function getXMLHttpRequest() {
	var xhr = null;
	
	if(window.XMLHttpRequest || window.ActiveXObject) {
		if(window.ActiveXObject) {
			try {
				xhr = new ActiveXObject("Msxml2.XMLHTTP");
			} catch(e) {
				xhr = new ActiveXObject("Microsoft.XMLHTTP");
			}
		} else {
			xhr = new XMLHttpRequest(); 
		}
	} else {
		alert("Votre navigateur ne supporte pas l'objet XMLHTTPRequest...");
		return null;
	}
	
	return xhr;
}

function deconnecter() {
	alert("Votre session administrateur a expirée. Veuillez vous reconnecter.");

	charger(true);
	
	var xhr = getXMLHttpRequest();

	if(xhr && xhr.readyState != 0) {
		xhr.abort(); 
	}

	xhr.onreadystatechange = function() { 
		if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) {
			charger(false);
			location.reload(true);
		}
	}
	
	xhr.open("GET", "scripts/php/connecter.php?type=2", true);	
	xhr.send(null);
}

/*LES CATEGORIES DE PRESTATION*/
function afficherFormAjoutCateg() {
	charger(true);
	
	var xhr = getXMLHttpRequest();

	if(xhr && xhr.readyState != 0) {
		xhr.abort(); 
	}

	xhr.onreadystatechange = function() { 
		if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) {
			charger(false);
			if (xhr.responseText=="deco") {
				deconnecter();
			}else{
				document.getElementById('divFont').style.height = document.getElementById('content2').scrollHeight+"px";
				document.getElementById('divFont').style.width = document.getElementById('content2').scrollWidth+"px";
				document.getElementById('divFont').style.display = 'block';
				document.getElementById('popup').style.display = 'block';
				document.getElementById('popup').style.width = "290px";
				document.getElementById('popup').style.marginLeft = "-145px";
				document.getElementById('popup').style.height = "60px";
				document.getElementById('popup').style.marginTop = "-10px";
				document.getElementById('popup').innerHTML = xhr.responseText;
				setFocus("libelle");
			}
		}
	}
	
	xhr.open("GET", "form_ajoutCateg.php", true);
	xhr.send(null);
}

function supprimerCateg(idCateg) {
	if (confirm("Etes-vous sur de vouloir supprimer cette catégorie (ceci supprimera egalement toutes les prestations de cette catégorie)?")) {
		charger(true);
		
		var xhr = getXMLHttpRequest();

		if(xhr && xhr.readyState != 0) {
			xhr.abort(); 
		}

		xhr.onreadystatechange = function() { 
			if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) {
				charger(false);
				if(xhr.responseText=="deco") {
					deconnecter();
				}else{
					location.reload(false);
				}
			}
		}
		
		xhr.open("GET", "scripts/php/gestionPrestation.php?type=2&idCateg="+idCateg, true);	
		xhr.send(null);
	}
}

function afficherFormModifCateg(idCateg) {
	charger(true);
	
	var xhr = getXMLHttpRequest();

	if(xhr && xhr.readyState != 0) {
		xhr.abort(); 
	}

	xhr.onreadystatechange = function() { 
		if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) {
			charger(false);
			if (xhr.responseText=="deco") {
				deconnecter();
			}else{
				document.getElementById('divFont').style.height = document.getElementById('content2').scrollHeight+"px";
				document.getElementById('divFont').style.width = document.getElementById('content2').scrollWidth+"px";
				document.getElementById('divFont').style.display = 'block';
				document.getElementById('popup').style.display = 'block';
				document.getElementById('popup').style.width = "290px";
				document.getElementById('popup').style.marginLeft = "-145px";
				document.getElementById('popup').style.height = "80px";
				document.getElementById('popup').style.marginTop = "-10px";
				document.getElementById('popup').innerHTML = xhr.responseText;
				setFocus("libelle");
			}
		}
	}
	
	xhr.open("GET", "form_modifCateg.php?idCateg="+idCateg, true);
	xhr.send(null);
}

