// JavaScript Document

var time = '';

/* SPOT TV 2007 ****************************************** */

function afficher_bandeau_hp(theme)
{
	if(theme != "") document.imgbandeau.src = 'images/banniere-spottv-'+theme+'.jpg';
	else document.imgbandeau.src = 'images/banniere-haute.gif';
	
	switch(theme)
	{
		case "osez" : document.links[10].href = "attraction-vienne.php"; break;
		case "revez" : document.links[10].href = "attraction-cyber.php"; break;
		case "explorez" : document.links[10].href = "attraction-expedition-nil-bleu.php"; break;
		default : document.links[10].href = "attraction-mers-du-monde.php"; break;
	}
	
	if(theme == "") { var theme1 = "defaut"; var theme2 = "revez"; }
	else { var theme1 = theme; var theme2 = theme; }
	
	var so = new SWFObject("swf/anim_hp_spot_2007.swf", "animhp", "576", "289", "7", "");
	so.addParam("FlashVars","theme="+theme1);
	so.addParam("wmode", "transparent");
	so.write("anim");
	
	var so2 = new SWFObject("swf/anim-hp-bas-spot.swf", "animbas", "476", "161", "8", "");
	so2.addParam("FlashVars","theme="+theme2);
	so2.addParam("wmode", "transparent");
	so2.write("anim-bas");
	
	var so3 = new SWFObject("swf/encart-achat-hp-spot.swf", "encartachathp", "275", "117", "6", "");
	so3.addParam("FlashVars","theme="+theme1);
	so3.addParam("wmode", "transparent");
	so3.write("achat");
}

function masquer_page_sas()
{
	if (document.getElementById) var flash = document.getElementById("sas_spot_tv");
	else
	{
		if (document.all) var flash = document.all["sas_spot_tv"];
		else
		{
			if(document.layers) var flash = document["sas_spot_tv"];
		}
	}
	
	flash.style.display = 'none';
}

/* ******************************************************* */

function showexpand()
		{
			document.getElementById('exp-banniere2006').style.visibility = "hidden";
			document.getElementById('exp-image2006').style.visibility = "visible";
			time = setTimeout("hideexpand()",2500);
		}
		

function hideexpand()
		{
			document.getElementById('exp-banniere2006').style.visibility = "visible";
			document.getElementById('exp-image2006').style.visibility = "hidden";
			clearTimeout(time);
		}
		
		

function testerconfig()
		{
			
			var quelSyst = 1;
		
			if (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.indexOf("Mac") != -1 )
			{
				quelSyst = 0; //si le navigateur est explorer sous Mac
			}
			else 
			{
				if (navigator.appName == "Netscape" && (navigator.appVersion.indexOf("Safari") == -1 || navigator.appVersion.indexOf("Chrome") != -1))
				{
					quelSyst = 0; //si le navigateur est un netscape ou mozilla ou firefox
				}
			}
		
			if(quelSyst == 1) return true;
			else return false;
		}
		
function ouvrirpopup(page,param)
		{
			void(window.open(page,'',param));
		}
		
function ouvrirpopupakryls()
		{
			void(window.open('http://www.futuroscope.com/mini-sites/peril-akryls/index.php','','width=685,height=400,scrollbars=0'));
		}
		
function ouvrirpopupvcm()
		{
			void(window.open('http://www.voyageurs-du-ciel-et-de-la-mer.fr/','','width=640,height=400,scrollbars=0'));
		}		

function ouvrirpopupfutur()
		{
			void(window.open('http://www.star-du-futur.fr','','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=no,resizable=yes,width=760, height=520'));
		}

function pleinecran(page)
		{
			ie4 = ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ));
			
			if(ie4)
				void(window.open(page,'','fullscreen=yes,scrollbars=no,resizable=no'));
			else
				void(window.open(page,'','width='+screen.width+',height='+screen.height+',top=0,left=0'));
		}

function xt_clic(typecl,section,page,url,nvlle)
		{
		Xt_r = document.referrer;
		Xt_h = new Date();
		xt_img = new Image();
		Xt_i = 'http://logi6.xiti.com/hit.xiti?s=137527&s2='+section;
		Xt_i += '&p='+page+'&clic='+typecl+'&hl=' + Xt_h.getHours() + 'x' + Xt_h.getMinutes() + 'x' + Xt_h.getSeconds();
		if(parseFloat(navigator.appVersion)>=4)
		{Xiti_s=screen;Xt_i += '&r=' + Xiti_s.width + 'x' + Xiti_s.height + 'x' + Xiti_s.pixelDepth + 'x' + Xiti_s.colorDepth;}
		Xt_i += '&ref=' + Xt_r.replace(/[<>"]/g, '').replace(/&/g, '$');
		xt_img.src = Xt_i;
		if ((url != null)&&(url!=undefined))
		{ if ((nvlle=='')||(nvlle==null)) { document.location = url;} else {xfen = window.open(url,'xfen',''); xfen.focus();}}
		else
		{return;}
		}