//verif frame
if(parent.frames.length!=0){
	parent.location.href=location.href;
}


/*
* Fonctions pour afficher/masquer les menus
*/
function cacheMenus(){
	for(i=0;i<=2;i++) {
  	with(document.getElementById("sousMenu"+i).style) {
			top="-2000px";
   	}
	}
}

function affichMenu(sousmenu){
	cacheMenus();
    document.getElementById(sousmenu).style.top="20px";
}


/* ----------------------------------------------------------------------------------------
Graceful E-Mail Obfuscation - JavaScript function (decodes e-mail addresses)
Last updated: July 31th, 2007 by Roel Van Gils
+ une couche de modif/adaptation pour GN par gowap
---------------------------------------------------------------------------------------- */
var rot13 = true;

window.onload = function () {
	geo();
}

function geo() {
	if (!document.getElementsByTagName) // Check for browser support
			return false;
	if (rot13) // Initiate ROT13 only if needed
		var map = rot13init(); 
	
	var liens = document.getElementsByTagName('a'); // Get all anchors
	
	for (var l = 0 ; l < liens.length ; l++) { // Loop through the anchors		
			if(liens[l].getAttribute('rel') == 'nofollow mail') {
			var href = liens[l].getAttribute('href');
			var address = href.replace(/.*contact\/mail\/([a-z0-9._%-]+)\+([a-z0-9._%-]+)\+([a-z.]+)/i, '$1' + '@' + '$2' + '.' + '$3');
			var linktext = liens[l].innerHTML; // IE Fix
			if (href != address) {
				liens[l].setAttribute('href','mailto:' + (rot13 ? str_rot13(address,map) : address)); // Add mailto link	
				liens[l].innerHTML = linktext; // IE Fix
			}
		}
	}
}

function rot13init() {
	var map = new Array();
	var s = "abcdefghijklmnopqrstuvwxyz";	
	for (var i = 0 ; i < s.length ; i++)
		map[s.charAt(i)] = s.charAt((i+13)%26);
	
	return map;
}

function str_rot13(a,map) {
	var s = "";
	for (var i = 0 ; i < a.length ; i++) {
		var b = a.charAt(i);
		s += (b>='A' && b<='Z' || b>='a' && b<='z' ? map[b] : b);
	}
	return s;
}

// ici commencent les vieilles merdes qu'il faudra bien virer un jour
<!--
var tps;
function timer(){
	tps = setInterval('masque()',8000);
}

function affiche(id){
	timer();
	var a = document.getElementById(id);
	if((a.style.display=='none')||(a.style.display=='')){
		a.style.display='block';
	}else{
		a.style.display='none';
	}
}

function masque(){
	clearInterval(tps);
	var a = document.getElementById('sous_menu1');
	var b = document.getElementById('sous_menu2');
	a.style.display='none';
	b.style.display='none';
}

function MM_swapImage(nom,vide,image){ //By Psy - on garde le même nom pour eviter de modifier les bibliotheques php
	document[nom].src=image;	
}


function PopupImage(img) {
  // Compatible IE5+ / NN6+ / Mozilla
 oFenetre = window.open('','Image','width=400,height=400,top=50, left=50,toolbar=no,scrollbars=no,resizable=no,location=no,directories=no');
 oFenetre.document.write("<html><head><title>Agrandissement</title></head>");
 oFenetre.document.write("<script type=\"text/javascript\">function twAjustePopUp() { if (document.images[0].complete) { window.resizeTo(document.images[0].width+30,document.images[0].height+80); window.focus();} else { setTimeout('twAjustePopUp()',500) } }</"+"script>");
 oFenetre.document.write("<body onload='compt=setTimeout(\"self.close();\",60000);twAjustePopUp()' onclick='window.close()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
 oFenetre.document.write("<table width='100%' border='0' cellspacing='0' cellpadding='0' height='100%'><tr><td valign='middle' align='center'>");
 oFenetre.document.write("<a href='javascript:window.close'><img src='"+img+"' border='0' alt='Cliquez pour fermer' title='Cliquez pour fermer'></a>");
 oFenetre.document.write("</td></tr></table></body></html>");
 oFenetre.document.close();
}

function ouvre_popup(page) {
	window.open(page,"popup","menubar=no, status=no, scrollbars=yes, location=no, width=500, height=300, top=100, left=740");
}

-->