// ---------------------------------------
// Gestion des liens internes au site vers pages .php avec ou sans parametres
// ---------------------------------------
function f1_rp(n,p) 
{
	switch (n)
	{	
		case "home"    : u = "/";              break;	
		case "dossier" : u = "/" + n + "/";    break;
		default        : u = "/" + n ;         break;
	}
if (p) u += "?" + p;
location.href = u;
}

// ---------------------------------------
// Gestion des lien vers ???
// ---------------------------------------
function f2_rp(n,p) 
{
	switch (n)
	{	
		case "home"    : u = "/";              break;	
		case "dossier" : u = "/" + n + "/";    break;
		default        : u = "/" + n + ".htm"; break;
	}
if (p) u += "?" + p;
location.href = u;
}

// ---------------------------------------
// Gestion des liens externes au site en target blank
// ---------------------------------------
function affichereo(url) {
	flash = window.open(url, "", 'status=yes, scrollbars=yes,menubar=no,width=680,height=500,resizable=yes');
	if (window.focus) flash.focus();
}
// ---------------------------------------


<!--
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
version = "z0";
if (browserName== "Microsoft Internet Explorer" && browserVer > 3) version = "e4";

function roll(what,newColor) 
{
	if (version == "e4")
	{
		what.style.color = newColor;
	}
}
//-->


//fonction pour inscription newsletter
adresse_mail = ""

//determine la position de l'arobase et du point ds l'adresse
pos_arobase = adresse_mail.indexOf('@')
pos_point = adresse_mail.lastIndexOf('.')

function abonnement_news(){
//on recupere l'adresse ds le champ
nws_mail = document.abonnement.nws_mail.value
if (nws_mail == ""){alert('Adresse invalide')}
else {
pos_arobase = nws_mail.indexOf('@')
pos_point = nws_mail.lastIndexOf('.')
//on verifie si il y a un arobase, un point + longueur de l'adresse + extension (fr, com...)
if ( (nws_mail.length > 100) || (pos_arobase <= 0 ) || (pos_point <= 0 ) || ( nws_mail.length - pos_point >4) || ( (nws_mail.length - pos_point)-1 < 2) )
{alert('Email invalide !')}	
else
{
ouvrir_popup_news('inscription.php?langue=FRA&nws_mail='+nws_mail+'','Inscription Newsletter !')
document.abonnement.submit()
}
}	
}	

//activation flash automatique IE
function affiche_flash(tag) {
document.write(tag);
} 


//pop up pour inscription newsletter
function ouvrir_popup_news(lien,nom_fenetre)
{window.open(lien,"nom_fenetre","width=310,height=350,scrollbars=no,resizable=yes,menubar=no,status=no,directories=yes,toolbar=no,location=yes");}


//pop up pour voir annonce 3C
function ouvre_3C(lien,fenetre)
{
var fenetre3C = "";
fenetre3C=window.open(lien,fenetre,"width=780,height=320,top=200,left=5,scrollbars=yes,resizable=yes,menubar=no,status=no,directories=no,toolbar=no,location=no");
fenetre3C.focus();
}


function eoafficher(url) {
	flash = window.open(url, "", 'status=yes, scrollbars=yes,menubar=no,width=750,height=500,resizable=yes');
	if (window.focus) flash.focus();
}

// zoom promotions
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function PopupLocanims(aniloc) {
window.open('pop_locflash.php?file_photo='+aniloc+'','mrt','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=280,height=380,top=30,left=50')
}
