var d, i, nbRubTot = 9;

function montreQue(nomCel) 
{
	for (i = 1; i<=nbRubTot; i++) {
		cache('smenu'+i);
	}
	
	args=montreQue.arguments;
	if(args.length>1)
		for (i=0;i<args.length;i++)
			montre(args[i]);
	else if(args.length>0)
		montre(nomCel);
}

function montre(id) {
	d = document.getElementById(id);
	if (d) d.style.display='block';
}

function cache(id) {
	d = document.getElementById(id);
	if (d) d.style.display='none';
}

function changeStyleById(idElt, newClr)
{
	if (document.getElementById)
	{
		var nodeObj = document.getElementById(idElt);
		if (nodeObj)
			nodeObj.style.background = newClr;
	}
}
function changeClassById(idElt, newClass)
{
	if (document.getElementById)
	{
		var nodeObj = document.getElementById(idElt);
		if (nodeObj)
			nodeObj.className = newClass;
	}
}

function voirImage(img) {
	titre=":: Lous Seurrots ::";
	w=open("",'Photo','top=100,left=10,width=400,height=400,status=yes,toolbar=no,scrollbars=no,resizable=no');	
	w.document.write('<html><head><title>'+titre+'</title><link rel="stylesheet" href="/css/lsrt.css" type="text/css"></head>');
	w.document.write('<script language="javascript">function checksize()  { if (document.images[0].complete) {  window.resizeTo(document.images[0].width+10,document.images[0].height+85); window.focus();} else { setTimeout("check()",250) } }</'+'script>');
	w.document.write('<body onload="checksize()" leftMargin="0" topMargin="0" marginwidth="0" marginheight="0"><img src="'+img+'" border="0">');
	w.document.write('<center><a href="javascript: window.close();">Fermer la fen&ecirc;tre</a></center>');
	w.document.write('</body></html>');
	w.document.close();
}

function verif_ctc(frm)
{
	val = frm.nom.value; 
	if (isEmpty(val) || isSpace(val)) 
	{ 
		alert('Veuillez renseigner votre nom.'); 
		frm.nom.focus(); 
		return false;
	}
	
	val = frm.email.value; 
	if (isNotEmailAdress(val)) 
	{ 
		if (isEmpty(val) || isSpace(val)) 
			alert('Veuillez renseigner votre email.'); 
		else
			alert('Format d\'adresse mail incorrect !\nVérifiez que vous avez correctement saisi votre email.'); 
		frm.email.focus(); 
		return false;
	}
	
	if (frm.adresse)
	{
		val = frm.adresse.value; 
		if (isEmpty(val) || isSpace(val)) 
		{ 
			alert('Veuillez renseigner votre adresse.'); 
			frm.adresse.focus(); 
			return false;
		}
	}
	
	val = frm.objet.value; 
	if (isEmpty(val) || isSpace(val)) 
	{ 
		alert('Veuillez renseigner l\'objet de votre demande.'); 
		frm.objet.focus(); 
		return false;
	}
	
	val = frm.message.value; 
	if (isEmpty(val) || isSpace(val)) 
	{ 
		alert('Veuillez renseigner votre message.'); 
		frm.message.focus(); 
		return false;
	}
	
	return true;
}

function changepage(me)
{
	if(me!=null)
		window.location=me.value;
}

function _runFlaAcc(lang) 
{ 
	lang = lang.toUpperCase();
  	/* 
  		Script permettant de résoudre le bug sous windows XP des flash appraissent entourés d'un cadre gris
	*/
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="723" height="369">\n');
	document.write('  <param name="movie" value="img/animlousseurrots.swf?lang='+lang+'">\n');
	document.write('  <param name="quality" value="high">\n');
	document.write('  <param name="wmode" value="transparent">\n');
	document.write('  <embed src="img/animlousseurrots.swf?lang='+lang+'" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="723" height="369"></embed>\n');
	document.write('</object>\n');
}

function runFlaAcc() 
{ 
  	/* 
  		Script permettant de résoudre le bug sous windows XP des flash appraissent entourés d'un cadre gris
	*/
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="723" height="369">\n');
	document.write('  <param name="movie" value="img/animlousseurrots.swf">\n');
	document.write('  <param name="quality" value="high">\n');
	document.write('  <param name="wmode" value="transparent">\n');
	document.write('  <embed src="img/animlousseurrots.swf" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="723" height="369"></embed>\n');
	document.write('</object>\n');
}

function runFlaGalPh() 
{ 
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0" width="630" height="360"><param name="movie" value="img/gallery.swf"><param name="quality" value="high"><embed src="img/gallery.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="630" height="360"></embed></object>\n');
}

function _runFlaPlan(lang) 
{ 
	lang = lang.toUpperCase();
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="630" height="420">\n');
    document.write('  <param name="movie" value="/img/plan_'+lang+'.swf">\n');
    document.write('  <param name="quality" value="high">\n');
    document.write('  <embed src="/img/plan_'+lang+'.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="630" height="420"></embed>\n');
  	document.write('</object>\n');
}
function runFlaPlan() 
{ 
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="630" height="420">\n');
    document.write('  <param name="movie" value="/img/plan.swf">\n');
    document.write('  <param name="quality" value="high">\n');
    document.write('  <embed src="/img/plan.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="630" height="420"></embed>\n');
  	document.write('</object>\n');
}

function runFlaVenir() 
{ 
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="200" height="245">\n');
    document.write('  <param name="movie" value="/editables/flash/lous.swf">\n');
    document.write('  <param name="quality" value="high">\n');
    document.write('  <embed src="/editables/flash/lous.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="200" height="245"></embed>\n');
    document.write('</object>\n');
}