var page = new Array(4);
page[0]="http://www.lynxtrack.com/afclick.php?o=444&b=d8p5b28f&p=2018&l=1&s=BCL"; //LRS
page[1]="http://www.lynxtrack.com/afclick.php?o=194&b=bdgmbtfr&p=2018&l=1"; //USPlat
page[2]="http://www.lynxtrack.com/afclick.php?o=57&b=sb4sc3gs&p=2018&l=1&s=BCL"; //LRF
page[3]="http://servedby.advertising.com/click/site=704889/mnum=197364"; //kw

var cpage = new Array(4);
rndnum = Math.round(Math.random()*100000);

cpage[0]="";
cpage[1]="";
cpage[2]="";
cpage[3]="";


function openAWindow(url)
{
var args = 'width=400,height=400,location=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0,hotkeys=0,top=10000,left=1000';
window.open(url,'Windows',args ); 
self.focus();
}

function setCookie(cookieName,cookieValue, expirehours) {
	var today = new Date();
	var expire = new Date();
	expire.setTime(today.getTime() + 3600000 * frequencyCap);
	document.cookie = cookieName+"="+escape(cookieValue)
                 + ";expires="+expire.toGMTString();
}

function ReadCookie(cookieName) {
 var theCookie=""+document.cookie;
 var ind=theCookie.indexOf(cookieName);
 if (ind==-1 || cookieName=="") return ""; 
 var ind1=theCookie.indexOf(';',ind);
 if (ind1==-1) ind1=theCookie.length; 
 return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
}

var frequencyCap = 1; //hours

if (ReadCookie('QC1') != 'yes')
{
	var num = Math.floor(Math.random() * 4);
	var num1 = Math.floor(Math.random() * 100);
	if(num1 > 50)
	{
		openAWindow(page[num]);
		setCookie('QC1','yes', frequencyCap);

		//var cnum = Math.floor(Math.random() * 100);
		//if(cnum < 20)
		//	setTimeout("openAWindow(cpage[num])",8000);

	}
}
