function desactiverBtnDroit()
{
   if(!document.rightClickDisabled)
   {
      if(document.layers)
      {
         document.captureEvents(Event.MOUSEDOWN);
         document.onmousedown=desactiverBtnDroit;
      }
      else document.oncontextmenu=desactiverBtnDroit;
      
      return document.rightClickDisabled=true;
   }
   
   return false;
}



//||||||||||||||||||||||||||||||||||||||||||| popup 1 seule fois |||||||||||||||||||||||||||||||||||||||||||||
function OuvrePopup() {
	// Vérifie que le cookie "pop1fois" n'est pas présent
	if (GetCookie("pop1fois")==null) {
		
		// Paramétrez ici le mode d'affichage du popup
		window.open("plus2spam.html","pop1fois","width=300, height=200, toolbars=no, scrollbars=no");

		// Enregistre le cookie pour une durée de 24 heures
		var pathname=location.pathname;
		var myDomain=pathname.substring(0,pathname.lastIndexOf('/')) +'/';
		var date_exp = new Date();
		date_exp.setTime(date_exp.getTime()+(24*3600*1000)); // 24 heures
		SetCookie("pop1fois","ok",date_exp,myDomain);
	}
}

function ViderCookie() {
		var pathname=location.pathname;
		var myDomain=pathname.substring(0,pathname.lastIndexOf('/')) +'/';
		var date_exp = new Date();
		date_exp.setTime(date_exp.getTime()-(1000)); // Heure déjà expirée
		SetCookie("pop1fois","",date_exp,myDomain);
		alert("Le cookie 'pop1fois' est vidé.\n Vous pouvez recharger la page pour voir le popup...")
}

function SetCookie (name, value) {
	var argv=SetCookie.arguments;
	var argc=SetCookie.arguments.length;
	var expires=(argc > 2) ? argv[2] : null;
	var path=(argc > 3) ? argv[3] : null;
	var domain=(argc > 4) ? argv[4] : null;
	var secure=(argc > 5) ? argv[5] : false;
	document.cookie=name+"="+escape(value)+
		((expires==null) ? "" : ("; expires="+expires.toGMTString()))+
		((path==null) ? "" : ("; path="+path))+
		((domain==null) ? "" : ("; domain="+domain))+
		((secure==true) ? "; secure" : "");
}

function getCookieVal(offset) {
	var endstr=document.cookie.indexOf (";", offset);
	if (endstr==-1)
      		endstr=document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}
function GetCookie (name) {
	var arg=name+"=";
	var alen=arg.length;
	var clen=document.cookie.length;
	var i=0;
	while (i<clen) {
		var j=i+alen;
		if (document.cookie.substring(i, j)==arg)
                        return getCookieVal (j);
                i=document.cookie.indexOf(" ",i)+1;
                        if (i==0) break;}
	return null;
}
// ||||||||||||||||||||||||||||||||||||||  FOCUS  ||||||||||||||||||||||||||||||||||||||||||||||||||||
//function Focus(nom) {
//	document.forms[0].elements[nom].focus();
// ajouter :
// onLoad='Focus("champ2")' (dans la balise <body onLoad='Focus("champ2")'> 'champ2' etant le 1er champ de formulaire concerné)
//}

// |||||||||||||||||||||||||||||||||||||| FIN FOCUS ||||||||||||||||||||||||||||||||||||||||||||||||||
//|||||||||||||||||||||||||||||||||||||||||  SECOUER UNE POPUP  |||||||||||||||||||||||||||||||||||||||||||||||
function secouer(nb) {
	var sens=-1;
	var X=0; var Y=0; var dx; var dy
	for (no=nb;no>1;no=no-0.1) {
		dx=-X+sens*Math.round(no*Math.random());
		dy=-Y+sens*Math.round(no*Math.random());
		X=X+dx; Y=Y+dy;
		top.moveBy(dx,dy);
		sens=sens*(-1);
	}
	top.moveBy(-X,-Y);
}