/*LES PRESTATIONS*/
function afficherFormAjoutPresta(idCateg) {
	charger(true);
	
	var xhr = getXMLHttpRequest();

	if(xhr && xhr.readyState != 0) {
		xhr.abort(); 
	}

	xhr.onreadystatechange = function() { 
		if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) {
			charger(false);
			if (xhr.responseText=="deco") {
				deconnecter();
			}else{
				document.getElementById('divFont').style.height = document.getElementById('content2').scrollHeight+"px";
				document.getElementById('divFont').style.width = document.getElementById('content2').scrollWidth+"px";
				document.getElementById('divFont').style.display = 'block';
				document.getElementById('popup').style.display = 'block';
				document.getElementById('popup').style.width = "290px";
				document.getElementById('popup').style.marginLeft = "-145px";
				document.getElementById('popup').style.height = "60px";
				document.getElementById('popup').style.marginTop = "-10px";
				document.getElementById('popup').innerHTML = xhr.responseText;
				setFocus("libelle");
			}
		}
	}
	
	xhr.open("GET", "form_ajoutPresta.php?idCateg="+idCateg, true);
	xhr.send(null);
}

function supprimerPresta(idPresta) {
	if (confirm("Etes-vous sur de vouloir supprimer cette prestation ?")) {
		charger(true);
		
		var xhr = getXMLHttpRequest();

		if(xhr && xhr.readyState != 0) {
			xhr.abort(); 
		}

		xhr.onreadystatechange = function() { 
			if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) {
				charger(false);
				if(xhr.responseText=="deco") {
					deconnecter();
				}else{
					location.reload(false);
				}
			}
		}
		
		xhr.open("GET", "scripts/php/gestionPrestation.php?type=5&idPresta="+idPresta, true);	
		xhr.send(null);
	}
}

function afficherFormModifPresta(idPresta) {
	charger(true);
	
	var xhr = getXMLHttpRequest();

	if(xhr && xhr.readyState != 0) {
		xhr.abort(); 
	}

	xhr.onreadystatechange = function() { 
		if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) {
			charger(false);
			if (xhr.responseText=="deco") {
				deconnecter();
			}else{
				document.getElementById('divFont').style.height = document.getElementById('content2').scrollHeight+"px";
				document.getElementById('divFont').style.width = document.getElementById('content2').scrollWidth+"px";
				document.getElementById('divFont').style.display = 'block';
				document.getElementById('popup').style.display = 'block';
				document.getElementById('popup').style.width = "290px";
				document.getElementById('popup').style.marginLeft = "-145px";
				document.getElementById('popup').style.height = "80px";
				document.getElementById('popup').style.marginTop = "-10px";
				document.getElementById('popup').innerHTML = xhr.responseText;
				setFocus("libelle");
			}
		}
	}
	
	xhr.open("GET", "form_modifPresta.php?idPresta="+idPresta, true);
	xhr.send(null);
}

/*LES COMMENTAIRES*/
function validerComm(idComm) {
	charger(true);

	var xhr = getXMLHttpRequest();

	if(xhr && xhr.readyState != 0) {
		xhr.abort(); 
	}

	xhr.onreadystatechange = function() { 
		if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) {
			charger(false);
			if(xhr.responseText=="deco") {
				deconnecter();
			}else{
				location.reload(false);
			}
		}
	}
	
	xhr.open("GET", "scripts/php/gestionCommentaire.php?type=2&idComm="+idComm, true);	
	xhr.send(null);
}

function supprimerCommm(idComm) {
	if (confirm("Etes-vous sur de vouloir supprimer ce commentaire ?")) {
		charger(true);
		
		var xhr = getXMLHttpRequest();

		if(xhr && xhr.readyState != 0) {
			xhr.abort(); 
		}

		xhr.onreadystatechange = function() { 
			if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) {
				charger(false);
				if(xhr.responseText=="deco") {
					deconnecter();
				}else{
					location.reload(false);
				}
			}
		}
		
		xhr.open("GET", "scripts/php/gestionCommentaire.php?type=3&idComm="+idComm, true);	
		xhr.send(null);
	}
}

