<!--
//window.onload=showSubMenu;
function showSubMenu(id) {
	var d = document.getElementById(id);
		for (var i = 1; i<=10; i++) {
			if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
		}
		
	if (d) {d.style.display='block';}
}
//-->

function ouvrir_popup(url,ww,hw) {
	eval("sluts= window.open( '" + url + "', 'enneart', 'width=" + ww + ",height=" + hw + ",toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=1,resizable=1,left=10,top=10');");
	eval("enneart.focus();");
}

function check_fields(whichform) {

	if(whichform == "auth"){
		if(document.frm.userName.value=="") {
			alert("Identifiant requis");
			document.frm.userName.focus();
			return false;
		}
		else {
			if(document.frm.password.value=="") {
				alert("Mot de passe requis");
				document.frm.password.focus();
				return false;
			}
		}
		document.frm.action = 'index.php?rub=11';
	}





if(whichform == "authlieu"){
		if(document.frm.lieuName.value=="") {
			alert("Nom du Lieu requis");
			document.frm.lieuName.focus();
			return false;
		}
		else {
			if(document.frm.lieupassword.value=="") {
				alert("Mot de passe requis");
				document.frm.lieupassword.focus();
				return false;
			}
		}
		document.frm.action = 'index.php?rub=36';
	}
	
	if(whichform == "subscribe"){
		if(document.frm.lastName.value=="") {
			alert("Nom requis");
			document.frm.lastName.focus();
			return false;
		}
		
		if(document.frm.firstName.value=="") {
			alert("Prénom requis");
			document.frm.firstName.focus();
			return false;
		}
		
		if(document.frm.email.value=="") {
			alert("Email requis");
			document.frm.email.focus();
			return false;
		}
	
		if(document.frm.pseudo.value=="") {
			alert("Identifiant requis");
			document.frm.pseudo.focus();
			return false;
		}
	
		if(document.frm.password.value=="") {
			alert("Mot de passe requis");
			document.frm.password.focus();
		return false;
		}

		if(document.frm.password.value!=document.frm.password2.value) {
			alert("Merci de confirmer votre mot de passe");
			document.frm.password2.focus();
			return false;
		}
		
		document.frm.action = 'index.php?rub=10&act=add';
	}
	
if(whichform == "subscribelieu"){
		if(document.frm.lastNameProprio.value=="") {
			alert("Nom requis");
			document.frm.lastNameProprio.focus();
			return false;
		}
		
		if(document.frm.firstNameProprio.value=="") {
			alert("Prénom requis");
			document.frm.firstNameProprio.focus();
			return false;
		}
		
		if(document.frm.lieuEmail.value=="") {
			alert("Email requis");
			document.frm.lieuEmail.focus();
			return false;
		}
	
		if(document.frm.lieuName.value=="") {
			alert("Nom du lieu requis");
			document.frm.lieuName.focus();
			return false;
		}
	
		if(document.frm.lieupassword.value=="") {
			alert("Mot de passe requis");
			document.frm.lieupassword.focus();
		return false;
		}

		if(document.frm.lieupassword.value!=document.frm.lieupassword2.value) {
			alert("Merci de confirmer votre mot de passe");
			document.frm.lieupassword2.focus();
			return false;
		}
		
		document.frm.action = 'index.php?rub=35&act=add';
	}



	if(whichform == "subchoice"){
		document.frm.action = 'index.php?rub=22&act=add';
	}
	
if(whichform == "subchoiceLieu"){
		document.frm.action = 'index.php?rub=37&act=add';
	}
	if(whichform == "myprofil"){
		document.frm.action = 'index.php?rub=20&act=mod';
	}
	
        if(whichform == "mavitrine"){
		document.frm.action = 'index.php?rub=40&act=mod';
	}
	
        if(whichform == "contact"){
		document.frm.action = 'index.php?rub=7&act=send';
	}         
	
	if(whichform == "annonces"){
		document.frm.action = 'index.php?rub=6&act=send';
	}
	


	if(whichform == "modMyCrea"){
		document.frm.action = 'index.php?rub=25&act=modMyCrea';
	}
	
	if(whichform == "suppMyCrea"){
		document.frm.action = 'index.php?rub=25&act=suppMyCrea';
	}
	
	if(whichform == "activeMyCrea"){
		document.frm.action = 'index.php?rub=25&act=activeMyCrea';
	}
	
	if(whichform == "addCrea"){
		if(document.frm.creationTitle.value=="") {
			alert("Titre requis");
			document.frm.creationTitle.focus();
			return false;
		}
		else {
			if(document.frm.creationPrice.value=="") {
				alert("Prix requis");
				document.frm.creationPrice.focus();
				return false;
			}
			else {
				if(document.frm.creationContent.value=="") {
					alert("Description requise");
					document.frm.creationContent.focus();
					return false;
				}
			}
		}		
		
		document.frm.action = 'index.php?rub=26&act=addCrea';
	}
	
	
	


	if(whichform == "modMyArticle"){
		document.frm.action = 'index.php?rub=32&act=modMyArticle';
	}
	
	if(whichform == "suppMyArticle"){
		document.frm.action = 'index.php?rub=32&act=suppMyArticle';
	}
	
	if(whichform == "activeMyArticle"){
		document.frm.action = 'index.php?rub=32&act=activeMyArticle';
	}
	
	if(whichform == "addArticle"){
		if(document.frm.articleTitle.value=="") {
			alert("Titre requis");
			document.frm.articleTitle.focus();
			return false;
		}
		else {
			if(document.frm.articlePrice.value=="") {
				alert("Prix requis");
				document.frm.articlePrice.focus();
				return false;
			}
			else {
				if(document.frm.articleContent.value=="") {
					alert("Description requise");
					document.frm.articleContent.focus();
					return false;
				}
			}
		}		
		
		document.frm.action = 'index.php?rub=34&act=addArticle';
	}
	
	document.frm.submit();
}


function hideShow(divId)

{
	try {
		divObj = document.getElementById(divId);
  

	if(divObj.style.display == "inline")
		divObj.style.display = "none";
	else
		divObj.style.display = "inline";
	}

	catch(e)
	{
    //alert(e.description);
	window.status = e.description;
	}

}