var bnum=new Number(Math.floor(99999999 * Math.random())+1);

function getsource(){ 
var winpops=window.open("view-source:" + window.location,'','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=600,height=900');
}

function popUp(URL) {
var winpops=window.open(URL,'','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=600,height=900');
}

function validation(){
	var email   = document.forms[0].mail.value;
    var verif   = /^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)(\.[a-zA-Z]{2,3})$/ ; 
    if (verif.exec(email) == null){
		alert("ATTENTION : l'adresse e-mail saisie est incorrecte.");
		return false;
	}else{
		return true;
	}
}

if (document.images){
	var asdecom0 = new Image(); asdecom0.src = "img/roll_home.jpg";
	var asdecom1 = new Image(); asdecom1.src = "img/roll_corporate.jpg";
	var asdecom2 = new Image(); asdecom2.src = "img/roll_products.jpg";
	var asdecom3 = new Image(); asdecom3.src = "img/roll_events.jpg";
}


//This function checks that all the required data are input
function checkEntries(){
	var data_miss = 0, myString = "", myForm = this.document.forms[0], myItem, rep_msg = "Vous devez saisir votre identifiant et votre mot de passe. \nVous avez omis:\n";
	
	if (myForm.f_login.value + "" == ""){
		rep_msg += "     - votre identifiant\n";
		data_miss = 1;
	}
	if (myForm.f_password.value + "" == ""){
		rep_msg += "     - votre mot de passe\n";
		data_miss = 1;
	}
	if (data_miss == 1){ 
		alert(rep_msg);
		return false;
	}else{ 			
		return true;
	}
}
