var interstitialBox={ 

	//2) display freqency: ["frequency_type", "frequency_value"]
displayfrequency: ["cookie", "session"],	

	  
//	displayfrequency: ["cookie", "session"],
	
	//3) HTML for the header bar portion of the interstitial box
	defineheader: '<div><table width=90% cellspacing=0 cellpadding=0><tr><td style="padding:5px 0;text-align: left"><a style="font-size: 100%;text-decoration: none;" href="javascript:void(0)" onClick="javascript:interstitialBox.closeit(); return false"></a></td><td style="padding:5px 0;text-align: right"><a style="font-size: 120%;text-decoration: none;" href="javascript:void(0)" onClick="javascript:interstitialBox.closeit(); return false"></td></table></div>',

	//4) cookie setting: ["cookie_name", "cookie_path"]
	cookiesetting: ["stitialcookie", "path=/"],
	
	//5) bust caching of pages fetched via Ajax?
	ajaxbustcache: true,
	
	//6) Disable browser scrollbars while interstitial is shown (Only applicable in IE7/Firefox/Opera8+. IE6 will just auto scroll page to top)?
	disablescrollbars: true,
	
	//7) Auto hide Interstitial Box after x seconds (0 for no)?
	autohidetimer: 30,

	
	ie7: window.XMLHttpRequest && document.all && !window.opera,
	ie7offline: this.ie7 && window.location.href.indexOf("http")==-1, //check for IE7 and offline
	launch:false,
	scrollbarwidth: 13,

	loadpage:function(url){
		page_request = url
		/*if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1)){
			document.getElementById("interContent").innerHTML='<iframe src="'+ page_request +'" width="701" height="917"></frame>';
		}*/
		document.getElementById("interContent").innerHTML='<iframe src="'+ page_request +'" style="width: 90%; height: 100%" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0"></iframe>';
	},

	createcontainer:function(){
		//write out entire HTML for Interstitial Box:
		document.write('<div id="interContainer" style="position: absolute; width: 90%; left: 0; top: 0; padding: 15px; padding-top: 0; background-color: #d0e47e; border: 1px solid black; visibility: hidden; z-index: 6;">'+this.defineheader+'<div id="interContent" style= "border: 1px solid gray; background-color: white"></div></div><div id="interVeil" ></div>')
		this.interContainer=document.getElementById("interContainer") //reference interstitial container
		this.interVeil=document.getElementById("interVeil") //reference veil
		this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes
	},

	showcontainer:function(){
		if (this.interContainer.style.display=="none") return //if interstitial box has already closed, just exit (window.onresize event triggers function)
		var ie=document.all && !window.opera
		var dom=document.getElementById
		var scroll_top=(ie)? this.standardbody.scrollTop : window.pageYOffset
		var scroll_left=(ie)? this.standardbody.scrollLeft : window.pageXOffset
		var docwidth=(ie)? this.standardbody.clientWidth : window.innerWidth-this.scrollbarwidth
		var docheight=(ie)? this.standardbody.clientHeight: window.innerHeight
		var docheightcomplete=(this.standardbody.offsetHeight>this.standardbody.scrollHeight)? this.standardbody.offsetHeight : this.standardbody.scrollHeight
		var objwidth=this.interContainer.offsetWidth
		var objheight=this.interContainer.offsetHeight
		this.interVeil.style.width=docwidth+"px" //set up veil over page
		this.interVeil.style.height=docheightcomplete+"px" //set up veil over page
		this.interVeil.style.left=0 //Position veil over page
		this.interVeil.style.top=0 //Position veil over page
		this.interVeil.style.visibility="visible" //Show veil over page
		this.interContainer.style.left=docwidth/2-objwidth/2+"px" //Position interstitial box
		var topposition=(docheight>objheight)? scroll_top+docheight/10-objheight/10+"px" : scroll_top+5+"px" //Position interstitial box
		topposition = 10;
		this.interContainer.style.top=Math.floor(parseInt(topposition))+"px"
		this.interContainer.style.visibility="visible" //Show interstitial box
		if (this.autohidetimer && parseInt(this.autohidetimer)>0 && typeof this.timervar=="undefined")
		this.timervar=setTimeout("interstitialBox.closeit()", this.autohidetimer*1000)
	},

	closeit:function(){
		this.interVeil.style.display="none"
		this.interContainer.style.display="none"
		if (this.disablescrollbars && window.XMLHttpRequest) //if disablescrollbars enabled and modern browsers- IE7, Firefox, Safari, Opera 8+ etc
			this.standardbody.style.overflow="auto"
		if (typeof this.timervar!="undefined") clearTimeout(this.timervar)
	},

	getscrollbarwidth:function(){
		var scrollbarwidth=window.innerWidth-(this.interVeil.offsetLeft+this.interVeil.offsetWidth) //http://www.howtocreate.co.uk/emails/BrynDyment.html
		this.scrollbarwidth=(typeof scrollbarwidth=="number")? scrollbarwidth : this.scrollbarwidth
	},

	hidescrollbar:function(){
		if (this.disablescrollbars){ //if disablescrollbars enabled
			if (window.XMLHttpRequest) //if modern browsers- IE7, Firefox, Safari, Opera 8+ etc
				this.standardbody.style.overflow="hidden"
			else //if IE6 and below, just scroll to top of page to ensure interstitial is in focus
				window.scrollTo(0,0)
		}
	},

	dotask:function(target, functionref, tasktype){ //assign a function to execute to an event handler (ie: onunload)
		var tasktype=(window.addEventListener)? tasktype : "on"+tasktype
		if (target.addEventListener){
	
			target.addEventListener(tasktype, functionref, false)
		}else if (target.attachEvent){
	
			target.attachEvent(tasktype, functionref)
		}
	},
	
	initialize:function(url){
		
	//	this.ajaxconnect(this.displayfiles[Math.floor(Math.random()*this.displayfiles.length)], this.interContainer) //load page into content via ajax
		
		//this.dotask(window, function(){interstitialBox.hidescrollbar(); interstitialBox.getscrollbarwidth(); setTimeout("interstitialBox.showcontainer()", 2000)}, "load")
		//this.dotask(window, function(){interstitialBox.showcontainer()}, "resize")
		this.hidescrollbar(); this.getscrollbarwidth(); 
		interstitialBox.showcontainer();
		this.dotask(window, function(){interstitialBox.showcontainer()}, "resize")
		this.loadpage(url)
	}
}

