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.01
  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 && d.getElementById) x=d.getElementById(n); return x;
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

// JavaScript Document
function initLogin(id) {
	var tmpObj=document.getElementById(id);
	tmpObj.onfocus=function () {
		if(this.value==id) this.value="";
	}
	tmpObj.onblur = function () {
		if(this.value=="") this.value=id;
	}
}

/*
window.onload = function() {
	initLogin("Login");
	initLogin("Password");
}*/

function trim(str) {
	return str.replace(/^\s+/g, '').replace(/\s+$/g, '');
}
function isBlank(str) {
	if( str == "" ) 
		return true ;
	return false ;
}

function isEmail(s){
	if (s.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]{2,4}$/) != -1)
		return true ;
	return false ;
}
function formValidate()
{ 
	var frm=document.getElementById('frmReg');
	if (isBlank(trim(frm.email.value) )) {
		alert("Merci d'indiquer votre e-mail professionnel.");
		frm.email.focus();
		return false;
	} 
	else if (!isEmail(trim(frm.email.value) )) {
		alert("Merci d'indiquer un e-mail professionnel valide.");
		frm.email.focus();
		return false;
	} 
	if (isBlank(trim(frm.nome.value) )) {
		alert("Merci d'indiquer votre nom.");
		frm.nome.focus();
		return false;
	}
	else if (isBlank( trim(frm.prenom.value) )) {
		alert("Merci d'indiquer votre prenom.");
		frm.prenom.focus();
		return false;
	}
	return true;
}

//
function getElementsByBaseTagClass(base, tag, className) { 
    var classPat = new RegExp('\\b'+className+'\\b'); 
    var nodes = base.getElementsByTagName(tag); 
    var matching = []; 
    for (var i = 0; i < nodes.length; i++) { 
        if (classPat.test(nodes[i].className)) { 
            matching.push(nodes[i]); 
        } 
    } 
	return matching; 
}

//

var W3CDOM = (document.createElement && document.getElementsByTagName);
var mouseOvers = new Array();
var mouseOuts = new Array();


function init()
{

	if (!W3CDOM) return;
	/*var nav = document.getElementById('container');*/
	var inputImgs = document.getElementsByTagName('input');
	var imageImgs = document.getElementsByTagName('img');
	var images = new Array();
	for (var i=0; i<imageImgs.length; i++) {images.push(imageImgs[i]);}
	for (var i=0; i<inputImgs.length; i++) {images.push(inputImgs[i]);}
	//alert (images.length);
	for (var i=0; i<images.length; i++)
	{
		if (images[i].src.indexOf('.gif') != -1) // On cible seulement les lments input de type image avec une extension de type .gif
		{			
			// Get image name
			//alert ( (images[i].src.substring(images[i].src.lastIndexOf('/') + 1)).substring(0,(images[i].src.substring(images[i].src.lastIndexOf('/') + 1)).lastIndexOf('.')) );
			tmp=(images[i].src.substring(images[i].src.lastIndexOf('/') + 1)).substring(0,(images[i].src.substring(images[i].src.lastIndexOf('/') + 1)).lastIndexOf('.'));
			
			if ( tmp.indexOf('_') != -1) /* search all img have "_" */
			{
				if (tmp.substring(tmp.lastIndexOf('_')+1) == "n" )
					{
						//alert ( (images[i].src.substring(images[i].src.lastIndexOf('/') + 1)).substring(0,(images[i].src.substring(images[i].src.lastIndexOf('/') + 1)).lastIndexOf('.')) );
						images[i].onmouseover = mouseGoesOver;
						images[i].onmouseout = mouseGoesOut;
						mouseOuts[i] = new Image();
						mouseOuts[i].src = images[i].src;
						mouseOvers[i] = new Image();	
						
						/*	
						if (images[i].src.lastIndexOf('_') != -1) { mouseOvers[i].src = images[i].src.substring(0,images[i].src.lastIndexOf('_')) + "_over" + suffix;}
						else { mouseOvers[i].src = images[i].src.substring(0,images[i].src.lastIndexOf('.')) + "_over" + suffix;}
						*/
						var suffix = images[i].src.substring(images[i].src.lastIndexOf('.'));
						if (images[i].src.lastIndexOf('.') != -1) { mouseOvers[i].src = images[i].src.substring(0,images[i].src.lastIndexOf('_')) + "_o" + suffix;}
						images[i].number = i;
					}
			}
		}
	} //end for
} //end init