function afficherFormModifierComm(idComm) {
	charger(true);
	
	var xhr = getXMLHttpRequest();

	if(xhr && xhr.readyState != 0) {
		xhr.abort(); 
	}

	xhr.onreadystatechange = function() { 
		if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) {
			charger(false);
			if (xhr.responseText=="deco") {
				deconnecter();
			}else{
				document.getElementById('divFont').style.height = document.getElementById('content2').scrollHeight+"px";
				document.getElementById('divFont').style.width = document.getElementById('content2').scrollWidth+"px";
				document.getElementById('divFont').style.display = 'block';
				document.getElementById('popup').style.display = 'block';
				document.getElementById('popup').style.width = "350px";
				document.getElementById('popup').style.marginLeft = "-175px";
				document.getElementById('popup').style.height = "255px";
				document.getElementById('popup').style.marginTop = "-10px";
				document.getElementById('popup').innerHTML = xhr.responseText;
				setFocus("nom");
			}
		}
	}
	
	xhr.open("GET", "form_modifComm.php?idComm="+idComm, true);
	xhr.send(null);
}

/*LES DOSSIERS*/
function afficherFormAjoutDossier() {
	charger(true);
	
	var xhr = getXMLHttpRequest();

	if(xhr && xhr.readyState != 0) {
		xhr.abort(); 
	}

	xhr.onreadystatechange = function() { 
		if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) {
			charger(false);
			if (xhr.responseText=="deco") {
				deconnecter();
			}else{
				document.getElementById('divFont').style.height = document.getElementById('content2').scrollHeight+"px";
				document.getElementById('divFont').style.width = document.getElementById('content2').scrollWidth+"px";
				document.getElementById('divFont').style.display = 'block';
				document.getElementById('popup').style.display = 'block';
				document.getElementById('popup').style.width = "380px";
				document.getElementById('popup').style.marginLeft = "-190px";
				document.getElementById('popup').style.height = "145px";
				document.getElementById('popup').style.marginTop = "-10px";
				document.getElementById('popup').innerHTML = xhr.responseText;
				setFocus("titre");
			}
		}
	}
	
	xhr.open("GET", "form_ajoutDossier.php", true);
	xhr.send(null);
}

function afficherFormModifierDossier(idDossier) {
	charger(true);
	
	var xhr = getXMLHttpRequest();

	if(xhr && xhr.readyState != 0) {
		xhr.abort(); 
	}

	xhr.onreadystatechange = function() { 
		if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) {
			charger(false);
			if (xhr.responseText=="deco") {
				deconnecter();
			}else{
				document.getElementById('divFont').style.height = document.getElementById('content2').scrollHeight+"px";
				document.getElementById('divFont').style.width = document.getElementById('content2').scrollWidth+"px";
				document.getElementById('divFont').style.display = 'block';
				document.getElementById('popup').style.display = 'block';
				document.getElementById('popup').style.width = "370px";
				document.getElementById('popup').style.marginLeft = "-185px";
				document.getElementById('popup').style.height = "310px";
				document.getElementById('popup').style.marginTop = "-10px";
				document.getElementById('popup').innerHTML = xhr.responseText;
				setFocus("titre");
			}
		}
	}
	
	xhr.open("GET", "form_modifDossier.php?idDossier="+idDossier, true);
	xhr.send(null);
}

function supprimerDossier(idDossier) {
	if (confirm("Etes-vous sur de vouloir supprimer ce dossier ? (Ceci supprimera également les photos que contient le dossier)")) {
		charger(true);
		
		var xhr = getXMLHttpRequest();

		if(xhr && xhr.readyState != 0) {
			xhr.abort(); 
		}

		xhr.onreadystatechange = function() { 
			if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) {
				charger(false);
				if(xhr.responseText=="deco") {
					deconnecter();
				}else{
					location.reload(false);
				}
			}
		}
		
		xhr.open("GET", "scripts/php/gestionDossier.php?type=2&idDossier="+idDossier, true);	
		xhr.send(null);
	}
}

