﻿function hideSelectElements(A){selects=document.getElementsByTagName("select");for(i=0;i<selects.length;i++){selects[i].style.visibility=A?"hidden":"visible"}}function isEmpty(C){var B,A;if(isObject(C)){for(B in C){A=C[B];if(isUndefined(A)&&isFunction(A)){return false}}}return true}function isFunction(A){return typeof A=="function"}function isNull(A){return A===null}function isNumber(A){return typeof A=="number"&&isFinite(A)}function isObject(A){return(A&&typeof A=="object")||isFunction(A)}function isString(A){return typeof A=="string"}function isUndefined(A){return typeof A=="undefined"}function trim(A){return A.replace(/^\s*|\s*$/g,"")}function repaintPageBody(){var A=document.getElementsByTagName("body")[0];A.style.display="none";A.style.display=""}function positionElement(C,B,D,A){if(B){var E=Position.cumulativeOffset(B);C.style.left=(E[0]+D)+"px";C.style.top=(E[1]+A)+"px"}else{C.style.left=D;C.style.top=A}}function focusPopup(A,B){if(A){if(A.style.zIndex<B){B+=1;A.style.zIndex=B}}return B}function gotoHere(A){window.location=A;return false}function loadImage(F,C,D,B,E){if(!isObject(F)){F=$(F)}if(D){F.src=D}var A=new Image();Event.observe(A,"load",onLoadImageComplete.bind(this,F,A,E));Event.observe(A,"error",onLoadError.bind(this,F,B,E));A.src=C}function onLoadImageComplete(D,B,C){var A=D.style.width.replace(/px/g,"");A=A!=""?A:B.width;if(B.width<A){D.style.width=B.width+"px"}D.src=B.src;if(C){C()}}function onLoadError(C,A,B){if(A){C.src=A}if(B){B()}}function processError(B,A){alert(resource.common.page_error+B.message)}function openFeedbackWindow(A){window.open(A.href+"&r="+window.location,"_blank","height=630,width=630,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes");return false};