function initreset()
{
	if (!W3CDOM) return;
	var images = document.getElementsByTagName('img');
	for (var i=0; i<images.length; i++)
	{
		if (images[i].src.indexOf('.gif') != -1) // On cible seulement les lments input de type image avec une extension de type .gif
		{			
			tmp=(images[i].src.substring(images[i].src.lastIndexOf('/') + 1)).substring(0,(images[i].src.substring(images[i].src.lastIndexOf('/') + 1)).lastIndexOf('.'));
			
			if ( tmp.indexOf('_') != -1) /* search all img have "_" */
			{
				if (tmp.substring(tmp.lastIndexOf('_')+1) == "o" )
				{
					//alert ( (images[i].src.substring(images[i].src.lastIndexOf('/') + 1)).substring(0,(images[i].src.substring(images[i].src.lastIndexOf('/') + 1)).lastIndexOf('.')) );
					var suffix = images[i].src.substring(images[i].src.lastIndexOf('.'));
					var tmpimg= new Image();
						tmpimg.src=images[i].src.substring(0,images[i].src.lastIndexOf('_')) + "_n.gif";
					images[i].src=tmpimg.src;
				}
			}
		}
	} //end for
} //end initreset

var fsub=false;
var mobj;
var osrc="";
function mouseGoesOver(fsub, mEvent) {
	if (checkIt("msie") != 0) { // use in IE
		if (fsub==true) {
			mobj.src=osrc;
			fsub=false;
		} else {
			this.src = mouseOvers[this.number].src;
		}
		osrc=event.srcElement.src;
		mobj=event.srcElement;
	}
	else {	// use in firefox
		if (fsub==true) {
			mobj.src=osrc;
			fsub=false;
		} else if (fsub=='')  {
			osrc=mEvent.target.src;
			mobj=mEvent.target;
		} else {
			this.src = mouseOvers[this.number].src;
		}
	}
}

function mouseGoesOut() {this.src = mouseOuts[this.number].src;	}

//-->

<!--
var detect = navigator.userAgent.toLowerCase();
var OS,browser,total,thestring;
var version = 0;

function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}

// Slide Content
document.orgH;
document.maxH=0;
document.curobj;
document.flagSlideUp=false;
document.Objselected;
document.flaggetH=true;

function getorgH(mH) {
	document.orgH=mH;
	document.flaggetH=false;
}

function slidemenu(id,curfaq) {
	if (document.flaggetH) { //get the Height of current div and keep it (run 1 time);
		getorgH(curfaq[id].offsetHeight);
	}
	for (i=0; i<curfaq.length; i++){
		if (i != id) {
			curfaq[i].style.display = "none";
		}		
	}
	curfaq[id].style.display="block";
	curfaq[id].style.overflow="hidden";
	document.maxH=curfaq[id].offsetHeight; /*get the current Height of Div */
	document.curobj=curfaq[id];
	curfaq[id].style.height=0 + "px";	

	if (document.Objselected==curfaq[id] && document.flagSlideUp) { /*toggle Div to Slide Up and Down*/
		curfaq[id].style.height=document.orgH + "px";		
		//curfaq[id].style.height=document.maxH + "px";		
		//aniHeightUp(8,80);			
	} else {
		document.maxH=document.orgH; //reset the maxH to the orginal Div Height.Cause the maxH is set to 0 when use aniHeightUp().
		aniHeightDown(8,80);
	}
	document.Objselected=curfaq[id]; /*use for toggle Div*/
}

function aniHeightDown (pxmove, waittime) {	/*Slide Div Down*/
	mobj=document.curobj;
	mobj.style.height = mobj.offsetHeight + pxmove + "px";
	if (mobj.offsetHeight>document.maxH) {
		mobj.style.height = document.maxH + "px";
		document.flagSlideUp=true;
		return;	
	}
	setTimeout("aniHeightDown("+pxmove+","+waittime+")", waittime);
}

