// JavaScript Document

function changeClass(div, classe)
{
	calque = document.getElementById(div); 
	calque.className = classe;
}

function validerEmail(email)
{
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (filter.test(email)) return false;
	else return true;
}

function changeDisplay(div)
{
	calque = document.getElementById(div); 
	
	switch(calque.style.display)
	{
		case "none":calque.style.display="block";break;
		default : calque.style.display="none";
	}
}

function affiche(URL)
{
	widthWin=(arguments[1])?arguments[1]:250;
	heightWin=(arguments[2])?arguments[2]:200;
	range=(arguments[3])?'width='+widthWin+',height='+heightWin+','+arguments[3]:'width='+widthWin+',height='+heightWin+',scrollbars=no,resizable=no,menubar=no,status=no,toolbar=no,location=no,top=50,left=50,directories=no';
	thenewWin=(arguments[4])?arguments[4]:'thenewWin';
	newWin = window.open(URL, thenewWin,range);
	newWin.focus();
}

function myLocation(url)
{	
	parent.location = url;
}

function show(calque)
{
	var calque = document.getElementById(calque);
	switch(calque.style.display)
	{
		case "block":	calque.style.display="none";break;
		case "none":	calque.style.display="block";break;
		default:	calque.style.display="block";
	}
}