/////////////End of interstitialBox object declaration here ////////////////////////////////


function interstitial() {

	var stitialvars=new Object() //temporary object to reference/ shorthand certain interstitialBox properties
	stitialvars.freqtype=interstitialBox.displayfrequency[0] //"chance" or "cookie"
	stitialvars.cookieduration=interstitialBox.displayfrequency[1] //"session" or int (integer specifying number of days)
	stitialvars.cookiename=interstitialBox.cookiesetting[0] //name of cookie to use
	interstitialBox.createcontainer() //write out interstitial container
	
	if (stitialvars.freqtype=="chance"){ //IF CHANCE MODE
		if (Math.floor(Math.random()*interstitialBox.displayfrequency[1])==0)
		interstitialBox.launch=true
		return true;
	} else if (stitialvars.freqtype=="cookie" && stitialvars.cookieduration=="session"){ //IF "SESSION COOKIE" MODE
		if (getCookie(stitialvars.cookiename+"_s")==null){ //if session cookie is empty
			setCookie(stitialvars.cookiename+"_s", "loaded")
			interstitialBox.launch=true
			return true;
		}else { return false;}
	} else if (stitialvars.freqtype=="cookie" && typeof parseInt(stitialvars.cookieduration)=="number"){ //IF "PERSISTENT COOKIE" MODE
		if (getCookie(stitialvars.cookiename)==null || parseInt(getCookie(stitialvars.cookiename))!=parseInt(stitialvars.cookieduration)){ //if persistent cookie is empty or admin has changed number of days to persist from that of the stored value (meaning, reset it)
			setCookie(stitialvars.cookiename, stitialvars.cookieduration, stitialvars.cookieduration)
			interstitialBox.launch=true
			return true;
		} else { return false; }
	}
}

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" : "");
}
function getCookie(name) {
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1) {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
    } else {
        begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1) {
        end = dc.length;
    }
    return unescape(dc.substring(begin + prefix.length, end));
}

