var delai=1E3,Url="",DefaultMenuId="SousMenu1",timeout;if(parent.frames.length>0)window.top.location.href=location.href;function MM_reloadPage(a){if(a==true)with(navigator){if(appName=="Netscape"&&parseInt(appVersion)==4){document.MM_pgW=innerWidth;document.MM_pgH=innerHeight;onresize=MM_reloadPage}}else if(innerWidth!=document.MM_pgW||innerHeight!=document.MM_pgH)location.reload()}MM_reloadPage(true);
function FbTwInit(a,c){if(a){window.fbAsyncInit=function(){FB.init({xfbml:true})};jsAsync("http://connect.facebook.net/fr_FR/all.js")}c&&jsAsync("http://platform.twitter.com/widgets.js")}function jsAsync(a){var c=document.createElement("script");c.src=a;c.setAttribute("async","true");document.documentElement.firstChild.appendChild(c)}
if(!document.getElementById)if(document.all)document.getElementById=function(a){return typeof document.all[a]!="undefined"?document.all[a]:null};else if(document.layers)document.getElementById=function(a){return typeof document[a]!="undefined"?document[a]:null};function DefaultMenu(){CacherMenus();if(document.getElementById(DefaultMenuId))document.getElementById(DefaultMenuId).style.visibility="visible"}
function MontrerMenu(){AnnulerCacher();CacherMenus();var a;a=window.event&&window.event.srcElement?event.srcElement:this;for(a=a.id?"Sous"+a.id:document.createElement?GetParent(a,"DIV").id:GetParent(a,"UL").id;a.substring(0,4)=="Sous";){if(document.getElementById(a))document.getElementById(a).style.visibility="visible";a=a.substring(4,a.length-1)}}
function CacherMenus(){for(var a=1;a<=9;a++)if(document.getElementById("SousMenu"+a)){document.getElementById("SousMenu"+a).style.visibility="hidden";for(var c=1;c<=9;c++)if(document.getElementById("SousSousMenu"+a+c))document.getElementById("SousSousMenu"+a+c).style.visibility="hidden"}}function CacherDelai(){timeout=setTimeout("DefaultMenu()",delai)}function AnnulerCacher(){timeout&&clearTimeout(timeout)}
function LeftBottom(a){var c=curbottom=0;if(a.offsetParent){c=a.offsetLeft;for(curbottom=typeof a.offsetHeight=="undefined"?a.offsetTop:a.offsetTop+a.offsetHeight;a=a.offsetParent;){c+=a.offsetLeft;curbottom+=a.offsetTop}}return[c,curbottom]}function GetParent(a,c){if(a.parentElement)for(var d=a;d;){if(d.tagName==c)return d;d=d.parentElement}else if(a.parentNode)for(d=a;d;){if(d.tagName==c)return d;d=d.parentNode}return a}
function SetDiv(a){if(a.parentElement)var c=LeftBottom(a.parentElement);else if(a.parentNode)c=LeftBottom(a.parentNode);else return a;if(document.createElement){var d=GetParent(a,"BODY"),b=document.createElement("div");b.appendChild(a);b.id=a.id;a.id="";b.className=a.className;a.className="";d.appendChild(b);b.style.top=c[1]+"px";b.style.left=c[0]+"px";return b}else return a}function GetChildren(a){return a.children?a.children:a.childNodes?a.childNodes:[]}
function SetMenuEvents(a,c,d){d=d;a=GetChildren(a);for(var b=0;b<a.length;b++)if(a[b].tagName=="A"){d+=1;a[b].id=c+d;if(a[b].href==Url){GetParent(a[b],"LI").style.backgroundImage="url(http://annuaire.lamogere.fr/degrade.jpg)";DefaultMenuId=a[b].id.substring(0,8)=="SousSous"?a[b].id.substring(4,a[b].id.length-2):a[b].id.substring(0,4)=="Sous"?a[b].id.substring(0,a[b].id.length-1):"Sous"+a[b].id}if(a[b].attachEvent){a[b].attachEvent("onmouseover",MontrerMenu);a[b].attachEvent("onfocus",MontrerMenu);
a[b].attachEvent("onmouseout",CacherDelai);a[b].attachEvent("onblur",CacherDelai)}else if(a[b].addEventListener){a[b].addEventListener("mouseover",MontrerMenu,false);a[b].addEventListener("focus",MontrerMenu,false);a[b].addEventListener("mouseout",CacherDelai,false);a[b].addEventListener("blur",CacherDelai,false)}else{a[b].onmouseover=MontrerMenu;a[b].onfocus=MontrerMenu;a[b].onmouseout=CacherDelai;a[b].onblur=CacherDelai}}else if(a[b].tagName=="UL")if(a[b].className){a[b].id="Sous"+c+d;var e=SetDiv(a[b]);
SetMenuEvents(e,e.id,0)}else SetMenuEvents(a[b],c,d);else d=SetMenuEvents(a[b],c,d);return d}function GetUrl(){if(document.location&&document.location.href){var a=document.location.href.lastIndexOf("index.html");Url=a>=0?document.location.href.substring(0,a):document.location.href}}
function Eject(a,c,d){document.getElementById(a).style.display="none";document.getElementById(d).style.display="block";window.Effect&&window.Effect.ScrollTo&&new Effect.ScrollTo(d,{duration:1});document.getElementById(c).style.display="block"}function Inject(a,c,d){document.getElementById(c).style.display="none";if(window.Effect&&window.Effect.SlideUp)new Effect.SlideUp(d);else document.getElementById(d).style.display="none";document.getElementById(a).style.display="block"}
function InitMenu(){if(document.getElementById("Menu")){GetUrl();SetMenuEvents(document.getElementById("Menu"),"Menu",0);DefaultMenu()}}
if(!window.addLoadListener)var addLoadListener=function(a){if(window.addEventListener)window.addEventListener("load",a,false);else if(document.addEventListener)document.addEventListener("load",a,false);else if(window.attachEvent)window.attachEvent("onload",a);else if(typeof window.onload!="function")window.onload=a;else{var c=window.onload;window.onload=function(){c();a()}}};addLoadListener(InitMenu);
