<!--
var parentHandle = "parentHandle";

var iW = screen.availWidth;
var iH = screen.availHeight;

// ---------------------------------------------------------------------------------- //
// Launch a new window and focus if supported

function launchwin(winurl,winname,winfeatures) {
	
	window.open(winurl,winname,winfeatures);	
}

function launchwizard(winurl,winname) {

	winfeatures = "height=" + (iH-50) + ",width=" + (iW-10) + ",top=0,left=0,scrollbars=yes,status=yes,resizable=yes";
	window.open(winurl,winname,winfeatures);	
}

function launchpopup(winurl) {
	iL = (iW-320)/2;
	iT = (iH-335)/2;
	winfeatures = "height=335,width=320,top="+iT+",left="+iL+",scrollbars=no";

	window.open(winurl,'mtPopup',winfeatures);
} 

function launchlargepopup(winurl) {
	iL = (iW-320)/2;
	iT = (iH-380)/2;

	winfeatures = "height=380,width=320,top="+iT+",left="+iL+",scrollbars=no";

	window.open(winurl,'mtPopup',winfeatures);
} 

function SetFocus(controlId )
{
	var oControl = document.getElementById(controlId);
	oControl.focus();
}

// ---------------------------------------------------------------------------------- //
function MM_preloadImages() {
	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];}}
}

function MM_swapImgRestore() {
	var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) {
	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;
}

function MM_swapImage() {
	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];}
}

function displaySubNav(selectedSubNav) {
	document.getElementById('homeSubNav').style.display = 'none';
	document.getElementById('insuranceSubNav').style.display = 'none';
	document.getElementById('creditCardSubNav').style.display = 'none';
	document.getElementById('myMoreThanSubNav').style.display = 'none';
	document.getElementById('contactUsSubNav').style.display = 'none';
	document.getElementById('getAQuoteSubNav').style.display = 'none';
	document.getElementById(selectedSubNav).style.display = 'block';

	MM_swapImage('insurance','','Theme/MoreThan/Images/top_nav/off/insurance.gif',1);
	MM_swapImage('credit_card','','Theme/MoreThan/Images/top_nav/off/credit_card.gif',1);
	MM_swapImage('my_more_than','','Theme/MoreThan/Images/top_nav/off/my_more_than.gif',1);
	MM_swapImage('contact_us','','Theme/MoreThan/Images/top_nav/off/contact_us.gif',1);
	MM_swapImage('get_a_quote','','Theme/MoreThan/Images/top_nav/off/get_a_quote.gif',1)
}

// ---------------------------------------------------------------------------------- //
function showSubMenu(inputVar) {
	closeSubMenus();

	for (i=0; i < menuList.length ; i++) {
		if (menuList[i][0] == inputVar) {
			document.getElementById(menuList[i][1]).style.display = 'inline';
		}
	}
	
	document.getElementById('subnav').style.display = 'inline-block';
	for (i=0; i < swapImage.length ; i++) {
		MM_swapImage(swapImage[i][0],'',swapImage[i][1],1);
	}
	
	/*if(inputVar == 'GLOBAL5')
	{
		launchwizard('/Process/initial.aspx?Type=MYACCOUNT','Wizard');void(0);
	}*/
}

function closeSubMenus() {
	for (i=0; i < menuList.length ; i++) {
		document.getElementById(menuList[i][1]).style.display = 'none';
	}
}

function PrintPage() {
	window.print();
}

function PrintAndClose() {
	PrintPage();
	window.close();
}

//function refreshOnLoginStateChange(isloggedin)
//{
//	var mainUrl = unescape(window.location.pathname);
	// check page state via 'Log In/Log Off' element of subsidiary menu
	// 'SubsidiaryLink_SS02' shows the page is in a logged out state
	// whereas 'SubsidiaryLink_MISC22' shows a logged in state
	// isloggedin is the current user state passed from the wizard
//	if ((document.getElementById('SubsidiaryLink_SS02')!= null && isloggedin) || (document.getElementById('SubsidiaryLink_MISC22')!= null && !isloggedin))
//	{
//		redirectMain(mainUrl);
//	}
//}

//------------------------------------------------------------------------------//
//Added functions for solving the non-SSL parent being refreshed by SSL child
//As the user would not get this far without cookies this is the mechanism whereby the 
//parent window handle is stored for calling across the SSL/non-SSL boundary. 
//
//This method is used because properties on the parent DOM can not be updated 
//nor functions called (even developer defined) to do the same thing

function resolveParentUrl(){
	var url = unescape(window.location.href);
	return url;
}

function winClose(){	
	window.close();
}

function createCookie(name, value, days)
{
	//This function assumes NO sub-domains (a domain would then have to be added to
	//document.cookie definition at the end)
	if (days)
	{
		var date = new Date();
		date.setTime(date.getTime()+ (days*24*60*60*1000));
		var expires = "; expires=" + date.toGMTString();
	}
	else var expires = "";
	
	document.cookie = name + "=" + value + expires + "; path=/";		
}

function readCookie(name)
{
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i = 0; i < ca.length; i++)
	{
		var c = ca[i];
		while (c.charAt(0) == ' ') c = c.substring(1, c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
	}
	return null;
}

function reloadParent(closeChildWindow){
	//This has to be called from the child window - looks for a specific window handle	
	window.opener.location.href = readCookie(parentHandle);
	if(closeChildWindow){
	document.body.style.cursor = 'wait';	
	self.setTimeout('winClose()', 2000);
	}
}

function loadParent(url,closeChildWindow){
	// This is called from the wizard window and loads the parent. Note that the urls called from the wizard window must be on the same port i.e. https
	window.opener.location.href= url;
	if(closeChildWindow){
	document.body.style.cursor = 'wait';	
	self.setTimeout('winClose()', 2000);
	}
}

function loadWindows(mainUrl, wizardUrl){

	launchwizard(wizardUrl,'Wizard');
	window.location.href = mainUrl;
	
}




//-->