if (this.name = '') this.name='shEAMainWnd'; this.focus(); function getElementPosition(elemID) { var offsetTrail = document.getElementById(elemID); var offsetLeft = 0; var offsetTop = 0; while (offsetTrail) { offsetLeft += offsetTrail.offsetLeft; offsetTop += offsetTrail.offsetTop; offsetTrail = offsetTrail.offsetParent; } if (navigator.userAgent.indexOf("Mac") != -1 && typeof document.body.leftMargin != "undefined") { offsetLeft += document.body.leftMargin; offsetTop += document.body.topMargin; } return {left:offsetLeft, top:offsetTop}; } function imagePopUp(urlToOpen) { var x = (screen.width-800)/2, y = (screen.height-800)/2; OpenWin = this.open(urlToOpen, "CtrlWindow", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes, screenX="+x+", screenY="+y+", left="+x+", top="+y); } function printerFriendly(urlToOpen) { var x = (screen.width-600)/2, y = (screen.height-400)/2; OpenWin = this.open(urlToOpen, "CtrlWindow", "width=600,height=400,toolbar=no,menubar=yes,location=no,scrollbars=yes,resizable=no, screenX="+x+", screenY="+y+", left="+x+", top="+y); } function recommend(urlRecommandForThisArticle) { var x = (screen.width-450)/2, y = (screen.height-340)/2; OpenWin = this.open(urlRecommandForThisArticle, "CtrlWindow", "width=450,height=340,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no, screenX="+x+", screenY="+y+", left="+x+", top="+y); } function gE(el) { return document.getElementById(el); } /************************************************************************* This code is from Dynamic Web Coding at http://www.dyn-web.com/ Copyright 2001-3 by Sharon Paine See Terms of Use at http://www.dyn-web.com/bus/terms.html regarding conditions under which you may use this code. This notice must be retained in the code as is! *************************************************************************/ // resize fix for ns4 var origWidth, origHeight; if (document.layers) { origWidth = window.innerWidth; origHeight = window.innerHeight; window.onresize = function() { if (window.innerWidth != origWidth || window.innerHeight != origHeight) history.go(0); } } var cur_lyr; // holds id of currently visible layer function swapLayers(id) { if (cur_lyr) hideLayer(cur_lyr); showLayer(id); cur_lyr = id; } var cur_lyr1; function swapLayers1(id1) { if (cur_lyr1) hideLayer(cur_lyr1); showLayer(id1); cur_lyr1 = id1; } var cur_lyr2; function swapLayers2(id2) { if (cur_lyr2) hideLayer(cur_lyr2); showLayer(id2); cur_lyr2 = id2; } function showLayer(id) { var lyr = getElemRefs(id); if (lyr && lyr.css) lyr.css.visibility = "visible"; } function hideLayer(id) { var lyr = getElemRefs(id); if (lyr && lyr.css) lyr.css.visibility = "hidden"; } function getElemRefs(id) { var el = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? getLyrRef(id,document): null; if (el) el.css = (el.style)? el.style: el; return el; } // get reference to nested layer for ns4 // from old dhtmllib.js by Mike Hall of www.brainjar.com function getLyrRef(lyr,doc) { if (document.layers) { var theLyr; for (var i=0; i 0) if ((theLyr = getLyrRef(lyr,theLyr.document)) != null) return theLyr; } return null; } } var aMenusVisible = new Array(); function showMenu(sectionID){ var defaultPosition = getElementPosition('trigger_menuItems[2]'); var aux = defaultPosition.top + 50; gE('menuItems['+sectionID+']').style.left = defaultPosition.left + gE('trigger_menuItems['+sectionID+']').offsetLeft; gE('menuItems['+sectionID+']').style.top = aux + "px"; gE('menuItems['+sectionID+']').style.display = 'block'; aMenusVisible[sectionID] = 1; } function hideMenu(sectionID){ aMenusVisible[sectionID] = 0; setTimeout('doHideMenu('+sectionID+');', 30); } function doHideMenu(sectionID){ if(!aMenusVisible[sectionID]) gE('menuItems['+sectionID+']').style.display = 'none'; } var OpenWin; function imgPopup(file, pwidth, pheight, title) { var content = ''; var x = (screen.width-pwidth)/2; y = (screen.height-pheight)/2; //y = 10; width = (pwidth > 1024) ? 1024 : pwidth + 50; height = (pheight > 768) ? 768 : pheight + 50; content += '' + title + ''; content += ''; content += '
'; if(OpenWin) OpenWin.close(); if(pwidth > 1024 || pheight > 768) OpenWin = this.open('', "CtrlWindow", "width=" + width + ",height=" + height + " toolbar=no, menubar=no, location=no, scrollbars=no, statusbar=no, resizable=no, screenX="+x+", screenY="+y+", left="+x+", top="+y); else OpenWin = this.open('', "CtrlWindow", "width=" + width + ",height=" + height + " toolbar=no, menubar=no, location=no, scrollbars=no, statusbar=no, resizable=no, screenX="+x+", screenY="+y+", left="+x+", top="+y); OpenWin.document.write(content); OpenWin.focus(); } function popUpGallery(poza , widthO, heightO, basePath) { var x = (screen.width-widthO)/2; y = (screen.height-heightO)/2; OpenWin = this.open(basePath+"popup.html?poza="+poza+"&screenWidth="+widthO+"&screenHeight="+heightO, "CtrlWindow", "width="+widthO+",height="+heightO+" toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no, screenX="+x+", screenY="+y+", left="+x+", top="+y); }