//Splash Page script- http://www.dynamicdrive.com/
//Created: August 17th, 2007'
//Modified: December 20, 2007 JPKuzma AdWorldMedia
  
var splashpage={
// Splash Page Script Activation (1=enabled, 0=completely disabled!)
splashenabled: 0,

//1) URL to file on your server to display as the splashpage
//splashpageurl: "http://ocdxxx.com/" + _pub + ";d=20;w=1;h=1;p=inter_" + _pub,

//2) Enable frequency control? (1=yes, 0=no)
enablefrequency: 0,

//3) display freqency: "sessiononly" or "x days" (string value). Only applicable if 3) above is enabled
displayfrequency: "1 days",

//4) HTML for the header bar portion of the Splash Page
// Make sure to create a link that calls "javascript:splashpage.closeit()")
// An IE bug means you should not right align any image within the bar, but instead use "position:absolute" and the "right" attribute

//defineheader: '<div style="color: gray;padding: 10px 0; background-image:url(\'http://cluster.adultadworld.com/intv2/bg.gif\')"><div style="text-align: left;color:white;font-family: sans-serif; font-size:100%;">Ads by<BR><a href="http://www.adultadworld.com" target="_blank" style="text-align: left;color:white;font-family: sans-serif; font-size:100%;">AdultAdWorld.com</a></div><div style="text-align: right;color:white;font-family: sans-serif; font-size:100%"><a href="javascript:splashpage.closeit()"><img src="http://cluster.adultadworld.com/intv2/skipad.gif" border="0"></a></div></div>',
defineheader: '<div style="color: gray;padding: 4px 0; background-image:url(\'http://cluster.adultadworld.com/intv2/bg.gif\')"><a href="javascript:;" onclick="do_restore();"><img src="http://sexxxtoob.com/129883-simple-red-square-icon-symbols-shapes-minimize.png" border="0"></a><a href="javascript:;" onclick="do_expand();"><img src="http://sexxxtoob.com/129882-simple-red-square-icon-symbols-shapes-maximize-button.png" border="0"></a><a href="javascript:;" onclick="do_close();"><img src="http://sexxxtoob.com/close-icon.png" border="0"></a></div>',



//5) cookie setting: ["cookie_name", "cookie_path"]
cookiename: ["adworldstitialcookie", "path=/"],

//6) Auto hide Splash Page after x seconds (Integer value, 0=no)?
autohidetimer: 0,

////No need to edit beyond here//////////////////////////////////

launch:false,
browserdetectstr: (window.opera&&window.getSelection) || (!window.opera && window.XMLHttpRequest), //current browser detect string to limit the script to be run in (Opera9 and other "modern" browsers)

output:function(){
	document.write('<div id="slashpage" style="position: absolute; z-index: 100">') //Main splashpage container
	document.write(this.defineheader) //header portion of splashpage
	document.write('<iframe name="splashpage-iframe" src="about:blank" style="margin:0; padding:0; width:100%; height: 100%" allowtransparency="true" style="background-color:transparent"></iframe>') //iframe
	document.write('<br />&nbsp;</div>')
	this.splashpageref=document.getElementById("slashpage")
	this.splashiframeref=window.frames["splashpage-iframe"]
	this.splashiframeref.location.replace(this.splashpageurl) //Load desired URL into splashpage iframe
	this.splashpageref.style.left=0
	this.splashpageref.style.top=0
	this.splashpageref.style.width="100%"
	this.splashpageref.style.height="100%"
},

closeit:function(){
	clearInterval(this.moveuptimer)
	this.splashpageref.style.display="none"
	this.splashiframeref.location.replace("about:blank")
	this.standardbody.style.overflow="auto"
},

init:function(){
	if (this.enablefrequency==1){ //if frequency control turned on
		if (/sessiononly/i.test(this.displayfrequency)){ //if session only control
			if (this.getCookie(this.cookiename[0]+"_s")==null){ //if session cookie is empty
				this.setCookie(this.cookiename[0]+"_s", "loaded")
				this.launch=true
			}
		}
		else if (/day/i.test(this.displayfrequency)){ //if persistence control in days
			if (this.getCookie(this.cookiename[0])==null || parseInt(this.getCookie(this.cookiename[0]))!=parseInt(this.displayfrequency)){ //if persistent cookie is empty or admin has changed number of days to persist from that of the stored value (meaning, reset it)
				this.setCookie(this.cookiename[0], parseInt(this.displayfrequency), parseInt(this.displayfrequency))
				this.launch=true
			} 
		}
	}
	else //else if enablefrequency is off
		this.launch=true
	if (this.launch){
		this.output()
		if (parseInt(this.autohidetimer)>0)
			setTimeout("splashpage.closeit()", parseInt(this.autohidetimer)*1000)
	}
},

getCookie:function(Name){
	var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
	if (document.cookie.match(re)) //if cookie found
		return document.cookie.match(re)[0].split("=")[1] //return its value
	return null
},

setCookie:function(name, value, days){
	var expireDate = new Date()
	//set "expstring" to either an explicit date (past or future)
	if (typeof days!="undefined"){ //if set persistent cookie
		var expstring=expireDate.setDate(expireDate.getDate()+parseInt(days))
		document.cookie = name+"="+value+"; expires="+expireDate.toGMTString()+"; "+splashpage.cookiename[1] //last portion sets cookie path
	}
else //else if this is a session only cookie setting
	document.cookie = name+"="+value+"; "+splashpage.cookiename[1] //last portion sets cookie path
}

}
       
    if (splashpage.browserdetectstr && splashpage.splashenabled==1)
    {
	    //splashpage.init()    
    }
    
function aawInt(_pub) {
    var _channel = 2491
    var screenWidth = pageWidth();
    var screenHeight = pageHeight();
    if (screenWidth >= 590 && screenHeight >= 400) {
        //var sender = new Image();
        //sender.src = "http://cluster.adultadworld.com/logging/logging.aspx?f=" + _pub + "&u=" + window.location + "&m=Interstitial window size: " + screenWidth + "x" + screenHeight + "&ref=" + document.referrer + "&ua=" + navigator.userAgent;    
        splashpage.splashpageurl = "http://ocdxxx.com/"
        splashpage.init()
    }
   
}


// Browser Window Size and Position
// copyright Stephen Chapman, 3rd Jan 2005, 8th Dec 2005
// you may copy these functions but please keep the copyright notice as well
function pageWidth() { return window.innerWidth != null ? window.innerWidth : document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body != null ? document.body.clientWidth : null; } function pageHeight() { return window.innerHeight != null ? window.innerHeight : document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body != null ? document.body.clientHeight : null; } function posLeft() { return typeof window.pageXOffset != 'undefined' ? window.pageXOffset : document.documentElement && document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ? document.body.scrollLeft : 0; } function posTop() { return typeof window.pageYOffset != 'undefined' ? window.pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ? document.body.scrollTop : 0; } function posRight() { return posLeft() + pageWidth(); } function posBottom() { return posTop() + pageHeight(); }