/*function IWCL_HookEvent(event, EventHandler) { this.addEventListener(event, EventHandler, false); }*/ var eventList = new Array( "abort", "blur", "change", "click", "dblclick", "dragdrop", "error", "focus", "keydown", "keypress", "keyup", "load", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "move", "reset", "resize", "select", "submit", "unload"); function IWEventHandler(event) { var i; var j; var e; var result = true; var evElement; var listLength = eventList.length; for (j=0; j < listLength; j++) { if (eventList[j] == event.type) break; } var isClick = event.type == "click"; ValidClick = true; evElement = event.target; if (evElement != null) { if (evElement.IEEventHandlers == null) { while (evElement != null && evElement.IEEventHandlers == null) { evElement = evElement.parentNode; } } if (evElement != null) { if (evElement.IEEventHandlers.length > 0) { listLength = evElement.IEEventHandlers[j].length; for (i = 0; i < listLength; i++) { evElement.eventFunc = evElement.IEEventHandlers[j][i]; if (!evElement.eventFunc(event)) { result = false; if (isClick) ValidClick = false; break; } } } } } return result; } function IWCL_HookEvent(event, EventHandler) { var i; var iLen = eventList.length; for (i=0; i < iLen; i++) { if (eventList[i] == event) break; } if (this.IEEventHandlers[i] == null) { this.IEEventHandlers[i] = new Array(); eval("if (this.on" + event + " != null) {this.IEEventHandlers[0] = this.on" + event + ";}"); eval("this.on" + event + " = IWEventHandler;"); } this.IEEventHandlers[i][this.IEEventHandlers[i].length] = EventHandler; } function FindElem(objname, aIgnoreForm) { var i = 0; var j = 0; var lresult = new Array(); var lforms = window.document.forms; var iLen = lforms.length; if (aIgnoreForm == null) { aIgnoreForm = getSubmitForm(); } for (i=iLen-1; i >= 0; --i) { if (lforms[i] == aIgnoreForm || lforms[i] == getSubmitForm()) { continue; } for (j=lforms[i].elements.length-1; j>=0; --j) { if (objname==lforms[i].elements[j].name) { lresult[lresult.length] = lforms[i].elements[j] } } } if (lresult.length == 0) { return window.document.getElementById(objname); } else { if (lresult.length == 1) { return lresult[0]; } else { return lresult; } } } function DoFocus() { return false; } function StaticInit() { } function getSubmitForm() { if (GIsPartialUpdate) { return window.document.getElementById("SubmitFrame").contentDocument.forms["SubmitForm"]; } else { return window.document.forms["SubmitForm"]; } } var ImageCurrentName = ''; ImageCurrentValidate = false; ImageCurrentConfirmation = ''; function ImageClick(AEvent) { return SubmitClickConfirm(ImageCurrentName, (AEvent.layerX) + ',' + (AEvent.layerY) , ImageCurrentValidate, ImageCurrentConfirmation); } function ImageSetEvent(ALink, AImgName, AValidation, AConfirmation) { ImageCurrentName = AImgName; ImageCurrentValidate = AValidation; ImageCurrentConfirmation = AConfirmation; ALink.onmousedown=ImageClick; return true; } var lResizeTimeOut = null; var lResizing = false; function calcScrollRect(aElement) { var lscrollWidth = 0; var lscrollHeight = 0; for (var i = aElement.childNodes.length-1; i >= 0; --i) { var node = aElement.childNodes[i]; if (isNotClipped(node)) { if (node.offsetTop + node.offsetHeight > lscrollHeight) { lscrollHeight = node.offsetTop + node.offsetHeight; } if (node.offsetLeft + node.offsetWidth > lscrollWidth) { lscrollWidth = node.offsetLeft + node.offsetWidth; } } } return new Point(lscrollWidth, lscrollHeight); } function DoSecondResize() { var LNewRect; var lWidth = window.innerWidth; var lHeight = window.innerHeight; /*alert("client(" + window.parent.document.body.clientWidth + "," + window.parent.document.body.clientHeight + ")"+ " scroll(" + window.parent.document.body.scrollWidth + "," + window.parent.document.body.scrollHeight + ")");*/ /* var lPoint = calcScrollRect(document.body); */ var lscrollWidth = window.document.body.scrollWidth; // js - added window. var lscrollHeight = window.document.body.scrollHeight; // js - added window. if (lWidth < lscrollWidth) { lWidth = lscrollWidth; lHeight -= 17; } else { lWidth -= 2; } if (lHeight < lscrollHeight) { lHeight = lscrollHeight; lWidth -= 17; } else { lHeight -= 1; } LNewRect = new Rect(0, 0, lWidth, lHeight); IWCLForm.UpdateRects(LNewRect); } function DoFirstResize() { var LNewRect; lResizing = true; var lWidth = window.innerWidth - 21; var lHeight = window.innerHeight - 21; LNewRect = new Rect(0, 0, lWidth, lHeight); IWCLForm.UpdateRects(LNewRect); DoSecondResize(); lResizeTimeOut = null; lResizing = false; } function Body_OnResize() { if (!lResizing && IWCLForm != null) { if (lResizeTimeOut) { clearTimeout(lResizeTimeOut); } DoFirstResize(); } } function SetCursor(ARoot) { var i; for (i = ARoot.childNodes.length-1; i >= 0; --i) { SetCursor(ARoot.childNodes[i]); if (ARoot.childNodes[i].style) { IWCLForm.oldCursors[IWCLForm.oldCursors.length] = ARoot.childNodes[i].style.cursor; IWCLForm.HTMLelements[IWCLForm.HTMLelements.length] = ARoot.childNodes[i]; ARoot.childNodes[i].style.cursor = "wait"; } } } function removeNS6SCDeadLock(elem) { var doc = elem.ownerDocument; if( doc == null ) return; var cs = doc.defaultView.getComputedStyle(elem,''); var borderLeftPixels = parseInt(cs.borderLeftWidth); var borderRightPixels = parseInt(cs.borderRightWidth); var borderTopPixels = parseInt(cs.borderTopWidth); var borderBottomPixels = parseInt(cs.borderBottomWidth); var possibleClientWidth = elem.offsetWidth - borderLeftPixels - borderRightPixels; var possibleClientHeight = elem.offsetHeight - borderTopPixels - borderBottomPixels; var isHBad = (elem.clientWidth < elem.scrollWidth) && ( elem.scrollWidth <= possibleClientWidth); var isVBad = (elem.clientHeight < elem.scrollHeight) && ( elem.scrollHeight <= possibleClientHeight); if( isHBad && isVBad ) { var oldOverflow = cs.overflow; elem.style.overflow = "visible"; elem.style.overflow = oldOverflow; } }