		function popup(url,winName,width,height)
		{
        	var new_window = window.open(url,winName,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=0,width=' + width + ',height=' + height);
		}

		function RedirectWithID(ReDirectFlag)
		{
			
			if(ReDirectFlag == 0)
			{
				UrlString = "../QuoteBuy.htm"; //+ plsString; //landlords household
			}
			else if(ReDirectFlag == 1)
			{
				UrlString = "/lse/HH/HH.aspx"; //+ plsString; //holiday homes
			}
			else if(ReDirectFlag == 2)
			{
				UrlString = "/lse/HS/HS.aspx"; //+ plsString; //homesafe
			}
			else if(ReDirectFlag == 3)
			{
				UrlString = "/lse/RTSV/RTSV.aspx";// + plsString; //rent protection
			}
			else if(ReDirectFlag == 4)
			{
				UrlString = "https://www.letsure.co.uk/lse/LP/LP.aspx"; //+ plsString; //legal protection
			}
			else if(ReDirectFlag == 5)
			{
				UrlString = "https://www.letsure.co.uk/lse/TCI/TCI.aspx"; //+ plsString; //tenants contents insurance
			}
			var details = 'scrollbars=yes,status=yes,toolbar=no,resizable=1,location=no,menu=no,width=780,height=520,left=10,top=10';
			var win2 = open(UrlString,'win2',details);
			win2.open;
		}
	
		function NewWindow(mypage, myname, w, h, scroll) 
		{
			var winl = (screen.width - w) / 2;
			var wint = (screen.height - h) / 2;
			winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'

			win = window.open(mypage, myname, winprops)
			if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); 
			}
		}
		
		function GetCookieData()
		{
			var idx = document.URL.indexOf('?');
			var agentID = "";
			if (idx != -1) 
			{
				var pairs = document.URL.substring(idx+1, document.URL.length);
				var plsString = pairs.substring(0,10);
				agentID = plsString.substring(4,10);
			}	
				
			//add to cookie
			
			//var expDate = new Date();
			//expDate.setTime(expDate.getTime() +  (24 * 60 * 60 * 1000 * 1)); 
		
			
			var id = GetCookie('LetSureAgentID');
			if (id == null || id == "") 
			{
				//alert("no cookie");
				//SetCookie('LetSureAgentID', agentID, expDate, "/","", false);	
				createCookie('LetSureAgentID', agentID, 1);
			}
			else //get cookie
			{
				//alert("cookie found");
				//alert(id);
			}
		
			
		}
		
		function createCookie(name,value,days)
		{
			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 SetCookie (name, value, expires, path, domain, secure) 
		{  
		
			document.cookie = name + "=" + escape (value) + 
			((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
			((path == null) ? "" : ("; path=" + path)) +  
			((domain == null) ? "" : ("; domain=" + domain)) +    
			((secure == true) ? "; secure" : "");
			
			
			
			//var date = new Date();
			//date.setTime(date.getTime()+(days*24*60*60*1));
			//var expiress = "; expires="+date.toGMTString();
			//
			//else var expires = "";
			//document.cookie = name+"="+value+expiress+"; path=/";
			
		}
		
		function GetCookie (name) 
		{
			var arg = name + "=";
			var alen = arg.length;
			var clen = document.cookie.length;
			var i = 0;
			while (i < clen) 
			{
				var j = i + alen;
				if (document.cookie.substring(i, j) == arg)
				return getCookieVal (j);
				i = document.cookie.indexOf(" ", i) + 1;
				
				if (i == 0) break; 
			}
			return null;
		}  
		
		function getCookieVal (offset) 
		{
			var endstr = document.cookie.indexOf (";", offset);
			if (endstr == -1)
			endstr = document.cookie.length;
			return unescape(document.cookie.substring(offset, endstr));
		}
//pull down menu jump function
function JumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