//|||||||||||||||||||||||||||||||||||||||| ANTI CLICK DROIT |||||||||||||||||||||||||||||||||||
//function protect() {
//	alert("Désolé, mais nous protégeons la vie privée de nos Membres.");
//	return false;
//	}
//function trap() {
//	if(document.images)
//		for(i=0;i<document.images.length;i++)
//			document.images[i].onmousedown = protect;
//	}

//window.onload=trap;
//|||||||||||||||||||||||||||||||||||||||| FIN ANTI CLICK DROIT |||||||||||||||||||||||||||||||||||

//|||||||||||||||||||||||||||||||||||||||| VISIONNEUSE AUTOMATIQUE ET MANUELLE DE PHOTOS |||||||||||||||||||||||||||||||||||
//PLF-http://www.jejavascript.net/ ( entre head et head )
var bauto = 0;
var dossier="";//-- CHOISIR DE SOUS REPERTOIRE DES IMAGES NE PAS OUBLIER LE SLASH-----(mis dans chaque page concernee)-----
var numero = 1;
function objet() {
this.length = objet.arguments.length
for (var i = 0; i < this.length; i++) this[i+1] = objet.arguments[i]
}
var nom = new objet ();// ----- LISTER LES IMAGES COMME ICI--(mis dans chaque page concernee)-- ET YA PLUS RIEN A CHANGER DANS HEAD
function suivante() {
numero += 1;
if (numero == nom.length + 1) numero = 1;
document.image.src = dossier+nom[numero];
}
function precedente() {
numero -= 1;
if (numero == 0) numero = nom.length; 
document.image.src = dossier+nom[numero];
}
function changer() {
numero += 1;
if (numero == nom.length + 1) numero = 1;
document.image.src = dossier+nom[numero];
roll=setTimeout("changer()", 3000);// ---- 3000=duree en millisecondes-----------------------
}
function initial() {
window.clearTimeout(roll);
document.image.src = dossier+nom[numero];
}
function auto() {
if (bauto == 0) {
bauto =1; changer();
document.vision.automat.value=" Lect/Stop "; 
} 
else {
bauto =0; initial();
document.vision.automat.value=" Lect/Auto ";
}
}
//||||||||||||||||||||||||||||||||||||||| FIN VISIONNEUSE AUTOMATIQUE ET MANUELLE DE PHOTOS ||||||||||||||||||||||||||||||||
// Entre les balises <head> et </head>
//Script pour cacher les messages de la barre status - par Jacques Brunet
//Vous pouvez y inscrire votre message ici il est indiqué (Bienvenue !)
//ou ne rien y écrire (' ')
//Pour me contacter écrivez à (webmestre@cfmrs.com)
//Vous devez garder cette partie pour l'utiliser gratuitement. Merci


function status1(){
window.status='Acceder à ce lien'
return true

if (document.layers)
document.captureEvents(Event.MOUSEOUT | Event.MOUSEOVER)
document.onmouseout=''
document.onmouseover=status1
}
//||||||||||||||||||||||||||||||||||||||||||  TEXTE CLIGNOTANT  |||||||||||||||||||||||||||||||||||||||||||||||||||||
i=0;
function clignote()
{
	tabColoris = new Array ("#eeffff","red");
	if (i+1 == tabColoris.length) i=0;
	else i++;
	document.getElementById("bienvenue").setAttribute('color',tabColoris[i]);
	document.getElementById("clignote").setAttribute('color',tabColoris[i]);
	setTimeout("clignote()",500);
}