function aniHeightUp (pxmove, waittime) { /*Slide Div Up*/
	mobj=document.curobj;
	mobj.style.height = mobj.offsetHeight - pxmove + "px";	
	if (mobj.offsetHeight<pxmove) {
		mobj.style.height = 0 + "px";
		mobj.style.display="none";
		document.flagSlideUp=false;
		return;
	}
	setTimeout("aniHeightUp("+pxmove+","+waittime+")", waittime);
}

function highlight (id, curfaq) {
	for (i=0; i<curfaq.length; i++){
		if (i != id) {
			curfaq[i].className="linkarr";
		}
	}
	curfaq[id].className="linkhilight";
}

var win=null;

function NewWindow(mypage,myname,w,h,scroll,pos)
{
	if (mypage!="")
	{
		if(pos=="random") {
			LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
			TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
		}

		if(pos=="center") {
			LeftPosition=(screen.width)?(screen.width-w)/2:100;
			TopPosition=(screen.height)?(screen.height-h)/2:100;
		}
		else if((pos!="center" && pos!="random") || pos==null) {
				LeftPosition=0;TopPosition=0
		}
		settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
		myname1 = myname + Math.round(1099999999*Math.random());
		win=window.open(mypage,myname1,settings);
	}
}

/***********************************************
* DHTML Billboard script- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//List of transitional effects to be randomly applied to billboard:
var billboardeffects=["GradientWipe(GradientSize=1.0 Duration=0.7)", "Inset", "Iris", "Pixelate(MaxSquare=5 enabled=false)", "RadialWipe", "RandomBars", "Slide(slideStyle='push')", "Spiral", "Stretch", "Strips", "Wheel", "ZigZag"]

//var billboardeffects=["Iris"] //Uncomment this line and input one of the effects above (ie: "Iris") for single effect.

var tickspeed=5000 //ticker speed in miliseconds (2000=2 seconds)
var effectduration=500 //Transitional effect duration in miliseconds
var hidecontent_from_legacy=1 //Should content be hidden in legacy browsers- IE4/NS4 (0=no, 1=yes).

var filterid=Math.floor(Math.random()*billboardeffects.length)

document.write('<style type="text/css">\n')
if (document.getElementById)
document.write('.billcontent{display:none;\n'+'filter:progid:DXImageTransform.Microsoft.'+billboardeffects[filterid]+'}\n')
else if (hidecontent_from_legacy)
document.write('#contentwrapper{display:none;}')
document.write('</style>\n')

var selectedDiv=0
var totalDivs=0

function contractboard(){
var inc=0
while (document.getElementById("billboard"+inc)){
document.getElementById("billboard"+inc).style.display="none"
inc++
}
}

function expandboard(){
var selectedDivObj=document.getElementById("billboard"+selectedDiv)
contractboard()
if (selectedDivObj.filters){
if (billboardeffects.length>1){
filterid=Math.floor(Math.random()*billboardeffects.length)
selectedDivObj.style.filter="progid:DXImageTransform.Microsoft."+billboardeffects[filterid]
}
selectedDivObj.filters[0].duration=effectduration/1000
selectedDivObj.filters[0].Apply()
}
selectedDivObj.style.display="block"
if (selectedDivObj.filters)
selectedDivObj.filters[0].Play()
selectedDiv=(selectedDiv<totalDivs-1)? selectedDiv+1 : 0
setTimeout("expandboard()",tickspeed)
}

function startbill(){
while (document.getElementById("billboard"+totalDivs)!=null)
totalDivs++
if(document.getElementById("billboard0") != null){
	if (document.getElementById("billboard0").filters)
	tickspeed+=effectduration
	expandboard()
}
}

if (window.addEventListener)
window.addEventListener("load", startbill, false)
else if (window.attachEvent)
window.attachEvent("onload", startbill)
else if (document.getElementById)
window.onload=startbill
