var menuClicked = false;

function menuColor(el, status)
{
	switch(el, status)
	{
		case 'over':
			document.getElementById(el).style.backgroundColor = '#E5D9E7';
			break;
		case 'overp':
			document.getElementById(el).style.backgroundColor = '#894B91';
			break;
		case 'out':
			document.getElementById(el).style.backgroundColor = '#FFFFFF';
			break;
		case 'outp':
			document.getElementById(el).style.backgroundColor = '#713279';
			break;
	}
}

function favorite() 
{
	external.AddFavorite('http://www.werksite.nl', 'Werksite.nl - Meer dan vacatures');
}

function homepageset(homeseturl) {
	homeseturl.style.behavior='url(#default#homepage)';
	homeseturl.setHomePage('http://www.werksite.nl');
	return false;
}

	var ie = document.all;
	var ns6 = document.getElementById && !document.all;
	var enabletip = false;
	var tid = 0;

	
	function ietruebody()
	{
		return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
	}
	
	function hvmenu(ver)
	{
		if (ns6||ie)
		{
	
			switch(ver)
			{
				case 'fun':
					hvobj.innerHTML=hvfun.innerHTML
					break;
				case 'bra':
					hvobj.innerHTML=hvbra.innerHTML
					break;
				case 'tijd':
					hvobj.innerHTML=hvtijd.innerHTML
					break;
			}
		
			enabletip = true;
			show(ver);
			return false;
		}
	}
	
	function show(ver)
	{
		if (enabletip)
		{
			switch(ver)
			{
				case 'fun':
					hvobj.style.top="143px"
					break;
				case 'bra':
					hvobj.style.top="168px"
					break;
				case 'tijd':
					hvobj.style.top="503px"
					break;
			}
			hvobj.style.left="138px"
			hvobj.style.display="block"
			hvobj.style.visibility="visible"
			if (typeof hide1!="undefined"){ hide1.style.visibility="hidden"; }
			if (typeof hide2!="undefined"){ hide2.style.visibility="hidden"; }
			clearTimeout(tid);
		}
	}
	
	function hvkill()
	{
		if (ns6||ie)
		{
	    tid = setTimeout('enabletip=false; hvobj.style.visibility="hidden"; hvobj.style.display="none"; if (typeof hide1!="undefined"){ hide1.style.visibility="visible"; } if (typeof hide2!="undefined"){ hide2.style.visibility="visible"; }', 250);
		}
	}

	function pop(url,name,w,h,s) 
	{
	var littlewin = null;
	Left= (screen.width) ? (screen.width-w) /2:0;
	Top= (screen.height) ? (screen.height-h) /2:0;
	sett='width='+w+',height='+h+',top='+Top+',left='+Left+',scrollbars='+s+',status=no';
		littlewin = window.open(url,name,sett);
		littlewin.focus();
	}
	
	// POPUNDER CODE
	
		var expDays = 1;
		
		var page = "http://www.werksite.nl/studies.php";
		var windowprops = "width=500,height=500,location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes";
		
		function GetCookie (name) {  
		var arg = name + "=";  
		var alen = arg.length;  
		var clen = document.cookie.length;  
		var i = 0;  
		while (i < clen) {    
		var j = i + alen;    
		if (document.cookie.substring(i, j) == arg)      
		return getCookieVal (j);    
		i = document.cookie.indexOf(" ", i) + 1;    
		if (i == 0) break;   
		}  
		return null;
		}
		function SetCookie (name, value) {  
		var argv = SetCookie.arguments;  
		var argc = SetCookie.arguments.length;  
		var expires = (argc > 2) ? argv[2] : null;  
		var path = (argc > 3) ? argv[3] : null;  
		var domain = (argc > 4) ? argv[4] : null;  
		var secure = (argc > 5) ? argv[5] : false;  
		document.cookie = name + "=" + escape (value) + 
		((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
		((path == null) ? "" : ("; path=" + path)) +  
		((domain == null) ? "" : ("; domain=" + domain)) +    
		((secure == true) ? "; secure" : "");
		}
		function DeleteCookie (name) {  
		var exp = new Date();  
		exp.setTime (exp.getTime() - 1);  
		var cval = GetCookie (name);  
		document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
		}
		var exp = new Date(); 
		exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
		function amt(){
		var count = GetCookie('count')
		if(count == null) {
		SetCookie('count','1')
		return 1
		}
		else {
		var newcount = parseInt(count) + 1;
		DeleteCookie('count')
		SetCookie('count',newcount,exp)
		return count
		   }
		}
		function getCookieVal(offset) {
		var endstr = document.cookie.indexOf (";", offset);
		if (endstr == -1)
		endstr = document.cookie.length;
		return unescape(document.cookie.substring(offset, endstr));
		}
		
		function checkCount() {
		var count = GetCookie('count');
		if (count == null) {
		count=1;
		SetCookie('count', count, exp);
		
		pund = window.open(page, "", windowprops);
		pund.blur()
		window.focus()
		
		}
		else {
		count++;
		SetCookie('count', count, exp);
		   }
		}		
		

function showCell(cellId)
{
	if(document.getElementById('cell'+cellId).style.display == "none")
	{
		document.getElementById('icon'+cellId).src="http://www.werksite.nl/images/site/open.gif";
		document.getElementById('cell'+cellId).style.display = "block";
	}
	else
	{
		document.getElementById('cell'+cellId).style.display = "none";
		document.getElementById('icon'+cellId).src="http://www.werksite.nl/images/site/closed.gif"  ;   
	} 
}