var popUpWindowInfo=null;var benefitsPopUp=null;function failsafeImg(){var b=new Image();b.src="images/blank.gif";for(var a=0;a<document.images.length;a++){if(!document.images[a].complete){document.images[a].src=b.src}if(typeof document.images[a].naturalWidth!="undefined"&&document.images[a].naturalWidth==0){}document.images[a].src=b.src}}function openBenefitsPopup(j,k,g,a){var b;var e;var d;var f;if(k==true&&a=="true"){for(var h=0;h<schemeEndorsments.length;h++){if(schemeEndorsments[h][2]==j){activeRow=h}}}if(a=="true"){e=encodeURIComponent(schemeEndorsments[activeRow][11]);b=encodeURIComponent(schemeEndorsments[activeRow][16]);d=encodeURIComponent(schemeEndorsments[activeRow][32]);f=encodeURIComponent(schemeEndorsments[activeRow][10])}else{e=encodeURIComponent(agentName.replace(/amp;/g,""));d=encodeURIComponent(insurer.replace(/amp;/g,""));b=encodeURIComponent(benifits.replace(/amp;/g,""));f=encodeURIComponent(brandImg)}var c=policyInfoPagesPath+"?provider="+e+"&insurer="+d+"&benefits="+b+"&schemeType="+selectedSchemeType+"&logo="+f+"&path="+policyInfoPagesPath+"&tab="+g;benefitsPopUp=window.open(c,"Information","toolbar=0,menubar=0,location=0,status=1,scrollbars=1,width=900,height=600,,screenX=0,screenY=200, bReplace=true");if(!benefitsPopUp||!benefitsPopUp.top){alert("please allow pop-ups in order to view your Policy Wording.")}else{benefitsPopUp.focus()}}function openPopUpInfo(a){popUpWindowInfo=window.open(a,"Information","toolbar=0,menubar=0,location=0,status=1,scrollbars=1,width=700,height=500,,screenX=0,screenY=200, bReplace=true");popUpWindowInfo.focus()}function capWords(e){var a,c,b,d,f;a=e.value.toLowerCase();stringLen=a.length;if(stringLen>0){for(i=0;i<stringLen;i++){if(i==0){c=a.substring(0,1).toUpperCase();d=a.substring(1,stringLen);a=c+d}else{c=a.substring(i,i+1);if(c==" "&&i<(stringLen-1)){c=a.substring(i+1,i+2).toUpperCase();b=a.substring(0,i+1);d=a.substring(i+2,stringLen);a=b+c+d}}}}e.value=a}function changeText(a){a.style.textTransform="capitalize";capWords(a)}function swapBI(b,d,e,a){var c;if(a==true){c=13}else{c=6}if(browserType.indexOf("Opera")==-1){if(document.getElementById(d).style.backgroundImage!="url("+e[c].src+")"||document.getElementById(d).style.backgroundImage==""){document.getElementById(d).style.backgroundImage="url("+e[b].src+")"}}else{if(document.getElementById(d).style.backgroundImage!='url("'+e[c].src+'")'||document.getElementById(d).style.backgroundImage==""){document.getElementById(d).style.backgroundImage="url("+e[b].src+")"}}}function swap(a,c,b){if(document.images){c.src=b[a].src}}function resizewindow(){if(document.all){var b=document.body.scrollWidth;var a=document.body.scrollHeight;a=a+80}else{var b=document.width;var a=document.height;a=a+100}window.resizeTo(b,a)}function openPopUpMH(a,b,h,g){var c=screen.width;var f=screen.height;var j=c*h;var e=f*g;var d=window.open(a,b,"toolbar=0,menubar=0,location=0,status=1,scrollbars=1,width="+j+",height="+e+",,screenX=0,screenY=200, bReplace=true");d.focus()};