function getCookie(Name) {
	var search = Name + "="
		if (document.cookie.length > 0) { // if there are any cookies
			offset = document.cookie.indexOf(search)
				if (offset != -1) { // if cookie exists 
					offset += search.length 
					// set index of beginning of value
					end = document.cookie.indexOf(";", offset) 
					// set index of end of cookie value
					if (end == -1) 
						end = document.cookie.length
					return unescape(document.cookie.substring(offset, end))
				}
		}
}


var expdate = new Date((new Date()).getTime() + 86400000);
var cookieval = getCookie("allcleanhumor_com_counter");
if  (cookieval==undefined) { 
	document.cookie="allcleanhumor_com_counter=1; expires=" + expdate.toGMTString() + "; path=/;";
}
if  (cookieval==1) { 
	document.cookie="allcleanhumor_com_counter=2; expires=" + expdate.toGMTString() + "; path=/;";
	// Fastclick Popunder
	var doc=document;  var url=escape(doc.location.href); var date_ob=new Date();
	doc.cookie='h2=o; path=/;';var bust=date_ob.getSeconds();
	if(doc.cookie.indexOf('e=llo') <= 0 && doc.cookie.indexOf('2=o') > 0){
	doc.write('<scr'+'ipt language="javascript" src="http://media.fastclick.net');
	doc.write('/w/pop.cgi?sid=4210&m=2&v=1.7e&u='+url+'&c='+bust+'"></scr'+'ipt>');
	date_ob.setTime(date_ob.getTime()+43200000);
	doc.cookie='he=llo; path=/; expires='+ date_ob.toGMTString();}
} 
if  (cookieval==2) { 
	document.cookie="allcleanhumor_com_counter=3; expires=" + expdate.toGMTString() + "; path=/;";
} 
if  (cookieval==3) { 
	document.cookie="allcleanhumor_com_counter=4; expires=" + expdate.toGMTString() + "; path=/;";
	// Popup Traffic Popunder
	document.write("<SCRIPT LANGUAGE=\"JavaScript\" src=\"http://www.popuptraffic.com/assign.php?l=mikebyde&mode=behind\"></script>");
} 