function opWin(htmlFile,product,businessProcess,extension){var url; var serverName='https://www.esure.com'; switch(htmlFile){case"Start.go":switch(product){case"EM":case"FC":case"SW":url="/new/motor"; break; case"EH":case"SH":url="/new/home"; break; default:url="/new/motor" }break; case"Retrieve.go":url="/retrieve"; break; case"MTALogin.go":if(product==="EM"){switch(businessProcess){case 3:case 2:case 1:url="/retrieve/renewal"; break }}break; default:return }window.open(serverName+url,"txn_window") }function getQueryURL(){return }; function opWinUrl(url) { winOpt = "toolbar=no,width=800,height=545,status=yes,scrollbars=no,resizable=yes,menubar=no"; window.open(url, "petquote", winOpt); } function getRedEyeTag(pageName) { var nourl = escape(pageName); var tag = 'https://reporting.esure.com' + '/cgi-bin/rr.cgi/images/blank.gif?nourl=' + nourl + '&norefer=' + escape(window.document.referrer); document.write(''); } function f(v) { return (v<10)? "0"+v : v; } function getDoubleClickTag(type, cat, quoteid, policyno, cost) { var ID_uid_4456484110874=Math.round(10000000000000*Math.random()); var ID_now_4456484110874=new Date(); var ID_date_4456484110874= f(ID_now_4456484110874.getDate())+""+ f(ID_now_4456484110874.getMonth()+1)+""+ f(ID_now_4456484110874.getFullYear())+"" + f(ID_now_4456484110874.getHours())+""+ f(ID_now_4456484110874.getMinutes())+""+ f(ID_now_4456484110874.getSeconds()); var URN = ID_uid_4456484110874 + ID_date_4456484110874; var axel = Math.random()+""; var a = axel * 10000000000000; var src = 'http://' + 'fls.doubleclick.net'; if(quoteid && !policyno && !cost) { document.write(''); } else if(quoteid && policyno && cost) { document.write(''); } else if(cost == 'URN') { document.write(''); } else { document.write(''); } } // The following JS code is to support the travel pages function getRef() { var query = location.search.substring(1); var pos = query.indexOf('ref='); if (pos == -1) pos = query.indexOf('REF='); var ref = query.substring(pos+4,query.length); return ref; } function opWinTravel(product) { var website_url = "https://esure-travel-insurance.co.uk"; var ref = getRef(); var quoteWindow = window.open(website_url + "/TSiteWeb/cgi-dta/quote.mac/step1?insuranceType=T&insuranceGroup=ESR&insurancePolicy=" + product + "&ref=" + ref, "getquote","toolbar=no,status=yes,scrollbars=yes,menubar=no,resizable=yes,width=800,height=545"); quoteWindow.focus(); } function opWinStaticPage(url,windowName,height,width,scrollbars,menubar) { if (windowName == null || windowName == "") { windowName = ""; } if (height == null || height == "") { height = 800; } if (width == null || width == "") { width = 545; } if (scrollbars == null || (scrollbars != 'yes' && scrollbars != 'no')) { scrollbars = 'yes'; } if (menubar == null || (menubar != 'yes' && menubar != 'no')) { menubar = 'yes'; } winOpt = "toolbar=yes,width="+width+",height="+height+",status=yes,scrollbars="+scrollbars+",resizable=yes,menubar="+menubar; window.open(url, windowName, winOpt); }