//Flash object
function flash(swf, w, h)
{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+w+'" height="'+h+'">');
	document.write('<param name="allowScriptAccess" value="always"><param name="wmode" value="transparent"><param name="movie" value="'+swf+'"><embed src="'+swf+'" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed></object>');
}

//MENU open/dicht
var hoogste;

function showHide(id) { 
	if(hoogste && hoogste != id){

		var el = document.getElementById(hoogste);
		el.style.display = 'none';
		
	}else{
		if(hoogste && hoogste == id){
			var elm = document.getElementById(id); 
			elm.style.display = (elm.style.display=='none'?'inline':'none'); 
		}
	}

	if(hoogste != id){
		var elm = document.getElementById(id); 
		elm.style.display = (elm.style.display=='none'?'inline':'none'); 
	}
	
	hoogste = id;
	
}

//AJAX Functie
function ajaxFunction(url, id){
	var xmlHttp;
	try{
		// Firefox, Opera 8.0+, Safari
    	xmlHttp=new XMLHttpRequest();
	}
  	catch (e){
    	// Internet Explorer
    	try{
      		xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      	}
    	catch (e){
      		try{
        		xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        	}
      		catch (e){
        		alert("Your browser does not support AJAX!");
        		return false;
        	}
      	}
    }
    xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState==4){
			document.getElementById(id).style.cursor = ("auto");
			div = document.getElementById(id);
			div.innerHTML = xmlHttp.responseText;
			load(); hideLoader('loader');
			//document.write(xmlHttp.responseText);
    	}else{
			document.getElementById(id).style.cursor = ("wait");
			document.getElementById(id).innerHTML = "test";
		}
 	}
    xmlHttp.open("GET",url,true);
    xmlHttp.send(null);
}

//OPEN popup
function openPopup(URL, x, y, naam){
	var winl = (screen.width - x) / 2;
	var wint = (screen.height - y) / 2;
	vWinCal=window.open(URL, naam,"toolbar=no,width="+x+",height="+y+", top="+wint+", left="+winl+",status=no,scrollbars=no,resize=no,menubar=no,toolbar=no");
}