/*LES PHOTOS*/
function afficherFormAjoutPhoto(idDossier) {
	charger(true);
	
	var xhr = getXMLHttpRequest();

	if(xhr && xhr.readyState != 0) {
		xhr.abort(); 
	}

	xhr.onreadystatechange = function() { 
		if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) {
			charger(false);
			if (xhr.responseText=="deco") {
				deconnecter();
			}else{
				document.getElementById('divFont').style.height = document.getElementById('content2').scrollHeight+"px";
				document.getElementById('divFont').style.width = document.getElementById('content2').scrollWidth+"px";
				document.getElementById('divFont').style.display = 'block';
				document.getElementById('popup').style.display = 'block';
				document.getElementById('popup').style.width = "280px";
				document.getElementById('popup').style.marginLeft = "-140px";
				document.getElementById('popup').style.height = "60px";
				document.getElementById('popup').style.marginTop = "-10px";
				document.getElementById('popup').innerHTML = xhr.responseText;
				setFocus("photo");
			}
		}
	}
	
	xhr.open("GET", "form_ajoutPhoto.php?idDossier="+idDossier, true);
	xhr.send(null);
}

function supprimerPhoto(idPhoto) {
	if (confirm("Etes-vous sur de vouloir supprimer cette photo ?")) {
		charger(true);
		
		var xhr = getXMLHttpRequest();

		if(xhr && xhr.readyState != 0) {
			xhr.abort(); 
		}

		xhr.onreadystatechange = function() { 
			if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) {
				charger(false);
				if(xhr.responseText=="deco") {
					deconnecter();
				}else{
					location.reload(false);
				}
			}
		}
		
		xhr.open("GET", "scripts/php/gestionPhoto.php?type=2&idPhoto="+idPhoto, true);	
		xhr.send(null);
	}
}

/*LES PHOTOS*/
function afficherFormAjoutImage() {
	charger(true);
	
	var xhr = getXMLHttpRequest();

	if(xhr && xhr.readyState != 0) {
		xhr.abort(); 
	}

	xhr.onreadystatechange = function() { 
		if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) {
			charger(false);
			if (xhr.responseText=="deco") {
				deconnecter();
			}else{
				document.getElementById('divFont').style.height = document.getElementById('content2').scrollHeight+"px";
				document.getElementById('divFont').style.width = document.getElementById('content2').scrollWidth+"px";
				document.getElementById('divFont').style.display = 'block';
				document.getElementById('popup').style.display = 'block';
				document.getElementById('popup').style.width = "280px";
				document.getElementById('popup').style.marginLeft = "-140px";
				document.getElementById('popup').style.height = "60px";
				document.getElementById('popup').style.marginTop = "-10px";
				document.getElementById('popup').innerHTML = xhr.responseText;
			}
		}
	}
	
	xhr.open("GET", "form_ajoutImage.php", true);
	xhr.send(null);
}

function supprimerImage(idImage) {
	if (confirm("Etes-vous sur de vouloir supprimer cette image ?")) {
		charger(true);
		
		var xhr = getXMLHttpRequest();

		if(xhr && xhr.readyState != 0) {
			xhr.abort(); 
		}

		xhr.onreadystatechange = function() { 
			if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) {
				charger(false);
				if(xhr.responseText=="deco") {
					deconnecter();
				}else{
					location.reload(false);
				}
			}
		}
		
		xhr.open("GET", "scripts/php/gestionImage.php?type=2&idImage="+idImage, true);	
		xhr.send(null);
	}
}

/*LES PARTENAIRES*/
function afficherFormAjoutPart() {
	charger(true);
	
	var xhr = getXMLHttpRequest();

	if(xhr && xhr.readyState != 0) {
		xhr.abort(); 
	}

	xhr.onreadystatechange = function() { 
		if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) {
			charger(false);
			if (xhr.responseText=="deco") {
				deconnecter();
			}else{
				document.getElementById('divFont').style.height = document.getElementById('content2').scrollHeight+"px";
				document.getElementById('divFont').style.width = document.getElementById('content2').scrollWidth+"px";
				document.getElementById('divFont').style.display = 'block';
				document.getElementById('popup').style.display = 'block';
				document.getElementById('popup').style.width = "400px";
				document.getElementById('popup').style.marginLeft = "-200px";
				document.getElementById('popup').style.height = "100px";
				document.getElementById('popup').style.marginTop = "-10px";
				document.getElementById('popup').innerHTML = xhr.responseText;
				setFocus("titre");
			}
		}
	}
	
	xhr.open("GET", "form_ajoutPart.php", true);
	xhr.send(null);
}

