//*************************************************************
//Detection du clic droit
//a rajouter dans les pages
//if (document.all) {document.onmousedown=clicie;}
//if (document.layers) {document.captureEvents(Event.MOUSEDOWN); document.onmousedown = clicns;}
//if (window.sidebar) {document.captureEvents(Event.MOUSEDOWN); document.onmousedown = clicns;}
//*************************************************************
function clicie() 
{
	if ((event.button==2)||(event.button==3)) {
		alert("All right reserved\n\nTout droit réservé");
	}
}
//*************************************************************
function clicns(e){
	// Fonction pour Netscape
	if(e.which==3){
		alert("All right reserved\n\nTout droit réservé");
		return false;
	}
}
//*************************************************************
//Fonction d'ouverture de fenetre supplementaire
//*************************************************************
//Fenetre de zoom de l'image
function zoom(img, idgS)
{
		ecran_w = 710;
		ecran_h = 540;
		param="menubar=no, toolbar=no, location=no, directories=no, position=top, status=no, scrollbars=no,  resizable=no, copyhistory=no, width=" + ecran_w + ", height=" + ecran_h + ", top=0, left=0"; 
		
		window.open("../chercher/zoom.php?photo="+img+"&idgS="+idgS, "zoom", param);
}
function nav(chx)
{
	if(navigator.appName=="Microsoft Internet Explorer")
	{alert("Appuiez sur le bouton chercher,\nMerci.");}
	else
	{
		if(chx!=2)
		{ gocherche(); }
		else
		{ gocherche2(); }
	}

}
//*************************************************************
//fonction specifique aux formulaire
//*************************************************************
function login(user, pass, raz)
{		
		ecran_w = 300;
		ecran_h = 200;
		top_h = (window.screen.height-100)/2;
		left_w =  (window.screen.width-300)/2;
		param="menubar=no, toolbar=no, location=no, directories=no, position=top, status=no, scrollbars=yes,  resizable=no, copyhistory=no, width=" + ecran_w + ", height=" + ecran_h + ", top=" + top_h + ", left=" +left_w; 
		url="../cookieInscritrec.php?user="+user+"&pass="+pass+"&raz="+raz;
			window.open(url , "_blank", param);
			document.indenti.action="../inscrits/index.php";
			setTimeout("document.indenti.submit();", 1500);
}
//*************************************************************
// function pour valider le chois de la photo et l'enregistrer en base
function choix(photo_num_txt)
{
  		window.document.panier.photo_num_txt.value=photo_num_txt;
		//window.document.panier.target="QI";
		window.document.panier.target="_self";
		window.document.panier.submit();
}

//*************************************************************
//*************************************************************
function gestpages(param)
{
		window.document.page.param.value=param;
		window.document.page.submit();
}
//*************************************************************
//Autres fonctions
//*************************************************************
function ajsuPhoto()
{
	window.document.panier.photo_num_txt.value="";
	for(a=0;a<window.document.panier.elements["ph"].length;a++)
	{
		if(window.document.panier.elements["ph"][a].checked)
		{
			window.document.panier.photo_num_txt.value+=window.document.panier.elements["ph"][a].value+";";
		}
	}
}
//*************************************************************
//liste de thèmes

//*************************************************************
// verifi si c'est un mail
function verifiermail(mail) 
{ 
/*      if ((mail.indexOf("@")>=0)&&(mail.indexOf(".")>=0)) 
      { 
         return true 
      } 
      else 
	  { 
         //alert("Mail invalide !"); 
         return false 
      } */
} 
