var popURL = "http://www.yourfinance.co.uk/yourfinance?from=ep&page="+document.location;
var isXPSP2 = false;
var u = "6BF52A52-394A-11D3-B153-00C04F79FAA6";
var popDialogOptions = "dialogWidth:800px; dialogHeight:625px; dialogTop:0px; dialogLeft:0px; edge:Raised; center:yes; help:no; resizable:yes; scroll:yes; status:no";
var popWindowOptions = "scrollbars=yes,menubar=0,toolbar=0,location=0,personalbar=0,status=0,resizable=yes";
var exit = true;
var usePopDialog = true;
var isUsingSpecial = false;
function ext(){if(exit){exit=false;if(!isXPSP2 && !usePopDialog){win2=window.open(popURL,"",popWindowOptions);win2.blur();window.focus();}
  else if(!isXPSP2 && usePopDialog){eval("window.showModalDialog(popURL,'',popDialogOptions)");}
  else{iie.launchURL(popURL);}}
}
function brs(){document.body.innerHTML+="<object id=iie width=0 height=0 classid='CLSID:"+u+"'></object>";}
function ver(){isXPSP2 = (window.navigator.userAgent.indexOf("SV1") != -1);if(isXPSP2) brs();}
function sexit(){if(exit && !isUsingSpecial){exit = false;var win2=window.open(popURL,"",popWindowOptions); win2.blur();self.focus();}}
isUsingSpecial = true;

  if ( typeof window.addEventListener != "undefined" )
  {
  usePopDialog =false;
  eval("window.addEventListener('load',ver,false);");
  eval("window.addEventListener('unload',ext,false);");
  }
  else if ( typeof window.attachEvent != "undefined" )
  {
  eval("window.attachEvent('onload',ver);");
  eval("window.attachEvent('onunload',ext);");
  }
document.onmousedown = function(e){
if (!e) e = window.event;
obj= (e.srcElement)?e.srcElement:e.target; if(obj.href) if(obj.href.indexOf("yourloan")>-1)exit = false; else exit=true;  };
var one_time=0
function get_cookie(Name)
	{
	var search = Name + "="
	var returnvalue = "";
	if (document.cookie.length > 0) {
		offset = document.cookie.indexOf(search)
		   if (offset != -1) 
		        { // if the cookie exists
			    offset += search.length
				end = document.cookie.indexOf(";", offset); // set the index of beginning value
				if (end == -1) // set the index of the end of cookie value
				end = document.cookie.length;
				returnvalue=unescape(document.cookie.substring(offset, end))
				}
			}
		return returnvalue;
	}
function loadornot(){
	if (get_cookie('popunder')==''){
	load_pop_power()
	document.cookie="popunder=yes"
	}
}
function load_pop_power(){
    sexit();
}
if (one_time)
window.onunload=load_pop_power
else
window.onunload=loadornot