function cd_position(p){
	position_x = (navigator.appName.indexOf("Netscape")!=-1 )? p.pageX : event.clientX+document.documentElement.scrollLeft;
	position_y = (navigator.appName.indexOf("Netscape")!=-1) ? p.pageY : document.documentElement.scrollTop+event.clientY;
}

function cd_Om()
{
  var menu = document.getElementById("menuClicDroit");
    menu.style.position = 'absolute';
    menu.style.left = position_x+"px";
    menu.style.top = position_y+"px";
	  menu.style.visibility = "visible";
  //console.log(menu.innerLeft);
	return(false);
}

function cd_Fm()
{
	document.getElementById("menuClicDroit").style.visibility = "hidden";
}

function cd_addFav()
{
	if (document.all){
		window.external.AddFavorite(location.href, document.title);
	}else{
		alert("");
	}
}

function cd_recommander(){
	window.open("recommander.php","recommander","width=800,height=600,scrollbars=yes,status=no,resizable=yes");
}

function cd_Om2(btn)
{
	if (navigator.appVersion.indexOf("MSIE") != -1 && event.button == 2)
	{
		cd_Om();
		return false;
	}
	else if ( (navigator.appName.indexOf("Netscape")!=-1 ) && btn.which == 3)
	{
		cd_Om();
		return false;
	}
}

//if(navigator.appName.indexOf("Netscape")!= -1) document.captureEvents(Event.MOUSEMOVE);

document.onmousemove = cd_position;
document.onmousedown = cd_Om2;
document.oncontextmenu = cd_Om;
document.onclick = cd_Fm;
var num=0, num2=0, num3=0, num4=0, num5=0, nbim=0;
function changer() {
switch(nbim){
case 1 :
if (num == 0) {
num = 1;
document.image.src = "images/apercu_royalcactus.jpg";// grande image
document.image.width = 929;
document.image.height = 1544;
}
else {
num = 0;
document.image.src = "images/apercu_royalcactus.jpg";// petite image
document.image.width = 150;
document.image.height = 249;
}
break;
case 2 :
if (num2 == 0) {
num2 = 1;
document.image2.src = "coffre_fort/coffre_fort2.jpg";// grande image
document.image2.width = 562;
document.image2.height = 238;
}
else {
num2 = 0;
document.image2.src = "coffre_fort/coffre_fort2.jpg";// petite image
document.image2.width = 150;
document.image2.height = 64;
}
break;
case 3 :
if (num3 == 0) {
num3 = 1;
document.image3.src = "coffre_fort/coffre_fort3.jpg";// grande image
document.image3.width = 593;
document.image3.height = 177;
}
else {
num3 = 0;
document.image3.src = "coffre_fort/coffre_fort3.jpg";// petite image
document.image3.width = 150;
document.image3.height = 45;
}
break;
case 4 :
if (num4 == 0) {
num4 = 1;
document.image4.src = "coffre_fort/coffre_fort4.jpg";// grande image
document.image4.width = 610;
document.image4.height = 313;
}
else {
num4 = 0;
document.image4.src = "coffre_fort/coffre_fort4.jpg";// petite image
document.image4.width = 150;
document.image4.height = 77;
}
break;
case 5 :
if (num5 == 0) {
num5 = 1;
document.image5.src = "coffre_fort/coffre_fort5.jpg";// grande image
document.image5.width = 620;
document.image5.height = 104;
}
else {
num5 = 0;
document.image5.src = "coffre_fort/coffre_fort5.jpg";// petite image
document.image5.width = 150;
document.image5.height = 25;
}
break;
}
}