// -------------------------------
// Positionnement bouton
var btn_left=23;
var larg_btn =60;
if (document.title == "Camping car - Cellule polyester"){
				var btn_top=145;
}
else {
				var btn_top=50;
}

var offsetx_menu=05; // larg_btn + btn_left
if (document.title == "Camping car - Cellule polyester"){
				var offsety_menu=100;
}
else {
				var offsety_menu=0;
}
var haut_menu = 500;
var larg_menu =600;

// Définition du bouton
var mn = 1;
var img_btn="<IMG SRC='images/titre_menu.gif' BORDER='0' WIDTH='85' HEIGHT='30' ALT=''>"

btn_menu = "<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>";
btn_menu += "<TR>";
btn_menu += "<TD ALIGN='center'>";
btn_menu += "<A HREF='#' onMouseOver='affmenu(1)'>";
btn_menu += img_btn;
btn_menu += "</A>";
btn_menu += "</TD>";
btn_menu += "</TR>";
btn_menu += "</TABLE>";

// -------------------------------
// Selon Navigateur
ns4=document.layers;
ie4=document.all;
ns6=document.getbtn_menuById&&!document.all;
// -------------------------------
// Création du bouton d'appel menu
if (NS){
				document.write('<LAYER NAME="btn_menu" TOP='+btn_top+' LEFT='+btn_left+'>'+btn_menu+'</LAYER>');
}
else{
				document.write('<DIV ID="btn_menu" STYLE="POSITION:absolute; TOP:'+btn_top+'; LEFT:'+btn_left+'">'+btn_menu+'</DIV>');
}

btn_left_start = 0;
btn_top_start = 0;
// -------------------------------
// Fonction déplacement bouton
function deplt_btn(){
				if(IE){
								ydiff=btn_top_start-document.body.scrollTop; 
								xdiff=btn_left_start-document.body.scrollLeft;
				}
				else{
								ydiff=btn_top_start-pageYOffset; 
								xdiff=btn_left_start-pageXOffset;
				}
				// -------------
				if(ydiff!=0){
								btn_top_start-=Math.round(ydiff/10);
				}
				if(xdiff!=0){
								btn_left_start-=Math.round(xdiff/10);
				}
				// -------------
				if(IE){
								document.all["btn_menu"].style.top=btn_top_start+btn_top;
								document.all["btn_menu"].style.left=btn_left_start+btn_left;
				}
				else if(NS){
								document.layers["btn_menu"].top=btn_top_start+btn_top;
								document.layers["btn_menu"].left=btn_left_start+btn_left;
				}
				else if(NS6){
								document.getElementById("btn_menu").style.top=btn_top_start+btn_top;
								document.getElementById("btn_menu").style.left=btn_left_start+btn_left;
				}
				else {
								document.getElementById("btn_menu").style.top=btn_top_start+btn_top;
								document.getElementById("btn_menu").style.left=btn_left_start+btn_left;
				}
}
// Appel fonction cadencé 
depltbtn=setInterval("deplt_btn()",20);

// ----------------------------------------
// Table du menu

function table_menu() {
	
				if (document.title == "Camping car - Cellule polyester"){
								mclass = "accueil";
				}
				else {
								mclass = "autrespages";
				}
				// Définition menu
				table_menu = '<TABLE BORDER="0" VALIGN="top" CLASS="'+mclass+'" SUMMARY="">';
				table_menu += '<TR>';
				table_menu += '<TD>';
				table_menu += '<IFRAME ID="Le menu" OnMouseOut="affmenu(0)" SCROLLING="no" SRC="menu.html" BORDER=0 FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 WIDTH='+larg_menu+' HEIGHT='+haut_menu+'>';
				table_menu += '</IFRAME>';
				table_menu += '</TD>';
				table_menu += '</TR>';
				table_menu += '</TABLE>';
				if (NS){
								document.write('<LAYER NAME="menu" VISIBILITY="hide" TOP='+offsety_menu+' LEFT='+offsetx_menu+' z-index=100>'+table_menu+'</LAYER>');
				}
				else{
								document.write('<DIV ID="menu" STYLE="POSITION:absolute; VISIBILITY:hidden; TOP:'+offsety_menu+'; LEFT:'+offsetx_menu+';z-index:100;">'+table_menu+'</DIV>');
				}
}
// ----------------------------------------
// Position de la souris
function position(e) {
				mouse_x = (navigator.appName.substring(0,3) == "Net") ? e.pageX : event.x+document.body.scrollLeft;
				mouse_y = (navigator.appName.substring(0,3) == "Net") ? e.pageY : event.y+document.body.scrollTop;
				window.status = "Souris X:"+mouse_x+" / Y:"+mouse_y;
}
if(navigator.appName.substring(0,3) == "Net") {
				document.captureEvents(Event.MOUSEMOVE);
}
document.onmousemove = position;
// ----------------------------------------
// Affichage du menu au survol de la souris
function affmenu(mn) {
				if (mn == 1) {
								if (IE) { 
												document.all["menu"].style.top = btn_top_start+offsety_menu;
												document.all["menu"].style.visibility = "visible"; 
								}
								else if (NS) { 
												document.layers["menu"].top = btn_top_start+offsety_menu;; 
												document.layers["menu"].visibility = "show"; 
								}
								else if (NS6) { 
												document.getElementById("menu").style.top = btn_top_start+offsety_menu;
												document.getElementById("menu").style.visibility = "visible"; 
								}
								else {
												document.getElementById("menu").style.top = btn_top_start+offsety_menu;
												document.getElementById("menu").style.visibility = "visible"; 
								}
				}
				else  {
								menu.innerHTML=table_menu;
								if (( mouse_x > offsetx_menu + 10) && (mouse_y > offsety_menu + 10)) {
												if (IE) { 
																document.all["menu"].style.visibility = "hidden"; 
												}
												else if (NS) { 
																document.layers["menu"].visibility = "hide"; 
												}
												else if (NS6) { 
																document.getElementById("menu").style.visibility = "hidden"; 
												}
												else {
																document.getElementById("menu").style.visibility = "hidden";
												}
								}
					}
	mn = 0;
	//alert (mn);
}
/* ************************************************************************************************/

