//
//
// Permet de desactiver le click droit 
//
//
// Reprise et modif Hugo PAGET
// 2008 - Plan¸te Vision
//
//
var message="Clic droit ne fonctionne pas.\n Pour toute copie nous contacter merci.";


function clickdoff(){

NS = navigator.appName=="Netscape"
IE = navigator.appName=="Microsoft Internet Explorer"
Ver = parseInt(navigator.appVersion)

// message = "Clic Droit de Souris\n Non Autorisˇ";   // mis en var globale

document.onmousedown = NoClic;    // Capture sous Netscape 6 et IE
	if (document.layers) {         // Capture sous Netscape 4.X
	   window.captureEvents(Event.MOUSEDOWN);
	   window.onmousedown = NoClic;
	}

	function NoClic(leclic) {          // Affichage du message d'alerte
		if (NS && leclic.which > 1){
			alert(message)
			return false
		} else if (IE && (event.button >1)) {
			alert(message)
		return false;
		}
	}
}

/*
//-----------------------------------------------------
//               autres fonctions
//-----------------------------------------------------


// Dans cette fonction le message ne fonctionne pas sous IE

function clickdoff(){
//	var message="Pour toute copie nous contacter merci";
	function clickIE() {if (document.all) {(message);alert(message); return false;}}
	function clickNS(e) {if
		(document.layers||(document.getElementById&&!document.all)) {
		if (e.which==2||e.which==3) {(message);alert(message);return false;}}}
		if (document.layers)
		{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
		else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
	document.oncontextmenu=new Function("return false")}



// Cette fonction ne fonctionne pas correctement
function clickdoff(e)
{

//	var message = "Clic Droit Dˇsactivˇ Par le webmaster";

	if(!document.rightClickDisabled) // initialize
	{
		if(document.layers)
			{
			document.captureEvents(Event.MOUSEDOWN); document.onmousedown = clickdoff;
			}
		else document.oncontextmenu = clickdoff; return document.rightClickDisabled = true;
	}
	if(document.layers || (document.getElementById && !document.all))
		{
			if (e.which==2||e.which==3)
				{
				alert(message); return false;
				}
		}
	else
		{
			alert(message);
			return false;
		}
}
clickdoff();

*/