//||||||||||||||||||||||||||||||||||||||| OUVERTURE POPUP ||||||||||||||||||||||||||||||||||||||
function popup(page) {
	window.open(page,'popup','width=600,height=500,toolbar=false,scrollbars=false');	
}
//||||||||||||||||||||||||||||||||||||||| PAGE WEB EN PLEINE PAGE ||||||||||||||||||||||||||||||||||||||
function pe() {
window.moveTo(0,0);
window.resizeTo(screen.width,(screen.height-25));
}
//||||||||||||||||||||||||||||||||||||||| AFFICHE LE TEXTE DES JOURNEES MONDIALES DE.... ||||||||||||||||||||||||||||||||||||||
//function Affichejournee()
//	{
//	if (document.all && document.getElementById)
//		{
//		document.write('<div style="text-decoration: none">1er decembre : Journée Mondiale de la lutte contre le SIDA....... donnez vos impressions dans notre forum !</div>');
//		}
//	}
//||||||||||||||||||||||||||||||||||||||| ROTATION DES BANNIERES  ||||||||||||||||||||||||||||||||||||||
function disp(txt) {document.write(txt);}
	// ne pas changer le nom 'banniere'
var banniere=new CreerBan('Visitez notre site...');
	// Definition des bannières Add(url de l'image, adresse associée à l'image, target, delai en secondes)
	// target est une chaine de caractères qui est soit : 
	//  1- le nom de la frame qui va recevoir le site de la bannière
	//  2- "_blank" pour ouvrir une nouvelle fenêtre
	//  3- "_self" pour remplacer la bannière par son site
	//  4- "_top"  pour supprimer toutes les frames et afficher le site en pleine page 
	// Remarque : toutes les images ont la dimension de la première image affichée (sous netscape)
	//            Il est préférable d'avoir toutes les images au meme format.


//FORMAT= fichier,lien,sortie,duree
//banniere.Add("http://action.metaffiliation.com/suivi.php?maff=S3E3643C8B1821","http://action.metaffiliation.com/suivi.php?mclic=S3E3643C8B1821", "_blank",15);
//banniere.Add("http://www.annonces31.com/gifs/labuche.jpg","http://www.labuche.fr","_blank",3);
banniere.Add("photos/ban_libup1_468.gif","http://www.libertins.up1.fr/inscription.php4", "_blank",15);
banniere.Add("http://affiliates.nexpartner.com/42/91/1437","http://affiliates.nexpartner.com/z/1437/CD91/", "_blank",3);


function CreerBan(alt) {
	this.nb=0;
	this.no=0;
	this.alt=alt;

	this.Add=AddBan;
	this.Init=InitBan;
}
function AddBan(img,href,target,delai) {
	var ban=new Object;
		ban.img=img;
		ban.href=href;
		ban.target=target;
		ban.delai=delai;
	this[this.nb]=ban;
	this.nb++;
}
function InitBan() {
	var aff="";
	if (document.images) { for(var i=0;i<this.nb;i++){var gif=new preload(this[i].img)}}
	disp(aff+"<BR><A href='javascript:tjsgo()'><IMG name='tjsimg' src='"+this[0].img+"' alt='"+this.alt+"' border='"+0+"'></A>");
	setTimeout("rotation()",this[0].delai*1000);
}
function rotation() {
	banniere.no++; var no=banniere.no; if (no>=banniere.nb) {banniere.no=0; no=0}
//	alert(no+" "+banniere[no].img+" ------"+document.anchors["tjsban"].href)
	document.images["tjsimg"].src=banniere[no].img;
	setTimeout("rotation()",banniere[no].delai*1000);
}
function tjsgo() {
	with(banniere[banniere.no]) {
		if(target=="_blank"){window.open(href,"")} else {
			if(target=="_top"){parent.window.location=href} else {
				if(target=="_iframe"){window._iframe.location=href} else {
				parent.frames[target].window.location=href}
				
			}
		}
	}
}
function preload() {
	this.length = preload.arguments.length;
	for (var i = 0; i < this.length; i++) {
		this[i+1] = new Image();
		this[i+1].src = preload.arguments[i];
	}
}
//----------------------------------------- FIN ROTATION PUBS--------------------------------------------------

//||||||||||||||||||||||||||||||||||||||||  pas d adresse dans barre de status ||||||||||||||||||||||
function noad () {
		 onmouseover="window.status='Visiteurs';return true"
		}
