xset= 15; yset= 10;
var old,skin,iex=(document.all),yyy=-1000;
var ns4=document.layers
var ns6=document.getlayerid&&!document.all
var ie4=document.all
if (ns4)
skin=document.layer
else if (ns6)
kn=document.getlayerid("layer").style
else if (ie4)
skin=document.all.layer.style
if(ns4)document.capture(event.mousemove);
else { skin.visibility="visible"
skin.display="none"
} document.onmousemove=trackmuis;

function popup(msg,bak){
var content=""+msg+""; yyy=yset;
if(ns4){skin.document.write(content);skin.document.close();skin.visibility="visible"}
if(ns6){document.getlayerid("layer").innerHTML=content;skin.display=''}
if(ie4){document.all("layer").innerHTML=content;skin.display=''}
}

function trackmuis(e){
var x=(ns4||ns6)?e.pageX:event.x+document.body.scrollLeft; skin.left=x+xset;
var y=(ns4||ns6)?e.pageY:event.y+document.body.scrollTop; skin.top=y+yyy;
}

function go(){ yyy=-1000;
if(ns4){skin.visibility="hidden";}
else if (ns6||ie4)
skin.display="none" }


var bookmarkurl="http://www.crazygames.nl"
var bookmarktitle="Crazygames.nl - Online games"
function bookmark()
{
window.external.AddFavorite(bookmarkurl,bookmarktitle);
}

if (top.location != self.location) {
top.location = self.location.href
}

function SetAllCheckBoxes(FormName, FieldName, CheckValue)
{
	if(!document.forms[FormName])
		return;
	var objCheckBoxes = document.forms[FormName].elements[FieldName];
	if(!objCheckBoxes)
		return;
	var countCheckBoxes = objCheckBoxes.length;
	if(!countCheckBoxes)
		objCheckBoxes.checked = CheckValue;
	else
		// set the check value for all check boxes
		for(var i = 0; i < countCheckBoxes; i++)
			objCheckBoxes[i].checked = CheckValue;
}

function MoveList(obj,step){
	if (obj.selectedIndex > -1 && obj.selectedIndex + step > -1 && obj.selectedIndex + step < obj.options.length){
		Val = obj.options[obj.selectedIndex + step].value;
		Text = obj.options[obj.selectedIndex + step].text;
		obj.options[obj.selectedIndex + step].value = obj.options[obj.selectedIndex].value;
		obj.options[obj.selectedIndex + step].text = obj.options[obj.selectedIndex].text;
		obj.options[obj.selectedIndex].value = Val;
		obj.options[obj.selectedIndex].text = Text;
		obj.selectedIndex += step;
	}
}

