<!-- Popup script on exit supplied by hypergurl.com. -->
<!-- http://www.hypergurl.com -->

<!-- Begin
var expDays = 1; // number of days the cookie should last
var exp = new Date(); 
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));

function GetCookie (cName) {  
var arg = cName + "=";  
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 SetCookie (cName, cValue) {  
	var argv = SetCookie.arguments;  
	var argc = SetCookie.arguments.length;  
	var expires = (argc > 2) ? argv[2] : null;  
	var path = (argc > 3) ? argv[3] : null;  
	var domain = (argc > 4) ? argv[4] : null;  
	var secure = (argc > 5) ? argv[5] : false;  
	document.cookie = cName + "=" + escape (cValue) + 
		((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
		((path == null) ? "" : ("; path=" + path)) +  
		((domain == null) ? "" : ("; domain=" + domain)) +    
		((secure == true) ? "; secure" : "");
}
function DeleteCookie (cName) {  
	var exp = new Date();  
	exp.setTime (exp.getTime() - 1); 
	var cval = GetCookie (cName);  
	document.cookie = cName + "=" + cval + "; expires=" + exp.toGMTString();
}
function amt(){
	var count = GetCookie('count')
	if(count == null) {
		SetCookie('count','1')
		return 1
	}else{
		var newcount = parseInt(count) + 1;
		DeleteCookie('count')
		SetCookie('count',newcount,exp)
		return count
   }
}
function getCookieVal(offset) {
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
		endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}
//---------------------------
// -s  function for popTop 
//---------------------------
var pgName = "/popTop.asp";
var wdwSetting = "location=no,directories=no,status=no,menubar=no,toolbar=no,scrollbars=no,resizable=no,width=635,height=430";

//calc today - midnight 
var dexp = new Date();
dexp.setUTCHours(23);
dexp.setUTCMinutes(59);
dexp.setUTCSeconds(01);

function winPopper (cName, cValue) {
	//.... increament the SBOWincnt

	var icount = GetCookie(cName);
	if (icount == null)	  icount=1;
	else{
		if (cValue==null)	icount++;
			else			icount= cValue;
	}	
	SetCookie(cName, icount, dexp);
}
function popTop() {
	var icount = GetCookie('SBOcnt');
	var iWin = GetCookie('SBOWincnt');		//increamented only when pop-leads clicked-on by user
	
	if (self == top && self.name == 'pop_window') return;
	else{
	 if (self == top && self.name != 'pop_window') {
	 	//... dont popup another if window is a pop-lead clicked-on window
		if (icount == null)	icount=1;
		 else				icount++;
		SetCookie('SBOcnt', icount, dexp);

		//-- SBOwinSess Cookie found then popup already opened, so exit
		icount = GetCookie('SBOwinSess');
		if  (icount != null)  return;
		SetCookie('SBOwinSess','1');			//-- SBOwinSess cookie expires when browser session closes

		var icount1 = GetCookie('SBOcnt');
		if (icount1 != null) {	
			//alert ('iWin=' +iWin);
			if (iWin == null || iWin < 3) {	
				//...if 3 pops-leads clicked-on by user then stop, no more popups for today
				mynewWindow = window.open(pgName,'popTop', wdwSetting);			
				if (mynewWindow != null)	mynewWindow.blur();
			}
		}	
	}else{
	top.location = self.location;
	}
   }
}
// -e

var win=null;
var mypage= "/popSBO.asp";
var myname= "sbopop";
var w= "312";
var h= "400";
var pos= "center";
var infocus= "back";
function popPhone() {
if (self == top && self.name == 'new_sbo') return;
	 else{
	 if (self == top && self.name != 'new_sbo') {	 
	
		if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
		if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
		else if((pos!='center' && pos!="random") || pos==null){myleft=0;mytop=20}
		settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";
		my_window=window.open(mypage,myname,settings);
		if (my_window != null)	my_window.blur(); 
		}else{
		top.location = self.location
		}
	}
} 
//  End -->

