// Images FlipFlop var imgArr = new Array; //version1 var imgIndex = 0; function loadImg(URL) { imgArr[imgIndex] = new Image; imgArr[imgIndex].src = URL; imgIndex++; } //------------------------------------- SERGE ---------------------------- function Set_nav_img(img,file) { img.src = file; return true; } //------------------------------------- /SERGE ---------------------------- function setImg(imgName, URL) { document[imgName].src = URL; return true; } //version2 var imgBaseURL = "/img/"; function setImage(name, state) { document[name].src = imgArr[name + state].src; return true; } function loadImages(names) { for (var i = 0; i < names.length; i++) { var name = names[i]; imgArr[name] = new Image(); imgArr[name + "1"] = new Image(); imgArr[name].src = imgBaseURL + name + "-1"+"-7-2"+".gif"; imgArr[name + "1"].src = imgBaseURL + name + "-2"+"-7-2"+".gif"; } } // /Images FlipFlop function openWnd(URL,w,h) { //------------------------------------- SERGE ---------------------------- var screen_width = screen.width; var screen_heght = screen.height; //------------------------------------- /SERGE ---------------------------- wndName = ""; for(i=0; c = URL.charAt(i); i++) { if(c=="." || c=="%" || c=="/" || c=="=" || c=="?" || c=="," || c=="&") c = "_"; wndName = wndName + c; } wndFeat = "width=" + w + ",height=" + h;// + ",scrollbars=1"; //------------------------------------- SERGE ---------------------------- if (w>(screen_width-20) || h>(screen_heght-110)) wndFeat += ",scrollbars=1"; //------------------------------------- /SERGE ---------------------------- wnd = open(URL, wndName, wndFeat); wnd.focus(); return false; }//openWnd(URL,w,h) function openWndExp(URL,w,h) { //------------------------------------- SERGE ---------------------------- var screen_width = screen.width; var screen_heght = screen.height; //------------------------------------- /SERGE ---------------------------- wndName = ""; for(i=0; c = URL.charAt(i); i++) { if(c=="." || c=="%" || c=="/" || c=="=" || c=="?" || c=="," || c=="&") c = "_"; wndName = wndName + c; } w+=25; h+=80; wndFeat = "width=" + w + ",height=" + h;// + ",scrollbars=1"; //------------------------------------- SERGE ---------------------------- if (w>(screen_width-20) || h>(screen_heght-110)) wndFeat += ",scrollbars=1"; //------------------------------------- /SERGE ---------------------------- wnd = open(URL, wndName, wndFeat); wnd.focus(); return false; }//openWnd(URL,w,h) function openSWnd(URL,w,h) { wndName = "sswindow"; wndFeat = "width=" + w + ",height=" + h + ",scrollbars=1"; //alert(URL + "\r\n" + wndName + "\r\n" + wndFeat) swnd = open(URL, wndName, wndFeat); swnd.focus(); return false; }//openSWnd(URL,w,h) function openWndP1(URL,w,h) { if(w>screen.availWidth) w = screen.availWidth - 40; if(h>screen.availHeight) h = screen.availHeight - 120; wndName = "sswindow"; wndFeat = "width=" + w + ",height=" + h + ",scrollbars=1,resizable=1,menubar=1,status=1"; swnd = open(URL, wndName, wndFeat); swnd.focus(); return false; }//openWndP1(URL,w,h) // toggleNode function tglNd(anID) { aName = "a" + anID; sName = "s" + anID; if(document.all != null && document.all[aName]!=null) { if(document.all[aName].style.display=="") { document.all[aName].style.display="none"; document[sName].src = "../img/p.gif"; } else { document.all[aName].style.display=""; document[sName].src = "../img/m.gif"; } }else{ return true; if(document.anchors[aName].style.display=="") { document.anchors[aName].style.display="none"; document[sName].src = "../img/p.gif"; } else { document.anchors[aName].style.display=""; document[sName].src = "../img/m.gif"; } } return false; } // /toggleNode function dumpElement(el) { var s = ''; for(k in el){ try{ s += k + ' = ' + el[k] + "\n"; } catch(ex){ s += k + ' = ' + '[error]' + "\n"; } } return s; } function addElementEventListener(element, evtType, evtHandler) { if (element.addEventListener) element.addEventListener(evtType, evtHandler, false); else element.attachEvent('on'+evtType, evtHandler); } function initKbdPageLister(prevElemID, nextElemID) { addElementEventListener(document, 'keydown', function(evt){ if(!evt) evt = window.event; if(evt.ctrlKey && evt.keyCode==37){ //left var a = document.getElementById(prevElemID); if(a) location.href = a.href; }else if(evt.ctrlKey && evt.keyCode==39){ //right var a = document.getElementById(nextElemID); if(a) location.href = a.href; } }); }