function openWin(url){ var width = screen.width / 2; var height = screen.height / 2; var posX = screen.width / 4; var posY = screen.height / 4; var option = "width=" + width + ", height=" + height + ", left=" + posX + ", top=" + posY + ", fullscreen=0, toolbar=0, location=0, directories=0, status=1, menubar=0, scrollbars=1, resizable=1"; return window.open(url, '_blank', option); } function openWinFullScreen(url){ var width = screen.width * 0.9; var height = screen.height * 0.9; var posX = screen.width * 0.1/2; var posY = screen.height * 0.1/2; var option = "width=" + width + ", height=" + height + ", left=" + posX + ", top=" + posY + ", fullscreen=0, toolbar=1, location=1, directories=1, status=1, menubar=1, scrollbars=1, resizable=1"; return window.open(url, '_blank', option); } function navigate(frameName, url){ parent.frames[frameName].location.href = url; } function autoFitFrame(frameName, maxWidth, maxHeight){ if(parent != null){ var frm = parent.window.document.getElementById(frameName); if(frm != null){ if(maxHeight != -1){ if(document.body.scrollHeight <= maxHeight){ frm.height = document.body.scrollHeight; }else{ frm.height = maxHeight; } } if(maxWidth != -1){ if(document.body.scrollWidth <= maxWidth){ frm.width = document.body.scrollWidth; }else{ frm.width = maxWidth; } } } } } function coordinate(elemName){ var e = {}; e.left = 0; e.top = 0; var elem = document.getElementById(elemName); var now = elem; while(now.tagName != null && now.tagName.toUpperCase() != "BODY") { e.left += now.offsetLeft; e.top += now.offsetTop; now = now.offsetParent; } e.bottom = e.top + elem.offsetHeight; e.right = e.left + elem.offsetWidth; return e; } var TRange = null; function searchString (str) { if(str == null || str.length == 0 )return; var strFound = false; if ( parseInt( navigator.appVersion ) < 4 ) return; if ( navigator.appName == "Netscape" ) { if ( !window.find(str) ) { while ( window.find(str,0,1)) continue; } } if ( navigator.appName.indexOf("Microsoft") != -1 ) { if ( TRange != null ) { TRange.collapse(false); strFound = TRange.findText(str); if ( strFound ) TRange.select(); } if ( TRange == null || strFound == false ) { TRange = window.document.body.createTextRange(); strFound = TRange.findText(str); if ( strFound ) TRange.select(); } } if ( !strFound ) alert ("'" + str + "' not found!"); } function showOrHide(itemId, operation){ var tmp = document.getElementById(itemId); if(operation == "show"){ tmp.style.display = ""; }else{ tmp.style.display = "none"; } }