// Function to check the validity of an email address
function checkEmail(email)
{
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email)) return true;
	return false;
}

// Function to check field value
function ValidateField(strFieldName)
{
	if (strFieldName.value.length>0) return true;
	return false;
}

// Function preload
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];}}
}


// ascenceur
var timer=0;
var y=0;

function init_timer(){
	timer=1;
}

function avant(hauteur,calq1,calq2){

	maximum=hauteur;
	calque1=calq1;
	calque2=calq2;
    if (document.getElementById){
    	document.getElementById(calque2).style.top=y+'px';
    }
    if ((document.all)&&(!document.getElementById)){
    	document.all[calque2].style.top=y+'px';
    }
    if (document.layers){
    	document.layers[calque1].layers[calque2].top=y+'px';
    }
    if(timer==1 && y<maximum){
    setTimeout("avant(maximum,calque1,calque2)",40);
    y+=10;}
}

function arriere(hauteur,calq1,calq2){

	//alert(max);
	maximum=hauteur;
	calque1=calq1;
	calque2=calq2;
    if (document.getElementById){
        document.getElementById('calque').style.top=y+'px';
    }
    if ((document.all)&&(!document.getElementById)){
    	document.all[calque2].style.top=y+'px';
    }
    if (document.layers){
    	document.layers[calque1].layers[calque2].top=y+'px';
    }
    if(timer==1 && y>maximum){
    setTimeout("arriere(maximum,calque1,calque2)",40);
    y-=10;}
}

function stop_timer(){
	timer=0;
}

function inity(){
	y=0;
}

function stop_timer(){
	timer=0;
}

function credit(){
	var pTemp=window.open("credits.html","credit","height=214,width=335,top=150,left=100,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,copyhistory=no,scrollbars=no");
	pTemp.document.close();
    pTemp.focus()
}