var min=15; // frequency cap in minutes, set to 15 or more
var sid=4659;
document.writeln('<scr'+'ipt language="javascript" src="http://code.fastclick.net/is.js"></scr'+'ipt>');

function GetCookieVal(offset)
{
	var endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset,endstr));
}

function FixCookieDate(date)
{
	var base = new Date(0) ;
	var skew = base.getTime() ;
	if (skew > 0) 
		date.setTime (date.getTime() - skew);
	return 1 ;
}

function GetCookie(name)
{
	var cookieJar = document.cookie.split( "; " );
	for( var x = 0; x < cookieJar.length; x++ ) {
		var oneCookie = cookieJar[x].split( "=" );
		if( oneCookie[0] == escape( name ) ) { return unescape( oneCookie[1] ); }
	}
	return null;
}

function SetCookie (name,value,expires,path,domain,secure)
{
	document.cookie = name + "=" + escape(value) +
	((expires) ? "; expires=" + expires.toGMTString() : "") +
	((path) ? "; path=" + path : "") + 
	((domain) ? "; domain=" + domain : "") +
	((secure) ? "; secure" : "");
	return 1 ;
}

var expdate = new Date();
FixCookieDate (expdate);
expdate.setTime(expdate.getTime() + (12 * 60 * 60 * 1000));

var cookieval = GetCookie('popunder') ;

if (cookieval)
{
	cookieval++ ;
	SetCookie('popunder',cookieval) ;

	cookieval = GetCookie('popunder') ;
	if (cookieval == 1  || cookieval == 3 || cookieval == 5 || cookieval == 9) 
	{
var d=new Date();var r=(d.getTime()%8673806982)+Math.random();var u=escape(window.location.href);
var host=' language="Javascript" src="http://as.casalemedia.com/s?s=';
document.write('<scr'+'ipt'+host+'62183&u='+u+'&f=1&id='+r+'"></scr'+'ipt>');
	} else {
var dc=document; var date_ob=new Date();
dc.cookie='h2=o; path=/;';var bust=date_ob.getSeconds();
if(dc.cookie.indexOf('e=llo') <= 0 && dc.cookie.indexOf('2=o') > 0){
dc.write('<scr'+'ipt language="javascript" src="http://media.fastclick.net');
dc.write('/w/pop.cgi?sid=4659&m=2&tp=2&v=1.8&c='+bust+'"></scr'+'ipt>');
date_ob.setTime(date_ob.getTime()+43200000);
dc.cookie='he=llo; path=/; expires='+ date_ob.toGMTString();} 
	}

} else {
	cookieval = 1 ;
	SetCookie('popunder',cookieval) ;
	
var d=new Date();var r=(d.getTime()%8673806982)+Math.random();var u=escape(window.location.href);
var host=' language="Javascript" src="http://as.casalemedia.com/s?s=';
document.write('<scr'+'ipt'+host+'62183&u='+u+'&f=1&id='+r+'"></scr'+'ipt>');
}