

function ShowDiv(DivID){
	if(document.getElementById)
		document.getElementById(DivID).style.visibility="visible";
}

function HideDiv(DivID){
	if(document.getElementById)
		document.getElementById(DivID).style.visibility = "hidden";
}

function ShowHide(DivID){
	if(document.getElementById(DivID).style.visibility == "hidden"){
		document.getElementById(DivID).style.visibility = "visible";
	}
	else{
		document.getElementById(DivID).style.visibility = "hidden";
	}

}


function ChangeDiv(divPrefixe,NbDiv,divNumber){
	
	if(navigator.platform.indexOf("Mac")!=-1 && navigator.appName.indexOf("Explorer")!=-1){
		var myX = 0;
		var myY = getY()-28;
	}
	else{
		var myX = getX();
		var myY = getY()+25;
	}
	SetDivToXY('ssmenu1',myX,myY);
	SetDivToXY('ssmenu2',myX+130,myY);
	SetDivToXY('ssmenu3',myX+270,myY);
	for(i=1;i<=NbDiv;i++){
		divName = divPrefixe + i;
		if(i==divNumber)ShowDiv(divName);
		else HideDiv(divName);
	}
}

function SetDivToXY(DivID,X,Y){
	if(document.getElementById){
		document.getElementById(DivID).style.left = X + "px";
		document.getElementById(DivID).style.top = Y + "px";
		//alert(document.getElementById(DivID).style.left);
	}
}

function getX(){
	var xPos = 0;
	if (document.getElementById){
		var MyObject = document.getElementById("imgnhaut1");
		xPos = MyObject.offsetLeft;
		tempEl = MyObject.offsetParent;
		while (tempEl != null) {
			xPos += tempEl.offsetLeft;
			tempEl = tempEl.offsetParent;
		}
	}
	return xPos;
}


function getY(){
	var yPos = 0;
	if (document.getElementById){
		var MyObject = document.getElementById("imgnhaut1");
		yPos = MyObject.offsetTop;
		tempEl = MyObject.offsetParent;
		while (tempEl != null) {
			yPos += tempEl.offsetTop;
			tempEl = tempEl.offsetParent;
		}
	}
	return yPos;
}

var divStatus=true;
var viTimer;
function DivStatus(status,DivId) {
	divStatus=status;
	if(status) {
		if(viTimer != null) clearTimeout(viTimer);
		viTimer = setTimeout("HideDiv('"+DivId+"')",100);
	} else {
		if(viTimer != null) clearTimeout(viTimer);
	}
}

function clearDiv(divID){
	if(divStatus){
		HideDiv(divID);
	}
}

function navOut(DivId){
	if(viTimer != null) clearTimeout(viTimer);
	viTimer = setTimeout("clearDiv('"+DivId+"')",100);
}

function SetDiv(DivId,Content) {
	document.getElementById(DivId).innerHTML = Content;
}

var ContentOn = false;
