<!-- hide this stuff from other browsers 

var strAmp = "&"

function popUpConverter(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'top=150,left=190,toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=530,height=510');");
}
function popUpConverterFull(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'top=0,left=0,toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=1015,height=708');");
}


function switchfirstpanel()
{
document.getElementById('firstpanel').style.display = "block";
document.getElementById('secondpanel').style.display = "none";
document.getElementById('switcher1').style.fontWeight = "normal";
document.getElementById('switcher1').style.color = "#717171";
document.getElementById('switcher1').style.textDecoration ="none";
document.getElementById('switcher2').style.color = "#cc0000";
document.getElementById('switcher2').style.textDecoration ="underline";
document.getElementById('switcher2').style.fontWeight = "bold";
}

function switchsecondpanel()
{

document.getElementById('firstpanel').style.display = "none";
document.getElementById('secondpanel').style.display = "block";
document.getElementById('switcher2').style.fontWeight = "normal";
document.getElementById('switcher2').style.color = "#717171";
document.getElementById('switcher1').style.color = "#cc0000";
document.getElementById('switcher2').style.textDecoration ="none";
document.getElementById('switcher1').style.textDecoration ="underline";
document.getElementById('switcher1').style.fontWeight = "bold";

}

// Preload images for Rollovers
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

// Swap image states on Rollovers
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
  if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

// Restore image states on Rollovers
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

// Find Object
function MM_findObj(n, d) { //v4.01
  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);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

// Go to URL
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function setObjectDisplay(strObjectId, bShow)
{
    var oElement = document.getElementById(strObjectId);
    if (oElement != null)
    {
        if (bShow)
        {
            oElement.style.visibility = "visible";
            oElement.style.display = "block";
        }
        else
        {
            oElement.style.visibility = "hidden";
            oElement.style.display = "none";
        }
    }
}

function printMode(bIsPrintMode)
{
    // declare array holding the CSS id tags of all page elements to hide when in print mode
    var arrDivsToHide = new Array(
        "seotextdivid",
        "headerdivid",
        "footerdivid",
        "navigationdivid",
        "contentimagedivid",
        "sectionboxdivid",
        "benefits",
        "righttiledivid"
        );
    for (var i = 0; i < arrDivsToHide.length; i++)
    {
        // loop through and hide all elements in the array
        setObjectDisplay(arrDivsToHide[i], !bIsPrintMode);
    }
    // print the page while all the specified elements are hidden
    printpage();
    for (var i = 0; i < arrDivsToHide.length; i++)
    {
        // loop through and display all elements in the array once again
        setObjectDisplay(arrDivsToHide[i], bIsPrintMode);
    }
}

// Print Page functionality
function printpage() {
    window.print();  
}

// Form Validation Script.
function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}

//Reloads the window if Nav4 resized Netscape 4 Bug fix
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

// Open Popup browser window FULLSCREEN
function fullWindow(url) { 
    var str = "left=0,screenX=0,top=0,screenY=0,resizable,status=yes,scrollbars=yes";
    if (window.screen) {
      var ah = screen.availHeight - 50;
      var aw = screen.availWidth - 10;
      str += ",height=" + ah;
      str += ",innerHeight=" + ah;
      str += ",width=" + aw;
      str += ",innerWidth=" + aw;
    }
    win=window.open(url, "w", str);
    win.focus();
} 

// Open Popup browser window FULLSCREEN
function fullWindow2(url) { 
    var str = "left=0,screenX=0,top=0,screenY=0,resizable,status=yes,scrollbars=yes";
    if (window.screen) {
      var ah = screen.availHeight - 50;
      var aw = screen.availWidth - 10;
      str += ",height=" + ah;
      str += ",innerHeight=" + ah;
      str += ",width=" + aw;
      str += ",innerWidth=" + aw;
    }
    win=window.open(url, "z", str);
}

// Open Popup browser window STANDARD
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

// Close Popup browser window
function CloseBrWindow(theURL,winName,features) { //v2.0
  window.close(theURL,winName,features);
}

// Open Popup browser window CENTERED on screen - Code by Lukas Smola - 2002
function NewWinCenter(mypage, myname, w, h, scroll, stat) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
// to add resize functionality to page winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',status='+stat+''
win = window.open(mypage, myname, winprops);
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

