/* Developed by Dubbele:punt Design - www.dubbelepunt.com */

// show/hide DIV
function showhide(target){
	// Close previous open DIV
	if(undefined === window.previous){
		previous = '';
	}else{
		layer_ref = document.getElementById(previous);
		layer_ref.style.display = 'none';
	}

	// Open current DIV
	layer_ref = document.getElementById(target);
	layer_ref.style.display = (layer_ref.style.display == 'block') ? 'none' : 'block';
	
	// Save current DIV
	previous = target;
}

// Show tijdschriften info
function showinfo(source, target){
	source_ref = document.getElementById(source);
	target_ref = document.getElementById(target + '_tijdschrift_info');

	target_ref.innerHTML = source_ref.innerHTML;
}

// swap images
function swap(target,img){
	if(document.images[target]){
		document.images[target].src="../images/"+img;
	}
}

// open popup window
function popup(url, w, h){
	window.open(url, "popup","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,height="+h+",width="+w);
}

// open popup window
function popup_tijdschrift(url, w, h){
	window.open(url, "popup","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,height="+h+",width="+w);
}

// open popup window
function popup_cadeaucheque(){
	if(typeof(document.forms.aanmelden) != 'undefined'){
		firstname = document.forms.aanmelden.to_firstname.value;
		lastname  = document.forms.aanmelden.to_lastname.value;
		map_type  = document.forms.aanmelden.map_type.value;
		map_from  = document.forms.aanmelden.map_vanaf.value;
	}else{
		firstname = '';
		lastname  = '';
		map_type  = '';
		map_from  = '';
	}
	
	// Build querystring
	query     = "?firstname="+firstname+"&lastname="+lastname+"&map_type="+map_type+"&map_from="+map_from;

	// Open window
	window.open("../aanmelden/cadeaucheque.php"+query, "popup","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,height=575,width=525");
}

/* Developed by Dubbele:punt Design - www.dubbelepunt.com */


