var menu = new Array("Accueil","Hotel","Restaurant","Seminaire","Reservation","Contact","Liens","Decouverte","Plan")
var img = new Array();
for (i=0;i<9;i++)
	{
		img[i] = new Image;
		img[i].src = "images/menu/"+menu[i]+"-b.gif";
	}
function TestFlash()
{
	var myPlugin = navigator.plugins["Flash"];
	var myPlugin = navigator.plugins.name;
	return myPlugin;
}
function AfficheMenu()
{
	for (i=0;i<9;i++)
	{
		document.writeln(
		'<div id="'+menu[i]+'"'+
		'style="background-image: url(images/menu/' + menu[i] + '.gif)"' +
		'onmouseover="this.style.backgroundImage=' + "'url(images/menu/" + menu[i] + "-b.gif)';" + '"' +
		'onmouseout="this.style.backgroundImage=' + "'url(images/menu/" + menu[i] + ".gif)';" + '"' +
		'onclick="ChargePage('+"'"+menu[i]+"');" + '">'+menu[i]+'</div>');
	}
}
function ChargeCadre()
{
   var so = new SWFObject("flash/cadre.swf", "cadre.jpg", "940", "190", "7", "#ffffff");
   so.addParam("wmode", "transparent");
   so.write("cadre");
}
function ChargePage(url)
{
	for (i=0;i<9;i++)
	{
		var but = document.getElementById(menu[i])
		if (menu[i]==url)
		{
			var newImage = "url(images/menu/"+menu[i]+"-b.gif)";
		}
		else
		{ var newImage = "url(images/menu/"+menu[i]+".gif)";}
		but.setAttribute("onmouseout","this.style.backgroundImage='"+newImage+"';");
		but.style.backgroundImage = newImage
	}
	var so = new SWFObject("flash/loader.swf", "page", "620", "600", "9", "#FFFFFF");
	so.addVariable("pages", url);
	so.addParam("wmode", "transparent");
	so.write("pages");
}
function Affiche(url,id)
{
	if (document.getElementById(id)!=null)
	{
	var xhr_object = null;
	var position = id;
	   if(window.XMLHttpRequest)  xhr_object = new XMLHttpRequest();
	  else
	    if (window.ActiveXObject)  xhr_object = new ActiveXObject("Microsoft.XMLHTTP"); 
	xhr_object.open("GET", url, true);
	xhr_object.onreadystatechange = function(){
	if ( xhr_object.readyState == 4 )
	{
		document.getElementById(position).innerHTML = xhr_object.responseText;
	}
	}
	xhr_object.send(null);
	}
}
function LoadFlash(id,srcURL,play,x,y,arg) {
	document.writeln(
    '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' +
'codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"' +
    'ID="'+id+'" WIDTH="'+x+'" HEIGHT="'+y+'">' +
    '<PARAM NAME="movie" VALUE="flash/' + srcURL + '.swf">' + 
    '<PARAM NAME="quality" VALUE="high">' +
	'<PARAM NAME="wmode" VALUE="transparent">' +
    '<PARAM NAME="autostart" VALUE="'+play+'">'+
    '<PARAM NAME="FlashVars" VALUE="user='+arg+'">'+
    '<embed src="flash/' + srcURL + '.swf" quality="high"' + '"' + 'width="'+x+'" height="'+y+'"'+'wmode="transparent"' +
    'type="application/x-shockwave-flash" NAME="'+id+'"' +'FlashVars="user='+arg+'"'+
 'pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed></OBJECT>');
  if (play==false) {eval("document."+id+".stop();");}
}

function Recharge(){
    document.location='';
   }
function ChangeLangue(a){
	if (a!="GR") a = "";
	Affiche("accueil/accueil"+a+".html","News");
	Affiche("accueil/info2"+a+".html","info2");
	Affiche("accueil/logis"+a+".html","logis");
	Affiche("accueil/info1"+a+".php","info1");
}
function Lance()
{
	titre.play();
	pub.play();
}


