function Popup(url,nom,largeur,hauteur,scrollbars,resizable,toolbar) {
	var haut = (screen.height - hauteur) / 2;
	var gauche = (screen.width - largeur) / 2;
	if(scrollbars == "undefined") {
		var scrollbars = 0;
	}
	if(resizable == "undefined") {
		var resizable = 0;
	}
	if(toolbar == "undefined") {
		var toolbar = 0;
	}
	var popup = window.open(url,nom,'width='+largeur+',height='+hauteur+',top='+haut+',left='+gauche+',scrollbars='+scrollbars+',resizable='+resizable+',toolbar='+toolbar+'');
	return;
}

function ConditionsUtilisation() {
	Popup("/conditions_utilisation.php","conditions_utilisation",400,400,1);
}

function Affiliation() {
	Popup("http://www.allopass.com/show_aff.php4?ID=10847&IDC=3482028","affiliation",600,450,1,1);
}

function ConfessionsIntimes() {
	Popup("confessions_intimes.php","confessions_intimes",400,417,0);
}

function CheckConditionsUtilisation() {
	if(document.getElementById('conditions').checked == false) {
		alert('Vous n\'avez pas accepté les conditions d\'utilisation');
		return false;
	} else {
		return true;
	}
}

function AnnonceSuivante(idColonne) {
	if(idColonne == 1) {
		annonceEnCours = document.getElementById('annonce_'+idColonne+'_'+idAnnonce1);
		idAnnonce1++;
		if(idAnnonce1 > nbrAnnonces1) {
			idAnnonce1 = 1;
		}
		annonceFuture = document.getElementById('annonce_'+idColonne+'_'+idAnnonce1);
	} else if(idColonne == 2) {
		annonceEnCours = document.getElementById('annonce_'+idColonne+'_'+idAnnonce2);
		idAnnonce2++;
		if(idAnnonce2 > nbrAnnonces2) {
			idAnnonce2 = 1;
		}
		annonceFuture = document.getElementById('annonce_'+idColonne+'_'+idAnnonce2);
	}
	annonceEnCours.style.display = 'none';
	annonceFuture.style.display = 'block';
}

function AnnoncePrecedente(idColonne) {
	if(idColonne == 1) {
		annonceEnCours = document.getElementById('annonce_'+idColonne+'_'+idAnnonce1);
		idAnnonce1--;
		if(idAnnonce1 < 1) {
			idAnnonce1 = nbrAnnonces1;
		}
		annonceFuture = document.getElementById('annonce_'+idColonne+'_'+idAnnonce1);
	} else if(idColonne == 2) {
		annonceEnCours = document.getElementById('annonce_'+idColonne+'_'+idAnnonce2);
		idAnnonce2--;
		if(idAnnonce2 < 1) {
			idAnnonce2 = nbrAnnonces2;
		}
		annonceFuture = document.getElementById('annonce_'+idColonne+'_'+idAnnonce2);
	}
	annonceEnCours.style.display = 'none';
	annonceFuture.style.display = 'block';
}