// Splash Page script - http://www.dynamicdrive.com/
// Created: August 17th, 2007'

/*
// 6) Auto hide Splash Page after x seconds (Integer value, 0 = no)?
var autohide_timer = '25';

var splashpage = {

// Splash Page Script Activation (1 = enabled, 0 =c ompletely disabled!)
splashenabled: 1,

// 1) URL to file on your server to display as the splashpage
splashpageurl: "http://www.lagangadelbusca.com.ar/",

// 2) Enable frequency control? (1 = yes, 0 = no)
enablefrequency: 1,

// 3) display freqency: "sessiononly" or "x days" (string value). Only applicable if 3) above is enabled
displayfrequency: "sessiononly",

// 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 id="header">'
+ '	<div style="text-align: center !important;">'
+ '		<object type="application/x-shockwave-flash" data="http://www.lagangadelbusca.com.ar/img/logo.swf" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" id="logo" style="border: none; width: 980px; height: 212px;">'
+ '			<param name="allowScriptAccess" value="sameDomain" />'
+ '			<param name="allowFullScreen" value="false" />'
+ '			<param name="movie" value="http://www.lagangadelbusca.com.ar/img/logo.swf" />'
+ '			<param name="quality" value="high" />'
+ '			<param name="wmode" value="transparent" />'
+ '			<param name="bgcolor" value="#ffffff" />'
+ '			<a href="http://www.lagangadelbusca.com.ar/" title="La Ganga Del Busca"><img src="http://www.lagangadelbusca.com.ar/img/logo.png" alt="" style="width: 980px; height: 212px; border: none;" /></a>'
+ '		</object>'
+ '	</div>'
+ '</div>'
+ '<div style="width: 980px; margin: 0 auto 2px auto; text-align: left; border-left: 1px solid; border-right: 1px solid #5d717e; border-top: 1px solid #5d717e; border-bottom: 1px solid #5d717e; padding-left: 5px; padding-right: 5px; padding-top: 5px; margin-top: 5px; padding-bottom: 5px; margin-bottom: 15px; background: #ffffff; -moz-border-radius: 10px; -webkit-border-radius: 10px; -khtml-border-radius: 10px; border-radius: 10px;">'
+ '	<div style=" margin-top: 5px; margin-bottom: 5px; text-align: center;">'
+ '		<span style="color: #000000; font-size: 18px; font-family: Verdana, Arial, Helvetica, Sans-Serif;">'
+ '			<span style="color: #ff0000; text-decoration: underline; font-weight: bold;">&iexcl;LEER IMPORTANTE!</span>'
+ '			<br /><br />'
+ '			<span style="font-weight: bold;">'
+ '				ATENCI&Oacute;N: La Ganga Del Busca se encuentra cerrado por vacaciones<br />hasta el d&iacute;a 13-02-2012 inclusive'
+ '				<br /><br />'
+ '				Todos los pedidos realizados desde el d&iacute;a 30-01-2012<br />ser&aacute;n <span style="text-decoration: underline;">confirmados</span> y <span style="text-decoration: underline;">enviados</span> a partir del d&iacute;a 13-02-2012'
+ '			</span>'
+ '		</span>'
+ '	</div>'
+ '	<br />'
+ '	<div style="text-align: center; margin-bottom: 5px;">'
+ '		<span style="color: #000000; color: #000000; font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 10px;">Si ya le&iacute;ste el mensaje pulsa</span>&nbsp;<a href="http://www.lagangadelbusca.com.ar/" title="La Ganga Del Busca" style="text-decoration: inderline; font-weight: bold; color: #000000; font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 10px;">Aqu&iacute;</a> <span style="color: #000000; color: #000000; font-family: Verdana, Arial, Helvetica, Sans-Serif; font-size: 10px;">para ir a La Ganga Del Busca</span>'
+ '	</div>'
+ '</div>',

// 5) cookie setting: ["cookie_name", "cookie_path"]
cookiename: ["splashpagecookie", "path=/"],

autohidetimer: autohide_timer,

//// 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; color: #aca8a1; background-color: #aca8a1; position: absolute; top:0; left:0; width: 100%; height: 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;"></iframe>') // Iframe
//	document.write('<br />&nbsp;</div>')
	document.write('</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.standardbody = (document.compatMode == "CSS1Compat")? document.documentElement : document.body
	
	if (!/safari/i.test(navigator.userAgent)) // If not Safari, disable document scrollbars
		this.standardbody.style.overflow = "auto"
	
	this.splashpageref.style.left = 0
	this.splashpageref.style.top = 0
	this.splashpageref.style.width = "100%"
	this.splashpageref.style.height = "100%"
	this.moveuptimer = setInterval("window.scrollTo(0,0)", 50)
},

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()
*/
