function toggle(e)
{
	if (e.style.display == 'none')
		{ e.style.display = 'block'; }
	else
		{ e.style.display = 'none'; }
}

function VoirPhoto(chemin, hauteur, largeur, Phnom)
{
	Photo=window.open('./Album/AgPhoto.php?Chemin='+chemin,'Photo','width='+largeur+', height='+hauteur+', toolbar=no, menubar=no, resizable=no, location=no, directories=no, status=no, scrollbars=auto, copyhistory=no');
}

function OuvrirMessage(URL,size)
{
	window.open(URL,'Message','width=522,height=450,toolbar=no,menubar=no,resizable=no,location=no,directories=no,status=no,scrollbars=yes,copyhistory=no');
}

function NouveauMessage(URL,size)
{
	window.open(URL,'Nouveau','width=430,height=420,toolbar=no,menubar=no,resizable=no,location=no,directories=no,status=no,scrollbars=auto,copyhistory=no');
}

function downloadFile(fichier)
{
	var xhr_object;
    try {  xhr_object = new ActiveXObject('Msxml2.XMLHTTP');   }
    catch (e) {
        try {   xhr_object = new ActiveXObject('Microsoft.XMLHTTP');    }
        catch (e2) {
          try {  xhr_object = new XMLHttpRequest();     }
          catch (e3) {  xhr_object = false;   }
        }
     }

	fichierPhP = '/Album/downloadFile.php?fichier='+fichier;
	alert (fichierPhP);
	xhr_object.open("GET", fichierPhP, true);
	xhr_object.send(null);
}

function VerifFormiPerso() {
	var SubOK='1';
	if (document.FormiPerso.pwd.value != document.FormiPerso.pwd2.value)
	    { SubOK='0'; alert('Les 2 mots de passe entrés ne sont pas identiques.'); }
	if (document.FormiPerso.pseudo.value.length<3)
	    { SubOK='0'; alert('Le pseudo doit contenir au moins 3 caractères.'); }
	if (SubOK=='1') document.FormiPerso.submit();
}
