<!-- Begin
function Cookiedown(cookie) {
	document.cookie = cookie;
}
//------------------------------------------------
// s-YVL function for popunder here
//------------------------------------------------
var pName = "/popSplash.php";
var wdwprops = "location=no,directories=no,status=no,menubar=no,toolbar=no,scrollbars=no,resizable=yes,width=635,height=435";
//var wdwprops = "resizable=yes,status=no,toolbar=no,location=no,menu=no,scrollbars=no,width=1,height=1";

//expire: today-midnight 
var expDT = new Date();
expDT.setUTCHours(23);
expDT.setUTCMinutes(59);
expDT.setUTCSeconds(0);

function winSplash (argName, argValue) {
	//.... increament RestWins 

	var cnt = getCk(argName);
	if (cnt == null)	  cnt=1;
	else{
		if (argValue==null)	cnt++;
			else			cnt= argValue;
	}	
	putCk(argName, cnt, expDT);
}
function getCk (argName){
	var argv = argName + "=";  
	var ilen = argv.length;  
	var vlen = document.cookie.length;  
	var n = 0;  
	while (n < vlen){
		var j = n + ilen;
		if (document.cookie.substring(n, j) == argv)
			return CkValue(j);
			
		n = document.cookie.indexOf(" ", n) + 1;    
		if (n == 0) break;   
	}
return null;
}
function putCk (argName, argValue) {  
	var argv = putCk.arguments;  
	var argc = putCk.arguments.length;  
	var aexpire = (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 = argName + "=" + escape (argValue) + 
	((aexpire == null) ? "" : ("; expires=" + aexpire.toGMTString())) + 
	((path == null) ? "" : ("; path=" + path)) +  
	((domain == null) ? "" : ("; domain=" + domain)) +    
	((secure == true) ? "; secure" : "");
}
function delCk (argName){
	var argValue = getCk(argName);  
	document.cookie = argName + "=" + argValue + "; expires=" + expDT.toGMTString();
}
function CkValue(offset) {
	var iStr = document.cookie.indexOf (";", offset);
	if (iStr == -1)  iStr = document.cookie.length;
return unescape(document.cookie.substring(offset, iStr));
}
function popSplash() {
	var cnt = getCk('Restcnt');
	var popcnt = getCk('RestWins');		//increamented only when pop-leads clicked-on by user
	
	//if the page not wrapped in a frame
	 if (self == top && self.name == 'new_Splash') return;
	 else{
	 if (self == top && self.name != 'new_Splash') {	 
		//... dont popup another if window=new_window  -which is a pop-lead clicked-on
		if (cnt == null)	cnt=1;
		 else				cnt++;
		putCk('Restcnt', cnt, expDT);
		

		// RestSess Cookie found then popup already opened, so exit
		cnt = getCk('RestSess');
		if  (cnt != null)  return;
		putCk('RestSess','1');			// RestSess cookie expires when browser session closes

		var cnt1 = getCk('Restcnt');
		if (cnt1 != null) {	
			if (popcnt == null || popcnt < 3) {		
				//...if 3 pops-leads clicked-on by user then stop, no more popcnt for today
				mynewWindow = window.open(pName,'popSplash', wdwprops);	
				if (mynewWindow != null)	mynewWindow.blur();
			}
		}	
	}else{
	top.location = self.location
	}
  }	   
}
// e-YVL 

var win=null;
var mypage= "/pop800.php";
var myname= "restfranpop";
var w= "313";
var h= "200";
var pos= "center";
var infocus= "back";
function pop800() {
if (self == top && self.name == 'new_restfran') return;
	 else{
	 if (self == top && self.name != 'new_restfran') {	 
	
		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 -->