// |||||||||||||||||||||||||||||||||||||||||||||||  Z O O M  |||||||||||||||||||||||||||||||||||||||||||
/*** Creation des variables (pour zoom) ***/
if(!window.JSFX)
	JSFX=new Object();
JSFX.ImageZoomRunning = false;

JSFX.zoomOn = function(img, zoomStep, maxZoom)
{
	if(img)
	{
		if(!zoomStep)
		{
			if(img.mode == "EXPAND")
				zoomStep = img.height/10;
			else
				zoomStep = img.width/10;
		}

		if(!maxZoom)
		{
			if(img.mode == "EXPAND")
				maxZoom = img.height/2;
			else
				maxZoom = img.width/2;
		}


		if(img.state == null)
		{
			img.state = "OFF";
			img.index = 0;
			img.orgWidth =  img.width;
			img.orgHeight = img.height;
			img.zoomStep = zoomStep;
			img.maxZoom  = maxZoom;
		}

		if(img.state == "OFF")
		{
			img.state = "ZOOM_IN";
			start_zooming();
		}
		else if( img.state == "ZOOM_IN_OUT"
			|| img.state == "ZOOM_OUT")
		{
			img.state = "ZOOM_IN";
		}
	}
}
JSFX.zoomIn = function(img, zoomStep, maxZoom)
{
	img.mode = "ZOOM";
	JSFX.zoomOn(img, zoomStep, maxZoom);
}
JSFX.stretchIn = function(img, zoomStep, maxZoom)
{
	img.mode = "STRETCH";
	JSFX.zoomOn(img, zoomStep, maxZoom);
}
JSFX.expandIn = function(img, zoomStep, maxZoom)
{
	img.mode = "EXPAND";
	JSFX.zoomOn(img, zoomStep, maxZoom);
}

JSFX.zoomOut = function(img)
{
	if(img)
	{
		if(img.state=="ON")
		{
			img.state="ZOOM_OUT";
			start_zooming();
		}
		else if(img.state == "ZOOM_IN")
		{
			img.state="ZOOM_IN_OUT";
		}
	}
}

function start_zooming()
{
	if(!JSFX.ImageZoomRunning)
		ImageZoomAnimation();
}

JSFX.setZoom = function(img)
{
	if(img.mode == "STRETCH")
	{
		img.width  = img.orgWidth  + img.index;
		img.height = img.orgHeight;
	}
	else if(img.mode == "EXPAND")
	{
		img.width  = img.orgWidth;
		img.height = img.orgHeight + img.index;
	}
	else
	{
		img.width  = img.orgWidth  + img.index;
		img.height  = img.orgHeight  + img.index;
	}
}

function ImageZoomAnimation()
{
	JSFX.ImageZoomRunning = false;
	for(i=0 ; i<document.images.length ; i++)
	{
		var img = document.images[i];
		if(img.state)
		{
			if(img.state == "ZOOM_IN")
			{
				img.index+=img.zoomStep;
				if(img.index > img.maxZoom)
					img.index = img.maxZoom;

				JSFX.setZoom(img);

				if(img.index == img.maxZoom)
					img.state="ON";
				else
					JSFX.ImageZoomRunning = true;
			}
			else if(img.state == "ZOOM_IN_OUT")
			{
				img.index+=img.zoomStep;
				if(img.index > img.maxZoom)
					img.index = img.maxZoom;

				JSFX.setZoom(img);
	
				if(img.index == img.maxZoom)
					img.state="ZOOM_OUT";
				JSFX.ImageZoomRunning = true;
			}
			else if(img.state == "ZOOM_OUT")
			{
				img.index-=img.zoomStep;
				if(img.index < 0)
					img.index = 0;

				JSFX.setZoom(img);

				if(img.index == 0)
					img.state="OFF";
				else
					JSFX.ImageZoomRunning = true;
			}
		}
	}
	if(JSFX.ImageZoomRunning)
		setTimeout("ImageZoomAnimation()", 40);
}
// --------------------------------------------- FIN ZOOM ------------------------------------------------------

