function inet_open_win() { if (ua["dom"]) { var url = ""; var target = ""; var attributes = ""; if (arguments.length > 0) { url = arguments[0]; } //Target attribute: if (arguments.length > 1) { target = arguments[1]; } //Optional attributes: if (arguments.length > 2) { width = 0; height = 0; center = false; tmp = arguments[2]; tmp_a = tmp.split(","); tmp = "" for (i = 0; i < tmp_a.length; i++) { val_a = tmp_a[i].split("="); if (val_a.length == 2) { if (i > 0) tmp += ","; if (val_a[0] == "width") width = val_a[1] else if (val_a[0] == "height") height = val_a[1] tmp += val_a[0]+"="+val_a[1]; } else if (val_a.length > 0) { switch(val_a[0]) { case "center" : center = true; break; } } } if (center) { x_pos = (screen.width - width) / 2; y_pos = (screen.height - height) / 2; if (tmp.length > 0) tmp += ","; tmp += "left="+x_pos+",top="+y_pos } attributes = tmp; } win = window.open(url, target, attributes); win.focus(); return false; } } function inet_print() { if (!ua["iemac"] && !ua["safari"]) { window.print(); } return false; } function inet_pop_win(pageToLoad, winName, width, height, center, ramme) { xposition=0; yposition=0; if ((parseInt(navigator.appVersion) >= 4 ) && (center)){ xposition = (screen.width - width) / 2; yposition = (screen.height - height) / 2; } width = width + ramme * 2 args = "width=" + width + "," + "height=" + height + "," + "location=0," + "menubar=0," + "resizable=0," + "scrollbars=0," + "status=0," + "titlebar=0," + "toolbar=0," + "hotkeys=0," + "left=" + xposition + "," + "top=" + yposition; window.open(pageToLoad+"&ramme="+ramme,winName,args ); } /**************/ /**** INIT ****/ function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != "function") { window.onload = func; } else { window.onload = function() { oldonload(); func(); } } } /**** INIT ****/ /**************/