function menuOver(r){
	focusLayer(r);
	clearDelayedHideLayer(r);
	showLayer(r);
}

function menuOut(r){
	unfocusLayer(r);
	delayedHideLayer(r,300);
	if(is.ie4) {
    startTrans(r);
	}

}

function seeLayer(num){
	if (num == 1)
	layer1.style.zIndex = 99;
	if (num == 2)
	thesolutions.style.zIndex = 99;
	if (num == 3)
	theproducts.style.zIndex = 99;
	if (num == 4)
	newsevents.style.zIndex = 99;
	if (num == 5)
	services.style.zIndex = 99;
	if (num == 6)
	career.style.zIndex = 99;
	if (num == 7)
	contactus.style.zIndex = 99;
	if (num == 8)
	initial.style.zIndex = 99;
}


function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function Is() {
  var agent = navigator.userAgent.toLowerCase();
  this.major = parseInt(navigator.appVersion);
  this.minor = parseFloat(navigator.appVersion);
  this.ns = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));
  this.ns2 = (this.ns && (this.major == 3));
  this.ns3 = (this.ns && (this.major == 3));
  this.ns4b = (this.ns && (this.minor < 4.04));
  this.ns4 = (this.ns && (this.major >= 4));
  this.ie = (agent.indexOf("msie") != -1);
  this.ie3 = (this.ie && (this.major == 2));
  this.ie4 = (this.ie && (this.major >= 4));
  this.op3 = (agent.indexOf("opera") != -1);
  this.win = (agent.indexOf("win")!=-1);
  this.mac = (agent.indexOf("mac")!=-1);
  this.unix = (agent.indexOf("x11")!=-1);
}
var is = new Is();

if(is.ns4) {
  doc = "document.";
  sty = "";
  htm = ".document";
} else if(is.ie4) {
  doc = "document.all.";
  sty = ".style";
  htm = "";
}

menuLine = new Array(1);
menuLine[0] = "faqs";
menuLine[1] = "policyquote";
menuLine[2] = "declarationforms";
menuLine[3] = "firetariff";
menuLine[4] = "commercial";
menuLine[5] = "personal";
menuLine[6] = "claimsnotification";
menuLine[7] = "claimsprocedures";
menuLine[8] = "doc";


for(i=0;i<9;i++){
	eval(menuLine[i]+"hide = 0;");
	eval(menuLine[i]+"z = 9;");
};


function hideLayer1(objName){
	obj=eval(doc+objName+sty);
	obj.visibility="hidden";
	obj.position="absolute";
}
function showLayer1(objName){
	obj=eval(doc+objName+sty);
	obj.visibility="visible";
	obj.position="relative";
}

function hideLayer(objName){
	obj=eval(doc+objName+sty);
	obj.visibility="hidden";
}

function delayedHideLayer(objName,time){
	obj=eval(doc+objName+sty);
	str= objName+"hide = setTimeout(\"hideLayer('"+ objName + "')\","+time+" );";
	eval(str);
}

function clearDelayedHideLayer(objName){
	str= "clearTimeout("+ objName + "hide);";
	eval(str);
}

function showLayer(objName){
	obj=eval(doc+objName+sty);
	obj.visibility="visible";
}

function focusLayer(objName){
	obj=eval(doc+objName+sty);
	obj.zIndex = 99;
}

function unfocusLayer(objName){
	obj=eval(doc+objName+sty);
	obj.zIndex =obj.zIndex -1;
}

function moveLayer(objName,newx,newy){
	obj=eval(doc+objName+sty);	
	obj.left=newx;
	obj.top=newy;
}

function slideLayer(objName,step,newx,newy){
	if(step != 0){
		obj=eval(doc+objName+sty);
		newstep = step-1;
		var left = parseInt(obj.left);
		obj.left = ((newx - left)/step) + left;
		var top = parseInt(obj.top);
		obj.top = ((newy - top)/step) + top;
		str = "setTimeout(\"slideLayer('"+objName+"',"+newstep+","+newx+","+newy+")\",10);";
		eval(str);
	}
	if(step != 0){
	}
}

function right(r){
	if(is.ns4) {
		wrX=window.innerWidth-r -13;
	} else if(is.ie4) {
		wrX=document.body.clientWidth-r;
	}		
	return wrX;
}

function docHeight(){
 	if(is.ns4) {
		wrX=window.innerHeight;
	} else if(is.ie4) {
		wrX=document.body.clientHeight;
	}		
	return wrX;
}

function left(r){
	return r;
}

function center(r){
	if(is.ns4) {
		wrX=window.innerWidth-7;
	} else if(is.ie4) {
		wrX=document.body.clientWidth;
	}		
	wrX = wrX /2;
	return wrX;
}

function bottom(r){
	if(is.ns4) {
		wrY=window.innerHeight-r -7;
	} else if(is.ie4) {
		wrY=document.body.clientHeight-r;
	}		
	return wrY;
}

function top(r){
	if(is.ns4) {
		wrY=r-7;
	} else if(is.ie4) {
		wrY=r;
	}		
	return wrY;
}

function middle(r){
	if(is.ns4) {
		wrY=window.innerHeight -7;
	} else if(is.ie4) {
		wrY=document.body.clientHeight;
	}		
	wrY = wrY /2;
	return wrY;
}


function startTrans(r){
}

function positionAllMenuLayers(){
}



