function getCookie(name) {
	var i, cookies, value;
	cookies = document.cookie.split("; ");
	for (i = 0; i < cookies.length; i++) {
		value = cookies[i].split("=");
		if (value[0] == name) {
			return decodeURIComponent(value[1]);
		}
	}
	return null;
}


ckread = getCookie("bombsquad");
if(ckread) {
ckarray = ckread.split(",");
}

window.onload = function(){
setTimeout("urlbaroff()", 100);
if(ckread) {
   if(ckarray[0] == "m1"){
   document.links[0].href="m1.php";
   inhs();
   }else if(ckarray[0] == "m2"){
   document.links[0].href="m2.php";
   inhs();
   }else if(ckarray[0] == "m3"){
   document.links[0].href="m3.php";
   inhs();
   }else if(ckarray[0] == "m4"){
   document.links[0].href="m4.php";
   inhs();
   }else if(ckarray[0] == "m5"){
   document.links[0].href="m5.php";
   inhs();
   }
}else{
  document.cookie = "bombsquad=m1,0,0; expires=Thu, 1-Jan-2030 00:00:00 GMT";
   document.links[0].href="m1.php";
}}

function urlbaroff(){
scrollTo(0,1);
}

function inhs(){
var hsin = document.getElementById("hscire");
hsin.innerHTML = "HIGH SCORE : "+escape(ckarray[2]);
}