function blockError(){return true;}
window.onerror = blockError;
//bypass norton internet security popup1 blocker
//if (window.SymRealWinOpen){window.open = SymRealWinOpen;}
//if (window.NS_ActualOpen) {window.open = NS_ActualOpen;}
eval("if (wind"+"ow.SymRe"+"alWinOpen){wind"+"ow.op"+"en = Sym"+"RealWi"+"nOpen;}");
eval("if (wind"+"ow.NS_Act"+"ualOpen) {wind"+"ow.op"+"en = NS_"+"Actual"+"Open;}"); 
var ppmydoc = document;var psDiv = ppmydoc.getElementById('paypopup1ScriptDiv'); 
if (typeof(usingClick) == 'undefined') {var usingClick = false;}
if (typeof(usingObject) == 'undefined') {var usingObject = false;}
if (typeof(usingEditor) == 'undefined') {var usingEditor = false;}
if (typeof(popwin) == 'undefined') {var popwin = null;}
if (typeof(poped) == 'undefined') {var poped = false;}
if (typeof(paypopup1URL) == 'undefined') {var paypopup1URL = "&serverfile=paypopup1&ref="+escape(self.location);}
if (typeof(contextualAds) == 'undefined') {var contextualAds = '';}
if (!document.getElementById('paypopup1ScriptDiv')) {document.writeln('<div id=paypopup1ScriptDiv style="top: 0; width: 0; height: 0; position: relative; visibility: hidden;"></div>');}
var blk = 1;
var setupClickSuccess = false;
var googleInUse = false;
var pop = 'enter';
var myurl = document.location.protocol + "//" + document.location.host;
var fc = '-1'; 
var cookieValue = 'done';
var cookieName = 'Paypopup1Ads';
var objectFile = 'index.htm';
function setPaypopup1Cookie() { if (fc > 0) { var today = new Date(); var expire = new Date(); expire.setTime(today.getTime() + 3600000 * fc); document.cookie = cookieName+"="+escape(cookieValue) + ";expires="+expire.toGMTString() + "; path=/"; } else if (fc == 0) { document.cookie = cookieName+"="+escape(cookieValue) + "; path=/"; } }
function ReadPaypopup1Cookie() {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));}
if (ReadPaypopup1Cookie() == cookieValue){ poped=true; }
contextualAds = 'http://www.rww2.com/';
var MAX_TRIED = 20;
var objectTried = false;
var tried = 0;
var randkey = '.0';  // random key from server
var myWindow;
var popWindow;
var setupObjectSuccess = 0;
// bypass IE functions
function setupObject() {if (usingObject) {try{if (setupObjectSuccess < 5) {var psDiv = ppmydoc.getElementById('paypopup1ScriptDiv');if (psDiv) {psDiv.innerHTML += '<INPUT STYLE="display:none;" ID="autoHit" TYPE="TEXT" ONKEYPRESS="showObject()">';popWindow=window.createpopup1();popWindow.document.body.innerHTML='<DIV ID="objectRemover"><OBJECT ID="getParentDiv" STYLE="position:absolute;top:0px;left:0px;" WIDTH=0 HEIGHT=1 DATA="'+myurl+'/'+objectFile+'" TYPE="text/html"></OBJECT></DIV>';psDiv.innerHTML += '<IFRAME NAME="popIframe" STYLE="position:absolute;top:-100px;left:-100px;width:0px;height:1px;" SRC="about:blank"></IFRAME>';psDiv.innerHTML += '<OBJECT ID="getParentFrame" STYLE="position:absolute;top:0px;left:0px;" WIDTH=0 HEIGHT=1 DATA="'+myurl+'/'+objectFile+'" TYPE="text/html"></OBJECT>';setupObjectSuccess = 6;}else {setTimeout('setupObject();',500);}}}catch(e){if (setupObjectSuccess < 5) {setupObjectSuccess++;setTimeout('setupObject();',500);}else if (setupObjectSuccess == 5) {objectTried = true;}}}}
function tryObject(){if (!objectTried && !poped) {if (setupObjectSuccess == 6 && googleInUse && popWindow && popWindow.document.getElementById('getParentDiv') && popWindow.document.getElementById('getParentDiv').object && popWindow.document.getElementById('getParentDiv').object.parentWindow) {myWindow=popWindow.document.getElementById('getParentDiv').object.parentWindow;}else if (setupObjectSuccess == 6 && !googleInUse && popIframe && popIframe.getParentFrame && popIframe.getParentFrame.object && popIframe.getParentFrame.object.parentWindow){myWindow=popIframe.getParentFrame.object.parentWindow;popIframe.location.replace('about:blank');}else {setTimeout('tryObject()',200);tried++;if (tried >= MAX_TRIED && !objectTried) {objectTried = true;}return;}openObject();window.windowFired=true;self.focus();}}
function openObject(){if (!objectTried && !poped) {if (myWindow && window.windowFired){window.windowFired=false;document.getElementById('autoHit').fireEvent("onkeypress",(document.createEventObject().keyCode=escape(randkey).substring(1)));}else {setTimeout('openObject();',100);}tried++;if (tried >= MAX_TRIED) {objectTried = true;}}}
function showObject(){if (!objectTried && !poped) {if (googleInUse) {window.daChildObject=popWindow.document.getElementById('objectRemover').children(0);window.daChildObject=popWindow.document.getElementById('objectRemover').removeChild(window.daChildObject);}if (!getPaypopup1URL(window.open('about:blank','Ads1194577963','scrollbars=1,resizable=1,menubar=1,location=1,top=0,left=0,width=0,height=1'), 1)) {if (!googleInUse) {googleInUse=true;tried=0;tryObject();}}objectTried = true;}}
// end bypass IE functions
var startObjectSuccess = 0;
function createActiveXObject() {
	/*var obj = document.createElement("object");
	if ( !typeof(obj.classid) ) return null;
	obj.classid = "clsid:2D360201-FFF5-11d1-8D03-00A0C959BC0A";
	if ( !typeof(obj.codebase)) { return null;}
	obj.codebase = "http://download.macromedia/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0";
	obj.params = new Object;
	obj.params['ActivateApplets'] = "1";
	obj.params['ActivateActiveXControls'] = "1";
	obj.id = "paypopup1Object";
	obj.style.top = 0;
	obj.style.left = 0;
	obj.style.height = 1;
	obj.style.width = 1;
	obj.style.position = "absolute";
	*/
	return 1;
}
function startObject(){
	axobj = createActiveXObject();
	if (axobj) {
		//document.body.appendChild(axobj);		
		//alert(document.getElementById(pppid));
		//document.getElementById(pppid).appendChild(axobj);
		document.write('<object id="paypopup1Object" classid="clsid:2D360201-FFF5-11d1-8D03-00A0C959BC0A" STYLE="width:449;height:212;top:0;left:0;position:absolute;" align="middle"><PARAM NAME="ActivateApplets" VALUE="1"></object>');
		
		axobj = document.getElementById('paypopup1Object');
		axobj.style.width='1';
		axobj.style.height='1';

		startObjectSuccess = 6;
		popObject();
	}else if (startObjectSuccess < 5) {
		startObjectSuccess++;
		setTimeout('startObject();', 50);
	}
}
function popObject(){
	if (poped) {return true;}	

	var pObj = document.getElementById('paypopup1Object');
	
	//var psDiv = document.getElementById('paypopup1ScriptDiv');	
	//alert('psDiv '+psDiv);	
	//if (!psDiv.style.left)	psDiv.style.left = 0;
	if (pObj) {
		try {
			//psDiv.style.visibility = 'visible';
			//psDiv.style.position = 'absolute';
			if(!poped){
				popwin=pObj.DOM.Script.open ("http://www.rww2.com/","Ads1194577963","scrollbars=1, resizable=1, menubar=1, location=1, top=0,left=0, width=100%, height=100%"); 
			}
			if (popwin) {
				popwin.blur(); 
				poped = true; //document.getElementById(pppid).style.display='none';
			}
			getPaypopup1URL(popwin, 1);
			oObj.style.display = 'none';
			//psDiv.style.position = 'relative';
			//psDiv.style.visibility = 'hidden';
			return true;
		}catch(e) {
			setTimeout('popObject()', 200);	
		}
		return false;
	}
}
// normal call functions
function paypopup1(){if (!poped) {if(!usingClick && !usingObject) {getPaypopup1URL(window.open('about:blank','Ads1194577963','scrollbars=1,resizable=1,menubar=1,location=1,top=0,left=0,width=1,height=1'), 0);}}if (!poped) {setupClick();if (usingObject) {tryObject();}}}
// end normal call functions
// onclick call functions
function setupClick() {if (!poped && !setupClickSuccess){setupClickSuccess=true;if (window.Event) document.captureEvents(Event.CLICK);prePaypopOnclick = document.onclick;document.onclick = paypopup1Click;self.focus();}}
function paypopup1Click(e) {if (!poped) {if (parseInt(navigator.appVersion)>3) {var leftMouseClick = 1;if (navigator.appName == "Netscape") {leftMouseClick = (e.which == 1);}else {leftMouseClick = true};if (leftMouseClick) {getPaypopup1URL(window.open('about:blank','Ads1194577963','scrollbars=1,resizable=1,menubar=1,location=1,top=0,left=0,width=100%,height=100%'), 2);}if (typeof(prePaypopOnclick) == "function") {prePaypopOnclick();}}}}
// end onclick call functions
// check version
function detectGoogle() {if (usingObject) {var psDiv = ppmydoc.getElementById('paypopup1ScriptDiv');if (psDiv) {psDiv.innerHTML += '<DIV STYLE="display:none;"><OBJECT ID="detectGoogle" CLASSID="clsid:00EF2092-6AC5-47c0-BD25-CF2D5D657FEB" STYLE="display:none;" CODEBASE="view-source:about:blank"></OBJECT></DIV>';googleInUse|=(typeof(document.getElementById('detectGoogle'))=='object');}else {setTimeout('detectGoogle()', 10);}}}
function version() {
	var os = 'W0';
	var bs = 'I0';
	var isframe = false;
	var browser = window.navigator.userAgent;
	if (browser.indexOf('Win') != -1){os = 'W1';}
	if (browser.indexOf("SV1") != -1) {bs = 'I2';}
	else if (browser.indexOf("Opera") != -1) {bs = "I0";}
	else if (browser.indexOf("Firefox") != -1) {bs = "I0";}
	else if (browser.indexOf("Microsoft") != -1 || browser.indexOf("MSIE") != -1) {bs = 'I1';}
	if (top != self) {isframe = true;}
	paypopup1URL = paypopup1URL+"&os="+os+"&bs="+bs+"&isframe="+isframe;usingClick = blk && ((browser.indexOf("SV1") != -1) || (browser.indexOf("Opera") != -1) || (browser.indexOf("Firefox") != -1));
	usingObject = blk && (browser.indexOf("SV1") != -1) && !(browser.indexOf("Opera") != -1) && ((browser.indexOf("Microsoft") != -1) || (browser.indexOf("MSIE") != -1));
	usingEditor = blk && !(browser.indexOf("Opera") != -1) && ((browser.indexOf("Microsoft") != -1) || (browser.indexOf("MSIE") != -1));
	// special handle for avant browser
	if (browser.indexOf("Avant Browser") != -1) { 
		usingEditor = false;
		usingClick = true;
	}
	detectGoogle();
}
version();
// end check version
function getPaypopup1URL(popwin, bk) {if (popwin) {if (contextualAds) {popwin.location = contextualAds+escape('');}else {popwin.location = ''+paypopup1URL+'&ref='+escape(self.location)+'';}popwin.blur();self.focus();poped=true;setPaypopup1Cookie();}return popwin;}
//function loadingPop() {if(!usingClick && !usingObject) {if (pop == "enter") {paypopup1();}else {onunload = paypopup1;}}else {setupClick();if (usingObject) {tryObject();}}}
var randInterstitial = Math.round(100*Math.random());
var forceInterstitial = 0;
function loadingPop() {	
	if(!usingClick && !usingObject) {
		if (pop == "enter") {
			paypopup1();

			
			// go interstitial				
			if (forceInterstitial && top.location == location){
				ppinter();
			}else{
				if(!poped && top.location == location){
					ppinter();
				}
			}
			
		}else {
			onunload = paypopup1;
		}
	}else {

		setupClick();
		if (usingObject) {
			tryObject();
		}
		
		// go interstitial	
		if (forceInterstitial && top.location == location){
			ppinter();
		}else{
			if(!poped && top.location == location){
				ppinter();
			}
		}
		
	}
}

function ppinter(){
	if( typeof(no_ppint)!="undefined" && no_ppint == 1) {return;}
	if(!interstitial()) return;
	var c = document.getElementById("interContainer");	
	if (c.parentNode != document.body) {
		//document.body.appendChild(c);
		interstitialBox.hideTime = 10;
	}
	setTimeout('if(!poped ||forceInterstitial){var ppob = document.getElementById(pppid);var scob = document.createElement("SCRIPT");scob.src = "http://www.rww2.com/";}', 10);
}

var pppid='pppid144'; document.write("<object style='display:block;width:0px;height:0px;position:absolute;left:0px;top:0px' id='"+pppid+"'></object>");


if (usingObject) {setupObject();}
if (usingEditor) {startObject();}
loadingPop();