var win = null;
function fenetre(mypage,myname,w,h,scroll,no)
{
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable='+no+''
	win = window.open(mypage,myname,settings)
	if(win.window.focus){win.window.focus();}
}
function clearText(thefield) {
	if (thefield.defaultValue==thefield.value)
	thefield.value = ""
}
function toggleVisibility(id) {
	e = document.getElementById(id);
	if (e.style.visibility == "visible") {
		e.style.display = "none";
		e.style.visibility = "hidden";
	} else {
		e.style.display = "block";
		e.style.visibility = "visible";
	}
}

function FocusText(BoxName)
{
if (BoxName.value == BoxName.defaultValue)
{
BoxName.value = '';
}
}
function BlurText(BoxName)
{
if (BoxName.value == '')
{
BoxName.value = BoxName.defaultValue;
}
}

function validateIt(ecriture) {
	strRet = "";
	if (ecriture.nom.value == "") strRet += '\tnom\n';
	if (ecriture.email.value == "") {
		strRet += '\tmail\n';
	} else {
		var string1 = ecriture.email.value;
		if (string1.indexOf("@")==-1 || string1.indexOf(".")==-1) strRet += '\tEmail\n';
	}
	if (strRet!="") {
		alert('Veuillez entrer un email correcte.');
		return false;
	} else {
		return true;
	}	
}