// ================ frame killer ================
if (top.frames.length!=0) top.location=self.document.location;


// ============== filtre anti-spam ==============
function noSpam(user,domain) {
	locationstring = "mailto:" + user + "@" + domain;
	window.location = locationstring;
}



// ============== ouverture popup ==============
function openPopup(type,url) {
	if (type == 1) { // 1 = popup
		var hauteur = 450;
		var largeur = 500;
		//popup centrée
		var top=(screen.height-hauteur)/2;
		var left=(screen.width-largeur)/2;
		window.open(url,'popup','toolbar=0,location=0,directories=0,status=1,scrollbars=1,resizable=1,copyhistory=0,menuBar=0,width='+largeur+',height='+hauteur+',left='+left+',top='+top+'');
	}
	else if (type == 2) { // 2 = liste des participants aux ateliers
		var hauteur = 450;
		var largeur = 500;
		//popup centrée
		var top=(screen.height-hauteur)/2;
		var left=(screen.width-largeur)/2;
		window.open(url,'popup','toolbar=0,location=0,directories=0,status=1,scrollbars=1,resizable=1,copyhistory=0,menuBar=0,width='+largeur+',height='+hauteur+',left='+left+',top='+top+'');
	}
	else if (type == 3) { // 3 = plan d'acces
		var hauteur = 650;
		var largeur = 566;
		//popup centrée
		var top=(screen.height-hauteur)/2;
		var left=(screen.width-largeur)/2;
		window.open(url,'popup','toolbar=0,location=0,directories=0,status=1,scrollbars=1,resizable=1,copyhistory=0,menuBar=0,width='+largeur+',height='+hauteur+',left='+left+',top='+top+'');
	}
	else { void(0); }
}

// ============== ouverture popup ==============
function popImg(imgid,imgwidth,imgheight) {
	var hauteur = imgheight + 100;
	var largeur = imgwidth + 25;
	//popup centrée
	var top=(screen.height-hauteur)/2;
	var left=(screen.width-largeur)/2;
	window.open('popimg.php?imgid='+imgid,'popup','toolbar=0,location=0,directories=0,status=1,scrollbars=1,resizable=1,copyhistory=0,menuBar=0,width='+largeur+',height='+hauteur+',left='+left+',top='+top+'');
}


// ============== fonction new window (target = blank) ==============
function openBlank(url) {
	if (window.open) {
		window.open(url);
	}
}

// ============== menu de navigation =============

