var locat=document.location;
var index2matchStr=/index2/;
var fofmatchStr=/fof/;
var calmatchStr=/calendar/;
var hassmatchStr=/hass/;
theIndicator=index2matchStr.test(document.location);
theIndicator1=fofmatchStr.test(document.location);
theIndicator2=calmatchStr.test(document.location);
theIndicator3=hassmatchStr.test(document.location);

//initialize positioning variables

var knomex=-500;
var knomey=-500;
var fairyx=-500;
var fairyy=-500;
var starx=-500;
var stary=-500;
var top_creaturex=-500;
var top_creaturey=-500;

//set positioning variables based on location

if(theIndicator==true){
	 knomex=167;
	 knomey=520;
	 fairyx=40;
	 fairyy=360;
	 starx=700;
	 stary=320;
	 top_creaturex=687;
	 top_creaturey=0;
}
else if(theIndicator1==true){
	 knomex=167;
	 knomey=420;
	 starx=700;
	 stary=550;
	 fairyx=300;
	 fairyy=700;
	 top_creaturex=687;
	 top_creaturey=0;
}
else if(theIndicator2==true){
	 //knomex=167;
	 //knomey=420;
	 starx=700;
	 stary=550;
	 fairyx=300;
	 fairyy=700;
	 top_creaturex=687;
	 top_creaturey=0;
}
else if(theIndicator3==true){
	 //knomex=167;
	 //knomey=420;
	 starx=700;
	 stary=550;
	 fairyx=600;
	 fairyy=600;
	 top_creaturex=687;
	 top_creaturey=0;
}

setPositions();

//run position setting code

function setPositions(){
if(document.all){
	document.all.knome.style.pixelTop=knomey;
	document.all.knome.style.pixelLeft=knomex;
	document.all.fairy.style.pixelTop=fairyy;
	document.all.fairy.style.pixelLeft=fairyx;
	document.all.star.style.pixelTop=stary;
	document.all.star.style.pixelLeft=starx;
	document.all.top_creature.style.pixelTop=top_creaturey;
	document.all.top_creature.style.pixelLeft=top_creaturex;
}
else if(document.getElementById){
	document.getElementById("knome").style.top=knomey;
	document.getElementById("knome").style.left=knomex;
	document.getElementById("fairy").style.top=fairyy;
	document.getElementById("fairy").style.left=fairyx;
	document.getElementById("star").style.top=stary;
	document.getElementById("star").style.left=starx;
	document.getElementById("top_creature").style.top=top_creaturey;
	document.getElementById("top_creature").style.left=top_creaturex;
	
}
else{
	document.knome.top=knomey;
	document.knome.left=knomex;
	document.fairy.top=fairyy;
	document.fairy.left=fairyx;
	document.star.top=stary;
	document.star.left=starx;
	document.top_creature.top=top_creaturey;
	document.top_creature.left=top_creaturex;
}


}
