if(Array.prototype.push==null){Array.prototype.push=function(){for(var A=0;A<arguments.length;A++){this[this.length]=arguments[A]}return this.length}}Array.prototype.ContainsNamedObject=function(A){for(var B=0;B<this.length-1;B++){if(this[B].name==A){return true}}return false};var agt,is_major,is_minor,is_ie,is_operaprior9,is_opera9;agt=navigator.userAgent.toLowerCase();is_major=parseInt(navigator.appVersion);is_minor=parseFloat(navigator.appVersion);is_ie=((agt.indexOf("msie")!=-1)&&(agt.indexOf("opera")==-1));is_opera=(agt.indexOf("opera")!=-1);is_operaprior9=is_opera;is_opera9=(agt.indexOf("opera")!=-1)&&(is_major>=9);function LoadJScript(A){var B=document.createElement("script");B.src=A;B.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(B)}function loadXML(B,C){var A;if(document.implementation&&document.implementation.createDocument){A=document.implementation.createDocument("","",null);A.onload=function(){C(A,B)};A.load(B)}else{if(window.ActiveXObject){A=new ActiveXObject("Microsoft.XMLDOM");A.onreadystatechange=function(){if(A.readyState==4){C(A,B)}};A.load(B)}}}function GetElement(A){if(!(document.getElementById)&&(document.createTextNode)){throw new Error("There is no proper DOM support for this borwser");return false}if(typeof (A)==="string"){A=document.getElementById(A)}return A}function GetElementStyleAttr(C,B,D){var E=GetElement(C),A;if(E.currentStyle){return E.currentStyle[B]}else{if(window.getComputedStyle){A=window.getComputedStyle(E,"");return A.getPropertyValue(D)}}return""}function GetElementStyle(A){A=GetElement(A);if(A.currentStyle){return A.currentStyle}else{if(window.getComputedStyle){return window.getComputedStyle(A,"")}else{return false}}}function JSEvents(){JSEvents.onLoadEvents=new Array();JSEvents.AttachEvent(window,"load",JSEvents.OnWindowLoad)}JSEvents.OnWindowLoad=function(){var A,B;for(A=0;A<JSEvents.onLoadEvents.length;A++){B=JSEvents.onLoadEvents[A];JSEvents.AttachEvent(B.element,B.event,B.handler,B.toCapture)}};JSEvents.AttachEvent=function(A,C,B,E,D){if(D){JSEvents.onLoadEvents.push({element:A,event:C,handler:B,toCapture:E});return true}A=GetElement(A);if(A.addEventListener){A.addEventListener(C,B,E);return true}else{if(A.attachEvent){return A.attachEvent("on"+C,B)}else{return false}}};JSEvents.DettachEvent=function(A,C,B,D){if(!(document.getElementById&&document.createTextNode)){return false}if(typeof (A)==="string"){A=document.getElementById(A)}if(!A||!B){return false}if(A.removeEventListener){A.removeEventListener(C,B,D);return true}else{if(A.detachEvent){return A.detachEvent("on"+C,B)}else{return false}}};JSEvents.GetEvent=function(A){return(A)?A:((window.event)?event:null)};JSEvents.GetEvtTarget=function(A){A=JSEvents.GetEvent(A);return(A)?((A.target)?A.target:((A.srcElement)?A.srcElement:null)):null};JSEvents.GetEvtReleatedTarget=function(A,B){A=JSEvents.GetEvent(A);if(!A){return null}if(B){return(A.relatedTarget)?A.relatedTarget:((A.fromElement)?A.fromElement:null)}else{return(A.relatedTarget)?A.relatedTarget:((A.toElement)?A.toElement:null)}};JSEvents.GetClientMousePos=function(A){var B,C;B={left:0,top:0};if(A.offsetX){B.left=A.offsetX;B.top=A.offsetY}else{if(A.layerX){if(GetElement("progressBar")){C={left:parseInt(GetElementStyleAttr("progressBar","borderLeftWidth","border-left-width")),top:parseInt(GetElementStyleAttr("progressBar","borderTopWidth","border-top-width"))};B.left=A.layerX-C.left;B.top=A.layerY-C.top}else{B.left=A.layerX;B.top=A.layerY}}}A.cancelBubble=true;return B};JSEvents.GetMousePos=function(A){A=JSEvents.GetEvent(A);var C={left:0,top:0},B;if(A.pageX){C.left=A.pageX;C.top=A.pageY}else{if(A.clientX){C.left=A.clientX+document.body.scrollLeft-document.body.clientLeft;C.top=A.clientY+document.body.scrollTop-document.body.clientTop;if(document.body.parentElement&&document.body.parentElement.clientLeft){B=document.body.parentElement;C.left+=B.scrollLeft-B.clientLeft;C.top+=B.scrollTop-B.clientTop}}}return C};JSEvents.StopPropagation=function(A){if(A.stopPropagation){A.stopPropagation()}else{if(A.cancelBubble!==undefined){A.cancelBubble=true}}};JSEvents.PreventDefault=function(A){if(A.preventDefault){A.preventDefault()}else{A.returnValue=false}};JSEvents();function GetElementRect(D){var F=0,E=0,B=null,C=0,A=0;D=GetElement(D);B=D;while(B){F+=B.offsetLeft+C;E+=B.offsetTop+A;B=B.offsetParent;if((B)&&(!is_opera)){if(B.nodeName=="HTML"){C=0;A=0}else{C=GetBorderWidths(B).left;A=GetBorderWidths(B).top}}}return{left:F,top:E,width:D.offsetWidth,height:D.offsetHeight,right:F+D.offsetWidth,bottom:E+D.offsetHeight}}function GetMargins(B){var A={left:0,top:0,right:0,bottom:0},C;B=GetElement(B);A.left=GetElementStyleAttr(B,"marginLeft","margin-left");A.top=GetElementStyleAttr(B,"marginTop","margin-top");A.right=GetElementStyleAttr(B,"marginRight","margin-right");A.bottom=GetElementStyleAttr(B,"marginBottom","margin-bottom");for(C in A){if(isNaN(parseInt(A[C]))){A[C]=0}else{A[C]=parseInt(A[C])}}return A}function GetPaddings(B){var A={left:0,top:0,right:0,bottom:0},C;B=GetElement(B);A.left=GetElementStyleAttr(B,"paddingLeft","padding-left");A.top=GetElementStyleAttr(B,"paddingTop","padding-top");A.right=GetElementStyleAttr(B,"paddingRight","padding-right");A.bottom=GetElementStyleAttr(B,"paddingBottom","padding-bottom");for(C in A){if(isNaN(parseInt(A[C]))){A[C]=0}else{A[C]=parseInt(A[C])}}return A}function GetBorderWidths(D){function A(E){var F=(is_ie)?1:0;if(E==="thin"){return 1+F}else{if(E==="medium"){return 3+F}else{if(E==="thick"){return 5+F}else{if(isNaN(parseInt(E))){return 0}else{return parseInt(E)}}}}}var C={left:0,top:0,right:0,bottom:0},B;D=GetElement(D);B=GetElementStyleAttr(D,"borderLeftStyle","border-left-style");if(B=="none"){C.left=0}else{C.left=GetElementStyleAttr(D,"borderLeftWidth","border-left-width");C.left=A(C.left)}B=GetElementStyleAttr(D,"borderTopStyle","border-top-style");if(B=="none"){C.top=0}else{C.top=GetElementStyleAttr(D,"borderTopWidth","border-top-width");C.top=A(C.top)}B=GetElementStyleAttr(D,"borderRightStyle","border-right-style");if(B=="none"){C.right=0}else{C.right=GetElementStyleAttr(D,"borderRightWidth","border-right-width");C.right=A(C.right)}B=GetElementStyleAttr(D,"borderBottomStyle","border-bottom-style");if(B=="none"){C.bottom=0}else{C.bottom=GetElementStyleAttr(D,"borderBottomWidth","border-bottom-width");C.bottom=A(C.bottom)}return C}function GetElementClientRect(C){var B={left:0,top:0,width:0,height:0},A,D;C=GetElement(C);rect=GetElementRect(C);A=GetPaddings(C);D=GetBorderWidths(C);B.width=rect.width-A.left-A.right-D.left-D.right;B.height=rect.height-A.top-A.bottom-D.top-D.bottom;return B}function SetElementRect(A,B){var E,D,C;A=GetElement(A);E=GetElementClientRect(A);D=GetElementRect(A);C=GetMargins(A);A.style.left=B.left-C.left+"px";A.style.top=B.top-C.top+"px";if(B.width<D.width-E.width){A.style.width="0px"}else{A.style.width=B.width-(D.width-E.width)+"px"}if(B.height<D.height-E.height){A.style.height="0px"}else{A.style.height=B.height-(D.height-E.height)+"px"}}function GetWinSize(){var B=0,A=0;if(typeof (window.innerWidth)=="number"){B=window.innerWidth;A=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){B=document.documentElement.clientWidth;A=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){B=document.body.clientWidth;A=document.body.clientHeight}}}return{width:B,height:A}}function GetScrollPos(){var B=0,A=0;if(typeof (window.pageYOffset)=="number"){B=window.pageXOffset;A=window.pageYOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){B=document.body.scrollLeft;A=document.body.scrollTop}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){B=document.documentElement.scrollLeft;A=document.documentElement.scrollTop}}}return{scrollLeft:B,scrollTop:A}}function GetPageSize(){var C=0,A=0,B=GetWinSize();if(window.innerHeight&&window.scrollMaxY){A=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){A=document.body.scrollHeight}else{A=document.body.offsetHeight}}if(window.innerWidth&&window.scrollMaxX){C=window.innerWidth+window.scrollMaxX}else{if(document.body.scrollWidth>document.body.offsetWidth){C=document.body.scrollWidth}else{C=document.body.offsetWidth}}if(C<B.width){C=B.width}if(A<B.height){A=B.height}return{width:C,height:A}};