
function itemover(obj,nummer) {
	try {
		obj.className="menuover"
		var obj2 = document.getElementById("bul"+nummer)
		obj2.src= pad+"bullet3.png"
	}
	catch(e){}
}

function itemout(obj,nummer) {
	try {
		obj.className="menuitem"
		var obj2 = document.getElementById("bul"+nummer)
		obj2.src= pad+"bullet2.png"
	}
	catch(e){}
}

function minover(naam) {
	var temp = naam
	if(temp.substring(temp.length-4, temp.length) == "over") {
		temp = temp.substring(0, temp.length-4)
	}
	return temp
}

function shopover(obj) {
	var temp = minover(obj.className)
	try {
		obj.className= temp+"over"
	}
	catch(e){}
}

function shopout(obj) {
	var temp = minover(obj.className)
	try {
		obj.className=temp
	}
	catch(e){}
}

function openMandje(doel) {
	obj = $(doel)
	obj.set('morph', {duration: 1000,link: 'chain'})
	obj.morph('.mandopen')
}

function sluitMandje(doel) {
	obj = $(doel)
	obj.morph('.manddicht').className="manddicht"
}

function wasvoorschrift(taal) {
	loadxhr("wasvoorschrift.php?taal="+taal,"wassen")
	openMandje("wassen")
}

function loadxhr(urlin,doel) {
url = urlin+"&rnd="+rndnum()
try {
	req = new XMLHttpRequest();
	     }

	catch (e1) {
		try {
		     req = new ActiveXObject("Microsoft.XMLHTTP"); 
		      }
		catch (e2) {
			req=new ActiveXObject("Msxml2.XMLHTTP");
			      
			}
		}
  if (req != undefined) {
    req.onreadystatechange = function() {loadDone(url,doel);};
    req.open("GET", url, true);
    req.send("");
  }
}

function loadDone(url,doel) {
   if (req.readyState == 4) { 
     if (req.status == 200) {
	if(doel=="mand") {
	        document.location = document.location+"&mand=1&rnd="+rndnum()
	}
	if(doel=="wassen") {
		//alert(req.responseText)
		document.getElementById("wassen").innerHTML = req.responseText
	}
	if(doel=="reload") {
	        document.location = document.location+"&rnd="+rndnum()
	}
     } 
        else {}    	
   }
   else {}
}

function rndnum() {
	return Math.round(Math.random()*1000)
}

window.size = function()
{
	var w = 0;
	var h = 0;

	//IE
	if(!window.innerWidth)
	{
		//strict mode
		if(!(document.documentElement.clientWidth == 0))
		{
			w = document.documentElement.clientWidth;
			h = document.documentElement.clientHeight;
		}
		//quirks mode
		else
		{
			w = document.body.clientWidth;
			h = document.body.clientHeight;
		}
	}
	//w3c
	else
	{
		w = window.innerWidth;
		h = window.innerHeight;
	}
	return {width:w,height:h};
}


function smallscreens() {
	try {
		var hoog = window.size().height - 480
		if (hoog <0) { hoog = 5}
		if (hoog < 125) {
			document.getElementById("bboven").style.top = hoog+"px"
			document.getElementById("bonder").style.top = (hoog-15) +"px"
			document.getElementById("mand").style.top = (hoog-15) +"px"
			document.getElementById("wassen").style.top = (hoog-15) +"px"

		}
		else {
			document.getElementById("bboven").style.top = "125px"
			document.getElementById("bonder").style.top = "110px"
			document.getElementById("mand").style.top = "110px"
			document.getElementById("wassen").style.top = "110px"
		}
	}
	catch(e) {}

}

