Nom = navigator.appName;

ns = (Nom == 'Netscape') ? 1:0
ie = (Nom == 'Microsoft Internet Explorer') ? 1:0
 

function goMenuH(arg, argb) {
	argb.parentNode.parentNode.style.backgroundImage = 'url("../images/fond_titre_menu_over.png")';
	var d = document.getElementById('pop');	
	var children = d.childNodes;
   for (var i = 0, c = children.length; i < c; i++) {		  
      if (children[i].nodeType === 1) { // C'est un élément HTML  
	   
        children[i].style.display = 'none';
      } else { // C'est certainement un noeud textuel
        
      }
	arg.style.display="block";	
    }
	var pos =argb.parentNode.parentNode.offsetTop;
	
	if (ie) {
		document.getElementById('pop').style.top=pos+"px";
	}	
	else {
		document.getElementById('pop').style.top=pos+"px";
	}	
	arg.style.display = 'block';
	document.getElementById('pop').style.left=document.getElementById('menuBox').offsetLeft+document.getElementById('menuBox').offsetWidth+document.getElementById('mainBox').offsetLeft;
	document.getElementById('pop').style.visibility="visible";	
	
	
	
	
	
	
	
	
}

function goMenuSansH(arg) {
	//thumb du menu	
	
	arg.parentNode.parentNode.style.backgroundImage = 'url("../images/fond_titre_menu_over.png")';
}

function menuOut(arg) {
	arg.parentNode.parentNode.style.backgroundImage = 'url("../images/fond_titre_menu.png")';
}
function menuOutS(arg) {
	document.getElementById('pop').style.visibility="hidden";
	arg.parentNode.parentNode.style.backgroundImage = 'url("../images/fond_titre_menu.png")';
}

//script de début pour horlogerie
function posThumb(idMontre) {
	//positionnement de la fenètre
	var long=document.body.offsetWidth;
	if(long<1024) document.getElementById('mainBox').style.left=0;
	else {
		var marge=(long-1024)/2;
		document.getElementById('mainBox').style.left=marge;
	}
	//positionement des thumbs en haut
		
	if(maPage!="home") {
		if(iframe[idMontre]){
		var link = document.getElementById('screen');
		link.innerHTML=iframe[idMontre];
		link.style.top=120;
		}
	}
	document.getElementById('affichNav').style.left=724-document.getElementById('affichNav').offsetWidth;	
	document.getElementById('affichNav').style.top=document.getElementById('affichText').offsetTop+document.getElementById('affichText').offsetHeight;
	//affichage des éléments chargés
	document.getElementById('affichSN').style.width=document.getElementById('screenBox').offsetWidth;
	document.getElementById('affichText').style.visibility="visible";
	document.getElementById('affichNav').style.visibility="visible";
	document.getElementById('mainBox').style.visibility="visible";
	document.getElementById('affichThumbs').style.visibility='visible';	
}

//===== charge l'image dans le div - affichMain --
function affichScreen(arg,argB) {
	document.getElementById('pop').style.visibility="hidden";			
	var link = document.getElementById('screen');
	link.innerHTML = "<img src='"+arg+"' id='grandeImage'> ";
	link.style.top=14;
	
	//préparation du texte
	
}

function startindex() {
	//positionnement de la fenètre
	var long=document.body.offsetWidth;
	if(long<1024) document.getElementById('mainBox').style.left=0;
	else {
		var marge=(long-1024)/2;
		document.getElementById('mainBox').style.left=marge;
	}	
	document.getElementById('mainBox').style.visibility="visible";
	cherche=document.getElementById('affichSN');
		
}
function affichVideo(arg) {
	//positionnement de la fenètre
	document.getElementById('screen').style.top=120;
	document.getElementById('screen').innerHTML=iframe[arg]	;
	
}

function affichFacebook() {
 document.getElementById('facebookBox').style.visibility = 'visible'; 
}


function gallet(arg, argA){
	nom="../images/"+argA+".png";
	nomUp="../images/"+argA+"_up.png";
	arg.style.backgroundImage = 'url('+nomUp+')';
}
function galletOut(arg, argA){
	nom="../images/"+argA+".png";
	nomUp="../images/"+argA+"_up.png";
	arg.style.backgroundImage = 'url('+nom+')';
}