function afficherFormModifierPart(idPart) {
	charger(true);
	
	var xhr = getXMLHttpRequest();

	if(xhr && xhr.readyState != 0) {
		xhr.abort(); 
	}

	xhr.onreadystatechange = function() { 
		if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) {
			charger(false);
			if (xhr.responseText=="deco") {
				deconnecter();
			}else{
				document.getElementById('divFont').style.height = document.getElementById('content2').scrollHeight+"px";
				document.getElementById('divFont').style.width = document.getElementById('content2').scrollWidth+"px";
				document.getElementById('divFont').style.display = 'block';
				document.getElementById('popup').style.display = 'block';
				document.getElementById('popup').style.width = "400px";
				document.getElementById('popup').style.marginLeft = "-200px";
				document.getElementById('popup').style.height = "260px";
				document.getElementById('popup').style.marginTop = "-10px";
				document.getElementById('popup').innerHTML = xhr.responseText;
				setFocus("titre");
			}
		}
	}
	
	xhr.open("GET", "form_modifPart.php?idPart="+idPart, true);
	xhr.send(null);
}

function supprimerPart(idPart) {
	if (confirm("Etes-vous sur de vouloir supprimer ce Partenaire ?")) {
		charger(true);
		
		var xhr = getXMLHttpRequest();

		if(xhr && xhr.readyState != 0) {
			xhr.abort(); 
		}

		xhr.onreadystatechange = function() { 
			if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) {
				charger(false);
				if(xhr.responseText=="deco") {
					deconnecter();
				}else{
					location.reload(false);
				}
			}
		}
		
		xhr.open("GET", "scripts/php/gestionPart.php?type=2&idPart="+idPart, true);	
		xhr.send(null);
	}
}

/*LES FORFAITS*/
function afficherFormAjoutForfait() {
	charger(true);
	
	var xhr = getXMLHttpRequest();

	if(xhr && xhr.readyState != 0) {
		xhr.abort(); 
	}

	xhr.onreadystatechange = function() { 
		if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) {
			charger(false);
			if (xhr.responseText=="deco") {
				deconnecter();
			}else{
				document.getElementById('divFont').style.height = document.getElementById('content2').scrollHeight+"px";
				document.getElementById('divFont').style.width = document.getElementById('content2').scrollWidth+"px";
				document.getElementById('divFont').style.display = 'block';
				document.getElementById('popup').style.display = 'block';
				document.getElementById('popup').style.width = "400px";
				document.getElementById('popup').style.marginLeft = "-200px";
				document.getElementById('popup').style.height = "80px";
				document.getElementById('popup').style.marginTop = "-10px";
				document.getElementById('popup').innerHTML = xhr.responseText;
				setFocus("titre");
			}
		}
	}
	
	xhr.open("GET", "form_ajoutForfait.php", true);
	xhr.send(null);
}

function supprimerForfait(idForfait) {
	if (confirm("Etes-vous sur de vouloir supprimer ce Forfait ?")) {
		charger(true);
		
		var xhr = getXMLHttpRequest();

		if(xhr && xhr.readyState != 0) {
			xhr.abort(); 
		}

		xhr.onreadystatechange = function() { 
			if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) {
				charger(false);
				if(xhr.responseText=="deco") {
					deconnecter();
				}else{
					location.reload(false);
				}
			}
		}
		
		xhr.open("GET", "scripts/php/gestionForfait.php?type=2&idForfait="+idForfait, true);	
		xhr.send(null);
	}
}

/*VALIDATION DE FORMULAIRES*/
function validerFormAjoutCateg() {
	var libelle = $('#libelle').val();
	
	if (!verifChaine(libelle)) {
		alert("Veuillez renseigner un libelle.");
		return false;
	}
	
	return true;
}

