var click = 0;

function noclic(clic)
{
	var msg="Désolé, le clic droit est désactivé !";
	if (navigator.appName=='Netscape' && clic.which==3) //si le navigateur est Netscape
{
	alert(msg); //affiche la boîte d'alerte
	return false;
}
else
	if (navigator.appName=='Microsoft Internet Explorer' && event.button==2)//si le navigateur est Internet Explorer
	{
		alert(msg); //affiche la boîte d'alerte
		return false;
	}
	return true;
}

function secure()
{
	if(click == 0)
	{
		click++;
		return true;
	}
	else
		return false;
}

// texte clicnotant (http://www.espacejavascript.com)
function clignote()
{
	if(document.getElementById)
	{
		if (document.getElementById("calque1") != null)
		{
			document.getElementById("calque1").style.visibility = 'hidden';
			window.setTimeout("document.getElementById('calque1').style.visibility = 'visible'", 750);
		}
		if (document.getElementById("calque2") != null)
		{
			document.getElementById("calque2").style.visibility = 'hidden';
			window.setTimeout("document.getElementById('calque2').style.visibility = 'visible'", 750);
		}
	}
	else if(document.all)
	{
		if(document.all["calque1"] != null)
		{
			document.all["calque1"].style.visibility = 'hidden';
			window.setTimeout("document.all['calque1'].style.visibility = 'visible'", 750);
		}
		if(document.all["calque2"] != null)
		{
			document.all["calque2"].style.visibility = 'hidden';
			window.setTimeout("document.all['calque2'].style.visibility = 'visible'", 750);
		}
	}
}

// Simple browser object detection
var ie = document.all ? true : false;
var ns = document.layers ? true : false;
var ns6 = !ie && document.getElementById ? true : false;
 
// ==================================================
function LyrObjGetRef(objectId) {
    if(ns6 && document.getElementById(objectId)) return document.getElementById(objectId);
    else if (ie && document.all(objectId)) return document.all(objectId);
    else if (ns && document.layers[objectId]) return document.layers[objectId];
    else return false;
 
}

function setPageDemarrage(anchor, url)
{
	browserName = navigator.appName;
	browserVer = parseInt(navigator.appVersion);
	/* Internet Explorer */
	if (browserName == "Microsoft Internet Explorer" & browserVer >= 4)
	{
		anchor.style.behavior='url(#default#homepage)';
		anchor.setHomePage(url);
	}
	/* Firefox */
	else if (window.external)
	{
		anchor.style.behavior='url(#default#homepage)';
		anchor.setHomePage(anchor.getAttribute('value'));
	}
}
