/*HM_Loader.js * by Peter Belesis. v4.2 020128 * Copyright (c) 2002 Peter Belesis. All Rights Reserved. */ HM_DOM = (document.getElementById) ? true : false; HM_NS4 = (document.layers) ? true : false; HM_IE = (document.all) ? true : false; HM_IE4 = HM_IE && !HM_DOM; HM_Mac = (navigator.appVersion.indexOf("Mac") != -1); HM_IE4M = HM_IE4 && HM_Mac; HM_Opera = (navigator.userAgent.indexOf("Opera")!=-1); HM_Konqueror = (navigator.userAgent.indexOf("Konqueror")!=-1); HM_IsMenu = (HM_DOM || HM_NS4 || (HM_IE4 && !HM_IE4M)); HM_BrowserString = HM_NS4 ? "NS4" : HM_DOM ? "DOM" : "IE4"; if(window.event + "" == "undefined") event = null; function HM_f_PopUp(){return false}; function HM_f_PopDown(){return false}; popUp = HM_f_PopUp; popDown = HM_f_PopDown; //centrage function HM_f_CenterMenu(topmenuid) { var MinimumPixelLeft = 0; //4.2 // var TheMenu = HM_DOM ? document.getElementById(topmenuid) : HM_IE4 ? document.all(topmenuid) : eval("window." + topmenuid); var TheMenu = HM_DOM ? document.getElementById(topmenuid) : window[topmenuid]; var TheMenu = HM_DOM ? document.getElementById(topmenuid) : HM_IE4 ? document.all(topmenuid) : eval("window." + topmenuid); var TheMenuWidth = HM_DOM ? parseInt(TheMenu.style.width) : HM_IE4 ? TheMenu.style.pixelWidth : TheMenu.clip.width; var TheWindowWidth = HM_IE ? (HM_DOM ? HM_IEcanvas.clientWidth : document.body.clientWidth) : window.innerWidth; return Math.max(parseInt((TheWindowWidth-TheMenuWidth) / 2),MinimumPixelLeft); } function pos_x_ancre(id_ancre,nom_ancre,topmenuid) { //bug sous Mac if (HM_Mac) return HM_f_CenterMenu(topmenuid); else { if (HM_DOM) { pos = document.getElementById(id_ancre); posx = getLeft(pos); } else if (HM_IE) { pos = document.all[id_ancre]; posx = getLeft(pos); } else if (HM_NS4) { pos = document.anchors[nom_ancre]; posx = pos.x; } } return posx; } function pos_y_ancre (id_ancre,nom_ancre) { if (HM_DOM) { pos = document.getElementById(id_ancre); posy = getTop(pos); posy += 1; } else if (HM_IE) { pos = document.all[id_ancre]; posy = getTop(pos); posy += 1; } else if (HM_NS4) { pos = document.anchors[nom_ancre]; posy = pos.y; posy += 1; } return posy; } function getLeft(MyObject) { if (MyObject.offsetParent) return (MyObject.offsetLeft + getLeft(MyObject.offsetParent)); else return (MyObject.offsetLeft); } function getTop(MyObject) { if (MyObject.offsetParent) return (MyObject.offsetTop + getTop(MyObject.offsetParent)); else return (MyObject.offsetTop); } if(HM_IsMenu) { document.write("<\/SCR" + "IPT>"); document.write("<\/SCR" + "IPT>"); } //end