function validerFormModifCateg() {
	var libelle = $('#libelle').val();
	var ordre = $('#ordre').val();
	
	if (!verifChaine(libelle)) {
		alert("Veuillez renseigner un libelle.");
		return false;
	}else if (!verifChaine(ordre)) {
		alert("Veuillez renseigner un ordre.");
		return false;
	}
	
	return true;
}

function validerFormAjoutPresta() {
	var libelle = $('#libelle').val();
	
	if (!verifChaine(libelle)) {
		alert("Veuillez renseigner un libelle.");
		return false;
	}
	
	return true;
}

function validerFormModifPresta() {
	var libelle = $('#libelle').val();
	var ordre = $('#ordre').val();
	
	if (!verifChaine(libelle)) {
		alert("Veuillez renseigner un libelle.");
		return false;
	}else if (!verifChaine(ordre)) {
		alert("Veuillez renseigner un ordre.");
		return false;
	}
	
	return true;
}

function validerFormAjouterDossier() {
	var titre = $('#titre').val();
	var mois = $('#mois').val();
	var annee = $('#annee').val();
	var client = $('#client').val();
	var jaquette = $('#jaquette').val();
	
	if (!verifChaine(titre)) {
		alert("Veuillez renseigner un titre.");
		return false;
	}else if (!verifChaine(mois) || !verifChaine(annee)) {
		alert("Date incorrecte.");
		return false;
	}else if (!verifChaine(client)) {
		alert("Veuillez renseigner le client.");
		return false;
	}else if (!verifChaine(jaquette)) {
		alert("Veuillez renseigner la jaquette.");
		return false;
	}
	
	return true;
}

function validerFormModifierDossier() {
	var titre = $('#titre').val();
	var mois = $('#mois').val();
	var annee = $('#annee').val();
	var client = $('#client').val();
	
	if (!verifChaine(titre)) {
		alert("Veuillez renseigner un titre.");
		return false;
	}else if (!verifChaine(mois) || !verifChaine(annee)) {
		alert("Date incorrecte.");
		return false;
	}else if (!verifChaine(client)) {
		alert("Veuillez renseigner le client.");
		return false;
	}
	
	return true;
}

function validerFormAjouterPhoto() {
	var photo = $('#photo').val();
	
	if (!verifChaine(titre)) {
		alert("Veuillez renseigner une photo.");
		return false;
	}
	
	return true;
}

function validerFormModifierComm() {
	var nom = $('#nom').val();
	var mail = $('#mail').val();
	var date = $('#date').val();
	var commentaire = $('#commentaire').val();
	
	if (!verifChaine(nom)) {
		alert("Veuillez renseigner un nom.");
		return false;
	}
	
	if (!verifChaine(mail)) {
		alert("Veuillez renseigner un mail.");
		return false;
	}
	
	if (!verifChaine(date)) {
		alert("Veuillez renseigner une date.");
		return false;
	}
	
	if (!verifChaine(commentaire)) {
		alert("Veuillez renseigner un commentaire.");
		return false;
	}
	
	return true;
}

function validerFormAjouterPart() {
	var logo = $('#logo').val();
	var commentaire = $('#comm').val();
	var lien = $('#lien').val();
	
	if (!verifChaine(logo)) {
		alert("Veuillez renseigner un logo.");
		return false;
	}
	
	if (!verifChaine(lien)) {
		alert("Veuillez renseigner un lien.");
		return false;
	}
	
	if (!verifChaine(commentaire)) {
		alert("Veuillez renseigner un commentaire.");
		return false;
	}	
	
	return true;
}

function validerFormModifierPart() {
	var commentaire = $('#comm').val();
	var lien = $('#lien').val();
	
	if (!verifChaine(lien)) {
		alert("Veuillez renseigner un lien.");
		return false;
	}
	
	if (!verifChaine(commentaire)) {
		alert("Veuillez renseigner un commentaire.");
		return false;
	}
	
	return true;
}

function listeOpe() {
	var anneeOpe = document.getElementById("anneeOpToAff").value;
	
	window.location.href="index.php?page=albumsPhotos&annee="+anneeOpe;
}
