function popup(myFiche) {
	window.open(myFiche,'','width=405,height=350,left=250,top=100')
}

function highlight(cible){
	cible.style.backgroundColor='#DDDDDD';
}
function unlight(cible){
	cible.style.backgroundColor='';
}
					
function open_label(label){
	div = document.getElementById(label);
	if (div != null) {
		if (div.style.display == "block"){
			div.style.display = "none";
		} else {
			div.style.display = "block";
		}
	}
}

function open_label_menu(label){
	div = document.getElementById(label);
	lien = document.getElementById('a_'+label);
	if (div != null) {
		if (div.style.display == "block"){
			div.style.display = "none";
		} else {
			div.style.display = "block";
		}
	}
	if (lien != null) {
		if (((lien.style.fontWeight == "bold") || (lien.style.fontWeight == "700")) 
			&& (label != page_section)){
																							// compliance for Opera browser
			lien.style.fontWeight = "normal";
		} else {
			lien.style.fontWeight = "bold";
		}
	}
}

///////////////////////////////////////

// Dreamweaver image swap management //

///////////////////////////////////////



function MM_swapImgRestore() { //v3.0

  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;

}



function MM_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}



function MM_findObj(n, d) { //v4.0

  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);

  if(!x && document.getElementById) x=document.getElementById(n); return x;

}



function MM_swapImage() { //v3.0

  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)

   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}



/////////////////////////////

//    Popup                //

/////////////////////////////

function Popup(url, w, h) {



// on dtermine la r?solution de l'cran 

  if (window.screen) {

    var aw = screen.availWidth;

    var ah = screen.availHeight;

  }

  

// d?calage pour centrer la fenetre 	

	 var offsetX = (aw/2) - (w/2);

	 var offsetY = (ah/2) - (h/2);



     var Params = "width=" + w + ",height=" + h + ",resizable=yes,status=0,toolbar=no,top=" + offsetY + ",left=" + offsetX + "" ;

     win = window.open(url,"_new", Params);

	 win.focus();

}



/////////////////////////////

//    Bookmarking          //

/////////////////////////////

function bookmark(){

	if (window.external) external.AddFavorite(location.href, "Site Internet Lilly France");

	else alert("Désolé, votre navigateur ne supporte pas cette fonctinnalit." + "\nVous pouvez utiliser la fonction Ajouter aux favoris de votre navigateur pour sauvegarder l adresse de cette page.");

	}



/////////////////////////////

//    Easy print popup     //

/////////////////////////////



function open_print_page() {

  window.open(document.location.href+'?print=yes', "print_page", "toolbar=no,width=750;height=575");

}



/////////////////////////////

// Modified date functions //

/////////////////////////////



var dateModified = document.lastModified;

var months = new Array('janvier','f?vrier','mars','avril','mai','juin','juillet','aot','septembre','octobre','novembre','d?cembre');

pos1 = dateModified.indexOf("/");

pos2 = dateModified.indexOf("/",pos1+1);

pos3 = dateModified.indexOf(" ",pos2+1);

modifydate = dateModified.substring(pos1+1,pos2) + " " + months[eval(dateModified.substring(0,pos1)-1)] + " " + dateModified.substring(pos2+1,pos3);



/////////////////////////////

// Send a page to a friend //

/////////////////////////////

	function sendFriend() {

      var thisURL= escape(document.location.href)

      var host_name="";

      host_name = "/main/emailAFriend.cfm?pageURL=" + thisURL;        

      location.href=host_name;

    }

/////////////////////////////

// Verify email            //

/////////////////////////////	

	function isMail(strSaisie) {

	if ( strSaisie.indexOf(" ") != -1 )

		return false;

	if ( strSaisie.indexOf("<") != -1 )

		return false;

	if ( strSaisie.indexOf(">") != -1 )

		return false;

	a = strSaisie.indexOf("@");

	if ( a != -1 ) {

		p = strSaisie.lastIndexOf(".");

		if ( (p > a+1) && ((strSaisie.length - p) <= 4) )

			return true;

	}

	return false;

} 



/////////////////////////////////////

///   Change lines color        /////

/////////////////////////////////////



function CH(tr, mode) {

var oldCol;

if (mode == 0) {

	oldCol = tr.className;

	tr.className = 'trOver';

	} else {

	tr.className = oldCol;

	}

}

