

function popup(i,j,w,h,t,l) {
	fpopup = window.open(i,j, 'width=' +w+ ',height=' +h+ ',top=' +t+ ',left=' +l+ ',scrollbars=yes,status=no,Resizable=yes');
	fpopup.focus();
}

function VersionNav(Netscape, Explorer) {
  if ((navigator.appVersion.substring(0,3) >= Netscape && navigator.appName == 'Netscape') ||      
      (navigator.appVersion.substring(0,3) >= Explorer && navigator.appName.substring(0,9) == 'Microsoft'))
    return true;
else return false;
}

var it, it2;
it = new Array();
it2 = new Array();

function AllHide() {
	var i,d;
	for (i=0;i<it.length;i++) {
		if(document.all) eval('document.all.'+it[i]+'.style.visibility = "hidden"');
		else {
			d = eval('document.'+it[i]);
			if(!d && document.getElementById) d=document.getElementById(it[i]);
			//alert(d.style.visibility);
			d.style.visibility="hidden";
			d.style.width=200;
		}
	}
}

function View(id, s) {
	if (s || eval('c'+id)) {
		if(document.all) {
			if (eval('document.all.'+id)) {
				eval('document.all.'+id+'.style.visibility = "visible"');
				eval('document.all.'+id+'.style.zIndex = 1');
			}
		}
		else {
				d = eval('document.'+id);
				if(!d && document.getElementById) d=document.getElementById(id);
				d.style.visibility="visible";
				d.style.zIndex = 1;
		}
		eval('c'+id+' = true');
	}
}

function validationbi() 
{ 
		if(document.formulaire.UsNom.value == "") 
		{ 
        alert ('Veuillez saisir votre nom'); 
        document.formulaire.UsNom.focus(); 
        return false; 
    	}

       	if(document.formulaire.UsPrenom.value == "") 
		{ 
        alert ('Veuillez saisir votre prénom'); 
        document.formulaire.UsPrenom.focus(); 
        return false; 
    	}
		var email = document.formulaire.UsMail.value; 
	    if (email.search(/^[_a-z0-9-]+(.[_a-z0-9-]+)*[^._-]@[a-z0-9-]+(.[a-z0-9]{2,4})*$/) == -1)
        { 
            alert ('Veuillez saisir une adresse email valide'); 
            document.formulaire.UsMail.focus(); 
            return false; 
        } 
		
		if(document.formulaire.UsMP.value == "") 
		{ 
        alert ('Veuillez saisir un mot de passe'); 
        document.formulaire.UsMP.focus(); 
        return false; 
    	}

else {return true;}
}



function animflash(tit, src, wi, he)
{
document.write("<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'");
document.write(" codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0'");
document.write(" WIDTH='"+ wi +"' HEIGHT='"+ he +"' id='"+ tit +"' ALIGN=''>");
document.write("<PARAM NAME=movie VALUE='"+ src +"'> ");
document.write("<param name=wmode value='transparent'> ");
document.write("<PARAM NAME=quality VALUE=high>");
document.write("<EMBED src='"+ src +"' quality=high wmode='transparent' WIDTH='"+ wi +"' HEIGHT='"+ he +"' NAME='"+ tit +"' TYPE='application/x-shockwave-flash'");
document.write(" PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'></EMBED>");
document.write("</OBJECT>");

}


function fenetreCent(url,nom,largeur,hauteur,options) {
var haut=(screen.height-hauteur)/2;
var Gauche=(screen.width-largeur)/2;
fencent=window.open(url,nom,"top="+haut+",left="+Gauche+",width="+largeur+",height="+hauteur+","+options);
}


var cF=document.all.calendar ;
var gimg,ginpt,ginpt2;

var hauteurcentre=(screen.height-184)/2;
var gauchecentre=(screen.width-158)/2;

function Calendrier(img,inpt,chmp,inpt2)
{
gimg=img;
ginpt=inpt;
ginpt2 = inpt2;
var htm="lib/Calendar2/cal.asp"
htm+="?date="+ginpt.value+"&dsel="+ginpt.value+"&chmp="+chmp+"&datlimit="+ginpt2.value;
//htm+="?date="+ginpt.value+"&dsel="+ginpt.value;
fpopup = window.open(htm,'calendart','width=158px,height=184px,top='+hauteurcentre+',left='+gauchecentre+',scrollbars=no,status=no,Resizable=no,menubar=no');
fpopup.focus();
}

function Annule(){
cF.style.display="none";
}

function position1(img) {
var dB=document.body;
	if (img.offsetTop- dB.scrollTop<cF.style.pixelHeight) {
		cF.style.top=img.offsetTop + img.offsetHeight + 3;
	} else {
		cF.style.top=img.offsetTop-cF.style.pixelHeight-5;
	}
	cF.style.left=img.offsetLeft-121;

}

function fullecran(){ 
 if ((document.body.offsetWidth+50) < window.screen.width) {
  window.moveTo(0,0);
  window.resizeTo(window.screen.width,window.screen.height-30); 
 }
}

