var page={

splashenabled: 1,


pageurl: "welcome.html",


enablefrequency: 1,


displayfrequency: "sessiononly",



defineheader: '<div align="center" style="padding-top: 30px; background: #000000; height: 100%; font: bold 12px Verdana;"><a href="javascript:page.closeit()" title="Click to enter"><img src="../images/bc.jpg" border="0"></a></div>',

cookiename: ["ajcookief", "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="page" style="position: absolute; z-index: 100; color: black; background-color:white">') //Main page container
	document.write(this.defineheader) //header portion of page
	document.write('<iframe name="page-iframe" src="about:blank" style="margin:0; padding:0; width:100%; height: 100%"></iframe>') //iframe
	document.write('<br />&nbsp;</div>')
	this.pageref=document.getElementById("page")
	this.splashiframeref=window.frames["page-iframe"]
	this.splashiframeref.location.replace(this.pageurl) //Load desired URL into page iframe
	this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body
	if (!/safari/i.test(navigator.userAgent)) //if not Safari, disable document scrollbars
	this.standardbody.style.overflow="hidden"
	this.pageref.style.left=0
	this.pageref.style.top=0
	this.pageref.style.width="100%"
	this.pageref.style.height="100%"
	this.moveuptimer=setInterval("window.scrollTo(0,0)", 50)
},

closeit:function(){
	clearInterval(this.moveuptimer)
	this.pageref.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("page.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()+"; "+page.cookiename[1] //last portion sets cookie path
	}
else //else if this is a session only cookie setting
	document.cookie = name+"="+value+"; "+page.cookiename[1] //last portion sets cookie path
}

}

if (page.browserdetectstr && page.splashenabled==1)
	page.init()