
var isLoggedIn=false;var ShowNewStyle;function checkCR(evt)
{try
{var evt=(evt)?evt:((event)?event:null);var node=(evt.target)?evt.target:((evt.srcElement)?evt.srcElement:null);if((evt.keyCode==13)&&((node.type=="text")||(node.type=="checkbox")||(node.type=="radio")||(node.type=="select-one")))
return false;}
catch(ex)
{return true;}
return true;}
document.onkeypress=checkCR;function IEVersion()
{var ieversion;if(/MSIE (\d+\.\d+);/.test(navigator.userAgent))
ieversion=new Number(RegExp.$1)
return ieversion;}
function findPosition(oElement){if(typeof(oElement.offsetParent)!='undefined'){for(var posX=0,posY=0;oElement;oElement=oElement.offsetParent){posX+=oElement.offsetLeft;posY+=oElement.offsetTop;}
return[posX,posY];}else{return[oElement.x,oElement.y];}}
function removeNL(s){return s.replace(/[\n\r]/g,'<br/>');}
function QuoteProcessMM_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;}
var quickQuotePreloadedImages;function QuoteProcessMM_preloadImages(){var d=document;if(d.images){if(!d.MM_p)d.MM_p=new Array();var i,j=d.MM_p.length,a=QuoteProcessMM_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];}}
quickQuotePreloadedImages=QuoteProcessMM_preloadImages.arguments;}
function QuoteProcessMM_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=QuoteProcessMM_findObj(n,d.layers[i].document);if(!x&&d.getElementById)x=d.getElementById(n);return x;}
function QuoteProcessMM_swapImage(){var i,j=0,x,a=QuoteProcessMM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3)
if((x=QuoteProcessMM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc)x.oSrc=x.src;x.src=a[i+2];}}
function NumberValidator(e,txtAgeBand,errorMessage,zeroAllowed)
{var keyCode;if(document.all)
keyCode=event.keyCode;else
keyCode=e.which;if(keyCode==0||keyCode==8||keyCode==9||keyCode==13||keyCode==16||(keyCode>48&&keyCode<=57)||(zeroAllowed&&keyCode==48)||(!zeroAllowed&&keyCode==48&&!isNaN(parseInt(txtAgeBand.value))&&parseInt(txtAgeBand.value)>0))
return true;else
{alert(errorMessage);txtAgeBand.focus();e.returnValue=false;return false;}}
function NumberValidator2(e,txtAgeBand,errorMessage)
{if(document.all)
if((event.keyCode==86)&&(event.ctrlKey)){alert(errorMessage);txtAgeBand.focus();return false;}
else
if((e.which==86)&&(e.ctrlKey)){alert(errorMessage);txtAgeBand.focus();return false;}}
function NumberValidator3(e,txtAgeBand,errorMessage,zeroAllowed)
{if(txtAgeBand.value.length>0)
{if(isNaN(parseInt(txtAgeBand.value))||(!zeroAllowed&&parseInt(txtAgeBand.value)==0))
{txtAgeBand.value="";alert(errorMessage);txtAgeBand.focus();return false;}
else
{txtAgeBand.value=parseInt(txtAgeBand.value);return true;}}}
function winopen(theUrl,useFrame,width,height,aq)
{if(useFrame!=null&&useFrame=="1")
{if(navigator.userAgent.indexOf("MSIE")!=-1)
{var base=document.getElementsByTagName("base");if(base!=null)
theUrl=base[0].href+"/frame/"+theUrl;}
else
theUrl="/frame/"+theUrl;}
width=width==null||undefined?410:width;height=height==null||undefined?420:height;var win=window.open(theUrl,"photos","scrollbars=yes,location=no,toolbar=no,left=380,top=200,width="+width+",height="+height+",resizable=1");if(win)
win.focus();}
function SelectTab(quickQuotePolicyType,defaultScheme)
{if(quickQuotePolicyType!=null)
document.getElementById(quickQuotePolicyType).className="tab selected";else if(defaultScheme!=null)
document.getElementById(defaultScheme).className="tab selected";}
var offsetxpoint=-60;var offsetypoint=20;var ie=document.all;var ns6=document.getElementById&&!document.all;var enabletip=false;if(ie||ns6)
var tipobj=document.all?document.all["dhtmltooltip"]:document.getElementById?document.getElementById("dhtmltooltip"):"";function ietruebody(){return(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;}
function ddrivetip(thetext,thecolor,thewidth,theheight){if(ns6||ie){tipobj.style.display='block';if(typeof thewidth!="undefined")tipobj.style.width=thewidth+"px";if(typeof theheight!="undefined")tipobj.style.height=theheight+"px";if(typeof thecolor!="undefined"&&thecolor!="")tipobj.style.backgroundColor=thecolor;if(document.all)
tipobj.innerHTML=thetext+(IEVersion()<7?"":"<iframe></iframe>");else
tipobj.innerHTML=thetext;enabletip=true;return false;}}
var gtipw,gtiph;function ddrivetipForGroupType(thecolor,thewidth,theheight){if(ns6||ie){tipobj.style.display='block';if(typeof thewidth!="undefined")tipobj.style.width=thewidth+"px";if(typeof theheight!="undefined")tipobj.style.height=theheight+"px";if(typeof thecolor!="undefined"&&thecolor!="")tipobj.style.backgroundColor=thecolor;if(document.all)
tipobj.innerHTML=groupTypeHelpText+(IEVersion()<7?"":"<iframe></iframe>");else
tipobj.innerHTML=groupTypeHelpText;enabletip=true;return false;}}
function positiontip(e){if(enabletip){var curX=(ns6)?e.pageX:event.clientX+ietruebody().scrollLeft;var curY=(ns6)?e.pageY:event.clientY+ietruebody().scrollTop;var controlContainerLeft=0;var controlContainerTop=0;if(ShowNewStyle&&$("#seoblurbandcontrolcontainer").length>0)
{controlContainerLeft=$("#seoblurbandcontrolcontainer").position().left;controlContainerTop=$("#seoblurbandcontrolcontainer").position().top;}
curX-=controlContainerLeft;curY-=controlContainerTop;var rightedge=ie&&!window.opera?ietruebody().clientWidth-event.clientX-offsetxpoint:window.innerWidth-e.clientX-offsetxpoint-20;var bottomedge=ie&&!window.opera?ietruebody().clientHeight-event.clientY-offsetypoint:window.innerHeight-e.clientY-offsetypoint-20;var leftedge=(offsetxpoint<0)?offsetxpoint*(-1):-1000;if(rightedge<tipobj.offsetWidth)
{tipobj.style.left=ie?ietruebody().scrollLeft+event.clientX-tipobj.offsetWidth-controlContainerLeft+"px":window.pageXOffset+e.clientX-tipobj.offsetWidth-controlContainerLeft+"px";}
else if(curX<leftedge)
{tipobj.style.left="5px";}
else
{tipobj.style.left=curX+offsetxpoint+"px";}
if(bottomedge<tipobj.offsetHeight)
{tipobj.style.top=ie?ietruebody().scrollTop+event.clientY-tipobj.offsetHeight-offsetypoint-controlContainerTop+"px":window.pageYOffset+e.clientY-tipobj.offsetHeight-offsetypoint-controlContainerTop+"px";}
else
{tipobj.style.top=curY+offsetypoint+"px";}
tipobj.style.visibility="visible";}}
function hideddrivetip(){if(ns6||ie){enabletip=false;tipobj.style.visibility="hidden";tipobj.style.left="-1000px";tipobj.style.backgroundColor='';tipobj.style.width='0px';tipobj.style.height='0px';tipobj.style.display='none';}}
document.onmousemove=positiontip;function InitDHTMLTooltip(){tipobj=document.all?document.all["dhtmltooltip"]:document.getElementById?document.getElementById("dhtmltooltip"):"";}
if(window.addEventListener)
window.addEventListener("load",InitDHTMLTooltip,false);else if(window.attachEvent)
window.attachEvent("onload",InitDHTMLTooltip);var sqmds=0;var txtsqrclientid;var saveQuoteWithRef=false;function loadSQMD(){if(sqmds==0){$("#sqmdbg").css({"opacity":"0.7"});$("#sqmdbg").fadeIn("slow");$("#sqmd").fadeIn("slow");sqmds=1;}}
function disableSQMD(){if(sqmds==1){$("#sqmdbg").fadeOut("slow");$("#sqmd").fadeOut("slow");sqmds=0;}}
function centerSQMD(){var windowWidth=document.documentElement.clientWidth;var windowHeight=document.documentElement.clientHeight;var popupHeight=$("#sqmd").height();var popupWidth=$("#sqmd").width();var scrollTop=$(window).scrollTop();if(scrollTop==undefined)scrollTop=0;var containerTop=$("#seoblurbandcontrolcontainer").length>0?$("#seoblurbandcontrolcontainer").position().top:0;var containerLeft=$("#seoblurbandcontrolcontainer").length>0?$("#seoblurbandcontrolcontainer").position().left:0;$("#sqmd").css({"position":"absolute","top":windowHeight/2-popupHeight/2-containerTop+scrollTop,"left":windowWidth/2-popupWidth/2-containerLeft});if($.browser.msie&&parseInt($.browser.version,10)<7)
windowHeight=document.body.clientHeight;$("#sqmdbg").css({"height":windowHeight,"width":windowWidth});}
function loadUQMD(){if(sqmds==0){$("#uqmdbg").css({"opacity":"0.2"});if($.browser.msie)
{$("#uqmdbg").show();$("#uqmd").show();}
else
{$("#uqmdbg").fadeIn("slow");$("#uqmd").fadeIn("slow");}
sqmds=1;}
if(showQuoteSavedMsg)
{$("#quotesaved").css("display","block");showQuoteSavedMsg=false;}
else
$("#quotesaved").css("display","none");$("#uqmd").liquidCanvas("[gradient{from:rgba(255, 255, 255, 1.0); to:rgba(255, 255, 255, 1.0);} border{color:rgb(0,74,147); width:1} ] => roundedRect{radius:25}");}
function disableUQMD(){if(sqmds==1){if($.browser.msie)
{$("#uqmdbg").hide();$("#uqmd").hide();}
else
{$("#uqmdbg").fadeOut("slow");$("#uqmd").fadeOut("slow",function(){$('#uqmdouter > canvas').each(function(index){$(this).remove();});});}
sqmds=0;}
$('#uqmdouter > .lcanvas').each(function(index){$(this).remove();});}
function centerUQMD(){var windowWidth=document.documentElement.clientWidth;var windowHeight=document.documentElement.clientHeight;var popupHeight=(isPQE&&$.browser.msie?150:$("#uqmd").height());var popupWidth=$("#uqmd").width();var scrollTop=$(window).scrollTop();if(scrollTop==undefined)scrollTop=0;var containerTop=$("#seoblurbandcontrolcontainer").length>0?$("#seoblurbandcontrolcontainer").position().top:0;var containerLeft=$("#seoblurbandcontrolcontainer").length>0?$("#seoblurbandcontrolcontainer").position().left:0;$("#uqmd").css({"position":"absolute","top":windowHeight/2-popupHeight/2-containerTop+scrollTop,"left":windowWidth/2-popupWidth/2-containerLeft});$("#uqmd").css("height",150);if($.browser.msie&&parseInt($.browser.version,10)<7)
windowHeight=document.body.clientHeight;$("#uqmdbg").css({"height":windowHeight,"width":windowWidth});}
function loadVEMD(){if(sqmds==0){$("#vemdbg").css({"opacity":"0.2"});if($.browser.msie)
{$("#vemdbg").show();$("#vemd").show();}
else
{$("#vemdbg").fadeIn("slow");$("#vemd").fadeIn("slow");}
sqmds=1;}
$("#vemd").liquidCanvas("[gradient{from:rgba(255, 255, 255, 1.0); to:rgba(255, 255, 255, 1.0);} border{color:rgb(0,74,147); width:1} ] => roundedRect{radius:25}");}
function disableVEMD(){if(sqmds==1){if($.browser.msie)
{$("#vemdbg").hide();$("#vemd").hide();}
else
{$("#vemdbg").fadeOut("slow");$("#vemd").fadeOut("slow",function(){$('#vemdouter > canvas').each(function(index){$(this).remove();});});}
sqmds=0;}
$('#vemdouter > .lcanvas').each(function(index){$(this).remove();});}
function centerVEMD(errorHTMLHeight){var windowWidth=document.documentElement.clientWidth;var windowHeight=document.documentElement.clientHeight;var popupHeight=(isPQE&&$.browser.msie?150:$("#uqmd").height());var popupWidth=$("#vemd").width();var scrollTop=$(window).scrollTop();if(scrollTop==undefined)scrollTop=0;var containerTop=$("#seoblurbandcontrolcontainer").length>0?$("#seoblurbandcontrolcontainer").position().top:0;var containerLeft=$("#seoblurbandcontrolcontainer").length>0?$("#seoblurbandcontrolcontainer").position().left:0;$("#vemd").css({"position":"absolute","top":windowHeight/2-popupHeight/2-containerTop+scrollTop,"left":windowWidth/2-popupWidth/2-containerLeft});if(typeof(errorHTMLHeight)==undefined||errorHTMLHeight<75)
errorHTMLHeight=75;var vemdHeight=errorHTMLHeight+75;$("#vemdErrorList").css("height",errorHTMLHeight);$("#vemd").css("height",vemdHeight);if($.browser.msie&&parseInt($.browser.version,10)<7)
windowHeight=document.body.clientHeight;$("#vemdbg").css({"height":windowHeight,"width":windowWidth});}
function ValidSaveQuoteRef()
{if($("#"+txtsqrclientid).val().length>400)
{alert("Reference name for quote has more characters than the maximum allowed, which is 400.");return false;}
else
return true;}
function ActionUpdate(){var action=location.href;if(action.indexOf("localhost")==-1){if(location.protocol=="http:"){action="https://"+action.substring(7,action.length);document.aspnetForm.action=action;}}}