// creates a new window up to the maximum height and width specified depending on available screenspace;
// dimensions are set to the maximum available if the requested height and/or width cannot be provided
function winOpenToMaxSpecified(sUrl, sName, sFeatures, iW, iH) {
	var aH = screen.availHeight - 50;
	var aW = screen.availWidth - 10;
	var iFinalH, iFinalW;
	if (iW > aW) {
		iFinalW = aW;
	} else {
		iFinalW = iW;
	}
	if (iH > aH) {
		iFinalH = aH;
	} else {
		iFinalH = iH;
	}
	var sFullFeatures = "";
	sFullFeatures += sFeatures;
	sFullFeatures += ", height=" + iFinalH;
    sFullFeatures += ", innerHeight=" + iFinalH;
    sFullFeatures += ", width=" + iFinalW;
    sFullFeatures += ", innerWidth=" + iFinalW;
    window.open(sUrl, sName, sFullFeatures);
}

//selected item.                  
var itemSelected = "";
var divSelected = "";

function setSelected(imageName,layerName) 
{
	if (itemSelected != ""){	
		if (imageName != itemSelected){
				if (document.layers && layerName != "") {
  				eval('document.' + divSelected + '.document.' + itemSelected + '.src = ' + itemSelected + 'off.src')
				}
				else {
  				eval('document.' + itemSelected + '.src = ' + itemSelected + 'off.src')
    		}
		}
	}
	itemSelected = imageName;
	divSelected = layerName;
}

//image on.
function turnOn(imageName,layerName) {
	if (document.layers && layerName != "") {
			eval('document.' + layerName + '.document.' + imageName + '.src = ' + imageName + 'on.src');
	}
	else {
  		if (eval('document.' + imageName)){
  			eval('document.' + imageName + '.src = ' + imageName + 'on.src');
  		} 
   }
}

//image off.
function turnOff(imageName,layerName) {
	if (imageName != itemSelected){
		if (document.layers && layerName != "") {
		// declare layer for netscape.	
		  		eval('document.' + layerName + '.document.' + imageName + '.src = ' + imageName + 'off.src');
		}
	 	else {
	  		if (eval('document.' + imageName)){
				eval('document.' + imageName + '.src = ' + imageName + 'off.src')
	  		} 	
		}
	}
}

//load form selection onChange.
function load(formName) {
	var list = document[formName].list;
	var str = list.options[list.selectedIndex].value;
	if (str != "") window.location.href = str;
}

// This function checks for DOM strategy, then returns an object reference.
function WM_checkIn(id) {
  if (document.all) {
    return document.all[id].style;
  } else if(document.layers) {
    return document.layers[id];
  }
}

/* Open-Show and Close-Hide Div Layer functions */
function toggle(targetId){
  if (document.getElementById){
		target = document.getElementById(targetId);
			 if ((target.style.display == "") || (target.style.display == "none")) {
			 		target.style.visibility = "visible";
					target.style.display = "block";
			 } else {
			 		target.style.visibility = "hidden";
					target.style.display = "none";
		}
	}
}

function openTarget(targetId){ 
	if (document.getElementById){ 
		target = document.getElementById(targetId); 
		if (target.style.display == ""){ 
			target.style.display = "block";
			target.style.visibility = "visible";
    	}
	} 
}

function closeTarget(targetId){ 
  if (document.getElementById){ 
	target = document.getElementById(targetId); 
		if (target.style.display == "block"){ 
			target.style.display = "none";
			target.style.visibility = "hidden";
    }
	} 
}

function appear() {
  for (i=0; i < arguments.length; i++) {
    if (document.getElementById && document.getElementById(arguments[i]) != null) {
         document.getElementById(arguments[i]).style.visibility='visible';
         document.getElementById(arguments[i]).style.display = 'inline';
    }
    else if (document.layers && document.layers[arguments[i]] != null)
        document.layers[arguments[i]].visibility = 'visible';
    else if (document.all && document.all[arguments[i]])
        document.all[arguments[i]].style.visibility = 'visible';
  }
}

function disappear() {
  for (i=0; i < arguments.length; i++) {
    if (document.getElementById && document.getElementById(arguments[i]) != null) {
         document.getElementById(arguments[i]).style.visibility='hidden';
         document.getElementById(arguments[i]).style.display = 'none';
    }
    else if (document.layers && document.layers[arguments[i]] != null)
        document.layers[arguments[i]].visibility = 'hidden';
    else if (document.all && document.all[arguments[i]])
         document.all[arguments[i]].style.visibility = 'hidden';
  }
}

// Show and Hide Layers
function MM_showHideLayers() { //v6.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; }
}

// toggle layer
if (document.layers) {
  var hidden = "hide";
  var visible = "show";
} else {
  var hidden = "hidden";
  var visible = "visible";
}
var toggleonoff = "toggle";

