function getLenghtScreen()
{
	if (document.getElementById) 
	{
	  if (navigator.appName.indexOf("Microsoft")!=0)
	  {
		//alert ("coucou 0: "+window.innerWidth);
		nScreenl = window.innerWidth; 
	  }
	  if (navigator.appName.indexOf("Microsoft")==0)
	  {
	  	//alert ("coucou 1: "+document.body.offsetWidth);
	  	nScreenl = document.body.offsetWidth; 
	  }
	}
}

function reloadme(){ 
setTimeout("window.location.reload()",0); 
} 

/*
DEFINITION DES VARIABLES DE BASE
*/
posXmenu = 10;
posYmenu = 20;
bgcolor1 = '#44658D';
bgcolor2 = '#A3ACC2';


/*
LIENS
*/
sousmenu = new Array;
sousmenu[0] = new Array;
sousmenu[1] = new Array;
sousmenu[2] = new Array;

/*
sousmenu[0][0] = '<A HREF="sommaire.htm" CLASS=menu><b>&nbsp;&nbsp;Page d\'accueil</b></A>';
*/

sousmenu[1][0] = '<A HREF="neuf.html" CLASS=menu><b>&nbsp;&nbsp;Neufs</b></A>';
sousmenu[1][1] = '<A HREF="occasion.html" CLASS=menu><b>&nbsp;&nbsp;Occasions</b></A>';
sousmenu[1][2] = '<A HREF="magasin.html" CLASS=menu><b>&nbsp;&nbsp;Accessoires</b></A>';

sousmenu[2][0] = '<A HREF="contacts.html" CLASS=menu><b>&nbsp;&nbsp;Nous écrire</b></A>';
sousmenu[2][1] = '<A HREF="equipe.html" CLASS=menu><b>&nbsp;&nbsp;Notre équipe !</b></A>';
sousmenu[2][2] = '<A HREF="infos.html" CLASS=menu><b>&nbsp;&nbsp;Infos pratiques</b></A>';

dom = document.getElementById;

/*
DEFINITION DU STYLE DES LIENS DU MENU
*/
document.write('<style type="text/css">');
document.write('A:hover.menu {color:#FFFF00; text-decoration:none;}')
document.write('A.menu {color:#FFFFFF; text-decoration:none;}')
document.write('</style>')

/*
POSITIONNEMENT DU SOUS-MENU
*/
if (dom)
	document.getElementById("cadremenu").style.top = posYmenu + 29;

/*
AFFICHAGE DES SOUS-MENUS
*/
function SousMenu(msg,pos)
	{
	if (dom)
		{
		document.getElementById("cadremenu").style.left = posXmenu + pos;
		var content = "<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR=#FFFFFF WIDTH=150><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=1>";
		for(pass=0; pass < msg.length; pass++)
			{
			content += "<TR><TD BGCOLOR="+bgcolor1+" onMouseOver=\"this.style.background='"+bgcolor2+"';endTm(minuterie)\" onMouseOut=\"this.style.background='"+bgcolor1+"';startTm()\" HEIGHT=30><FONT SIZE=2 FACE=\"Verdana\"> "+msg[pass]+"</FONT></TD></TR>";
			}
		content += "</TABLE></TD></TR></TABLE>";
		document.getElementById("cadremenu").innerHTML = content;
		document.getElementById("cadremenu").style.visibility = "visible";
		}
	}

/*
INVISIBILITE DES SOUS-MENUS
*/
function KillFenetre ()
	{
	if (dom)
		{
		document.getElementById("cadremenu").style.visibility = "hidden";
		}
	}

function startTm ()
	{
	minuterie = setTimeout('KillFenetre()',1500);
	}

function endTm (minuterie)
	{
	clearTimeout(minuterie);
	}

document.onclick = KillFenetre;

/*
AFFICHAGE DU TABLEAU PRINCIPAL
*/

getLenghtScreen();
posXadrr = (nScreenl/2) + 394 - 247 - posXmenu - 20;
posYadrr = posYmenu - 5;
posXmenu = posXmenu + (nScreenl/2) - 394;
posXnews = posXadrr - 110

//alert ("nScreenl: "+nScreenl);

if (dom)
	{
		document.write('<DIV id=Cadreprincipal STYLE="position:absolute; top:'+posYmenu+'px; left:'+posXmenu+'px; z-index:10"><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR=#FFFFFF WIDTH=360><TR><TD><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=1 WIDTH=100% HEIGHT=30><TR VALIGN="MIDDLE">')
		document.write('<TD WIDTH=120 ALIGN=center BGCOLOR='+bgcolor1+' onMouseOver="this.style.background=\''+bgcolor2+'\';SousMenu(sousmenu[0],0);endTm(minuterie)"   onMouseOut="this.style.background=\''+bgcolor1+'\';startTm()"><A HREF="sommaire.html" CLASS=menu><FONT SIZE=2 FACE="Verdana"><b>Accueil</b></FONT></A></TD>')
		document.write('<TD WIDTH=120 ALIGN=center BGCOLOR='+bgcolor1+' onMouseOver="this.style.background=\''+bgcolor2+'\';SousMenu(sousmenu[1],119);endTm(minuterie)" onMouseOut="this.style.background=\''+bgcolor1+'\';startTm()"><A CLASS=menu><FONT SIZE=2 FACE="Verdana"><b>Camping-cars</b></FONT></A></TD>')
		document.write('<TD WIDTH=120 ALIGN=center BGCOLOR='+bgcolor1+' onMouseOver="this.style.background=\''+bgcolor2+'\';SousMenu(sousmenu[2],239);endTm(minuterie)" onMouseOut="this.style.background=\''+bgcolor1+'\';startTm()"><A CLASS=menu><FONT SIZE=2 FACE="Verdana"><b>Nous rencontrer</b></FONT></A></TD>')
		document.write('</TR></TABLE></TD></TR></TABLE></DIV>')
		document.write('<DIV id=addr STYLE="position:absolute; top:'+posYadrr+'px; left:'+posXadrr+'px; z-index:10"><a href=index.html><IMG SRC="images/addr.jpg" WIDTH=247 HEIGHT=37 border=no onMouseOver="javascript:this.src=\'images/addr2.jpg\';" onMouseOut="javascript:this.src=\'images/addr.jpg\';" ></a></DIV>')
		document.write('<DIV id=news STYLE="position:absolute; top:'+posYadrr+'px; left:'+posXnews+'px; z-index:10"><a href=news.html><IMG SRC="images/news.jpg" WIDTH=100 HEIGHT=37 border=no onMouseOver="javascript:this.src=\'images/news2.jpg\';" onMouseOut="javascript:this.src=\'images/news.jpg\';" ></a></DIV>')
	}