function changeVis() {
  if (document.layers || document.all) {
    var inc, endInc=arguments.length;
    // run through the args (objects) and set the visibility of each
    for (inc=0; inc<endInc; inc+=2) {
      // get a good object reference
      var daObj = WM_checkIn(arguments[inc]);
      if (arguments[inc+1] == hidden) {
        // hide the object
        daObj.visibility = hidden;
      } else if (arguments[inc+1] == visible) {
        // show the object
        daObj.visibility = visible;
      } else if (arguments[inc+1] == toggleonoff) {
        // toggle the object's visibility
        if (daObj.visibility == visible) {
          daObj.visibility = hidden;
        } else if (daObj.visibility == hidden) {
          daObj.visibility = visible;
        }
      }
    }
  }
}

// layer on.
function show() {
    // shows mulitple layers
    // does not work in NS4 with nested layers
    var args = show.arguments;
    for (var i=0; i<(args.length); i++) {
		if (document.getElementById) { 		// IE5, NS6
			if (document.getElementById(args[i])) document.getElementById(args[i]).style.visibility = 'visible';
		} else if (document.all) { 			// IE4
            if (document.all[args[i]]) document.all[args[i]].style.visibility = 'visible';
        } else if (document.layers) {		// NS4
            if (document.layers[args[i]]) document.layers[args[i]].visibility = 'visible';
        }
    }
}

// layer off.
function hide() {
    // hides mulitple layers
    // does not work in NS4 with nested layers
    var args = hide.arguments;
    for (var i=0; i<(args.length); i++) {
		if (document.getElementById) { 		// IE5, NS6
			if (document.getElementById(args[i])) document.getElementById(args[i]).style.visibility = 'hidden';
		} else if (document.all) { 			// IE4
            if (document.all[args[i]]) document.all[args[i]].style.visibility = 'hidden';
        } else if (document.layers) {		// NS4
            if (document.layers[args[i]]) document.layers[args[i]].visibility = 'hidden';
        }
    }
}

menu_status = new Array(); 

function Hide(theid){
	var switch_id = document.getElementById(theid);
	switch_id.className = 'hide';
	menu_status[theid]  = 'hide';
}

function showHide(theid){
	if (document.getElementById) {
		var switch_id = document.getElementById(theid);
		if (switch_id != null) {
			if (menu_status[theid] != 'show') {
				switch_id.className = 'show';
				menu_status[theid] = 'show';
			} else {
				switch_id.className = 'hide';
				menu_status[theid] = 'hide';
			}
		}
	}
}

/* image rollover functions */
function roll(id, newSrc) {
	var theImage = findImage(document, id, 0);
	if (theImage) theImage.src = newSrc;
}

function findImage(doc, name, j) {
	var theImage = false;
	if (doc.images) theImage = doc.images[name];
	if (theImage) return theImage;
	if (doc.layers) {
		for (j = 0; j < doc.layers.length; j++) {
			theImage = findImage(doc.layers[j].document, name, 0);
			if (theImage) return (theImage);
		}
	}
	return (false);
}

function highlightLink() {
	//Get filename from the URL
	thisPage = document.URL.substring(document.URL.lastIndexOf("/")+1 ,document.URL.length);
	//Loop through all the links
	for (i=0; i<document.links.length; i++ ) {
		//Get only the filename from the href of navigation link
		pageLink = document.links[i].href.substring(document.links[i].href.lastIndexOf("/")+1 ,document.links[i].href.length);
		pageID = document.getElementById("my_policy_manager.asp");
		//if the current filename & the link-ed file name are the same, change the background color of that link
		if (thisPage == pageLink) {
			//BG is the name of a class that I have defined, that sets background color to grey
			document.links[i].className = "overlineLink";
		}
	}
} 

function openFireSafetyPopup()
{
	winOpenToMaxSpecified('/home-insurance/fire-safety/index.asp','winFireSafety','left=0,screenX=0,top=0,screenY=0,resizable,status=yes,scrollbars=no', 701, 621);
}

function openCorporateInfo()
{
	winOpenToMaxSpecified('/corporate-affairs/default.asp','corporateInfo','left=0,screenX=0,top=0,screenY=0,resizable,status=yes,scrollbars=no', 818, 421);
}

function hideElement(elementId)
{
 document.getElementById(elementId).style.display = 'none';
}

function showElement(elementId)
{
 document.getElementById(elementId).style.display = 'block';
} 
// end hiding javascript -->