var DHTMLSuite=new Object();var standardObjectsCreated=false;DHTMLSuite.eventElements=new Array();DHTMLSuite.createStandardObjects=function(){DHTMLSuite.clientInfoObj=new DHTMLSuite.clientInfo();DHTMLSuite.clientInfoObj.init();if(!DHTMLSuite.configObj){DHTMLSuite.configObj=new DHTMLSuite.config();DHTMLSuite.configObj.init()}DHTMLSuite.commonObj=new DHTMLSuite.common();DHTMLSuite.variableStorage=new DHTMLSuite.globalVariableStorage();DHTMLSuite.commonObj.init();window.onunload=function(){DHTMLSuite.commonObj.__clearGarbage()};standardObjectsCreated=true};DHTMLSuite.config=function(){var A;var C};DHTMLSuite.config.prototype={init:function(){this.imagePath="dhtmlsuite/";this.cssPath="dhtmlsuite/"},setCssPath:function(A){this.cssPath=A},setImagePath:function(A){this.imagePath=A}};DHTMLSuite.globalVariableStorage=function(){var C;this.menuBar_highlightedItems=new Array();var A;this.arrayOfDhtmlSuiteObjects=new Array()};DHTMLSuite.globalVariableStorage.prototype={};DHTMLSuite.common=function(){var D;var C;var A;this.cssCacheStatus=true;this.eventElements=new Array()};DHTMLSuite.common.prototype={init:function(){this.loadedCSSFiles=new Array()},loadCSS:function(A){if(!this.loadedCSSFiles[A]){this.loadedCSSFiles[A]=true;var C=document.createElement("LINK");if(!this.cssCacheStatus){if(A.indexOf("?")>=0){A=A+"&"}else{A=A+"?"}A=A+"rand="+Math.random()}C.href=DHTMLSuite.configObj.cssPath+A;C.rel="stylesheet";C.media="screen";C.type="text/css";document.getElementsByTagName("HEAD")[0].appendChild(C)}},getTopPos:function(A){var C=A.offsetTop;while((A=A.offsetParent)!=null){if(A.tagName!="HTML"){C+=(A.offsetTop-A.scrollTop);if(document.all){C+=A.clientTop}}}return C},setCssCacheStatus:function(A){this.cssCacheStatus=A},getLeftPos:function(A){var C=A.offsetLeft;while((A=A.offsetParent)!=null){if(A.tagName!="HTML"){C+=A.offsetLeft;if(document.all){C+=A.clientLeft}}}return C},cancelEvent:function(){return false},addEvent:function(C,A,D){if(C.attachEvent){C["e"+A+D]=D;C[A+D]=function(){C["e"+A+D](window.event)};C.attachEvent("on"+A,C[A+D])}else{C.addEventListener(A,D,false)}this.__addEventElement(C);delete (C)},removeEvent:function(C,A,D){if(C.detachEvent){C.detachEvent("on"+A,C[A+D]);C[A+D]=null}else{C.removeEventListener(A,D,false)}},__clearGarbage:function(){if(!DHTMLSuite.clientInfoObj.isMSIE){return }for(var A in DHTMLSuite.variableStorage.arrayOfDhtmlSuiteObjects){DHTMLSuite.variableStorage.arrayOfDhtmlSuiteObjects[A]=false}for(var A=0;A<DHTMLSuite.eventElements.length;A++){DHTMLSuite.eventElements[A].onclick=null;DHTMLSuite.eventElements[A].onmousedown=null;DHTMLSuite.eventElements[A].onmousemove=null;DHTMLSuite.eventElements[A].onmouseout=null;DHTMLSuite.eventElements[A].onmouseover=null;DHTMLSuite.eventElements[A].onmouseup=null;DHTMLSuite.eventElements[A].onfocus=null;DHTMLSuite.eventElements[A].onblur=null;DHTMLSuite.eventElements[A].onkeydown=null;DHTMLSuite.eventElements[A].onkeypress=null;DHTMLSuite.eventElements[A].onkeyup=null;DHTMLSuite.eventElements[A].onselectstart=null;DHTMLSuite.eventElements[A].ondragstart=null;DHTMLSuite.eventElements[A].oncontextmenu=null;DHTMLSuite.eventElements[A].onscroll=null}window.onunload=null;DHTMLSuite=null},__addEventElement:function(A){DHTMLSuite.eventElements[DHTMLSuite.eventElements.length]=A},getSrcElement:function(C){var A;if(C.target){A=C.target}else{if(C.srcElement){A=C.srcElement}}if(A.nodeType==3){A=A.parentNode}return A}};DHTMLSuite.clientInfo=function(){var E;var D;var A;var F;var C};DHTMLSuite.clientInfo.prototype={init:function(){this.browser=navigator.userAgent;this.isOpera=(this.browser.toLowerCase().indexOf("opera")>=0)?true:false;this.isFirefox=(this.browser.toLowerCase().indexOf("firefox")>=0)?true:false;this.isMSIE=(this.browser.toLowerCase().indexOf("msie")>=0)?true:false;this.isSafari=(this.browser.toLowerCase().indexOf("safari")>=0)?true:false;this.navigatorVersion=navigator.appVersion.replace(/.*?MSIE (\d\.\d).*/g,"$1")/1}};DHTMLSuite.menuModelItem=function(){var D;var P;var M;var C;var H;var I;var K;var F;var Q;var N;var O;var A;var S;var E;this.state="regular"};DHTMLSuite.menuModelItem.prototype={setMenuVars:function(C,K,F,A,D,I,E,H,M){this.id=C;this.itemText=K;this.itemIcon=F;this.url=A;this.parentId=D;this.jsFunction=E;this.separator=false;this.depth=false;this.hasSubs=false;this.helpText=I;this.submenuWidth=M;this.visible=true;if(!H){if(this.parentId){this.type="top"}else{this.type="sub"}}else{this.type=H}},setAsSeparator:function(C,A){this.id=C;this.parentId=A;this.separator=true;this.visible=true;if(this.parentId){this.type="top"}else{this.type="sub"}},setVisibility:function(A){this.visible=A},getState:function(){return this.state},setState:function(A){this.state=A},setSubMenuWidth:function(A){this.submenuWidth=A},setIcon:function(A){this.itemIcon=A},setText:function(A){this.itemText=A}};DHTMLSuite.menuModel=function(){var A;var C;var F;var E;this.menuItems=new Array();this.menuItemsOrder=new Array();this.submenuType=new Array();this.submenuType[1]="top";for(var D=2;D<20;D++){this.submenuType[D]="sub"}if(!standardObjectsCreated){DHTMLSuite.createStandardObjects()}};DHTMLSuite.menuModel.prototype={addItem:function(C,K,F,A,D,I,E,H,M){if(!C){C=this.__getUniqueId()}this.menuItems[C]=new DHTMLSuite.menuModelItem();this.menuItems[C].setMenuVars(C,K,F,A,D,I,E,H,M);this.menuItemsOrder[this.menuItemsOrder.length]=C;return this.menuItems[C]},addItemsFromMarkup:function(V){if(!document.getElementById(V)){alert("<UL> tag with id "+V+" does not exist");return }var C=document.getElementById(V);var U=C.getElementsByTagName("LI");for(var A=0;A<U.length;A++){var N=U[A].id.replace(/[^0-9]/gi,"");if(!N){N=this.__getUniqueId()}this.menuItems[N]=new DHTMLSuite.menuModelItem();this.menuItemsOrder[this.menuItemsOrder.length]=N;var T=0;if(U[A].parentNode!=C){T=U[A].parentNode.parentNode.id}var D=U[A].getAttribute("itemType");if(!D){D=U[A].itemType}if(D=="separator"){this.menuItems[N].setAsSeparator(N,T);continue}if(T){D="sub"}else{D="top"}var S=U[A].getElementsByTagName("A")[0];if(!S){continue}if(S){var I=S.innerHTML}var O=U[A].getAttribute("itemIcon");var F=S.href;if(F=="#"||F.substr(F.length-1,1)=="#"){F=""}var K=U[A].getAttribute("jsFunction");var E=false;var M=S.getAttribute("title");if(!M){M=S.title}this.menuItems[N].setMenuVars(N,I,O,F,T,M,K,D,E)}var H=C.getElementsByTagName("UL");for(var A=0;A<H.length;A++){var P=H[A].getAttribute("width");if(!P){P=H[A].width}if(P){var N=H[A].parentNode.id.replace(/[^0-9]/gi,"");this.setSubMenuWidth(N,P)}}var W=C.getElementsByTagName("li");for(var A=0;A<W.length;A++){var N=W[A].id.replace(/[^0-9]/gi,"");try{this.setSubMenuWidth(N,"200")}catch(Q){}}C.style.display="none"},setSubMenuWidth:function(C,A){this.menuItems[C].setSubMenuWidth(A)},setMainMenuGroupWidth:function(A){alert(A);this.mainMenuGroupWidth=A},addSeparator:function(A){id=this.__getUniqueId();if(!A){A=0}this.menuItems[id]=new DHTMLSuite.menuModelItem();this.menuItems[id].setAsSeparator(id,A);this.menuItemsOrder[this.menuItemsOrder.length]=id;return this.menuItems[id]},init:function(){this.__getDepths();this.__setHasSubs()},setMenuItemVisibility:function(C,A){this.menuItems[C].setVisibility(A)},setSubMenuType:function(C,A){this.submenuType[C]=A},getItems:function(E,A){if(!E){return this.menuItems}if(!A){A=new Array()}for(var C=0;C<this.menuItemsOrder.length;C++){var D=this.menuItemsOrder[C];if(!D){continue}if(this.menuItems[D].parentId==E){A[A.length]=this.menuItems[D];if(this.menuItems[D].hasSubs){return this.getItems(this.menuItems[D].id,A)}}}return A},__getUniqueId:function(){var A=Math.random()+"";A=A.replace(".","");A="99"+A;A=A/1;while(this.menuItems[A]){A=Math.random()+"";A=A.replace(".","");A=A/1}return A},__getDepths:function(){for(var A=0;A<this.menuItemsOrder.length;A++){var C=this.menuItemsOrder[A];if(!C){continue}this.menuItems[C].depth=1;if(this.menuItems[C].parentId){this.menuItems[C].depth=this.menuItems[this.menuItems[C].parentId].depth+1}this.menuItems[C].type=this.submenuType[this.menuItems[C].depth]}},__setHasSubs:function(){for(var A=0;A<this.menuItemsOrder.length;A++){var C=this.menuItemsOrder[A];if(!C){continue}if(this.menuItems[C].parentId){this.menuItems[this.menuItems[C].parentId].hasSubs=1}}},__hasSubs:function(C){for(var A=0;A<this.menuItemsOrder.length;A++){var C=this.menuItemsOrder[A];if(!C){continue}if(this.menuItems[C].parentId==C){return true}}return false},__deleteChildNodes:function(F,A){var C=new Array();for(var E=0;E<this.menuItemsOrder.length;E++){var D=this.menuItemsOrder[E];if(!D){continue}if(this.menuItems[D].parentId==F&&F){this.menuItems[D]=false;C[C.length]=D;this.__deleteChildNodes(D,true)}}if(!A){for(var E=0;E<C;E++){if(!C[E]){continue}this.__deleteItemFromItemOrderArray(C[E])}}this.__setHasSubs()},__deleteANode:function(A){this.menuItems[A]=false;this.__deleteItemFromItemOrderArray(A)},__deleteItemFromItemOrderArray:function(D){for(var A=0;A<this.menuItemsOrder.length;A++){var C=this.menuItemsOrder[A];if(!C){continue}if(this.menuItemsOrder[A]==D){this.menuItemsOrder.splice(A,1);return }}},__appendMenuModel:function(C,H){if(!C){return }var A=C.getItems();for(var E=0;E<C.menuItemsOrder.length;E++){var F=C.menuItemsOrder[E];if(!F){continue}if(!A[F].parentId){A[F].parentId=H}this.menuItems[F]=A[F];for(var D=0;D<this.menuItemsOrder.length;D++){if(!this.menuItemsOrder[D]){continue}if(this.menuItemsOrder[D]==A[F].id){this.menuItemsOrder.splice(D,1)}}this.menuItemsOrder[this.menuItemsOrder.length]=A[F].id}this.__getDepths();this.__setHasSubs()}};DHTMLSuite.menuItem=function(){var C;var A;var D;var H;var F;this.layoutCSS="menu-item.css";this.cssPrefix="DHTMLSuite_";if(!standardObjectsCreated){DHTMLSuite.createStandardObjects()}var E;this.objectIndex=DHTMLSuite.variableStorage.arrayOfDhtmlSuiteObjects.length};DHTMLSuite.menuItem.prototype={createItem:function(A){DHTMLSuite.commonObj.loadCSS(this.layoutCSS);DHTMLSuite.variableStorage.arrayOfDhtmlSuiteObjects[this.objectIndex]=this;this.modelItemRef=A;this.divElement=document.createElement("DIV");this.divElement.id="DHTMLSuite_menuItem"+A.id;this.divElement.className=this.cssPrefix+"menuItem_"+A.type+"_regular";this.divElement.onselectstart=function(){return DHTMLSuite.commonObj.cancelEvent(false,this)};if(A.helpText){this.divElement.title=A.helpText}if(A.type=="top"){this.__createMenuElementsOfTypeTop(this.divElement)}if(A.type=="sub"){this.__createMenuElementsOfTypeSub(this.divElement)}if(A.separator){this.divElement.className=this.cssPrefix+"menuItem_separator_"+A.type;this.divElement.innerHTML="<span></span>"}else{var C=this.objectIndex/1;this.divElement.onclick=function(D){DHTMLSuite.variableStorage.arrayOfDhtmlSuiteObjects[C].__navigate(D)};this.divElement.onmousedown=this.__clickMenuItem;this.divElement.onmouseup=this.__rolloverMenuItem;this.divElement.onmouseover=this.__rolloverMenuItem;this.divElement.onmouseout=this.__rolloutMenuItem;DHTMLSuite.commonObj.__addEventElement(this.divElement)}return this.divElement},setLayoutCss:function(A){this.layoutCSS=A},__createMenuElementsOfTypeTop:function(C){if(this.modelItemRef.itemIcon){var A=document.createElement("DIV");A.innerHTML='<img src="'+this.modelItemRef.itemIcon+'">';A.id="menuItemIcon"+this.modelItemRef.id;C.appendChild(A)}if(this.modelItemRef.itemText){var D=document.createElement("DIV");D.innerHTML=this.modelItemRef.itemText;D.className=this.cssPrefix+"menuItem_textContent";D.id="menuItemText"+this.modelItemRef.id;C.appendChild(D)}var D=document.createElement("DIV");D.className=this.cssPrefix+"menuItem_top_arrowShowSub";D.id="DHTMLSuite_menuBar_arrow"+this.modelItemRef.id;C.appendChild(D);this.expandElement=D;if(!this.modelItemRef.hasSubs){D.style.display="none"}},__createMenuElementsOfTypeSub:function(A){if(this.modelItemRef.itemIcon){A.style.backgroundImage="url('"+this.modelItemRef.itemIcon+"')";A.style.backgroundRepeat="no-repeat";A.style.backgroundPosition="left center"}if(this.modelItemRef.itemText){var C=document.createElement("DIV");C.className="DHTMLSuite_textContent";C.innerHTML=this.modelItemRef.itemText;C.className=this.cssPrefix+"menuItem_textContent";C.id="menuItemText"+this.modelItemRef.id;A.appendChild(C)}var C=document.createElement("DIV");C.className=this.cssPrefix+"menuItem_sub_arrowShowSub";A.appendChild(C);C.id="DHTMLSuite_menuBar_arrow"+this.modelItemRef.id;this.expandElement=C;if(!this.modelItemRef.hasSubs){C.style.display="none"}else{C.previousSibling.style.paddingRight="15px"}},setCssPrefix:function(A){this.cssPrefix=A},setIcon:function(C){this.modelItemRef.setIcon(C);if(this.modelItemRef.type=="top"){var D=document.getElementById("menuItemIcon"+this.modelItemRef.id);var A=D.getElementsByTagName("IMG")[0];if(!A){A=document.createElement("IMG");D.appendChild(A)}A.src=C;if(!C){A.parentNode.removeChild(A)}}if(this.modelItemRef.type=="sub"){this.divElement.style.backgroundImage="url('"+C+"')"}},setText:function(A){this.modelItemRef.setText(A);document.getElementById("menuItemText"+this.modelItemRef.id).innerHTML=A},__clickMenuItem:function(){this.className=this.className.replace("_regular","_click");this.className=this.className.replace("_over","_click")},__rolloverMenuItem:function(){this.className=this.className.replace("_regular","_over");this.className=this.className.replace("_click","_over")},__rolloutMenuItem:function(){this.className=this.className.replace("_over","_regular")},setState:function(A){this.divElement.className=this.cssPrefix+"menuItem_"+this.modelItemRef.type+"_"+A;this.modelItemRef.setState(A)},getState:function(){var A=this.modelItemRef.getState();if(!A){if(this.divElement.className.indexOf("_over")>=0){A="over"}if(this.divElement.className.indexOf("_click")>=0){A="click"}this.modelItemRef.setState(A)}return A},__setHasSub:function(A){this.modelItemRef.hasSubs=A;if(!A){document.getElementById(this.cssPrefix+"menuBar_arrow"+this.modelItemRef.id).style.display="none"}else{document.getElementById(this.cssPrefix+"menuBar_arrow"+this.modelItemRef.id).style.display="block"}},hide:function(){this.modelItemRef.setVisibility(false);this.divElement.style.display="none"},show:function(){this.modelItemRef.setVisibility(true);this.divElement.style.display="block"},__hideGroup:function(){if(this.modelItemRef.parentId){this.divElement.parentNode.style.visibility="hidden";if(DHTMLSuite.clientInfoObj.isMSIE){try{var C=this.divElement.parentNode.id.replace(/[^0-9]/gi,"");document.getElementById("DHTMLSuite_menuBarIframe_"+C).style.visibility="hidden"}catch(A){}}}},__navigate:function(e){if(document.all){e=event}if(e){var srcEl=DHTMLSuite.commonObj.getSrcElement(e);if(srcEl.id.indexOf("arrow")>=0){return }}if(this.modelItemRef.state=="disabled"){return }if(this.modelItemRef.url){location.href=this.modelItemRef.url}if(this.modelItemRef.jsFunction){try{eval(this.modelItemRef.jsFunction)}catch(e){alert("Defined Javascript code for the menu item( "+this.modelItemRef.jsFunction+" ) cannot be executed")}}}};DHTMLSuite.menuBar=function(){var M;var Q;var P;var V;var N;var D;var W;var I;var O;var K;var H;var S;var A;var F;var C;var T;var E;var U;this.cssPrefix="DHTMLSuite_";this.menuItemLayoutCss=false;this.layoutCSS="menu-bar.css";this.menuBarBackgroundImage="menu_strip_bg.jpg";this.menuItem_objects=new Array();DHTMLSuite.variableStorage.menuBar_highlightedItems=new Array();this.menuBarState=false;this.menuBarObj=false;this.menuBarHeight=26;this.submenuGroups=new Array();this.submenuIframes=new Array();this.targetId=false;this.activeSubItemsOnMouseOver=true;this.menuItemCssPrefix=false;this.createIframesForOldIeBrowsers=true;if(!standardObjectsCreated){DHTMLSuite.createStandardObjects()}};DHTMLSuite.menuBar.prototype={init:function(){DHTMLSuite.commonObj.loadCSS(this.layoutCSS);this.__createDivs();this.__createMenuItems();this.__setBasicEvents();window.refToThismenuBar=this},setTarget:function(A){this.targetId=A},setLayoutCss:function(A){this.layoutCSS=A},setMenuItemLayoutCss:function(A){this.menuItemLayoutCss=A},setCreateIframesForOldIeBrowsers:function(A){this.createIframesForOldIeBrowsers=A},addMenuItems:function(A){this.menuItemObj=A;this.menuItems=A.getItems()},setActiveSubItemsOnMouseOver:function(A){this.activeSubItemsOnMouseOver=A},setMenuItemState:function(C,A){this.menuItem_objects[C].setState(A)},setMenuItemCssPrefix:function(A){this.menuItemCssPrefix=A},setCssPrefix:function(A){this.cssPrefix=A},replaceMenuItems:function(C,A){this.hideSubMenus();this.__deleteMenuItems(C);this.menuItemObj.__appendMenuModel(A,C);this.__clearAllMenuItems();this.__createMenuItems()},deleteMenuItems:function(C,A){this.hideSubMenus();this.__deleteMenuItems(C,A);this.__clearAllMenuItems();this.__createMenuItems()},appendMenuItems:function(C,A){this.hideSubMenus();this.menuItemObj.__appendMenuModel(A,C);this.__clearAllMenuItems();this.__createMenuItems()},hideMenuItem:function(A){this.menuItem_objects[A].hide()},showMenuItem:function(A){this.menuItem_objects[A].show()},setText:function(C,A){this.menuItem_objects[C].setText(A)},setIcon:function(C,A){this.menuItem_objects[C].setIcon(A)},__clearAllMenuItems:function(){for(var C=0;C<this.menuItemObj.menuItemsOrder.length;C++){var A=this.menuItemObj.menuItemsOrder[C];if(this.submenuGroups[A]){this.submenuGroups[A].parentNode.removeChild(this.submenuGroups[A]);this.submenuGroups[A]=false}if(this.submenuIframes[A]){this.submenuIframes[A].parentNode.removeChild(this.submenuIframes[A]);this.submenuIframes[A]=false}}this.menuBarObj.innerHTML=""},__deleteMenuItems:function(D,A){if(A){this.menuItemObj.__deleteANode(D)}if(!this.submenuGroups[D]){return }this.menuItem_objects[D].__setHasSub(false);this.menuItemObj.__deleteChildNodes(D);var C=this.submenuGroups[D];C.parentNode.removeChild(C);if(this.submenuIframes[D]){this.submenuIframes[D].parentNode.removeChild(this.submenuIframes[D])}this.submenuGroups.splice(D,1);this.submenuIframes.splice(D,1)},__changeMenuBarState:function(){var D=this.getAttribute("objectRef");var C=DHTMLSuite.variableStorage.arrayOfDhtmlSuiteObjects[D];var E=this.id.replace(/[^0-9]/gi,"");var A=C.menuItem_objects[E].getState();if(A=="disabled"){return }C.menuBarState=!C.menuBarState;if(!C.menuBarState){C.hideSubMenus()}else{C.hideSubMenus();C.__expandGroup(E)}},__createDivs:function(){window.refTomenuBar=this;this.menuBarObj=document.createElement("DIV");this.menuBarObj.className=this.cssPrefix+"menuBar_"+this.menuItemObj.submenuType[1];if(!document.getElementById(this.targetId)){alert("No target defined for the menu object");return }var A=document.getElementById(this.targetId);A.appendChild(this.menuBarObj)},hideSubMenus:function(C){if(this&&this.tagName){if(document.all){C=event}var A=DHTMLSuite.commonObj.getSrcElement(C);if(A.tagName.toLowerCase()=="img"){A=A.parentNode}if(A.className&&A.className.indexOf("arrow")>=0){return }}for(var D=0;D<DHTMLSuite.variableStorage.menuBar_highlightedItems.length;D++){DHTMLSuite.variableStorage.menuBar_highlightedItems[D].setState("regular");DHTMLSuite.variableStorage.menuBar_highlightedItems[D].__hideGroup()}DHTMLSuite.variableStorage.menuBar_highlightedItems=new Array()},__expandGroup:function(E){var C=this.submenuGroups[E];var A=C.getElementsByTagName("DIV")[0];var D=A.id.replace(/[^0-9]/g,"");C.style.visibility="visible";if(this.submenuIframes[E]){this.submenuIframes[E].style.visibility="visible"}DHTMLSuite.variableStorage.menuBar_highlightedItems[DHTMLSuite.variableStorage.menuBar_highlightedItems.length]=this.menuItem_objects[D];this.__positionSubMenu(E);if(DHTMLSuite.clientInfoObj.isOpera){var A=C.getElementsByTagName("DIV")[0];A.className=A.className.replace("_over","_over")}},__activateMenuElements:function(A,D,C){if(!this.menuBarState&&!this.activeSubItemsOnMouseOver){return }var H=A.id.replace(/[^0-9]/g,"");var E=this.menuItem_objects[H].getState();if(E=="disabled"){return }if(C&&DHTMLSuite.variableStorage.menuBar_highlightedItems.length>0){this.hideSubMenus()}var F="over";if(!C){F="active"}this.menuItem_objects[H].setState(F);if(this.submenuGroups[H]){this.__expandGroup(H)}DHTMLSuite.variableStorage.menuBar_highlightedItems[DHTMLSuite.variableStorage.menuBar_highlightedItems.length]=this.menuItem_objects[H];if(D.menuItems[H].parentId){this.__activateMenuElements(D.menuItem_objects[D.menuItems[H].parentId].divElement,D,false)}},__createMenuItems:function(){if(!this.globalObjectIndex){this.globalObjectIndex=DHTMLSuite.variableStorage.arrayOfDhtmlSuiteObjects.length}var H=this.globalObjectIndex;DHTMLSuite.variableStorage.arrayOfDhtmlSuiteObjects[H]=this;var M=false;var N=document.getElementsByTagName("DIV");if(N.length>0){M=N[0]}for(var O=0;O<this.menuItemObj.menuItemsOrder.length;O++){var K=this.menuItemObj.menuItemsOrder[O];if(!this.menuItems[K].id){continue}this.menuItem_objects[this.menuItems[K].id]=new DHTMLSuite.menuItem();if(this.menuItemCssPrefix){this.menuItem_objects[this.menuItems[K].id].setCssPrefix(this.menuItemCssPrefix)}if(this.menuItemLayoutCss){this.menuItem_objects[this.menuItems[K].id].setLayoutCss(this.menuItemLayoutCss)}var C=this.menuItem_objects[this.menuItems[K].id].createItem(this.menuItems[K]);if(!this.menuItems[K].separator){DHTMLSuite.commonObj.addEvent(C,"mouseover",function(){DHTMLSuite.variableStorage.arrayOfDhtmlSuiteObjects[H].__activateMenuElements(this,DHTMLSuite.variableStorage.arrayOfDhtmlSuiteObjects[H],true)})}if(this.menuItem_objects[this.menuItems[K].id].expandElement){var D=this.menuItem_objects[this.menuItems[K].id].expandElement;var E=DHTMLSuite.variableStorage.arrayOfDhtmlSuiteObjects[H].menuItems[K].parentId+"";var A=D.id.replace(/[^0-9]/gi,"");D.setAttribute("objectRef",H);D.objectRef=H;D.onclick=this.__changeMenuBarState}var I=this.menuBarObj;if(this.menuItems[K].depth==1&&this.menuItemObj.submenuType[this.menuItems[K].depth]!="top"&&this.menuItemObj.mainMenuGroupWidth){var F=this.menuItemObj.mainMenuGroupWidth+"";if(F.indexOf("%")==-1){F=F+"px"}I.style.width=F}if(this.menuItems[K].depth=="1"){if(this.menuItemObj.submenuType[this.menuItems[K].depth]=="top"){C.style.styleFloat="left";C.style.cssText="float:left"}}else{if(!this.menuItems[K].depth){alert("Error in menu model(depth not defined for a menu item). Remember to call the init() method for the menuModel object.");return }if(!this.submenuGroups[this.menuItems[K].parentId]){this.submenuGroups[this.menuItems[K].parentId]=document.createElement("DIV");this.submenuGroups[this.menuItems[K].parentId].style.zIndex=10000;this.submenuGroups[this.menuItems[K].parentId].id="DHTMLSuite_menuBarSubGroup"+this.menuItems[K].parentId;this.submenuGroups[this.menuItems[K].parentId].style.visibility="hidden";if(this.menuItemObj.submenuType[this.menuItems[K].depth]=="sub"){this.submenuGroups[this.menuItems[K].parentId].className=this.cssPrefix+"menuBar_sub"}if(M){M.parentNode.insertBefore(this.submenuGroups[this.menuItems[K].parentId],M)}else{document.body.appendChild(this.submenuGroups[this.menuItems[K].parentId])}if(DHTMLSuite.clientInfoObj.isMSIE&&this.createIframesForOldIeBrowsers){this.submenuIframes[this.menuItems[K].parentId]=document.createElement('<IFRAME src="about:blank" frameborder=0>');this.submenuIframes[this.menuItems[K].parentId].id="DHTMLSuite_menuBarIframe_"+this.menuItems[K].parentId;this.submenuIframes[this.menuItems[K].parentId].style.position="absolute";this.submenuIframes[this.menuItems[K].parentId].style.zIndex=9000;this.submenuIframes[this.menuItems[K].parentId].style.visibility="hidden";if(M){M.parentNode.insertBefore(this.submenuIframes[this.menuItems[K].parentId],M)}else{document.body.appendChild(this.submenuIframes[this.menuItems[K].parentId])}}}I=this.submenuGroups[this.menuItems[K].parentId]}I.appendChild(C);if(this.menuItems[K].visible==false){this.hideMenuItem(this.menuItems[K].id)}if(this.menuItems[K].state!="regular"){this.menuItem_objects[this.menuItems[K].id].setState(this.menuItems[K].state)}}this.__setSizeOfAllSubMenus();this.__positionAllSubMenus();if(DHTMLSuite.clientInfoObj.isOpera){this.__fixLayoutOpera()}},__fixLayoutOpera:function(){for(var A=0;A<this.menuItemObj.menuItemsOrder.length;A++){var C=this.menuItemObj.menuItemsOrder[A];if(!C){continue}this.menuItem_objects[C].divElement.className=this.menuItem_objects[C].divElement.className.replace("_regular","_regular")}},__setSizeOfAllSubMenus:function(){for(var A in this.submenuGroups){this.__setSizeOfSubMenus(A)}},__positionAllSubMenus:function(){for(var A in this.submenuGroups){this.__positionSubMenu(A)}},__positionSubMenu:function(H){try{var C=this.submenuGroups[H];var F=this.menuItems[H].depth;var A=this.menuItemObj.submenuType[F];if(A=="top"){C.style.left=DHTMLSuite.commonObj.getLeftPos(this.menuItem_objects[H].divElement)+"px";C.style.top=(DHTMLSuite.commonObj.getTopPos(this.menuItem_objects[H].divElement)+this.menuItem_objects[H].divElement.offsetHeight)+"px"}else{C.style.left=(DHTMLSuite.commonObj.getLeftPos(this.menuItem_objects[H].divElement)+this.menuItem_objects[H].divElement.offsetWidth)+"px";C.style.top=(DHTMLSuite.commonObj.getTopPos(this.menuItem_objects[H].divElement))+"px"}if(DHTMLSuite.clientInfoObj.isMSIE){var D=this.submenuIframes[H];D.style.left=C.style.left;D.style.top=C.style.top;D.style.width=C.clientWidth+"px";D.style.height=C.clientHeight+"px"}}catch(E){}},__setSizeOfSubMenus:function(E){try{var C=this.submenuGroups[E];var A=Math.max(C.offsetWidth,this.menuItem_objects[E].divElement.offsetWidth);if(this.menuItems[E].submenuWidth){A=this.menuItems[E].submenuWidth}A=A+"";if(A.indexOf("%")==-1){A=A+"px"}C.style.width=A;if(DHTMLSuite.clientInfoObj.isMSIE){this.submenuIframes[E].style.width=C.style.width;this.submenuIFrames[E].style.height=C.style.height}}catch(D){}},__repositionMenu:function(A){A.menuBarObj.style.top=document.documentElement.scrollTop+"px"},__menuItemRollOver:function(A){var C=A.id.replace(/[^0-9]/g,"");A.className="DHTMLSuite_menuBar_menuItem_over_"+this.menuItems[C]["depth"]},__menuItemRollOut:function(A){var C=A.id.replace(/[^0-9]/g,"");A.className="DHTMLSuite_menuBar_menuItem_"+this.menuItems[C]["depth"]},__menuNavigate:function(C){var D=C.id.replace(/[^0-9]/g,"");var A=this.menuItems[D]["url"];if(!A){return }alert(this.menuItems[D]["url"])},__setBasicEvents:function(){DHTMLSuite.commonObj.addEvent(document.documentElement,"click",this.hideSubMenus)}};if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={}}YAHOO.namespace=function(){var F=arguments,H=null,K,M,I;for(K=0;K<F.length;K=K+1){I=F[K].split(".");H=YAHOO;for(M=(I[0]=="YAHOO")?1:0;M<I.length;M=M+1){H[I[M]]=H[I[M]]||{};H=H[I[M]]}}return H};YAHOO.log=function(F,E,H){var I=YAHOO.widget.Logger;if(I&&I.log){return I.log(F,E,H)}else{return false}};YAHOO.register=function(O,U,K){var P=YAHOO.env.modules;if(!P[O]){P[O]={versions:[],builds:[]}}var N=P[O],Q=K.version,S=K.build,T=YAHOO.env.listeners;N.name=O;N.version=Q;N.build=S;N.versions.push(Q);N.builds.push(S);N.mainClass=U;for(var M=0;M<T.length;M=M+1){T[M](N)}if(U){U.VERSION=Q;U.BUILD=S}else{YAHOO.log("mainClass is undefined for module "+O,"warn")}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(C){return YAHOO.env.modules[C]||null};YAHOO.env.ua=function(){var E={ie:0,opera:0,gecko:0,webkit:0,mobile:null};var F=navigator.userAgent,D;if((/KHTML/).test(F)){E.webkit=1}D=F.match(/AppleWebKit\/([^\s]*)/);if(D&&D[1]){E.webkit=parseFloat(D[1]);if(/ Mobile\//.test(F)){E.mobile="Apple"}else{D=F.match(/NokiaN[^\/]*/);if(D){E.mobile=D[0]}}}if(!E.webkit){D=F.match(/Opera[\s\/]([^\s]*)/);if(D&&D[1]){E.opera=parseFloat(D[1]);D=F.match(/Opera Mini[^;]*/);if(D){E.mobile=D[0]}}else{D=F.match(/MSIE\s([^;]*)/);if(D&&D[1]){E.ie=parseFloat(D[1])}else{D=F.match(/Gecko\/([^\s]*)/);if(D){E.gecko=1;D=F.match(/rv:([^\s\)]*)/);if(D&&D[1]){E.gecko=parseFloat(D[1])}}}}}return E}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var I=YAHOO_config.listener,E=YAHOO.env.listeners,F=true,H;if(I){for(H=0;H<E.length;H=H+1){if(E[H]==I){F=false;break}}if(F){E.push(I)}}}})();YAHOO.lang=YAHOO.lang||{isArray:function(D){if(D){var C=YAHOO.lang;return C.isNumber(D.length)&&C.isFunction(D.splice)}return false},isBoolean:function(C){return typeof C==="boolean"},isFunction:function(C){return typeof C==="function"},isNull:function(C){return C===null},isNumber:function(C){return typeof C==="number"&&isFinite(C)},isObject:function(C){return(C&&(typeof C==="object"||YAHOO.lang.isFunction(C)))||false},isString:function(C){return typeof C==="string"},isUndefined:function(C){return typeof C==="undefined"},hasOwnProperty:function(C,D){if(Object.prototype.hasOwnProperty){return C.hasOwnProperty(D)}return !YAHOO.lang.isUndefined(C[D])&&C.constructor.prototype[D]!==C[D]},_IEEnumFix:function(N,O){if(YAHOO.env.ua.ie){var K=["toString","valueOf"],H;for(H=0;H<K.length;H=H+1){var I=K[H],M=O[I];if(YAHOO.lang.isFunction(M)&&M!=Object.prototype[I]){N[I]=M}}}},extend:function(I,H,K){if(!H||!I){throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.")}var M=function(){};M.prototype=H.prototype;I.prototype=new M();I.prototype.constructor=I;I.superclass=H.prototype;if(H.prototype.constructor==Object.prototype.constructor){H.prototype.constructor=H}if(K){for(var F in K){I.prototype[F]=K[F]}YAHOO.lang._IEEnumFix(I.prototype,K)}},augmentObject:function(K,M){if(!M||!K){throw new Error("Absorb failed, verify dependencies.")}var H=arguments,N,I,O=H[2];if(O&&O!==true){for(N=2;N<H.length;N=N+1){K[H[N]]=M[H[N]]}}else{for(I in M){if(O||!K[I]){K[I]=M[I]}}YAHOO.lang._IEEnumFix(K,M)}},augmentProto:function(F,H){if(!H||!F){throw new Error("Augment failed, verify dependencies.")}var E=[F.prototype,H.prototype];for(var I=2;I<arguments.length;I=I+1){E.push(arguments[I])}YAHOO.lang.augmentObject.apply(this,E)},dump:function(O,T){var M=YAHOO.lang,K,U,Q=[],P="{...}",N="f(){...}",S=", ",V=" => ";if(!M.isObject(O)){return O+""}else{if(O instanceof Date||("nodeType" in O&&"tagName" in O)){return O}else{if(M.isFunction(O)){return N}}}T=(M.isNumber(T))?T:3;if(M.isArray(O)){Q.push("[");for(K=0,U=O.length;K<U;K=K+1){if(M.isObject(O[K])){Q.push((T>0)?M.dump(O[K],T-1):P)}else{Q.push(O[K])}Q.push(S)}if(Q.length>1){Q.pop()}Q.push("]")}else{Q.push("{");for(K in O){if(M.hasOwnProperty(O,K)){Q.push(K+V);if(M.isObject(O[K])){Q.push((T>0)?M.dump(O[K],T-1):P)}else{Q.push(O[K])}Q.push(S)}}if(Q.length>1){Q.pop()}Q.push("}")}return Q.join("")},substitute:function(W,U,g){var n,o,p,c,Z,X,S=YAHOO.lang,d=[],T,l="dump",f=" ",V="{",Y="}";for(;;){n=W.lastIndexOf(V);if(n<0){break}o=W.indexOf(Y,n);if(n+1>=o){break}T=W.substring(n+1,o);c=T;X=null;p=c.indexOf(f);if(p>-1){X=c.substring(p+1);c=c.substring(0,p)}Z=U[c];if(g){Z=g(c,Z,X)}if(S.isObject(Z)){if(S.isArray(Z)){Z=S.dump(Z,parseInt(X,10))}else{X=X||"";var h=X.indexOf(l);if(h>-1){X=X.substring(4)}if(Z.toString===Object.prototype.toString||h>-1){Z=S.dump(Z,parseInt(X,10))}else{Z=Z.toString()}}}else{if(!S.isString(Z)&&!S.isNumber(Z)){Z="~-"+d.length+"-~";d[d.length]=T}}W=W.substring(0,n)+Z+W.substring(o+1)}for(n=d.length-1;n>=0;n=n-1){W=W.replace(new RegExp("~-"+n+"-~"),"{"+d[n]+"}","g")}return W},trim:function(C){try{return C.replace(/^\s+|\s+$/g,"")}catch(D){return C}},merge:function(){var F={},I=arguments;for(var H=0,E=I.length;H<E;H=H+1){YAHOO.lang.augmentObject(F,I[H],true)}return F},later:function(Q,N,P,K,U){Q=Q||0;N=N||{};var M=P,S=K,T,O;if(YAHOO.lang.isString(P)){M=N[P]}if(!M){throw new TypeError("method undefined")}if(!YAHOO.lang.isArray(S)){S=[K]}T=function(){M.apply(N,S)};O=(U)?setInterval(T,Q):setTimeout(T,Q);return{interval:U,cancel:function(){if(this.interval){clearInterval(O)}else{clearTimeout(O)}}}},isValue:function(D){var C=YAHOO.lang;return(C.isObject(D)||C.isString(D)||C.isNumber(D)||C.isBoolean(D))}};YAHOO.util.Lang=YAHOO.lang;YAHOO.lang.augment=YAHOO.lang.augmentProto;YAHOO.augment=YAHOO.lang.augmentProto;YAHOO.extend=YAHOO.lang.extend;YAHOO.register("yahoo",YAHOO,{version:"2.4.1",build:"742"});(function(){var T=YAHOO.util,Z,d,g=0,c={},l={},X=window.document;var S=YAHOO.env.ua.opera,Y=YAHOO.env.ua.webkit,U=YAHOO.env.ua.gecko,h=YAHOO.env.ua.ie;var n={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i};var W=function(C){if(!n.HYPHEN.test(C)){return C}if(c[C]){return c[C]}var A=C;while(n.HYPHEN.exec(A)){A=A.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase())}c[C]=A;return A};var V=function(A){var C=l[A];if(!C){C=new RegExp("(?:^|\\s+)"+A+"(?:\\s+|$)");l[A]=C}return C};if(X.defaultView&&X.defaultView.getComputedStyle){Z=function(E,A){var C=null;if(A=="float"){A="cssFloat"}var D=X.defaultView.getComputedStyle(E,"");if(D){C=D[W(A)]}return E.style[A]||C}}else{if(X.documentElement.currentStyle&&h){Z=function(F,D){switch(W(D)){case"opacity":var A=100;try{A=F.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(C){try{A=F.filters("alpha").opacity}catch(C){}}return A/100;case"float":D="styleFloat";default:var E=F.currentStyle?F.currentStyle[D]:null;return(F.style[D]||E)}}}else{Z=function(C,A){return C.style[A]}}}if(h){d=function(D,C,A){switch(C){case"opacity":if(YAHOO.lang.isString(D.style.filter)){D.style.filter="alpha(opacity="+A*100+")";if(!D.currentStyle||!D.currentStyle.hasLayout){D.style.zoom=1}}break;case"float":C="styleFloat";default:D.style[C]=A}}}else{d=function(D,C,A){if(C=="float"){C="cssFloat"}D.style[C]=A}}var Q=function(C,A){return C&&C.nodeType==1&&(!A||A(C))};YAHOO.util.Dom={get:function(C){if(C&&(C.tagName||C.item)){return C}if(YAHOO.lang.isString(C)||!C){return X.getElementById(C)}if(C.length!==undefined){var A=[];for(var D=0,E=C.length;D<E;++D){A[A.length]=T.Dom.get(C[D])}return A}return C},getStyle:function(D,A){A=W(A);var C=function(E){return Z(E,A)};return T.Dom.batch(D,C,T.Dom,true)},setStyle:function(E,C,A){C=W(C);var D=function(F){d(F,C,A)};T.Dom.batch(E,D,T.Dom,true)},getXY:function(C){var A=function(D){if((D.parentNode===null||D.offsetParent===null||this.getStyle(D,"display")=="none")&&D!=D.ownerDocument.body){return false}return f(D)};return T.Dom.batch(C,A,T.Dom,true)},getX:function(C){var A=function(D){return T.Dom.getXY(D)[0]};return T.Dom.batch(C,A,T.Dom,true)},getY:function(C){var A=function(D){return T.Dom.getXY(D)[1]};return T.Dom.batch(C,A,T.Dom,true)},setXY:function(E,A,C){var D=function(F){var H=this.getStyle(F,"position");if(H=="static"){this.setStyle(F,"position","relative");H="relative"}var K=this.getXY(F);if(K===false){return false}var M=[parseInt(this.getStyle(F,"left"),10),parseInt(this.getStyle(F,"top"),10)];if(isNaN(M[0])){M[0]=(H=="relative")?0:F.offsetLeft}if(isNaN(M[1])){M[1]=(H=="relative")?0:F.offsetTop}if(A[0]!==null){F.style.left=A[0]-K[0]+M[0]+"px"}if(A[1]!==null){F.style.top=A[1]-K[1]+M[1]+"px"}if(!C){var I=this.getXY(F);if((A[0]!==null&&I[0]!=A[0])||(A[1]!==null&&I[1]!=A[1])){this.setXY(F,A,true)}}};T.Dom.batch(E,D,T.Dom,true)},setX:function(A,C){T.Dom.setXY(A,[C,null])},setY:function(C,A){T.Dom.setXY(C,[null,A])},getRegion:function(C){var A=function(E){if((E.parentNode===null||E.offsetParent===null||this.getStyle(E,"display")=="none")&&E!=X.body){return false}var D=T.Region.getRegion(E);return D};return T.Dom.batch(C,A,T.Dom,true)},getClientWidth:function(){return T.Dom.getViewportWidth()},getClientHeight:function(){return T.Dom.getViewportHeight()},getElementsByClassName:function(F,A,E,D){A=A||"*";E=(E)?T.Dom.get(E):null||X;if(!E){return[]}var K=[],M=E.getElementsByTagName(A),C=V(F);for(var I=0,H=M.length;I<H;++I){if(C.test(M[I].className)){K[K.length]=M[I];if(D){D.call(M[I],M[I])}}}return K},hasClass:function(C,D){var E=V(D);var A=function(F){return E.test(F.className)};return T.Dom.batch(C,A,T.Dom,true)},addClass:function(C,D){var A=function(E){if(this.hasClass(E,D)){return false}E.className=YAHOO.lang.trim([E.className,D].join(" "));return true};return T.Dom.batch(C,A,T.Dom,true)},removeClass:function(C,D){var E=V(D);var A=function(H){if(!this.hasClass(H,D)){return false}var F=H.className;H.className=F.replace(E," ");if(this.hasClass(H,D)){this.removeClass(H,D)}H.className=YAHOO.lang.trim(H.className);return true};return T.Dom.batch(C,A,T.Dom,true)},replaceClass:function(C,E,F){if(!F||E===F){return false}var D=V(E);var A=function(H){if(!this.hasClass(H,E)){this.addClass(H,F);return true}H.className=H.className.replace(D," "+F+" ");if(this.hasClass(H,E)){this.replaceClass(H,E,F)}H.className=YAHOO.lang.trim(H.className);return true};return T.Dom.batch(C,A,T.Dom,true)},generateId:function(D,A){A=A||"yui-gen";var C=function(F){if(F&&F.id){return F.id}var E=A+g++;if(F){F.id=E}return E};return T.Dom.batch(D,C,T.Dom,true)||C.apply(T.Dom,arguments)},isAncestor:function(C,A){C=T.Dom.get(C);A=T.Dom.get(A);if(!C||!A){return false}if(C.contains&&A.nodeType&&!Y){return C.contains(A)}else{if(C.compareDocumentPosition&&A.nodeType){return !!(C.compareDocumentPosition(A)&16)}else{if(A.nodeType){return !!this.getAncestorBy(A,function(D){return D==C})}}}return false},inDocument:function(A){return this.isAncestor(X.documentElement,A)},getElementsBy:function(K,H,F,D){H=H||"*";F=(F)?T.Dom.get(F):null||X;if(!F){return[]}var E=[],A=F.getElementsByTagName(H);for(var C=0,I=A.length;C<I;++C){if(K(A[C])){E[E.length]=A[C];if(D){D(A[C])}}}return E},batch:function(D,K,A,F){D=(D&&(D.tagName||D.item))?D:T.Dom.get(D);if(!D||!K){return false}var E=(F)?A:window;if(D.tagName||D.length===undefined){return K.call(E,D,A)}var C=[];for(var H=0,I=D.length;H<I;++H){C[C.length]=K.call(E,D[H],A)}return C},getDocumentHeight:function(){var A=(X.compatMode!="CSS1Compat")?X.body.scrollHeight:X.documentElement.scrollHeight;var C=Math.max(A,T.Dom.getViewportHeight());return C},getDocumentWidth:function(){var A=(X.compatMode!="CSS1Compat")?X.body.scrollWidth:X.documentElement.scrollWidth;var C=Math.max(A,T.Dom.getViewportWidth());return C},getViewportHeight:function(){var C=self.innerHeight;var A=X.compatMode;if((A||h)&&!S){C=(A=="CSS1Compat")?X.documentElement.clientHeight:X.body.clientHeight}return C},getViewportWidth:function(){var C=self.innerWidth;var A=X.compatMode;if(A||h){C=(A=="CSS1Compat")?X.documentElement.clientWidth:X.body.clientWidth}return C},getAncestorBy:function(C,A){while(C=C.parentNode){if(Q(C,A)){return C}}return null},getAncestorByClassName:function(C,D){C=T.Dom.get(C);if(!C){return null}var A=function(E){return T.Dom.hasClass(E,D)};return T.Dom.getAncestorBy(C,A)},getAncestorByTagName:function(C,D){C=T.Dom.get(C);if(!C){return null}var A=function(E){return E.tagName&&E.tagName.toUpperCase()==D.toUpperCase()};return T.Dom.getAncestorBy(C,A)},getPreviousSiblingBy:function(C,A){while(C){C=C.previousSibling;if(Q(C,A)){return C}}return null},getPreviousSibling:function(A){A=T.Dom.get(A);if(!A){return null}return T.Dom.getPreviousSiblingBy(A)},getNextSiblingBy:function(C,A){while(C){C=C.nextSibling;if(Q(C,A)){return C}}return null},getNextSibling:function(A){A=T.Dom.get(A);if(!A){return null}return T.Dom.getNextSiblingBy(A)},getFirstChildBy:function(D,A){var C=(Q(D.firstChild,A))?D.firstChild:null;return C||T.Dom.getNextSiblingBy(D.firstChild,A)},getFirstChild:function(C,A){C=T.Dom.get(C);if(!C){return null}return T.Dom.getFirstChildBy(C)},getLastChildBy:function(D,A){if(!D){return null}var C=(Q(D.lastChild,A))?D.lastChild:null;return C||T.Dom.getPreviousSiblingBy(D.lastChild,A)},getLastChild:function(A){A=T.Dom.get(A);return T.Dom.getLastChildBy(A)},getChildrenBy:function(D,A){var C=T.Dom.getFirstChildBy(D,A);var E=C?[C]:[];T.Dom.getNextSiblingBy(C,function(F){if(!A||A(F)){E[E.length]=F}return false});return E},getChildren:function(A){A=T.Dom.get(A);if(!A){}return T.Dom.getChildrenBy(A)},getDocumentScrollLeft:function(A){A=A||X;return Math.max(A.documentElement.scrollLeft,A.body.scrollLeft)},getDocumentScrollTop:function(A){A=A||X;return Math.max(A.documentElement.scrollTop,A.body.scrollTop)},insertBefore:function(A,C){A=T.Dom.get(A);C=T.Dom.get(C);if(!A||!C||!C.parentNode){return null}return C.parentNode.insertBefore(A,C)},insertAfter:function(A,C){A=T.Dom.get(A);C=T.Dom.get(C);if(!A||!C||!C.parentNode){return null}if(C.nextSibling){return C.parentNode.insertBefore(A,C.nextSibling)}else{return C.parentNode.appendChild(A)}},getClientRegion:function(){var C=T.Dom.getDocumentScrollTop(),D=T.Dom.getDocumentScrollLeft(),A=T.Dom.getViewportWidth()+D,E=T.Dom.getViewportHeight()+C;return new T.Region(C,A,E,D)}};var f=function(){if(X.documentElement.getBoundingClientRect){return function(C){var A=C.getBoundingClientRect();var D=C.ownerDocument;return[A.left+T.Dom.getDocumentScrollLeft(D),A.top+T.Dom.getDocumentScrollTop(D)]}}else{return function(C){var A=[C.offsetLeft,C.offsetTop];var D=C.offsetParent;var E=(Y&&T.Dom.getStyle(C,"position")=="absolute"&&C.offsetParent==C.ownerDocument.body);if(D!=C){while(D){A[0]+=D.offsetLeft;A[1]+=D.offsetTop;if(!E&&Y&&T.Dom.getStyle(D,"position")=="absolute"){E=true}D=D.offsetParent}}if(E){A[0]-=C.ownerDocument.body.offsetLeft;A[1]-=C.ownerDocument.body.offsetTop}D=C.parentNode;while(D.tagName&&!n.ROOT_TAG.test(D.tagName)){if(T.Dom.getStyle(D,"display").search(/^inline|table-row.*$/i)){A[0]-=D.scrollLeft;A[1]-=D.scrollTop}D=D.parentNode}return A}}}()})();YAHOO.util.Region=function(H,F,E,I){this.top=H;this[1]=H;this.right=F;this.bottom=E;this.left=I;this[0]=I};YAHOO.util.Region.prototype.contains=function(C){return(C.left>=this.left&&C.right<=this.right&&C.top>=this.top&&C.bottom<=this.bottom)};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left))};YAHOO.util.Region.prototype.intersect=function(H){var K=Math.max(this.top,H.top);var I=Math.min(this.right,H.right);var F=Math.min(this.bottom,H.bottom);var M=Math.max(this.left,H.left);if(F>=K&&I>=M){return new YAHOO.util.Region(K,I,F,M)}else{return null}};YAHOO.util.Region.prototype.union=function(H){var K=Math.min(this.top,H.top);var I=Math.max(this.right,H.right);var F=Math.max(this.bottom,H.bottom);var M=Math.min(this.left,H.left);return new YAHOO.util.Region(K,I,F,M)};YAHOO.util.Region.prototype.toString=function(){return("Region {top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}")};YAHOO.util.Region.getRegion=function(M){var I=YAHOO.util.Dom.getXY(M);var N=I[1];var K=I[0]+M.offsetWidth;var H=I[1]+M.offsetHeight;var O=I[0];return new YAHOO.util.Region(N,K,H,O)};YAHOO.util.Point=function(C,D){if(YAHOO.lang.isArray(C)){D=C[1];C=C[0]}this.x=this.right=this.left=this[0]=C;this.y=this.top=this.bottom=this[1]=D};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.4.1",build:"742"});YAHOO.util.CustomEvent=function(I,M,K,F){this.type=I;this.scope=M||window;this.silent=K;this.signature=F||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var H="_YUICEOnSubscribe";if(I!==H){this.subscribeEvent=new YAHOO.util.CustomEvent(H,this,true)}this.lastError=null};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(F,E,D){if(!F){throw new Error("Invalid callback for subscriber to '"+this.type+"'")}if(this.subscribeEvent){this.subscribeEvent.fire(F,E,D)}this.subscribers.push(new YAHOO.util.Subscriber(F,E,D))},unsubscribe:function(M,I){if(!M){return this.unsubscribeAll()}var K=false;for(var O=0,H=this.subscribers.length;O<H;++O){var N=this.subscribers[O];if(N&&N.contains(M,I)){this._delete(O);K=true}}return K},fire:function(){var M=this.subscribers.length;if(!M&&this.silent){return true}var V=[],X=true,N,U=false;for(N=0;N<arguments.length;++N){V.push(arguments[N])}if(!this.silent){}for(N=0;N<M;++N){var Q=this.subscribers[N];if(!Q){U=true}else{if(!this.silent){}var S=Q.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var P=null;if(V.length>0){P=V[0]}try{X=Q.fn.call(S,P,Q.obj)}catch(Y){this.lastError=Y}}else{try{X=Q.fn.call(S,this.type,V,Q.obj)}catch(W){this.lastError=W}}if(false===X){if(!this.silent){}return false}}}if(U){var T=[],O=this.subscribers;for(N=0,M=O.length;N<M;N=N+1){T.push(O[N])}this.subscribers=T}return true},unsubscribeAll:function(){for(var D=0,C=this.subscribers.length;D<C;++D){this._delete(C-1-D)}this.subscribers=[];return D},_delete:function(C){var D=this.subscribers[C];if(D){delete D.fn;delete D.obj}this.subscribers[C]=null},toString:function(){return"CustomEvent: '"+this.type+"', scope: "+this.scope}};YAHOO.util.Subscriber=function(F,E,D){this.fn=F;this.obj=YAHOO.lang.isUndefined(E)?null:E;this.override=D};YAHOO.util.Subscriber.prototype.getScope=function(C){if(this.override){if(this.override===true){return this.obj}else{return this.override}}return C};YAHOO.util.Subscriber.prototype.contains=function(C,D){if(D){return(this.fn==C&&this.obj==D)}else{return(this.fn==C)}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }"};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var S=false;var Q=[];var P=[];var T=[];var V=[];var M=0;var U=[];var N=[];var O=0;var K={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};return{POLL_RETRYS:4000,POLL_INTERVAL:10,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,startInterval:function(){if(!this._interval){var C=this;var A=function(){C._tryPreloadAttach()};this._interval=setInterval(A,this.POLL_INTERVAL)}},onAvailable:function(E,I,D,F,H){var C=(YAHOO.lang.isString(E))?[E]:E;for(var A=0;A<C.length;A=A+1){U.push({id:C[A],fn:I,obj:D,override:F,checkReady:H})}M=this.POLL_RETRYS;this.startInterval()},onContentReady:function(E,C,D,A){this.onAvailable(E,C,D,A,true)},onDOMReady:function(C,D,A){if(this.DOMReady){setTimeout(function(){var E=window;if(A){if(A===true){E=D}else{E=A}}C.call(E,"DOMReady",[],D)},0)}else{this.DOMReadyEvent.subscribe(C,D,A)}},addListener:function(h,n,E,c,l){if(!E||!E.call){return false}if(this._isValidCollection(h)){var D=true;for(var Z=0,H=h.length;Z<H;++Z){D=this.on(h[Z],n,E,c,l)&&D}return D}else{if(YAHOO.lang.isString(h)){var d=this.getEl(h);if(d){h=d}else{this.onAvailable(h,function(){YAHOO.util.Event.on(h,n,E,c,l)});return true}}}if(!h){return false}if("unload"==n&&c!==this){P[P.length]=[h,n,E,c,l];return true}var A=h;if(l){if(l===true){A=c}else{A=l}}var g=function(W){return E.call(A,YAHOO.util.Event.getEvent(W,h),c)};var C=[h,n,E,g,A,c,l];var I=Q.length;Q[I]=C;if(this.useLegacyEvent(h,n)){var f=this.getLegacyIndex(h,n);if(f==-1||h!=T[f][0]){f=T.length;N[h.id+n]=f;T[f]=[h,n,h["on"+n]];V[f]=[];h["on"+n]=function(W){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(W),f)}}V[f].push(C)}else{try{this._simpleAdd(h,n,g,false)}catch(F){this.lastError=F;this.removeListener(h,n,E);return false}}return true},fireLegacyEvent:function(H,W){var E=true,Y,C,D,A,F;C=V[W];for(var X=0,I=C.length;X<I;++X){D=C[X];if(D&&D[this.WFN]){A=D[this.ADJ_SCOPE];F=D[this.WFN].call(A,H);E=(E&&F)}}Y=T[W];if(Y&&Y[2]){Y[2](H)}return E},getLegacyIndex:function(A,D){var C=this.generateId(A)+D;if(typeof N[C]=="undefined"){return -1}else{return N[C]}},useLegacyEvent:function(A,D){if(this.webkit&&("click"==D||"dblclick"==D)){var C=parseInt(this.webkit,10);if(!isNaN(C)&&C<418){return true}}return false},removeListener:function(Z,c,D){var W,F,A;if(typeof Z=="string"){Z=this.getEl(Z)}else{if(this._isValidCollection(Z)){var C=true;for(W=0,F=Z.length;W<F;++W){C=(this.removeListener(Z[W],c,D)&&C)}return C}}if(!D||!D.call){return this.purgeElement(Z,false,c)}if("unload"==c){for(W=0,F=P.length;W<F;W++){A=P[W];if(A&&A[0]==Z&&A[1]==c&&A[2]==D){P[W]=null;return true}}return false}var I=null;var H=arguments[3];if("undefined"===typeof H){H=this._getCacheIndex(Z,c,D)}if(H>=0){I=Q[H]}if(!Z||!I){return false}if(this.useLegacyEvent(Z,c)){var X=this.getLegacyIndex(Z,c);var Y=V[X];if(Y){for(W=0,F=Y.length;W<F;++W){A=Y[W];if(A&&A[this.EL]==Z&&A[this.TYPE]==c&&A[this.FN]==D){Y[W]=null;break}}}}else{try{this._simpleRemove(Z,c,I[this.WFN],false)}catch(E){this.lastError=E;return false}}delete Q[H][this.WFN];delete Q[H][this.FN];Q[H]=null;return true},getTarget:function(D,A){var C=D.target||D.srcElement;return this.resolveTextNode(C)},resolveTextNode:function(A){if(A&&3==A.nodeType){return A.parentNode}else{return A}},getPageX:function(A){var C=A.pageX;if(!C&&0!==C){C=A.clientX||0;if(this.isIE){C+=this._getScrollLeft()}}return C},getPageY:function(C){var A=C.pageY;if(!A&&0!==A){A=C.clientY||0;if(this.isIE){A+=this._getScrollTop()}}return A},getXY:function(A){return[this.getPageX(A),this.getPageY(A)]},getRelatedTarget:function(A){var C=A.relatedTarget;if(!C){if(A.type=="mouseout"){C=A.toElement}else{if(A.type=="mouseover"){C=A.fromElement}}}return this.resolveTextNode(C)},getTime:function(D){if(!D.time){var A=new Date().getTime();try{D.time=A}catch(C){this.lastError=C;return A}}return D.time},stopEvent:function(A){this.stopPropagation(A);this.preventDefault(A)},stopPropagation:function(A){if(A.stopPropagation){A.stopPropagation()}else{A.cancelBubble=true}},preventDefault:function(A){if(A.preventDefault){A.preventDefault()}else{A.returnValue=false}},getEvent:function(E,C){var A=E||window.event;if(!A){var D=this.getEvent.caller;while(D){A=D.arguments[0];if(A&&Event==A.constructor){break}D=D.caller}}return A},getCharCode:function(A){var C=A.keyCode||A.charCode||0;if(YAHOO.env.ua.webkit&&(C in K)){C=K[C]}return C},_getCacheIndex:function(E,D,F){for(var H=0,A=Q.length;H<A;++H){var C=Q[H];if(C&&C[this.FN]==F&&C[this.EL]==E&&C[this.TYPE]==D){return H}}return -1},generateId:function(C){var A=C.id;if(!A){A="yuievtautoid-"+O;++O;C.id=A}return A},_isValidCollection:function(A){try{return(A&&typeof A!=="string"&&A.length&&!A.tagName&&!A.alert&&typeof A[0]!=="undefined")}catch(C){return false}},elCache:{},getEl:function(A){return(typeof A==="string")?document.getElementById(A):A},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(A){if(!S){S=true;var C=YAHOO.util.Event;C._ready();C._tryPreloadAttach()}},_ready:function(A){var C=YAHOO.util.Event;if(!C.DOMReady){C.DOMReady=true;C.DOMReadyEvent.fire();C._simpleRemove(document,"DOMContentLoaded",C._ready)}},_tryPreloadAttach:function(){if(this.locked){return false}if(this.isIE){if(!this.DOMReady){this.startInterval();return false}}this.locked=true;var E=!S;if(!E){E=(M>0)}var F=[];var D=function(X,W){var Y=X;if(W.override){if(W.override===true){Y=W.obj}else{Y=W.override}}W.fn.call(Y,W.obj)};var A,C,H,I;for(A=0,C=U.length;A<C;++A){H=U[A];if(H&&!H.checkReady){I=this.getEl(H.id);if(I){D(I,H);U[A]=null}else{F.push(H)}}}for(A=0,C=U.length;A<C;++A){H=U[A];if(H&&H.checkReady){I=this.getEl(H.id);if(I){if(S||I.nextSibling){D(I,H);U[A]=null}}else{F.push(H)}}}M=(F.length===0)?0:M-1;if(E){this.startInterval()}else{clearInterval(this._interval);this._interval=null}this.locked=false;return true},purgeElement:function(H,F,D){var W=(YAHOO.lang.isString(H))?this.getEl(H):H;var E=this.getListeners(W,D),I,C;if(E){for(I=0,C=E.length;I<C;++I){var A=E[I];this.removeListener(W,A.type,A.fn,A.index)}}if(F&&W&&W.childNodes){for(I=0,C=W.childNodes.length;I<C;++I){this.purgeElement(W.childNodes[I],F,D)}}},getListeners:function(W,Y){var F=[],X;if(!Y){X=[Q,P]}else{if(Y==="unload"){X=[P]}else{X=[Q]}}var D=(YAHOO.lang.isString(W))?this.getEl(W):W;for(var H=0;H<X.length;H=H+1){var A=X[H];if(A&&A.length>0){for(var E=0,C=A.length;E<C;++E){var I=A[E];if(I&&I[this.EL]===D&&(!Y||Y===I[this.TYPE])){F.push({type:I[this.TYPE],fn:I[this.FN],obj:I[this.OBJ],adjust:I[this.OVERRIDE],scope:I[this.ADJ_SCOPE],index:E})}}}}return(F.length)?F:null},_unload:function(D){var E=YAHOO.util.Event,H,I,A,C,W;for(H=0,C=P.length;H<C;++H){A=P[H];if(A){var F=window;if(A[E.ADJ_SCOPE]){if(A[E.ADJ_SCOPE]===true){F=A[E.UNLOAD_OBJ]}else{F=A[E.ADJ_SCOPE]}}A[E.FN].call(F,E.getEvent(D,A[E.EL]),A[E.UNLOAD_OBJ]);P[H]=null;A=null;F=null}}P=null;if(YAHOO.env.ua.ie&&Q&&Q.length>0){I=Q.length;while(I){W=I-1;A=Q[W];if(A){E.removeListener(A[E.EL],A[E.TYPE],A[E.FN],W)}I--}A=null}T=null;E._simpleRemove(window,"unload",E._unload)},_getScrollLeft:function(){return this._getScroll()[1]},_getScrollTop:function(){return this._getScroll()[0]},_getScroll:function(){var C=document.documentElement,A=document.body;if(C&&(C.scrollTop||C.scrollLeft)){return[C.scrollTop,C.scrollLeft]}else{if(A){return[A.scrollTop,A.scrollLeft]}else{return[0,0]}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(E,D,A,C){E.addEventListener(D,A,(C))}}else{if(window.attachEvent){return function(E,D,A,C){E.attachEvent("on"+D,A)}}else{return function(){}}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(E,D,A,C){E.removeEventListener(D,A,(C))}}else{if(window.detachEvent){return function(A,D,C){A.detachEvent("on"+D,C)}}else{return function(){}}}}()}}();(function(){var C=YAHOO.util.Event;C.on=C.addListener;if(C.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);C._dri=setInterval(function(){var A=document.createElement("p");try{A.doScroll("left");clearInterval(C._dri);C._dri=null;C._ready();A=null}catch(D){A=null}},C.POLL_INTERVAL)}else{if(C.webkit){C._dri=setInterval(function(){var A=document.readyState;if("loaded"==A||"complete"==A){clearInterval(C._dri);C._dri=null;C._ready()}},C.POLL_INTERVAL)}else{C._simpleAdd(document,"DOMContentLoaded",C._ready)}}C._simpleAdd(window,"load",C._load);C._simpleAdd(window,"unload",C._unload);C._tryPreloadAttach()})()}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(H,N,I,K){this.__yui_events=this.__yui_events||{};var M=this.__yui_events[H];if(M){M.subscribe(N,I,K)}else{this.__yui_subscribers=this.__yui_subscribers||{};var O=this.__yui_subscribers;if(!O[H]){O[H]=[]}O[H].push({fn:N,obj:I,override:K})}},unsubscribe:function(O,M,I){this.__yui_events=this.__yui_events||{};var H=this.__yui_events;if(O){var K=H[O];if(K){return K.unsubscribe(M,I)}}else{var P=true;for(var N in H){if(YAHOO.lang.hasOwnProperty(H,N)){P=P&&H[N].unsubscribe(M,I)}}return P}return false},unsubscribeAll:function(C){return this.unsubscribe(C)},createEvent:function(S,K){this.__yui_events=this.__yui_events||{};var O=K||{};var P=this.__yui_events;if(P[S]){}else{var Q=O.scope||this;var U=(O.silent);var N=new YAHOO.util.CustomEvent(S,Q,U,YAHOO.util.CustomEvent.FLAT);P[S]=N;if(O.onSubscribeCallback){N.subscribeEvent.subscribe(O.onSubscribeCallback)}this.__yui_subscribers=this.__yui_subscribers||{};var T=this.__yui_subscribers[S];if(T){for(var M=0;M<T.length;++M){N.subscribe(T[M].fn,T[M].obj,T[M].override)}}}return P[S]},fireEvent:function(M,N,H,O){this.__yui_events=this.__yui_events||{};var I=this.__yui_events[M];if(!I){return null}var P=[];for(var K=1;K<arguments.length;++K){P.push(arguments[K])}return I.fire.apply(I,P)},hasEvent:function(C){if(this.__yui_events){if(this.__yui_events[C]){return true}}return false}};YAHOO.util.KeyListener=function(H,I,O,N){if(!H){}else{if(!I){}else{if(!O){}}}if(!N){N=YAHOO.util.KeyListener.KEYDOWN}var M=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof H=="string"){H=document.getElementById(H)}if(typeof O=="function"){M.subscribe(O)}else{M.subscribe(O.fn,O.scope,O.correctScope)}function K(A,C){if(!I.shift){I.shift=false}if(!I.alt){I.alt=false}if(!I.ctrl){I.ctrl=false}if(A.shiftKey==I.shift&&A.altKey==I.alt&&A.ctrlKey==I.ctrl){var E;if(I.keys instanceof Array){for(var D=0;D<I.keys.length;D++){E=I.keys[D];if(E==A.charCode){M.fire(A.charCode,A);break}else{if(E==A.keyCode){M.fire(A.keyCode,A);break}}}}else{E=I.keys;if(E==A.charCode){M.fire(A.charCode,A)}else{if(E==A.keyCode){M.fire(A.keyCode,A)}}}}}this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(H,N,K);this.enabledEvent.fire(I)}this.enabled=true};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(H,N,K);this.disabledEvent.fire(I)}this.enabled=false};this.toString=function(){return"KeyListener ["+I.keys+"] "+H.tagName+(H.id?"["+H.id+"]":"")}};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.util.KeyListener.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};YAHOO.register("event",YAHOO.util.Event,{version:"2.4.1",build:"742"});YAHOO.util.Attribute=function(D,C){if(C){this.owner=C;this.configure(D,true)}};YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,validator:null,getValue:function(){return this.value},setValue:function(I,O){var K;var H=this.owner;var N=this.name;var M={type:N,prevValue:this.getValue(),newValue:I};if(this.readOnly||(this.writeOnce&&this._written)){return false}if(this.validator&&!this.validator.call(H,I)){return false}if(!O){K=H.fireBeforeChangeEvent(M);if(K===false){return false}}if(this.method){this.method.call(H,I)}this.value=I;this._written=true;M.type=N;if(!O){this.owner.fireChangeEvent(M)}return true},configure:function(F,E){F=F||{};this._written=false;this._initialConfig=this._initialConfig||{};for(var D in F){if(D&&YAHOO.lang.hasOwnProperty(F,D)){this[D]=F[D];if(E){this._initialConfig[D]=F[D]}}}},resetValue:function(){return this.setValue(this._initialConfig.value)},resetConfig:function(){this.configure(this._initialConfig)},refresh:function(C){this.setValue(this.value,C)}};(function(){var C=YAHOO.util.Lang;YAHOO.util.AttributeProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(A){this._configs=this._configs||{};var D=this._configs[A];if(!D){return undefined}return D.value},set:function(F,A,I){this._configs=this._configs||{};var H=this._configs[F];if(!H){return false}return H.setValue(A,I)},getAttributeKeys:function(){this._configs=this._configs;var A=[];var F;for(var E in this._configs){F=this._configs[E];if(C.hasOwnProperty(this._configs,E)&&!C.isUndefined(F)){A[A.length]=E}}return A},setAttributes:function(A,F){for(var E in A){if(C.hasOwnProperty(A,E)){this.set(E,A[E],F)}}},resetValue:function(A,D){this._configs=this._configs||{};if(this._configs[A]){this.set(A,this._configs[A]._initialConfig.value,D);return true}return false},refresh:function(A,H){this._configs=this._configs;A=((C.isString(A))?[A]:A)||this.getAttributeKeys();for(var F=0,I=A.length;F<I;++F){if(this._configs[A[F]]&&!C.isUndefined(this._configs[A[F]].value)&&!C.isNull(this._configs[A[F]].value)){this._configs[A[F]].refresh(H)}}},register:function(D,A){this.setAttributeConfig(D,A)},getAttributeConfig:function(E){this._configs=this._configs||{};var F=this._configs[E]||{};var A={};for(E in F){if(C.hasOwnProperty(F,E)){A[E]=F[E]}}return A},setAttributeConfig:function(F,E,A){this._configs=this._configs||{};E=E||{};if(!this._configs[F]){E.name=F;this._configs[F]=this.createAttribute(E)}else{this._configs[F].configure(E,A)}},configureAttribute:function(F,E,A){this.setAttributeConfig(F,E,A)},resetAttributeConfig:function(A){this._configs=this._configs||{};this._configs[A].resetConfig()},subscribe:function(D,A){this._events=this._events||{};if(!(D in this._events)){this._events[D]=this.createEvent(D)}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments)},on:function(){this.subscribe.apply(this,arguments)},addListener:function(){this.subscribe.apply(this,arguments)},fireBeforeChangeEvent:function(A){var D="before";D+=A.type.charAt(0).toUpperCase()+A.type.substr(1)+"Change";A.type=D;return this.fireEvent(A.type,A)},fireChangeEvent:function(A){A.type+="Change";return this.fireEvent(A.type,A)},createAttribute:function(A){return new YAHOO.util.Attribute(A,this)}};YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventProvider)})();(function(){var M=YAHOO.util.Dom,I=YAHOO.util.AttributeProvider;YAHOO.util.Element=function(C,A){if(arguments.length){this.init(C,A)}};YAHOO.util.Element.prototype={DOM_EVENTS:null,appendChild:function(A){A=A.get?A.get("element"):A;this.get("element").appendChild(A)},getElementsByTagName:function(A){return this.get("element").getElementsByTagName(A)},hasChildNodes:function(){return this.get("element").hasChildNodes()},insertBefore:function(C,A){C=C.get?C.get("element"):C;A=(A&&A.get)?A.get("element"):A;this.get("element").insertBefore(C,A)},removeChild:function(A){A=A.get?A.get("element"):A;this.get("element").removeChild(A);return true},replaceChild:function(C,A){C=C.get?C.get("element"):C;A=A.get?A.get("element"):A;return this.get("element").replaceChild(C,A)},initAttributes:function(A){},addListener:function(C,D,A,E){var F=this.get("element");E=E||this;F=this.get("id")||F;var P=this;if(!this._events[C]){if(this.DOM_EVENTS[C]){YAHOO.util.Event.addListener(F,C,function(Q){if(Q.srcElement&&!Q.target){Q.target=Q.srcElement}P.fireEvent(C,Q)},A,E)}this.createEvent(C,this)}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments)},on:function(){this.addListener.apply(this,arguments)},subscribe:function(){this.addListener.apply(this,arguments)},removeListener:function(A,C){this.unsubscribe.apply(this,arguments)},addClass:function(A){M.addClass(this.get("element"),A)},getElementsByClassName:function(A,C){return M.getElementsByClassName(A,C,this.get("element"))},hasClass:function(A){return M.hasClass(this.get("element"),A)},removeClass:function(A){return M.removeClass(this.get("element"),A)},replaceClass:function(A,C){return M.replaceClass(this.get("element"),A,C)},setStyle:function(A,C){var D=this.get("element");if(!D){return this._queue[this._queue.length]=["setStyle",arguments]}return M.setStyle(D,A,C)},getStyle:function(A){return M.getStyle(this.get("element"),A)},fireQueue:function(){var C=this._queue;for(var A=0,D=C.length;A<D;++A){this[C[A][0]].apply(this,C[A][1])}},appendTo:function(C,A){C=(C.get)?C.get("element"):M.get(C);this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:C});A=(A&&A.get)?A.get("element"):M.get(A);var D=this.get("element");if(!D){return false}if(!C){return false}if(D.parent!=C){if(A){C.insertBefore(D,A)}else{C.appendChild(D)}}this.fireEvent("appendTo",{type:"appendTo",target:C})},get:function(D){var A=this._configs||{};var C=A.element;if(C&&!A[D]&&!YAHOO.lang.isUndefined(C.value[D])){return C.value[D]}return I.prototype.get.call(this,D)},setAttributes:function(A,F){var C=this.get("element");for(var D in A){if(!this._configs[D]&&!YAHOO.lang.isUndefined(C[D])){this.setAttributeConfig(D)}}for(var E=0,P=this._configOrder.length;E<P;++E){if(A[this._configOrder[E]]){this.set(this._configOrder[E],A[this._configOrder[E]],F)}}},set:function(D,A,E){var C=this.get("element");if(!C){this._queue[this._queue.length]=["set",arguments];if(this._configs[D]){this._configs[D].value=A}return }if(!this._configs[D]&&!YAHOO.lang.isUndefined(C[D])){N.call(this,D)}return I.prototype.set.apply(this,arguments)},setAttributeConfig:function(E,C,A){var D=this.get("element");if(D&&!this._configs[E]&&!YAHOO.lang.isUndefined(D[E])){N.call(this,E,C)}else{I.prototype.setAttributeConfig.apply(this,arguments)}this._configOrder.push(E)},getAttributeKeys:function(){var C=this.get("element");var A=I.prototype.getAttributeKeys.call(this);for(var D in C){if(!this._configs[D]){A[D]=A[D]||C[D]}}return A},createEvent:function(A,C){this._events[A]=true;I.prototype.createEvent.apply(this,arguments)},init:function(A,C){H.apply(this,arguments)}};var H=function(C,D){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};this._configOrder=[];D=D||{};D.element=D.element||C||null;this.DOM_EVENTS={click:true,dblclick:true,keydown:true,keypress:true,keyup:true,mousedown:true,mousemove:true,mouseout:true,mouseover:true,mouseup:true,focus:true,blur:true,submit:true};var A=false;if(YAHOO.lang.isString(C)){N.call(this,"id",{value:D.element})}if(M.get(C)){A=true;K.call(this,D);O.call(this,D)}YAHOO.util.Event.onAvailable(D.element,function(){if(!A){K.call(this,D)}this.fireEvent("available",{type:"available",target:D.element})},this,true);YAHOO.util.Event.onContentReady(D.element,function(){if(!A){O.call(this,D)}this.fireEvent("contentReady",{type:"contentReady",target:D.element})},this,true)};var K=function(A){this.setAttributeConfig("element",{value:M.get(A.element),readOnly:true})};var O=function(A){this.initAttributes(A);this.setAttributes(A,true);this.fireQueue()};var N=function(D,A){var C=this.get("element");A=A||{};A.name=D;A.method=A.method||function(E){C[D]=E};A.value=A.value||C[D];this._configs[D]=new YAHOO.util.Attribute(A,this)};YAHOO.augment(YAHOO.util.Element,I)})();YAHOO.register("element",YAHOO.util.Element,{version:"2.4.1",build:"742"});if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={}}YAHOO.namespace=function(){var F=arguments,H=null,K,M,I;for(K=0;K<F.length;K=K+1){I=F[K].split(".");H=YAHOO;for(M=(I[0]=="YAHOO")?1:0;M<I.length;M=M+1){H[I[M]]=H[I[M]]||{};H=H[I[M]]}}return H};YAHOO.log=function(F,E,H){var I=YAHOO.widget.Logger;if(I&&I.log){return I.log(F,E,H)}else{return false}};YAHOO.register=function(O,U,K){var P=YAHOO.env.modules;if(!P[O]){P[O]={versions:[],builds:[]}}var N=P[O],Q=K.version,S=K.build,T=YAHOO.env.listeners;N.name=O;N.version=Q;N.build=S;N.versions.push(Q);N.builds.push(S);N.mainClass=U;for(var M=0;M<T.length;M=M+1){T[M](N)}if(U){U.VERSION=Q;U.BUILD=S}else{YAHOO.log("mainClass is undefined for module "+O,"warn")}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(C){return YAHOO.env.modules[C]||null};YAHOO.env.ua=function(){var E={ie:0,opera:0,gecko:0,webkit:0,mobile:null};var F=navigator.userAgent,D;if((/KHTML/).test(F)){E.webkit=1}D=F.match(/AppleWebKit\/([^\s]*)/);if(D&&D[1]){E.webkit=parseFloat(D[1]);if(/ Mobile\//.test(F)){E.mobile="Apple"}else{D=F.match(/NokiaN[^\/]*/);if(D){E.mobile=D[0]}}}if(!E.webkit){D=F.match(/Opera[\s\/]([^\s]*)/);if(D&&D[1]){E.opera=parseFloat(D[1]);D=F.match(/Opera Mini[^;]*/);if(D){E.mobile=D[0]}}else{D=F.match(/MSIE\s([^;]*)/);if(D&&D[1]){E.ie=parseFloat(D[1])}else{D=F.match(/Gecko\/([^\s]*)/);if(D){E.gecko=1;D=F.match(/rv:([^\s\)]*)/);if(D&&D[1]){E.gecko=parseFloat(D[1])}}}}}return E}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var I=YAHOO_config.listener,E=YAHOO.env.listeners,F=true,H;if(I){for(H=0;H<E.length;H=H+1){if(E[H]==I){F=false;break}}if(F){E.push(I)}}}})();YAHOO.lang=YAHOO.lang||{isArray:function(D){if(D){var C=YAHOO.lang;return C.isNumber(D.length)&&C.isFunction(D.splice)}return false},isBoolean:function(C){return typeof C==="boolean"},isFunction:function(C){return typeof C==="function"},isNull:function(C){return C===null},isNumber:function(C){return typeof C==="number"&&isFinite(C)},isObject:function(C){return(C&&(typeof C==="object"||YAHOO.lang.isFunction(C)))||false},isString:function(C){return typeof C==="string"},isUndefined:function(C){return typeof C==="undefined"},hasOwnProperty:function(C,D){if(Object.prototype.hasOwnProperty){return C.hasOwnProperty(D)}return !YAHOO.lang.isUndefined(C[D])&&C.constructor.prototype[D]!==C[D]},_IEEnumFix:function(N,O){if(YAHOO.env.ua.ie){var K=["toString","valueOf"],H;for(H=0;H<K.length;H=H+1){var I=K[H],M=O[I];if(YAHOO.lang.isFunction(M)&&M!=Object.prototype[I]){N[I]=M}}}},extend:function(I,H,K){if(!H||!I){throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.")}var M=function(){};M.prototype=H.prototype;I.prototype=new M();I.prototype.constructor=I;I.superclass=H.prototype;if(H.prototype.constructor==Object.prototype.constructor){H.prototype.constructor=H}if(K){for(var F in K){I.prototype[F]=K[F]}YAHOO.lang._IEEnumFix(I.prototype,K)}},augmentObject:function(K,M){if(!M||!K){throw new Error("Absorb failed, verify dependencies.")}var H=arguments,N,I,O=H[2];if(O&&O!==true){for(N=2;N<H.length;N=N+1){K[H[N]]=M[H[N]]}}else{for(I in M){if(O||!K[I]){K[I]=M[I]}}YAHOO.lang._IEEnumFix(K,M)}},augmentProto:function(F,H){if(!H||!F){throw new Error("Augment failed, verify dependencies.")}var E=[F.prototype,H.prototype];for(var I=2;I<arguments.length;I=I+1){E.push(arguments[I])}YAHOO.lang.augmentObject.apply(this,E)},dump:function(O,T){var M=YAHOO.lang,K,U,Q=[],P="{...}",N="f(){...}",S=", ",V=" => ";if(!M.isObject(O)){return O+""}else{if(O instanceof Date||("nodeType" in O&&"tagName" in O)){return O}else{if(M.isFunction(O)){return N}}}T=(M.isNumber(T))?T:3;if(M.isArray(O)){Q.push("[");for(K=0,U=O.length;K<U;K=K+1){if(M.isObject(O[K])){Q.push((T>0)?M.dump(O[K],T-1):P)}else{Q.push(O[K])}Q.push(S)}if(Q.length>1){Q.pop()}Q.push("]")}else{Q.push("{");for(K in O){if(M.hasOwnProperty(O,K)){Q.push(K+V);if(M.isObject(O[K])){Q.push((T>0)?M.dump(O[K],T-1):P)}else{Q.push(O[K])}Q.push(S)}}if(Q.length>1){Q.pop()}Q.push("}")}return Q.join("")},substitute:function(W,U,g){var n,o,p,c,Z,X,S=YAHOO.lang,d=[],T,l="dump",f=" ",V="{",Y="}";for(;;){n=W.lastIndexOf(V);if(n<0){break}o=W.indexOf(Y,n);if(n+1>=o){break}T=W.substring(n+1,o);c=T;X=null;p=c.indexOf(f);if(p>-1){X=c.substring(p+1);c=c.substring(0,p)}Z=U[c];if(g){Z=g(c,Z,X)}if(S.isObject(Z)){if(S.isArray(Z)){Z=S.dump(Z,parseInt(X,10))}else{X=X||"";var h=X.indexOf(l);if(h>-1){X=X.substring(4)}if(Z.toString===Object.prototype.toString||h>-1){Z=S.dump(Z,parseInt(X,10))}else{Z=Z.toString()}}}else{if(!S.isString(Z)&&!S.isNumber(Z)){Z="~-"+d.length+"-~";d[d.length]=T}}W=W.substring(0,n)+Z+W.substring(o+1)}for(n=d.length-1;n>=0;n=n-1){W=W.replace(new RegExp("~-"+n+"-~"),"{"+d[n]+"}","g")}return W},trim:function(C){try{return C.replace(/^\s+|\s+$/g,"")}catch(D){return C}},merge:function(){var F={},I=arguments;for(var H=0,E=I.length;H<E;H=H+1){YAHOO.lang.augmentObject(F,I[H],true)}return F},later:function(Q,N,P,K,U){Q=Q||0;N=N||{};var M=P,S=K,T,O;if(YAHOO.lang.isString(P)){M=N[P]}if(!M){throw new TypeError("method undefined")}if(!YAHOO.lang.isArray(S)){S=[K]}T=function(){M.apply(N,S)};O=(U)?setInterval(T,Q):setTimeout(T,Q);return{interval:U,cancel:function(){if(this.interval){clearInterval(O)}else{clearTimeout(O)}}}},isValue:function(D){var C=YAHOO.lang;return(C.isObject(D)||C.isString(D)||C.isNumber(D)||C.isBoolean(D))}};YAHOO.util.Lang=YAHOO.lang;YAHOO.lang.augment=YAHOO.lang.augmentProto;YAHOO.augment=YAHOO.lang.augmentProto;YAHOO.extend=YAHOO.lang.extend;YAHOO.register("yahoo",YAHOO,{version:"2.4.1",build:"742"});(function(){var T=YAHOO.util,Z,d,g=0,c={},l={},X=window.document;var S=YAHOO.env.ua.opera,Y=YAHOO.env.ua.webkit,U=YAHOO.env.ua.gecko,h=YAHOO.env.ua.ie;var n={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i};var W=function(C){if(!n.HYPHEN.test(C)){return C}if(c[C]){return c[C]}var A=C;while(n.HYPHEN.exec(A)){A=A.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase())}c[C]=A;return A};var V=function(A){var C=l[A];if(!C){C=new RegExp("(?:^|\\s+)"+A+"(?:\\s+|$)");l[A]=C}return C};if(X.defaultView&&X.defaultView.getComputedStyle){Z=function(E,A){var C=null;if(A=="float"){A="cssFloat"}var D=X.defaultView.getComputedStyle(E,"");if(D){C=D[W(A)]}return E.style[A]||C}}else{if(X.documentElement.currentStyle&&h){Z=function(F,D){switch(W(D)){case"opacity":var A=100;try{A=F.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(C){try{A=F.filters("alpha").opacity}catch(C){}}return A/100;case"float":D="styleFloat";default:var E=F.currentStyle?F.currentStyle[D]:null;return(F.style[D]||E)}}}else{Z=function(C,A){return C.style[A]}}}if(h){d=function(D,C,A){switch(C){case"opacity":if(YAHOO.lang.isString(D.style.filter)){D.style.filter="alpha(opacity="+A*100+")";if(!D.currentStyle||!D.currentStyle.hasLayout){D.style.zoom=1}}break;case"float":C="styleFloat";default:D.style[C]=A}}}else{d=function(D,C,A){if(C=="float"){C="cssFloat"}D.style[C]=A}}var Q=function(C,A){return C&&C.nodeType==1&&(!A||A(C))};YAHOO.util.Dom={get:function(C){if(C&&(C.tagName||C.item)){return C}if(YAHOO.lang.isString(C)||!C){return X.getElementById(C)}if(C.length!==undefined){var A=[];for(var D=0,E=C.length;D<E;++D){A[A.length]=T.Dom.get(C[D])}return A}return C},getStyle:function(D,A){A=W(A);var C=function(E){return Z(E,A)};return T.Dom.batch(D,C,T.Dom,true)},setStyle:function(E,C,A){C=W(C);var D=function(F){d(F,C,A)};T.Dom.batch(E,D,T.Dom,true)},getXY:function(C){var A=function(D){if((D.parentNode===null||D.offsetParent===null||this.getStyle(D,"display")=="none")&&D!=D.ownerDocument.body){return false}return f(D)};return T.Dom.batch(C,A,T.Dom,true)},getX:function(C){var A=function(D){return T.Dom.getXY(D)[0]};return T.Dom.batch(C,A,T.Dom,true)},getY:function(C){var A=function(D){return T.Dom.getXY(D)[1]};return T.Dom.batch(C,A,T.Dom,true)},setXY:function(E,A,C){var D=function(F){var H=this.getStyle(F,"position");if(H=="static"){this.setStyle(F,"position","relative");H="relative"}var K=this.getXY(F);if(K===false){return false}var M=[parseInt(this.getStyle(F,"left"),10),parseInt(this.getStyle(F,"top"),10)];if(isNaN(M[0])){M[0]=(H=="relative")?0:F.offsetLeft}if(isNaN(M[1])){M[1]=(H=="relative")?0:F.offsetTop}if(A[0]!==null){F.style.left=A[0]-K[0]+M[0]+"px"}if(A[1]!==null){F.style.top=A[1]-K[1]+M[1]+"px"}if(!C){var I=this.getXY(F);if((A[0]!==null&&I[0]!=A[0])||(A[1]!==null&&I[1]!=A[1])){this.setXY(F,A,true)}}};T.Dom.batch(E,D,T.Dom,true)},setX:function(A,C){T.Dom.setXY(A,[C,null])},setY:function(C,A){T.Dom.setXY(C,[null,A])},getRegion:function(C){var A=function(E){if((E.parentNode===null||E.offsetParent===null||this.getStyle(E,"display")=="none")&&E!=X.body){return false}var D=T.Region.getRegion(E);return D};return T.Dom.batch(C,A,T.Dom,true)},getClientWidth:function(){return T.Dom.getViewportWidth()},getClientHeight:function(){return T.Dom.getViewportHeight()},getElementsByClassName:function(F,A,E,D){A=A||"*";E=(E)?T.Dom.get(E):null||X;if(!E){return[]}var K=[],M=E.getElementsByTagName(A),C=V(F);for(var I=0,H=M.length;I<H;++I){if(C.test(M[I].className)){K[K.length]=M[I];if(D){D.call(M[I],M[I])}}}return K},hasClass:function(C,D){var E=V(D);var A=function(F){return E.test(F.className)};return T.Dom.batch(C,A,T.Dom,true)},addClass:function(C,D){var A=function(E){if(this.hasClass(E,D)){return false}E.className=YAHOO.lang.trim([E.className,D].join(" "));return true};return T.Dom.batch(C,A,T.Dom,true)},removeClass:function(C,D){var E=V(D);var A=function(H){if(!this.hasClass(H,D)){return false}var F=H.className;H.className=F.replace(E," ");if(this.hasClass(H,D)){this.removeClass(H,D)}H.className=YAHOO.lang.trim(H.className);return true};return T.Dom.batch(C,A,T.Dom,true)},replaceClass:function(C,E,F){if(!F||E===F){return false}var D=V(E);var A=function(H){if(!this.hasClass(H,E)){this.addClass(H,F);return true}H.className=H.className.replace(D," "+F+" ");if(this.hasClass(H,E)){this.replaceClass(H,E,F)}H.className=YAHOO.lang.trim(H.className);return true};return T.Dom.batch(C,A,T.Dom,true)},generateId:function(D,A){A=A||"yui-gen";var C=function(F){if(F&&F.id){return F.id}var E=A+g++;if(F){F.id=E}return E};return T.Dom.batch(D,C,T.Dom,true)||C.apply(T.Dom,arguments)},isAncestor:function(C,A){C=T.Dom.get(C);A=T.Dom.get(A);if(!C||!A){return false}if(C.contains&&A.nodeType&&!Y){return C.contains(A)}else{if(C.compareDocumentPosition&&A.nodeType){return !!(C.compareDocumentPosition(A)&16)}else{if(A.nodeType){return !!this.getAncestorBy(A,function(D){return D==C})}}}return false},inDocument:function(A){return this.isAncestor(X.documentElement,A)},getElementsBy:function(K,H,F,D){H=H||"*";F=(F)?T.Dom.get(F):null||X;if(!F){return[]}var E=[],A=F.getElementsByTagName(H);for(var C=0,I=A.length;C<I;++C){if(K(A[C])){E[E.length]=A[C];if(D){D(A[C])}}}return E},batch:function(D,K,A,F){D=(D&&(D.tagName||D.item))?D:T.Dom.get(D);if(!D||!K){return false}var E=(F)?A:window;if(D.tagName||D.length===undefined){return K.call(E,D,A)}var C=[];for(var H=0,I=D.length;H<I;++H){C[C.length]=K.call(E,D[H],A)}return C},getDocumentHeight:function(){var A=(X.compatMode!="CSS1Compat")?X.body.scrollHeight:X.documentElement.scrollHeight;var C=Math.max(A,T.Dom.getViewportHeight());return C},getDocumentWidth:function(){var A=(X.compatMode!="CSS1Compat")?X.body.scrollWidth:X.documentElement.scrollWidth;var C=Math.max(A,T.Dom.getViewportWidth());return C},getViewportHeight:function(){var C=self.innerHeight;var A=X.compatMode;if((A||h)&&!S){C=(A=="CSS1Compat")?X.documentElement.clientHeight:X.body.clientHeight}return C},getViewportWidth:function(){var C=self.innerWidth;var A=X.compatMode;if(A||h){C=(A=="CSS1Compat")?X.documentElement.clientWidth:X.body.clientWidth}return C},getAncestorBy:function(C,A){while(C=C.parentNode){if(Q(C,A)){return C}}return null},getAncestorByClassName:function(C,D){C=T.Dom.get(C);if(!C){return null}var A=function(E){return T.Dom.hasClass(E,D)};return T.Dom.getAncestorBy(C,A)},getAncestorByTagName:function(C,D){C=T.Dom.get(C);if(!C){return null}var A=function(E){return E.tagName&&E.tagName.toUpperCase()==D.toUpperCase()};return T.Dom.getAncestorBy(C,A)},getPreviousSiblingBy:function(C,A){while(C){C=C.previousSibling;if(Q(C,A)){return C}}return null},getPreviousSibling:function(A){A=T.Dom.get(A);if(!A){return null}return T.Dom.getPreviousSiblingBy(A)},getNextSiblingBy:function(C,A){while(C){C=C.nextSibling;if(Q(C,A)){return C}}return null},getNextSibling:function(A){A=T.Dom.get(A);if(!A){return null}return T.Dom.getNextSiblingBy(A)},getFirstChildBy:function(D,A){var C=(Q(D.firstChild,A))?D.firstChild:null;return C||T.Dom.getNextSiblingBy(D.firstChild,A)},getFirstChild:function(C,A){C=T.Dom.get(C);if(!C){return null}return T.Dom.getFirstChildBy(C)},getLastChildBy:function(D,A){if(!D){return null}var C=(Q(D.lastChild,A))?D.lastChild:null;return C||T.Dom.getPreviousSiblingBy(D.lastChild,A)},getLastChild:function(A){A=T.Dom.get(A);return T.Dom.getLastChildBy(A)},getChildrenBy:function(D,A){var C=T.Dom.getFirstChildBy(D,A);var E=C?[C]:[];T.Dom.getNextSiblingBy(C,function(F){if(!A||A(F)){E[E.length]=F}return false});return E},getChildren:function(A){A=T.Dom.get(A);if(!A){}return T.Dom.getChildrenBy(A)},getDocumentScrollLeft:function(A){A=A||X;return Math.max(A.documentElement.scrollLeft,A.body.scrollLeft)},getDocumentScrollTop:function(A){A=A||X;return Math.max(A.documentElement.scrollTop,A.body.scrollTop)},insertBefore:function(A,C){A=T.Dom.get(A);C=T.Dom.get(C);if(!A||!C||!C.parentNode){return null}return C.parentNode.insertBefore(A,C)},insertAfter:function(A,C){A=T.Dom.get(A);C=T.Dom.get(C);if(!A||!C||!C.parentNode){return null}if(C.nextSibling){return C.parentNode.insertBefore(A,C.nextSibling)}else{return C.parentNode.appendChild(A)}},getClientRegion:function(){var C=T.Dom.getDocumentScrollTop(),D=T.Dom.getDocumentScrollLeft(),A=T.Dom.getViewportWidth()+D,E=T.Dom.getViewportHeight()+C;return new T.Region(C,A,E,D)}};var f=function(){if(X.documentElement.getBoundingClientRect){return function(C){var A=C.getBoundingClientRect();var D=C.ownerDocument;return[A.left+T.Dom.getDocumentScrollLeft(D),A.top+T.Dom.getDocumentScrollTop(D)]}}else{return function(C){var A=[C.offsetLeft,C.offsetTop];var D=C.offsetParent;var E=(Y&&T.Dom.getStyle(C,"position")=="absolute"&&C.offsetParent==C.ownerDocument.body);if(D!=C){while(D){A[0]+=D.offsetLeft;A[1]+=D.offsetTop;if(!E&&Y&&T.Dom.getStyle(D,"position")=="absolute"){E=true}D=D.offsetParent}}if(E){A[0]-=C.ownerDocument.body.offsetLeft;A[1]-=C.ownerDocument.body.offsetTop}D=C.parentNode;while(D.tagName&&!n.ROOT_TAG.test(D.tagName)){if(T.Dom.getStyle(D,"display").search(/^inline|table-row.*$/i)){A[0]-=D.scrollLeft;A[1]-=D.scrollTop}D=D.parentNode}return A}}}()})();YAHOO.util.Region=function(H,F,E,I){this.top=H;this[1]=H;this.right=F;this.bottom=E;this.left=I;this[0]=I};YAHOO.util.Region.prototype.contains=function(C){return(C.left>=this.left&&C.right<=this.right&&C.top>=this.top&&C.bottom<=this.bottom)};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left))};YAHOO.util.Region.prototype.intersect=function(H){var K=Math.max(this.top,H.top);var I=Math.min(this.right,H.right);var F=Math.min(this.bottom,H.bottom);var M=Math.max(this.left,H.left);if(F>=K&&I>=M){return new YAHOO.util.Region(K,I,F,M)}else{return null}};YAHOO.util.Region.prototype.union=function(H){var K=Math.min(this.top,H.top);var I=Math.max(this.right,H.right);var F=Math.max(this.bottom,H.bottom);var M=Math.min(this.left,H.left);return new YAHOO.util.Region(K,I,F,M)};YAHOO.util.Region.prototype.toString=function(){return("Region {top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}")};YAHOO.util.Region.getRegion=function(M){var I=YAHOO.util.Dom.getXY(M);var N=I[1];var K=I[0]+M.offsetWidth;var H=I[1]+M.offsetHeight;var O=I[0];return new YAHOO.util.Region(N,K,H,O)};YAHOO.util.Point=function(C,D){if(YAHOO.lang.isArray(C)){D=C[1];C=C[0]}this.x=this.right=this.left=this[0]=C;this.y=this.top=this.bottom=this[1]=D};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.4.1",build:"742"});YAHOO.util.CustomEvent=function(I,M,K,F){this.type=I;this.scope=M||window;this.silent=K;this.signature=F||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var H="_YUICEOnSubscribe";if(I!==H){this.subscribeEvent=new YAHOO.util.CustomEvent(H,this,true)}this.lastError=null};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(F,E,D){if(!F){throw new Error("Invalid callback for subscriber to '"+this.type+"'")}if(this.subscribeEvent){this.subscribeEvent.fire(F,E,D)}this.subscribers.push(new YAHOO.util.Subscriber(F,E,D))},unsubscribe:function(M,I){if(!M){return this.unsubscribeAll()}var K=false;for(var O=0,H=this.subscribers.length;O<H;++O){var N=this.subscribers[O];if(N&&N.contains(M,I)){this._delete(O);K=true}}return K},fire:function(){var M=this.subscribers.length;if(!M&&this.silent){return true}var V=[],X=true,N,U=false;for(N=0;N<arguments.length;++N){V.push(arguments[N])}if(!this.silent){}for(N=0;N<M;++N){var Q=this.subscribers[N];if(!Q){U=true}else{if(!this.silent){}var S=Q.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var P=null;if(V.length>0){P=V[0]}try{X=Q.fn.call(S,P,Q.obj)}catch(Y){this.lastError=Y}}else{try{X=Q.fn.call(S,this.type,V,Q.obj)}catch(W){this.lastError=W}}if(false===X){if(!this.silent){}return false}}}if(U){var T=[],O=this.subscribers;for(N=0,M=O.length;N<M;N=N+1){T.push(O[N])}this.subscribers=T}return true},unsubscribeAll:function(){for(var D=0,C=this.subscribers.length;D<C;++D){this._delete(C-1-D)}this.subscribers=[];return D},_delete:function(C){var D=this.subscribers[C];if(D){delete D.fn;delete D.obj}this.subscribers[C]=null},toString:function(){return"CustomEvent: '"+this.type+"', scope: "+this.scope}};YAHOO.util.Subscriber=function(F,E,D){this.fn=F;this.obj=YAHOO.lang.isUndefined(E)?null:E;this.override=D};YAHOO.util.Subscriber.prototype.getScope=function(C){if(this.override){if(this.override===true){return this.obj}else{return this.override}}return C};YAHOO.util.Subscriber.prototype.contains=function(C,D){if(D){return(this.fn==C&&this.obj==D)}else{return(this.fn==C)}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }"};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var S=false;var Q=[];var P=[];var T=[];var V=[];var M=0;var U=[];var N=[];var O=0;var K={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};return{POLL_RETRYS:4000,POLL_INTERVAL:10,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,startInterval:function(){if(!this._interval){var C=this;var A=function(){C._tryPreloadAttach()};this._interval=setInterval(A,this.POLL_INTERVAL)}},onAvailable:function(E,I,D,F,H){var C=(YAHOO.lang.isString(E))?[E]:E;for(var A=0;A<C.length;A=A+1){U.push({id:C[A],fn:I,obj:D,override:F,checkReady:H})}M=this.POLL_RETRYS;this.startInterval()},onContentReady:function(E,C,D,A){this.onAvailable(E,C,D,A,true)},onDOMReady:function(C,D,A){if(this.DOMReady){setTimeout(function(){var E=window;if(A){if(A===true){E=D}else{E=A}}C.call(E,"DOMReady",[],D)},0)}else{this.DOMReadyEvent.subscribe(C,D,A)}},addListener:function(h,n,E,c,l){if(!E||!E.call){return false}if(this._isValidCollection(h)){var D=true;for(var Z=0,H=h.length;Z<H;++Z){D=this.on(h[Z],n,E,c,l)&&D}return D}else{if(YAHOO.lang.isString(h)){var d=this.getEl(h);if(d){h=d}else{this.onAvailable(h,function(){YAHOO.util.Event.on(h,n,E,c,l)});return true}}}if(!h){return false}if("unload"==n&&c!==this){P[P.length]=[h,n,E,c,l];return true}var A=h;if(l){if(l===true){A=c}else{A=l}}var g=function(W){return E.call(A,YAHOO.util.Event.getEvent(W,h),c)};var C=[h,n,E,g,A,c,l];var I=Q.length;Q[I]=C;if(this.useLegacyEvent(h,n)){var f=this.getLegacyIndex(h,n);if(f==-1||h!=T[f][0]){f=T.length;N[h.id+n]=f;T[f]=[h,n,h["on"+n]];V[f]=[];h["on"+n]=function(W){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(W),f)}}V[f].push(C)}else{try{this._simpleAdd(h,n,g,false)}catch(F){this.lastError=F;this.removeListener(h,n,E);return false}}return true},fireLegacyEvent:function(H,W){var E=true,Y,C,D,A,F;C=V[W];for(var X=0,I=C.length;X<I;++X){D=C[X];if(D&&D[this.WFN]){A=D[this.ADJ_SCOPE];F=D[this.WFN].call(A,H);E=(E&&F)}}Y=T[W];if(Y&&Y[2]){Y[2](H)}return E},getLegacyIndex:function(A,D){var C=this.generateId(A)+D;if(typeof N[C]=="undefined"){return -1}else{return N[C]}},useLegacyEvent:function(A,D){if(this.webkit&&("click"==D||"dblclick"==D)){var C=parseInt(this.webkit,10);if(!isNaN(C)&&C<418){return true}}return false},removeListener:function(Z,c,D){var W,F,A;if(typeof Z=="string"){Z=this.getEl(Z)}else{if(this._isValidCollection(Z)){var C=true;for(W=0,F=Z.length;W<F;++W){C=(this.removeListener(Z[W],c,D)&&C)}return C}}if(!D||!D.call){return this.purgeElement(Z,false,c)}if("unload"==c){for(W=0,F=P.length;W<F;W++){A=P[W];if(A&&A[0]==Z&&A[1]==c&&A[2]==D){P[W]=null;return true}}return false}var I=null;var H=arguments[3];if("undefined"===typeof H){H=this._getCacheIndex(Z,c,D)}if(H>=0){I=Q[H]}if(!Z||!I){return false}if(this.useLegacyEvent(Z,c)){var X=this.getLegacyIndex(Z,c);var Y=V[X];if(Y){for(W=0,F=Y.length;W<F;++W){A=Y[W];if(A&&A[this.EL]==Z&&A[this.TYPE]==c&&A[this.FN]==D){Y[W]=null;break}}}}else{try{this._simpleRemove(Z,c,I[this.WFN],false)}catch(E){this.lastError=E;return false}}delete Q[H][this.WFN];delete Q[H][this.FN];Q[H]=null;return true},getTarget:function(D,A){var C=D.target||D.srcElement;return this.resolveTextNode(C)},resolveTextNode:function(A){if(A&&3==A.nodeType){return A.parentNode}else{return A}},getPageX:function(A){var C=A.pageX;if(!C&&0!==C){C=A.clientX||0;if(this.isIE){C+=this._getScrollLeft()}}return C},getPageY:function(C){var A=C.pageY;if(!A&&0!==A){A=C.clientY||0;if(this.isIE){A+=this._getScrollTop()}}return A},getXY:function(A){return[this.getPageX(A),this.getPageY(A)]},getRelatedTarget:function(A){var C=A.relatedTarget;if(!C){if(A.type=="mouseout"){C=A.toElement}else{if(A.type=="mouseover"){C=A.fromElement}}}return this.resolveTextNode(C)},getTime:function(D){if(!D.time){var A=new Date().getTime();try{D.time=A}catch(C){this.lastError=C;return A}}return D.time},stopEvent:function(A){this.stopPropagation(A);this.preventDefault(A)},stopPropagation:function(A){if(A.stopPropagation){A.stopPropagation()}else{A.cancelBubble=true}},preventDefault:function(A){if(A.preventDefault){A.preventDefault()}else{A.returnValue=false}},getEvent:function(E,C){var A=E||window.event;if(!A){var D=this.getEvent.caller;while(D){A=D.arguments[0];if(A&&Event==A.constructor){break}D=D.caller}}return A},getCharCode:function(A){var C=A.keyCode||A.charCode||0;if(YAHOO.env.ua.webkit&&(C in K)){C=K[C]}return C},_getCacheIndex:function(E,D,F){for(var H=0,A=Q.length;H<A;++H){var C=Q[H];if(C&&C[this.FN]==F&&C[this.EL]==E&&C[this.TYPE]==D){return H}}return -1},generateId:function(C){var A=C.id;if(!A){A="yuievtautoid-"+O;++O;C.id=A}return A},_isValidCollection:function(A){try{return(A&&typeof A!=="string"&&A.length&&!A.tagName&&!A.alert&&typeof A[0]!=="undefined")}catch(C){return false}},elCache:{},getEl:function(A){return(typeof A==="string")?document.getElementById(A):A},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(A){if(!S){S=true;var C=YAHOO.util.Event;C._ready();C._tryPreloadAttach()}},_ready:function(A){var C=YAHOO.util.Event;if(!C.DOMReady){C.DOMReady=true;C.DOMReadyEvent.fire();C._simpleRemove(document,"DOMContentLoaded",C._ready)}},_tryPreloadAttach:function(){if(this.locked){return false}if(this.isIE){if(!this.DOMReady){this.startInterval();return false}}this.locked=true;var E=!S;if(!E){E=(M>0)}var F=[];var D=function(X,W){var Y=X;if(W.override){if(W.override===true){Y=W.obj}else{Y=W.override}}W.fn.call(Y,W.obj)};var A,C,H,I;for(A=0,C=U.length;A<C;++A){H=U[A];if(H&&!H.checkReady){I=this.getEl(H.id);if(I){D(I,H);U[A]=null}else{F.push(H)}}}for(A=0,C=U.length;A<C;++A){H=U[A];if(H&&H.checkReady){I=this.getEl(H.id);if(I){if(S||I.nextSibling){D(I,H);U[A]=null}}else{F.push(H)}}}M=(F.length===0)?0:M-1;if(E){this.startInterval()}else{clearInterval(this._interval);this._interval=null}this.locked=false;return true},purgeElement:function(H,F,D){var W=(YAHOO.lang.isString(H))?this.getEl(H):H;var E=this.getListeners(W,D),I,C;if(E){for(I=0,C=E.length;I<C;++I){var A=E[I];this.removeListener(W,A.type,A.fn,A.index)}}if(F&&W&&W.childNodes){for(I=0,C=W.childNodes.length;I<C;++I){this.purgeElement(W.childNodes[I],F,D)}}},getListeners:function(W,Y){var F=[],X;if(!Y){X=[Q,P]}else{if(Y==="unload"){X=[P]}else{X=[Q]}}var D=(YAHOO.lang.isString(W))?this.getEl(W):W;for(var H=0;H<X.length;H=H+1){var A=X[H];if(A&&A.length>0){for(var E=0,C=A.length;E<C;++E){var I=A[E];if(I&&I[this.EL]===D&&(!Y||Y===I[this.TYPE])){F.push({type:I[this.TYPE],fn:I[this.FN],obj:I[this.OBJ],adjust:I[this.OVERRIDE],scope:I[this.ADJ_SCOPE],index:E})}}}}return(F.length)?F:null},_unload:function(D){var E=YAHOO.util.Event,H,I,A,C,W;for(H=0,C=P.length;H<C;++H){A=P[H];if(A){var F=window;if(A[E.ADJ_SCOPE]){if(A[E.ADJ_SCOPE]===true){F=A[E.UNLOAD_OBJ]}else{F=A[E.ADJ_SCOPE]}}A[E.FN].call(F,E.getEvent(D,A[E.EL]),A[E.UNLOAD_OBJ]);P[H]=null;A=null;F=null}}P=null;if(YAHOO.env.ua.ie&&Q&&Q.length>0){I=Q.length;while(I){W=I-1;A=Q[W];if(A){E.removeListener(A[E.EL],A[E.TYPE],A[E.FN],W)}I--}A=null}T=null;E._simpleRemove(window,"unload",E._unload)},_getScrollLeft:function(){return this._getScroll()[1]},_getScrollTop:function(){return this._getScroll()[0]},_getScroll:function(){var C=document.documentElement,A=document.body;if(C&&(C.scrollTop||C.scrollLeft)){return[C.scrollTop,C.scrollLeft]}else{if(A){return[A.scrollTop,A.scrollLeft]}else{return[0,0]}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(E,D,A,C){E.addEventListener(D,A,(C))}}else{if(window.attachEvent){return function(E,D,A,C){E.attachEvent("on"+D,A)}}else{return function(){}}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(E,D,A,C){E.removeEventListener(D,A,(C))}}else{if(window.detachEvent){return function(A,D,C){A.detachEvent("on"+D,C)}}else{return function(){}}}}()}}();(function(){var C=YAHOO.util.Event;C.on=C.addListener;if(C.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);C._dri=setInterval(function(){var A=document.createElement("p");try{A.doScroll("left");clearInterval(C._dri);C._dri=null;C._ready();A=null}catch(D){A=null}},C.POLL_INTERVAL)}else{if(C.webkit){C._dri=setInterval(function(){var A=document.readyState;if("loaded"==A||"complete"==A){clearInterval(C._dri);C._dri=null;C._ready()}},C.POLL_INTERVAL)}else{C._simpleAdd(document,"DOMContentLoaded",C._ready)}}C._simpleAdd(window,"load",C._load);C._simpleAdd(window,"unload",C._unload);C._tryPreloadAttach()})()}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(H,N,I,K){this.__yui_events=this.__yui_events||{};var M=this.__yui_events[H];if(M){M.subscribe(N,I,K)}else{this.__yui_subscribers=this.__yui_subscribers||{};var O=this.__yui_subscribers;if(!O[H]){O[H]=[]}O[H].push({fn:N,obj:I,override:K})}},unsubscribe:function(O,M,I){this.__yui_events=this.__yui_events||{};var H=this.__yui_events;if(O){var K=H[O];if(K){return K.unsubscribe(M,I)}}else{var P=true;for(var N in H){if(YAHOO.lang.hasOwnProperty(H,N)){P=P&&H[N].unsubscribe(M,I)}}return P}return false},unsubscribeAll:function(C){return this.unsubscribe(C)},createEvent:function(S,K){this.__yui_events=this.__yui_events||{};var O=K||{};var P=this.__yui_events;if(P[S]){}else{var Q=O.scope||this;var U=(O.silent);var N=new YAHOO.util.CustomEvent(S,Q,U,YAHOO.util.CustomEvent.FLAT);P[S]=N;if(O.onSubscribeCallback){N.subscribeEvent.subscribe(O.onSubscribeCallback)}this.__yui_subscribers=this.__yui_subscribers||{};var T=this.__yui_subscribers[S];if(T){for(var M=0;M<T.length;++M){N.subscribe(T[M].fn,T[M].obj,T[M].override)}}}return P[S]},fireEvent:function(M,N,H,O){this.__yui_events=this.__yui_events||{};var I=this.__yui_events[M];if(!I){return null}var P=[];for(var K=1;K<arguments.length;++K){P.push(arguments[K])}return I.fire.apply(I,P)},hasEvent:function(C){if(this.__yui_events){if(this.__yui_events[C]){return true}}return false}};YAHOO.util.KeyListener=function(H,I,O,N){if(!H){}else{if(!I){}else{if(!O){}}}if(!N){N=YAHOO.util.KeyListener.KEYDOWN}var M=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof H=="string"){H=document.getElementById(H)}if(typeof O=="function"){M.subscribe(O)}else{M.subscribe(O.fn,O.scope,O.correctScope)}function K(A,C){if(!I.shift){I.shift=false}if(!I.alt){I.alt=false}if(!I.ctrl){I.ctrl=false}if(A.shiftKey==I.shift&&A.altKey==I.alt&&A.ctrlKey==I.ctrl){var E;if(I.keys instanceof Array){for(var D=0;D<I.keys.length;D++){E=I.keys[D];if(E==A.charCode){M.fire(A.charCode,A);break}else{if(E==A.keyCode){M.fire(A.keyCode,A);break}}}}else{E=I.keys;if(E==A.charCode){M.fire(A.charCode,A)}else{if(E==A.keyCode){M.fire(A.keyCode,A)}}}}}this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(H,N,K);this.enabledEvent.fire(I)}this.enabled=true};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(H,N,K);this.disabledEvent.fire(I)}this.enabled=false};this.toString=function(){return"KeyListener ["+I.keys+"] "+H.tagName+(H.id?"["+H.id+"]":"")}};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.util.KeyListener.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};YAHOO.register("event",YAHOO.util.Event,{version:"2.4.1",build:"742"});YAHOO.register("yahoo-dom-event",YAHOO,{version:"2.4.1",build:"742"});YAHOO.util.Connect={_msxml_progid:["Microsoft.XMLHTTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:"application/x-www-form-urlencoded; charset=UTF-8",_default_form_header:"application/x-www-form-urlencoded",_use_default_xhr_header:true,_default_xhr_header:"XMLHttpRequest",_has_default_headers:true,_default_headers:{},_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,_submitElementValue:null,_hasSubmitListener:(function(){if(YAHOO.util.Event){YAHOO.util.Event.addListener(document,"click",function(C){var A=YAHOO.util.Event.getTarget(C);if(A.type&&A.type.toLowerCase()=="submit"){YAHOO.util.Connect._submitElementValue=encodeURIComponent(A.name)+"="+encodeURIComponent(A.value)}});return true}return false})(),startEvent:new YAHOO.util.CustomEvent("start"),completeEvent:new YAHOO.util.CustomEvent("complete"),successEvent:new YAHOO.util.CustomEvent("success"),failureEvent:new YAHOO.util.CustomEvent("failure"),uploadEvent:new YAHOO.util.CustomEvent("upload"),abortEvent:new YAHOO.util.CustomEvent("abort"),_customEvents:{onStart:["startEvent","start"],onComplete:["completeEvent","complete"],onSuccess:["successEvent","success"],onFailure:["failureEvent","failure"],onUpload:["uploadEvent","upload"],onAbort:["abortEvent","abort"]},setProgId:function(A){this._msxml_progid.unshift(A)},setDefaultPostHeader:function(A){if(typeof A=="string"){this._default_post_header=A}else{if(typeof A=="boolean"){this._use_default_post_header=A}}},setDefaultXhrHeader:function(A){if(typeof A=="string"){this._default_xhr_header=A}else{this._use_default_xhr_header=A}},setPollingInterval:function(A){if(typeof A=="number"&&isFinite(A)){this._polling_interval=A}},createXhrObject:function(F){var E,A;try{A=new XMLHttpRequest();E={conn:A,tId:F}}catch(D){for(var C=0;C<this._msxml_progid.length;++C){try{A=new ActiveXObject(this._msxml_progid[C]);E={conn:A,tId:F};break}catch(D){}}}finally{return E}},getConnectionObject:function(A){var D;var E=this._transaction_id;try{if(!A){D=this.createXhrObject(E)}else{D={};D.tId=E;D.isUpload=true}if(D){this._transaction_id++}}catch(C){}finally{return D}},asyncRequest:function(I,E,H,A){var F=(this._isFileUpload)?this.getConnectionObject(true):this.getConnectionObject();var D=(H&&H.argument)?H.argument:null;if(!F){return null}else{if(H&&H.customevents){this.initCustomEvents(F,H)}if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(F,H,E,A);return F}if(I.toUpperCase()=="GET"){if(this._sFormData.length!==0){E+=((E.indexOf("?")==-1)?"?":"&")+this._sFormData}}else{if(I.toUpperCase()=="POST"){A=A?this._sFormData+"&"+A:this._sFormData}}}if(I.toUpperCase()=="GET"&&(H&&H.cache===false)){E+=((E.indexOf("?")==-1)?"?":"&")+"rnd="+new Date().valueOf().toString()}var C=new Date();E+=((E.indexOf("?")==-1)?"?":"&")+"u_t_s="+C.getTime();F.conn.open(I,E,true);if(this._use_default_xhr_header){if(!this._default_headers["X-Requested-With"]){this.initHeader("X-Requested-With",this._default_xhr_header,true)}}if((I.toUpperCase()=="POST"&&this._use_default_post_header)&&this._isFormSubmit===false){this.initHeader("Content-Type",this._default_post_header)}if(this._has_default_headers||this._has_http_headers){this.setHeader(F)}this.handleReadyState(F,H);F.conn.send(A||null);if(this._isFormSubmit===true){this.resetFormState()}this.startEvent.fire(F,D);if(F.startEvent){F.startEvent.fire(F,D)}return F}},initCustomEvents:function(A,D){for(var C in D.customevents){if(this._customEvents[C][0]){A[this._customEvents[C][0]]=new YAHOO.util.CustomEvent(this._customEvents[C][1],(D.scope)?D.scope:null);A[this._customEvents[C][0]].subscribe(D.customevents[C])}}},handleReadyState:function(D,E){var C=this;var A=(E&&E.argument)?E.argument:null;if(E&&E.timeout){this._timeOut[D.tId]=window.setTimeout(function(){C.abort(D,E,true)},E.timeout)}this._poll[D.tId]=window.setInterval(function(){if(D.conn&&D.conn.readyState===4){window.clearInterval(C._poll[D.tId]);delete C._poll[D.tId];if(E&&E.timeout){window.clearTimeout(C._timeOut[D.tId]);delete C._timeOut[D.tId]}C.completeEvent.fire(D,A);if(D.completeEvent){D.completeEvent.fire(D,A)}C.handleTransactionResponse(D,E)}},this._polling_interval)},handleTransactionResponse:function(H,I,A){var E,D;var C=(I&&I.argument)?I.argument:null;try{if(H.conn.status!==undefined&&H.conn.status!==0){E=H.conn.status}else{E=13030}}catch(F){E=13030}if(E>=200&&E<300||E===1223){D=this.createResponseObject(H,C);if(I&&I.success){if(!I.scope){I.success(D)}else{I.success.apply(I.scope,[D])}}this.successEvent.fire(D);if(H.successEvent){H.successEvent.fire(D)}}else{switch(E){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:D=this.createExceptionObject(H.tId,C,(A?A:false));if(I&&I.failure){if(!I.scope){I.failure(D)}else{I.failure.apply(I.scope,[D])}}break;default:D=this.createResponseObject(H,C);if(I&&I.failure){if(!I.scope){I.failure(D)}else{I.failure.apply(I.scope,[D])}}}this.failureEvent.fire(D);if(H.failureEvent){H.failureEvent.fire(D)}}this.releaseObject(H);D=null},createResponseObject:function(A,I){var E={};var M={};try{var D=A.conn.getAllResponseHeaders();var H=D.split("\n");for(var F=0;F<H.length;F++){var C=H[F].indexOf(":");if(C!=-1){M[H[F].substring(0,C)]=H[F].substring(C+2)}}}catch(K){}E.tId=A.tId;E.status=(A.conn.status==1223)?204:A.conn.status;E.statusText=(A.conn.status==1223)?"No Content":A.conn.statusText;E.getResponseHeader=M;E.getAllResponseHeaders=D;E.responseText=A.conn.responseText;E.responseXML=A.conn.responseXML;if(I){E.argument=I}return E},createExceptionObject:function(K,E,A){var H=0;var I="communication failure";var D=-1;var C="transaction aborted";var F={};F.tId=K;if(A){F.status=D;F.statusText=C}else{F.status=H;F.statusText=I}if(E){F.argument=E}return F},initHeader:function(A,E,D){var C=(D)?this._default_headers:this._http_headers;C[A]=E;if(D){this._has_default_headers=true}else{this._has_http_headers=true}},setHeader:function(A){if(this._has_default_headers){for(var C in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,C)){A.conn.setRequestHeader(C,this._default_headers[C])}}}if(this._has_http_headers){for(var C in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,C)){A.conn.setRequestHeader(C,this._http_headers[C])}}delete this._http_headers;this._http_headers={};this._has_http_headers=false}},resetDefaultHeaders:function(){delete this._default_headers;this._default_headers={};this._has_default_headers=false},setForm:function(O,F,C){this.resetFormState();var N;if(typeof O=="string"){N=(document.getElementById(O)||document.forms[O])}else{if(typeof O=="object"){N=O}else{return }}if(F){var H=this.createFrame(C?C:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=N;return }var A,M,I,P;var K=false;for(var E=0;E<N.elements.length;E++){A=N.elements[E];P=A.disabled;M=A.name;I=A.value;if(!P&&M){switch(A.type){case"select-one":case"select-multiple":for(var D=0;D<A.options.length;D++){if(A.options[D].selected){if(window.ActiveXObject){this._sFormData+=encodeURIComponent(M)+"="+encodeURIComponent(A.options[D].attributes.value.specified?A.options[D].value:A.options[D].text)+"&"}else{this._sFormData+=encodeURIComponent(M)+"="+encodeURIComponent(A.options[D].hasAttribute("value")?A.options[D].value:A.options[D].text)+"&"}}}break;case"radio":case"checkbox":if(A.checked){this._sFormData+=encodeURIComponent(M)+"="+encodeURIComponent(I)+"&"}break;case"file":case undefined:case"reset":case"button":break;case"submit":if(K===false){if(this._hasSubmitListener&&this._submitElementValue){this._sFormData+=this._submitElementValue+"&"}else{this._sFormData+=encodeURIComponent(M)+"="+encodeURIComponent(I)+"&"}K=true}break;default:this._sFormData+=encodeURIComponent(M)+"="+encodeURIComponent(I)+"&"}}}this._isFormSubmit=true;this._sFormData=this._sFormData.substr(0,this._sFormData.length-1);this.initHeader("Content-Type",this._default_form_header);return this._sFormData},resetFormState:function(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData=""},createFrame:function(A){var C="yuiIO"+this._transaction_id;var D;if(window.ActiveXObject){D=document.createElement('<iframe id="'+C+'" name="'+C+'" />');if(typeof A=="boolean"){D.src="javascript:false"}else{if(typeof secureURI=="string"){D.src=A}}}else{D=document.createElement("iframe");D.id=C;D.name=C}D.style.position="absolute";D.style.top="-1000px";D.style.left="-1000px";document.body.appendChild(D)},appendPostData:function(A){var E=[];var C=A.split("&");for(var D=0;D<C.length;D++){var F=C[D].indexOf("=");if(F!=-1){E[D]=document.createElement("input");E[D].type="hidden";E[D].name=C[D].substring(0,F);E[D].value=C[D].substring(F+1);this._formNode.appendChild(E[D])}}return E},uploadFile:function(E,Q,F,D){var S=this;var K="yuiIO"+E.tId;var M="multipart/form-data";var O=document.getElementById(K);var N=(Q&&Q.argument)?Q.argument:null;var C={action:this._formNode.getAttribute("action"),method:this._formNode.getAttribute("method"),target:this._formNode.getAttribute("target")};this._formNode.setAttribute("action",F);this._formNode.setAttribute("method","POST");this._formNode.setAttribute("target",K);if(this._formNode.encoding){this._formNode.setAttribute("encoding",M)}else{this._formNode.setAttribute("enctype",M)}if(D){var P=this.appendPostData(D)}this._formNode.submit();this.startEvent.fire(E,N);if(E.startEvent){E.startEvent.fire(E,N)}if(Q&&Q.timeout){this._timeOut[E.tId]=window.setTimeout(function(){S.abort(E,Q,true)},Q.timeout)}if(P&&P.length>0){for(var I=0;I<P.length;I++){this._formNode.removeChild(P[I])}}for(var A in C){if(YAHOO.lang.hasOwnProperty(C,A)){if(C[A]){this._formNode.setAttribute(A,C[A])}else{this._formNode.removeAttribute(A)}}}this.resetFormState();var H=function(){if(Q&&Q.timeout){window.clearTimeout(S._timeOut[E.tId]);delete S._timeOut[E.tId]}S.completeEvent.fire(E,N);if(E.completeEvent){E.completeEvent.fire(E,N)}var U={};U.tId=E.tId;U.argument=Q.argument;try{U.responseText=O.contentWindow.document.body?O.contentWindow.document.body.innerHTML:O.contentWindow.document.documentElement.textContent;U.responseXML=O.contentWindow.document.XMLDocument?O.contentWindow.document.XMLDocument:O.contentWindow.document}catch(T){}if(Q&&Q.upload){if(!Q.scope){Q.upload(U)}else{Q.upload.apply(Q.scope,[U])}}S.uploadEvent.fire(U);if(E.uploadEvent){E.uploadEvent.fire(U)}YAHOO.util.Event.removeListener(O,"load",H);setTimeout(function(){document.body.removeChild(O);S.releaseObject(E)},100)};YAHOO.util.Event.addListener(O,"load",H)},abort:function(F,I,A){var E;var C=(I&&I.argument)?I.argument:null;if(F&&F.conn){if(this.isCallInProgress(F)){F.conn.abort();window.clearInterval(this._poll[F.tId]);delete this._poll[F.tId];if(A){window.clearTimeout(this._timeOut[F.tId]);delete this._timeOut[F.tId]}E=true}}else{if(F&&F.isUpload===true){var D="yuiIO"+F.tId;var H=document.getElementById(D);if(H){YAHOO.util.Event.removeListener(H,"load");document.body.removeChild(H);if(A){window.clearTimeout(this._timeOut[F.tId]);delete this._timeOut[F.tId]}E=true}}else{E=false}}if(E===true){this.abortEvent.fire(F,C);if(F.abortEvent){F.abortEvent.fire(F,C)}this.handleTransactionResponse(F,I,true)}return E},isCallInProgress:function(C){if(C&&C.conn){return C.conn.readyState!==4&&C.conn.readyState!==0}else{if(C&&C.isUpload===true){var A="yuiIO"+C.tId;return document.getElementById(A)?true:false}else{return false}}},releaseObject:function(A){if(A&&A.conn){A.conn=null;A=null}}};YAHOO.register("connection",YAHOO.util.Connect,{version:"2.4.1",build:"742"});(function(){YAHOO.util.Config=function(E){if(E){this.init(E)}};var C=YAHOO.lang,D=YAHOO.util.CustomEvent,A=YAHOO.util.Config;A.CONFIG_CHANGED_EVENT="configChanged";A.BOOLEAN_TYPE="boolean";A.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(E){this.owner=E;this.configChangedEvent=this.createEvent(A.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=D.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[]},checkBoolean:function(E){return(typeof E==A.BOOLEAN_TYPE)},checkNumber:function(E){return(!isNaN(E))},fireEvent:function(E,H){var F=this.config[E];if(F&&F.event){F.event.fire(H)}},addProperty:function(F,E){F=F.toLowerCase();this.config[F]=E;E.event=this.createEvent(F,{scope:this.owner});E.event.signature=D.LIST;E.key=F;if(E.handler){E.event.subscribe(E.handler,this.owner)}this.setProperty(F,E.value,true);if(!E.suppressEvent){this.queueProperty(F,E.value)}},getConfig:function(){var E={},H,F;for(H in this.config){F=this.config[H];if(F&&F.event){E[H]=F.value}}return E},getProperty:function(E){var F=this.config[E.toLowerCase()];if(F&&F.event){return F.value}else{return undefined}},resetProperty:function(E){E=E.toLowerCase();var F=this.config[E];if(F&&F.event){if(this.initialConfig[E]&&!C.isUndefined(this.initialConfig[E])){this.setProperty(E,this.initialConfig[E]);return true}}else{return false}},setProperty:function(F,I,E){var H;F=F.toLowerCase();if(this.queueInProgress&&!E){this.queueProperty(F,I);return true}else{H=this.config[F];if(H&&H.event){if(H.validator&&!H.validator(I)){return false}else{H.value=I;if(!E){this.fireEvent(F,I);this.configChangedEvent.fire([F,I])}return true}}else{return false}}},queueProperty:function(X,U){X=X.toLowerCase();var W=this.config[X],O=false,N,I,K,M,T,V,H,Q,S,E,P,Y,F;if(W&&W.event){if(!C.isUndefined(U)&&W.validator&&!W.validator(U)){return false}else{if(!C.isUndefined(U)){W.value=U}else{U=W.value}O=false;N=this.eventQueue.length;for(P=0;P<N;P++){I=this.eventQueue[P];if(I){K=I[0];M=I[1];if(K==X){this.eventQueue[P]=null;this.eventQueue.push([X,(!C.isUndefined(U)?U:M)]);O=true;break}}}if(!O&&!C.isUndefined(U)){this.eventQueue.push([X,U])}}if(W.supercedes){T=W.supercedes.length;for(Y=0;Y<T;Y++){V=W.supercedes[Y];H=this.eventQueue.length;for(F=0;F<H;F++){Q=this.eventQueue[F];if(Q){S=Q[0];E=Q[1];if(S==V.toLowerCase()){this.eventQueue.push([S,E]);this.eventQueue[F]=null;break}}}}}return true}else{return false}},refireEvent:function(E){E=E.toLowerCase();var F=this.config[E];if(F&&F.event&&!C.isUndefined(F.value)){if(this.queueInProgress){this.queueProperty(E)}else{this.fireEvent(E,F.value)}}},applyConfig:function(E,I){var H,F;if(I){F={};for(H in E){if(C.hasOwnProperty(E,H)){F[H.toLowerCase()]=E[H]}}this.initialConfig=F}for(H in E){if(C.hasOwnProperty(E,H)){this.queueProperty(H,E[H])}}},refresh:function(){var E;for(E in this.config){this.refireEvent(E)}},fireQueue:function(){var F,K,E,I,H;this.queueInProgress=true;for(F=0;F<this.eventQueue.length;F++){K=this.eventQueue[F];if(K){E=K[0];I=K[1];H=this.config[E];H.value=I;this.fireEvent(E,I)}}this.queueInProgress=false;this.eventQueue=[]},subscribeToConfigEvent:function(F,H,K,E){var I=this.config[F.toLowerCase()];if(I&&I.event){if(!A.alreadySubscribed(I.event,H,K)){I.event.subscribe(H,K,E)}return true}else{return false}},unsubscribeFromConfigEvent:function(E,F,I){var H=this.config[E.toLowerCase()];if(H&&H.event){return H.event.unsubscribe(F,I)}else{return false}},toString:function(){var E="Config";if(this.owner){E+=" ["+this.owner.toString()+"]"}return E},outputEventQueue:function(){var E="",I,F,H=this.eventQueue.length;for(F=0;F<H;F++){I=this.eventQueue[F];if(I){E+=I[0]+"="+I[1]+", "}}return E},destroy:function(){var F=this.config,E,H;for(E in F){if(C.hasOwnProperty(F,E)){H=F[E];H.event.unsubscribeAll();H.event=null}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null}};A.alreadySubscribed=function(F,K,M){var H=F.subscribers.length,E,I;if(H>0){I=H-1;do{E=F.subscribers[I];if(E&&E.obj==M&&E.fn==K){return true}}while(I--)}return false};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Module=function(V,U){if(V){this.init(V,U)}else{}};var H=YAHOO.util.Dom,E=YAHOO.util.Config,Q=YAHOO.util.Event,P=YAHOO.util.CustomEvent,I=YAHOO.widget.Module,K,T,S,F,A={BEFORE_INIT:"beforeInit",INIT:"init",APPEND:"append",BEFORE_RENDER:"beforeRender",RENDER:"render",CHANGE_HEADER:"changeHeader",CHANGE_BODY:"changeBody",CHANGE_FOOTER:"changeFooter",CHANGE_CONTENT:"changeContent",DESTORY:"destroy",BEFORE_SHOW:"beforeShow",SHOW:"show",BEFORE_HIDE:"beforeHide",HIDE:"hide"},M={VISIBLE:{key:"visible",value:true,validator:YAHOO.lang.isBoolean},EFFECT:{key:"effect",suppressEvent:true,supercedes:["visible"]},MONITOR_RESIZE:{key:"monitorresize",value:true},APPEND_TO_DOCUMENT_BODY:{key:"appendtodocumentbody",value:false}};I.IMG_ROOT=null;I.IMG_ROOT_SSL=null;I.CSS_MODULE="yui-module";I.CSS_HEADER="hd";I.CSS_BODY="bd";I.CSS_FOOTER="ft";I.RESIZE_MONITOR_SECURE_URL="javascript:false;";I.textResizeEvent=new P("textResize");function O(){if(!K){K=document.createElement("div");K.innerHTML=('<div class="'+I.CSS_HEADER+'"></div><div class="'+I.CSS_BODY+'"></div><div class="'+I.CSS_FOOTER+'"></div>');T=K.firstChild;S=T.nextSibling;F=S.nextSibling}return K}function N(){if(!T){O()}return(T.cloneNode(false))}function C(){if(!S){O()}return(S.cloneNode(false))}function D(){if(!F){O()}return(F.cloneNode(false))}I.prototype={constructor:I,element:null,header:null,body:null,footer:null,id:null,imageRoot:I.IMG_ROOT,initEvents:function(){var U=P.LIST;this.beforeInitEvent=this.createEvent(A.BEFORE_INIT);this.beforeInitEvent.signature=U;this.initEvent=this.createEvent(A.INIT);this.initEvent.signature=U;this.appendEvent=this.createEvent(A.APPEND);this.appendEvent.signature=U;this.beforeRenderEvent=this.createEvent(A.BEFORE_RENDER);this.beforeRenderEvent.signature=U;this.renderEvent=this.createEvent(A.RENDER);this.renderEvent.signature=U;this.changeHeaderEvent=this.createEvent(A.CHANGE_HEADER);this.changeHeaderEvent.signature=U;this.changeBodyEvent=this.createEvent(A.CHANGE_BODY);this.changeBodyEvent.signature=U;this.changeFooterEvent=this.createEvent(A.CHANGE_FOOTER);this.changeFooterEvent.signature=U;this.changeContentEvent=this.createEvent(A.CHANGE_CONTENT);this.changeContentEvent.signature=U;this.destroyEvent=this.createEvent(A.DESTORY);this.destroyEvent.signature=U;this.beforeShowEvent=this.createEvent(A.BEFORE_SHOW);this.beforeShowEvent.signature=U;this.showEvent=this.createEvent(A.SHOW);this.showEvent.signature=U;this.beforeHideEvent=this.createEvent(A.BEFORE_HIDE);this.beforeHideEvent.signature=U;this.hideEvent=this.createEvent(A.HIDE);this.hideEvent.signature=U},platform:function(){var U=navigator.userAgent.toLowerCase();if(U.indexOf("windows")!=-1||U.indexOf("win32")!=-1){return"windows"}else{if(U.indexOf("macintosh")!=-1){return"mac"}else{return false}}}(),browser:function(){var U=navigator.userAgent.toLowerCase();if(U.indexOf("opera")!=-1){return"opera"}else{if(U.indexOf("msie 7")!=-1){return"ie7"}else{if(U.indexOf("msie")!=-1){return"ie"}else{if(U.indexOf("safari")!=-1){return"safari"}else{if(U.indexOf("gecko")!=-1){return"gecko"}else{return false}}}}}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true}else{return false}}(),initDefaultConfig:function(){this.cfg.addProperty(M.VISIBLE.key,{handler:this.configVisible,value:M.VISIBLE.value,validator:M.VISIBLE.validator});this.cfg.addProperty(M.EFFECT.key,{suppressEvent:M.EFFECT.suppressEvent,supercedes:M.EFFECT.supercedes});this.cfg.addProperty(M.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:M.MONITOR_RESIZE.value});this.cfg.addProperty(M.APPEND_TO_DOCUMENT_BODY.key,{value:M.APPEND_TO_DOCUMENT_BODY.value})},init:function(Z,Y){var W,c;this.initEvents();this.beforeInitEvent.fire(I);this.cfg=new E(this);if(this.isSecure){this.imageRoot=I.IMG_ROOT_SSL}if(typeof Z=="string"){W=Z;Z=document.getElementById(Z);if(!Z){Z=(O()).cloneNode(false);Z.id=W}}this.element=Z;if(Z.id){this.id=Z.id}c=this.element.firstChild;if(c){var V=false,U=false,X=false;do{if(1==c.nodeType){if(!V&&H.hasClass(c,I.CSS_HEADER)){this.header=c;V=true}else{if(!U&&H.hasClass(c,I.CSS_BODY)){this.body=c;U=true}else{if(!X&&H.hasClass(c,I.CSS_FOOTER)){this.footer=c;X=true}}}}}while((c=c.nextSibling))}this.initDefaultConfig();H.addClass(this.element,I.CSS_MODULE);if(Y){this.cfg.applyConfig(Y,true)}if(!E.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true)}this.initEvent.fire(I)},initResizeMonitor:function(){var U,V,X;function Y(){I.textResizeEvent.fire()}if(!YAHOO.env.ua.opera){V=H.get("_yuiResizeMonitor");if(!V){V=document.createElement("iframe");if(this.isSecure&&I.RESIZE_MONITOR_SECURE_URL&&YAHOO.env.ua.ie){V.src=I.RESIZE_MONITOR_SECURE_URL}if(YAHOO.env.ua.gecko){X=["<html><head><script ",'type="text/javascript">',"window.onresize=function(){window.parent.","YAHOO.widget.Module.textResizeEvent.","fire();}","<\/script></head>","<body></body></html>"].join("");V.src="data:text/html;charset=utf-8,"+encodeURIComponent(X)}V.id="_yuiResizeMonitor";V.style.position="absolute";V.style.visibility="hidden";var W=document.body.firstChild;if(W){document.body.insertBefore(V,W)}else{document.body.appendChild(V)}V.style.width="10em";V.style.height="10em";V.style.top=(-1*V.offsetHeight)+"px";V.style.left=(-1*V.offsetWidth)+"px";V.style.borderWidth="0";V.style.visibility="visible";if(YAHOO.env.ua.webkit){U=V.contentWindow.document;U.open();U.close()}}if(V&&V.contentWindow){I.textResizeEvent.subscribe(this.onDomResize,this,true);if(!I.textResizeInitialized){if(!YAHOO.env.ua.gecko){if(!Q.on(V.contentWindow,"resize",Y)){Q.on(V,"resize",Y)}}I.textResizeInitialized=true}this.resizeMonitor=V}}},onDomResize:function(X,W){var V=-1*this.resizeMonitor.offsetWidth,U=-1*this.resizeMonitor.offsetHeight;this.resizeMonitor.style.top=U+"px";this.resizeMonitor.style.left=V+"px"},setHeader:function(V){var U=this.header||(this.header=N());if(typeof V=="string"){U.innerHTML=V}else{U.innerHTML="";U.appendChild(V)}this.changeHeaderEvent.fire(V);this.changeContentEvent.fire()},appendToHeader:function(V){var U=this.header||(this.header=N());U.appendChild(V);this.changeHeaderEvent.fire(V);this.changeContentEvent.fire()},setBody:function(V){var U=this.body||(this.body=C());if(typeof V=="string"){U.innerHTML=V}else{U.innerHTML="";U.appendChild(V)}this.changeBodyEvent.fire(V);this.changeContentEvent.fire()},appendToBody:function(V){var U=this.body||(this.body=C());U.appendChild(V);this.changeBodyEvent.fire(V);this.changeContentEvent.fire()},setFooter:function(V){var U=this.footer||(this.footer=D());if(typeof V=="string"){U.innerHTML=V}else{U.innerHTML="";U.appendChild(V)}this.changeFooterEvent.fire(V);this.changeContentEvent.fire()},appendToFooter:function(V){var U=this.footer||(this.footer=D());U.appendChild(V);this.changeFooterEvent.fire(V);this.changeContentEvent.fire()},render:function(W,U){var X=this,Y;function V(Z){if(typeof Z=="string"){Z=document.getElementById(Z)}if(Z){X._addToParent(Z,X.element);X.appendEvent.fire()}}this.beforeRenderEvent.fire();if(!U){U=this.element}if(W){V(W)}else{if(!H.inDocument(this.element)){return false}}if(this.header&&!H.inDocument(this.header)){Y=U.firstChild;if(Y){U.insertBefore(this.header,Y)}else{U.appendChild(this.header)}}if(this.body&&!H.inDocument(this.body)){if(this.footer&&H.isAncestor(this.moduleElement,this.footer)){U.insertBefore(this.body,this.footer)}else{U.appendChild(this.body)}}if(this.footer&&!H.inDocument(this.footer)){U.appendChild(this.footer)}this.renderEvent.fire();return true},destroy:function(){var U,V;if(this.element){Q.purgeElement(this.element,true);U=this.element.parentNode}if(U){U.removeChild(this.element)}this.element=null;this.header=null;this.body=null;this.footer=null;I.textResizeEvent.unsubscribe(this.onDomResize,this);this.cfg.destroy();this.cfg=null;this.destroyEvent.fire();for(V in this){if(V instanceof P){V.unsubscribeAll()}}},show:function(){this.cfg.setProperty("visible",true)},hide:function(){this.cfg.setProperty("visible",false)},configVisible:function(V,U,W){var X=U[0];if(X){this.beforeShowEvent.fire();H.setStyle(this.element,"display","block");this.showEvent.fire()}else{this.beforeHideEvent.fire();H.setStyle(this.element,"display","none");this.hideEvent.fire()}},configMonitorResize:function(W,V,X){var U=V[0];if(U){this.initResizeMonitor()}else{I.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null}},_addToParent:function(U,V){if(!this.cfg.getProperty("appendtodocumentbody")&&U===document.body&&U.firstChild){U.insertBefore(V,U.firstChild)}else{U.appendChild(V)}},toString:function(){return"Module "+this.id}};YAHOO.lang.augmentProto(I,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Overlay=function(P,O){YAHOO.widget.Overlay.superclass.constructor.call(this,P,O)};var H=YAHOO.lang,M=YAHOO.util.CustomEvent,F=YAHOO.widget.Module,N=YAHOO.util.Event,E=YAHOO.util.Dom,D=YAHOO.util.Config,C=YAHOO.widget.Overlay,I,A={BEFORE_MOVE:"beforeMove",MOVE:"move"},K={X:{key:"x",validator:H.isNumber,suppressEvent:true,supercedes:["iframe"]},Y:{key:"y",validator:H.isNumber,suppressEvent:true,supercedes:["iframe"]},XY:{key:"xy",suppressEvent:true,supercedes:["iframe"]},CONTEXT:{key:"context",suppressEvent:true,supercedes:["iframe"]},FIXED_CENTER:{key:"fixedcenter",value:false,validator:H.isBoolean,supercedes:["iframe","visible"]},WIDTH:{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},HEIGHT:{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},ZINDEX:{key:"zindex",value:null},CONSTRAIN_TO_VIEWPORT:{key:"constraintoviewport",value:false,validator:H.isBoolean,supercedes:["iframe","x","y","xy"]},IFRAME:{key:"iframe",value:(YAHOO.env.ua.ie==6?true:false),validator:H.isBoolean,supercedes:["zindex"]}};C.IFRAME_SRC="javascript:false;";C.IFRAME_OFFSET=3;C.VIEWPORT_OFFSET=10;C.TOP_LEFT="tl";C.TOP_RIGHT="tr";C.BOTTOM_LEFT="bl";C.BOTTOM_RIGHT="br";C.CSS_OVERLAY="yui-overlay";C.windowScrollEvent=new M("windowScroll");C.windowResizeEvent=new M("windowResize");C.windowScrollHandler=function(O){if(YAHOO.env.ua.ie){if(!window.scrollEnd){window.scrollEnd=-1}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){C.windowScrollEvent.fire()},1)}else{C.windowScrollEvent.fire()}};C.windowResizeHandler=function(O){if(YAHOO.env.ua.ie){if(!window.resizeEnd){window.resizeEnd=-1}clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){C.windowResizeEvent.fire()},100)}else{C.windowResizeEvent.fire()}};C._initialized=null;if(C._initialized===null){N.on(window,"scroll",C.windowScrollHandler);N.on(window,"resize",C.windowResizeHandler);C._initialized=true}YAHOO.extend(C,F,{init:function(P,O){C.superclass.init.call(this,P);this.beforeInitEvent.fire(C);E.addClass(this.element,C.CSS_OVERLAY);if(O){this.cfg.applyConfig(O,true)}if(this.platform=="mac"&&YAHOO.env.ua.gecko){if(!D.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true)}if(!D.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true)}}this.initEvent.fire(C)},initEvents:function(){C.superclass.initEvents.call(this);var O=M.LIST;this.beforeMoveEvent=this.createEvent(A.BEFORE_MOVE);this.beforeMoveEvent.signature=O;this.moveEvent=this.createEvent(A.MOVE);this.moveEvent.signature=O},initDefaultConfig:function(){C.superclass.initDefaultConfig.call(this);this.cfg.addProperty(K.X.key,{handler:this.configX,validator:K.X.validator,suppressEvent:K.X.suppressEvent,supercedes:K.X.supercedes});this.cfg.addProperty(K.Y.key,{handler:this.configY,validator:K.Y.validator,suppressEvent:K.Y.suppressEvent,supercedes:K.Y.supercedes});this.cfg.addProperty(K.XY.key,{handler:this.configXY,suppressEvent:K.XY.suppressEvent,supercedes:K.XY.supercedes});this.cfg.addProperty(K.CONTEXT.key,{handler:this.configContext,suppressEvent:K.CONTEXT.suppressEvent,supercedes:K.CONTEXT.supercedes});this.cfg.addProperty(K.FIXED_CENTER.key,{handler:this.configFixedCenter,value:K.FIXED_CENTER.value,validator:K.FIXED_CENTER.validator,supercedes:K.FIXED_CENTER.supercedes});this.cfg.addProperty(K.WIDTH.key,{handler:this.configWidth,suppressEvent:K.WIDTH.suppressEvent,supercedes:K.WIDTH.supercedes});this.cfg.addProperty(K.HEIGHT.key,{handler:this.configHeight,suppressEvent:K.HEIGHT.suppressEvent,supercedes:K.HEIGHT.supercedes});this.cfg.addProperty(K.ZINDEX.key,{handler:this.configzIndex,value:K.ZINDEX.value});this.cfg.addProperty(K.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:K.CONSTRAIN_TO_VIEWPORT.value,validator:K.CONSTRAIN_TO_VIEWPORT.validator,supercedes:K.CONSTRAIN_TO_VIEWPORT.supercedes});this.cfg.addProperty(K.IFRAME.key,{handler:this.configIframe,value:K.IFRAME.value,validator:K.IFRAME.validator,supercedes:K.IFRAME.supercedes})},moveTo:function(O,P){this.cfg.setProperty("xy",[O,P])},hideMacGeckoScrollbars:function(){E.removeClass(this.element,"show-scrollbars");E.addClass(this.element,"hide-scrollbars")},showMacGeckoScrollbars:function(){E.removeClass(this.element,"hide-scrollbars");E.addClass(this.element,"show-scrollbars")},configVisible:function(S,O,Y){var Q=O[0],T=E.getStyle(this.element,"visibility"),Z=this.cfg.getProperty("effect"),W=[],V=(this.platform=="mac"&&YAHOO.env.ua.gecko),o=D.alreadySubscribed,X,P,n,g,f,d,l,c,U;if(T=="inherit"){n=this.element.parentNode;while(n.nodeType!=9&&n.nodeType!=11){T=E.getStyle(n,"visibility");if(T!="inherit"){break}n=n.parentNode}if(T=="inherit"){T="visible"}}if(Z){if(Z instanceof Array){c=Z.length;for(g=0;g<c;g++){X=Z[g];W[W.length]=X.effect(this,X.duration)}}else{W[W.length]=Z.effect(this,Z.duration)}}if(Q){if(V){this.showMacGeckoScrollbars()}if(Z){if(Q){if(T!="visible"||T===""){this.beforeShowEvent.fire();U=W.length;for(f=0;f<U;f++){P=W[f];if(f===0&&!o(P.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){P.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true)}P.animateIn()}}}}else{if(T!="visible"||T===""){this.beforeShowEvent.fire();E.setStyle(this.element,"visibility","visible");this.cfg.refireEvent("iframe");this.showEvent.fire()}}}else{if(V){this.hideMacGeckoScrollbars()}if(Z){if(T=="visible"){this.beforeHideEvent.fire();U=W.length;for(d=0;d<U;d++){l=W[d];if(d===0&&!o(l.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){l.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true)}l.animateOut()}}else{if(T===""){E.setStyle(this.element,"visibility","hidden")}}}else{if(T=="visible"||T===""){this.beforeHideEvent.fire();E.setStyle(this.element,"visibility","hidden");this.hideEvent.fire()}}}},doCenterOnDOMEvent:function(){if(this.cfg.getProperty("visible")){this.center()}},configFixedCenter:function(T,Q,U){var V=Q[0],P=D.alreadySubscribed,S=C.windowResizeEvent,O=C.windowScrollEvent;if(V){this.center();if(!P(this.beforeShowEvent,this.center,this)){this.beforeShowEvent.subscribe(this.center)}if(!P(S,this.doCenterOnDOMEvent,this)){S.subscribe(this.doCenterOnDOMEvent,this,true)}if(!P(O,this.doCenterOnDOMEvent,this)){O.subscribe(this.doCenterOnDOMEvent,this,true)}}else{this.beforeShowEvent.unsubscribe(this.center);S.unsubscribe(this.doCenterOnDOMEvent,this);O.unsubscribe(this.doCenterOnDOMEvent,this)}},configHeight:function(S,P,T){var O=P[0],Q=this.element;E.setStyle(Q,"height",O);this.cfg.refireEvent("iframe")},configWidth:function(S,O,T){var Q=O[0],P=this.element;E.setStyle(P,"width",Q);this.cfg.refireEvent("iframe")},configzIndex:function(Q,O,S){var T=O[0],P=this.element;if(!T){T=E.getStyle(P,"zIndex");if(!T||isNaN(T)){T=0}}if(this.iframe||this.cfg.getProperty("iframe")===true){if(T<=0){T=1}}E.setStyle(P,"zIndex",T);this.cfg.setProperty("zIndex",T,true);if(this.iframe){this.stackIframe()}},configXY:function(Q,P,S){var U=P[0],O=U[0],T=U[1];this.cfg.setProperty("x",O);this.cfg.setProperty("y",T);this.beforeMoveEvent.fire([O,T]);O=this.cfg.getProperty("x");T=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([O,T])},configX:function(Q,P,S){var O=P[0],T=this.cfg.getProperty("y");this.cfg.setProperty("x",O,true);this.cfg.setProperty("y",T,true);this.beforeMoveEvent.fire([O,T]);O=this.cfg.getProperty("x");T=this.cfg.getProperty("y");E.setX(this.element,O,true);this.cfg.setProperty("xy",[O,T],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([O,T])},configY:function(Q,P,S){var O=this.cfg.getProperty("x"),T=P[0];this.cfg.setProperty("x",O,true);this.cfg.setProperty("y",T,true);this.beforeMoveEvent.fire([O,T]);O=this.cfg.getProperty("x");T=this.cfg.getProperty("y");E.setY(this.element,T,true);this.cfg.setProperty("xy",[O,T],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([O,T])},showIframe:function(){var P=this.iframe,O;if(P){O=this.element.parentNode;if(O!=P.parentNode){this._addToParent(O,P)}P.style.display="block"}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none"}},syncIframe:function(){var O=this.iframe,Q=this.element,T=C.IFRAME_OFFSET,P=(T*2),S;if(O){O.style.width=(Q.offsetWidth+P+"px");O.style.height=(Q.offsetHeight+P+"px");S=this.cfg.getProperty("xy");if(!H.isArray(S)||(isNaN(S[0])||isNaN(S[1]))){this.syncPosition();S=this.cfg.getProperty("xy")}E.setXY(O,[(S[0]-T),(S[1]-T)])}},stackIframe:function(){if(this.iframe){var O=E.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(O)&&!isNaN(O)){E.setStyle(this.iframe,"zIndex",(O-1))}}},configIframe:function(S,Q,T){var O=Q[0];function U(){var W=this.iframe,X=this.element,Y;if(!W){if(!I){I=document.createElement("iframe");if(this.isSecure){I.src=C.IFRAME_SRC}if(YAHOO.env.ua.ie){I.style.filter="alpha(opacity=0)";I.frameBorder=0}else{I.style.opacity="0"}I.style.position="absolute";I.style.border="none";I.style.margin="0";I.style.padding="0";I.style.display="none"}W=I.cloneNode(false);Y=X.parentNode;var V=Y||document.body;this._addToParent(V,W);this.iframe=W}this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true}}function P(){U.call(this);this.beforeShowEvent.unsubscribe(P);this._iframeDeferred=false}if(O){if(this.cfg.getProperty("visible")){U.call(this)}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(P);this._iframeDeferred=true}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false}}},configConstrainToViewport:function(Q,O,S){function P(){if(YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))){this.syncPosition()}var U=this.cfg.getProperty("x");var W=this.cfg.getProperty("y");var V=this.getConstrainedXY(U,W);if(V[0]!==U||V[1]!==W){this.moveTo(V[0],V[1])}}var T=O[0];if(T){if(!D.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true)}if(!D.alreadySubscribed(this.beforeShowEvent,P)){this.beforeShowEvent.subscribe(P)}}else{this.beforeShowEvent.unsubscribe(P);this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this)}},configContext:function(Q,P,T){var V=P[0],S,U,O;if(V){S=V[0];U=V[1];O=V[2];if(S){if(typeof S=="string"){this.cfg.setProperty("context",[document.getElementById(S),U,O],true)}if(U&&O){this.align(U,O)}}}},align:function(P,O){var V=this.cfg.getProperty("context"),U=this,T,S,W;function Q(X,Y){switch(P){case C.TOP_LEFT:U.moveTo(Y,X);break;case C.TOP_RIGHT:U.moveTo((Y-S.offsetWidth),X);break;case C.BOTTOM_LEFT:U.moveTo(Y,(X-S.offsetHeight));break;case C.BOTTOM_RIGHT:U.moveTo((Y-S.offsetWidth),(X-S.offsetHeight));break}}if(V){T=V[0];S=this.element;U=this;if(!P){P=V[1]}if(!O){O=V[2]}if(S&&T){W=E.getRegion(T);switch(O){case C.TOP_LEFT:Q(W.top,W.left);break;case C.TOP_RIGHT:Q(W.top,W.right);break;case C.BOTTOM_LEFT:Q(W.bottom,W.left);break;case C.BOTTOM_RIGHT:Q(W.bottom,W.right);break}}}},enforceConstraints:function(P,O,Q){var T=O[0];var S=this.getConstrainedXY(T[0],T[1]);this.cfg.setProperty("x",S[0],true);this.cfg.setProperty("y",S[1],true);this.cfg.setProperty("xy",S,true)},getConstrainedXY:function(c,Y){var S=C.VIEWPORT_OFFSET,Z=E.getViewportWidth(),V=E.getViewportHeight(),Q=this.element.offsetHeight,X=this.element.offsetWidth,g=E.getDocumentScrollLeft(),d=E.getDocumentScrollTop();var U=c;var P=Y;if(X+S<Z){var W=g+S;var f=g+Z-X-S;if(c<W){U=W}else{if(c>f){U=f}}}else{U=S+g}if(Q+S<V){var T=d+S;var O=d+V-Q-S;if(Y<T){P=T}else{if(Y>O){P=O}}}else{P=S+d}return[U,P]},center:function(){var S=C.VIEWPORT_OFFSET,T=this.element.offsetWidth,Q=this.element.offsetHeight,P=E.getViewportWidth(),U=E.getViewportHeight(),O,V;if(T<P){O=(P/2)-(T/2)+E.getDocumentScrollLeft()}else{O=S+E.getDocumentScrollLeft()}if(Q<U){V=(U/2)-(Q/2)+E.getDocumentScrollTop()}else{V=S+E.getDocumentScrollTop()}this.cfg.setProperty("xy",[parseInt(O,10),parseInt(V,10)]);this.cfg.refireEvent("iframe")},syncPosition:function(){var O=E.getXY(this.element);this.cfg.setProperty("x",O[0],true);this.cfg.setProperty("y",O[1],true);this.cfg.setProperty("xy",O,true)},onDomResize:function(Q,P){var O=this;C.superclass.onDomResize.call(this,Q,P);setTimeout(function(){O.syncPosition();O.cfg.refireEvent("iframe");O.cfg.refireEvent("context")},0)},bringToTop:function(){var T=[],S=this.element;function W(c,Z){var f=E.getStyle(c,"zIndex"),d=E.getStyle(Z,"zIndex"),Y=(!f||isNaN(f))?0:parseInt(f,10),X=(!d||isNaN(d))?0:parseInt(d,10);if(Y>X){return -1}else{if(Y<X){return 1}else{return 0}}}function Q(Z){var X=E.hasClass(Z,C.CSS_OVERLAY),Y=YAHOO.widget.Panel;if(X&&!E.isAncestor(S,X)){if(Y&&E.hasClass(Z,Y.CSS_PANEL)){T[T.length]=Z.parentNode}else{T[T.length]=Z}}}E.getElementsBy(Q,"DIV",document.body);T.sort(W);var O=T[0],V;if(O){V=E.getStyle(O,"zIndex");if(!isNaN(V)){var U=false;if(O!=S){U=true}else{if(T.length>1){var P=E.getStyle(T[1],"zIndex");if(!isNaN(P)&&(V==P)){U=true}}}if(U){this.cfg.setProperty("zindex",(parseInt(V,10)+2))}}}},destroy:function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe)}this.iframe=null;C.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);C.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);C.superclass.destroy.call(this)},toString:function(){return"Overlay "+this.id}})}());(function(){YAHOO.widget.OverlayManager=function(I){this.init(I)};var E=YAHOO.widget.Overlay,D=YAHOO.util.Event,F=YAHOO.util.Dom,C=YAHOO.util.Config,H=YAHOO.util.CustomEvent,A=YAHOO.widget.OverlayManager;A.CSS_FOCUSED="focused";A.prototype={constructor:A,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"})},init:function(M){this.cfg=new C(this);this.initDefaultConfig();if(M){this.cfg.applyConfig(M,true)}this.cfg.fireQueue();var K=null;this.getActive=function(){return K};this.focus=function(N){var O=this.find(N);if(O){if(K!=O){if(K){K.blur()}this.bringToTop(O);K=O;F.addClass(K.element,A.CSS_FOCUSED);O.focusEvent.fire()}}};this.remove=function(O){var Q=this.find(O),N;if(Q){if(K==Q){K=null}var P=(Q.element===null&&Q.cfg===null)?true:false;if(!P){N=F.getStyle(Q.element,"zIndex");Q.cfg.setProperty("zIndex",-1000,true)}this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));Q.hideEvent.unsubscribe(Q.blur);Q.destroyEvent.unsubscribe(this._onOverlayDestroy,Q);if(!P){D.removeListener(Q.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);Q.cfg.setProperty("zIndex",N,true);Q.cfg.setProperty("manager",null)}Q.focusEvent.unsubscribeAll();Q.blurEvent.unsubscribeAll();Q.focusEvent=null;Q.blurEvent=null;Q.focus=null;Q.blur=null}};this.blurAll=function(){var O=this.overlays.length,N;if(O>0){N=O-1;do{this.overlays[N].blur()}while(N--)}};this._onOverlayBlur=function(O,N){K=null};var I=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[]}if(I){this.register(I);this.overlays.sort(this.compareZIndexDesc)}},_onOverlayElementFocus:function(M){var I=D.getTarget(M),K=this.close;if(K&&(I==K||F.isAncestor(K,I))){this.blur()}else{this.focus()}},_onOverlayDestroy:function(K,I,M){this.remove(M)},register:function(I){var O=this,P,M,K,N;if(I instanceof E){I.cfg.addProperty("manager",{value:this});I.focusEvent=I.createEvent("focus");I.focusEvent.signature=H.LIST;I.blurEvent=I.createEvent("blur");I.blurEvent.signature=H.LIST;I.focus=function(){O.focus(this)};I.blur=function(){if(O.getActive()==this){F.removeClass(this.element,A.CSS_FOCUSED);this.blurEvent.fire()}};I.blurEvent.subscribe(O._onOverlayBlur);I.hideEvent.subscribe(I.blur);I.destroyEvent.subscribe(this._onOverlayDestroy,I,this);D.on(I.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus,null,I);P=F.getStyle(I.element,"zIndex");if(!isNaN(P)){I.cfg.setProperty("zIndex",parseInt(P,10))}else{I.cfg.setProperty("zIndex",0)}this.overlays.push(I);this.bringToTop(I);return true}else{if(I instanceof Array){M=0;N=I.length;for(K=0;K<N;K++){if(this.register(I[K])){M++}}if(M>0){return true}}else{return false}}},bringToTop:function(Q){var M=this.find(Q),P,I,N;if(M){N=this.overlays;N.sort(this.compareZIndexDesc);I=N[0];if(I){P=F.getStyle(I.element,"zIndex");if(!isNaN(P)){var O=false;if(I!==M){O=true}else{if(N.length>1){var K=F.getStyle(N[1].element,"zIndex");if(!isNaN(K)&&(P==K)){O=true}}}if(O){M.cfg.setProperty("zindex",(parseInt(P,10)+2))}}N.sort(this.compareZIndexDesc)}}},find:function(I){var M=this.overlays,N=M.length,K;if(N>0){K=N-1;if(I instanceof E){do{if(M[K]==I){return M[K]}}while(K--)}else{if(typeof I=="string"){do{if(M[K].id==I){return M[K]}}while(K--)}}return null}},compareZIndexDesc:function(N,M){var K=(N.cfg)?N.cfg.getProperty("zIndex"):null,I=(M.cfg)?M.cfg.getProperty("zIndex"):null;if(K===null&&I===null){return 0}else{if(K===null){return 1}else{if(I===null){return -1}else{if(K>I){return -1}else{if(K<I){return 1}else{return 0}}}}}},showAll:function(){var K=this.overlays,M=K.length,I;if(M>0){I=M-1;do{K[I].show()}while(I--)}},hideAll:function(){var K=this.overlays,M=K.length,I;if(M>0){I=M-1;do{K[I].hide()}while(I--)}},toString:function(){return"OverlayManager"}}}());(function(){YAHOO.widget.Tooltip=function(P,O){YAHOO.widget.Tooltip.superclass.constructor.call(this,P,O)};var E=YAHOO.lang,N=YAHOO.util.Event,C=YAHOO.util.Dom,H=YAHOO.widget.Tooltip,F,I={PREVENT_OVERLAP:{key:"preventoverlap",value:true,validator:E.isBoolean,supercedes:["x","y","xy"]},SHOW_DELAY:{key:"showdelay",value:200,validator:E.isNumber},AUTO_DISMISS_DELAY:{key:"autodismissdelay",value:5000,validator:E.isNumber},HIDE_DELAY:{key:"hidedelay",value:250,validator:E.isNumber},TEXT:{key:"text",suppressEvent:true},CONTAINER:{key:"container"}};H.CSS_TOOLTIP="yui-tt";function K(P,O,Q){var U=Q[0],S=Q[1],T=this.cfg,V=T.getProperty("width");if(V==S){T.setProperty("width",U)}this.unsubscribe("hide",this._onHide,Q)}function D(P,O){var Q=document.body,V=this.cfg,U=V.getProperty("width"),S,T;if((!U||U=="auto")&&(V.getProperty("container")!=Q||V.getProperty("x")>=C.getViewportWidth()||V.getProperty("y")>=C.getViewportHeight())){T=this.element.cloneNode(true);T.style.visibility="hidden";T.style.top="0px";T.style.left="0px";Q.appendChild(T);S=(T.offsetWidth+"px");Q.removeChild(T);T=null;V.setProperty("width",S);V.refireEvent("xy");this.subscribe("hide",K,[(U||""),S])}}function A(P,O,Q){this.render(Q)}function M(){N.onDOMReady(A,this.cfg.getProperty("container"),this)}YAHOO.extend(H,YAHOO.widget.Overlay,{init:function(P,O){H.superclass.init.call(this,P);this.beforeInitEvent.fire(H);C.addClass(this.element,H.CSS_TOOLTIP);if(O){this.cfg.applyConfig(O,true)}this.cfg.queueProperty("visible",false);this.cfg.queueProperty("constraintoviewport",true);this.setBody("");this.subscribe("beforeShow",D);this.subscribe("init",M);this.subscribe("render",this.onRender);this.initEvent.fire(H)},initDefaultConfig:function(){H.superclass.initDefaultConfig.call(this);this.cfg.addProperty(I.PREVENT_OVERLAP.key,{value:I.PREVENT_OVERLAP.value,validator:I.PREVENT_OVERLAP.validator,supercedes:I.PREVENT_OVERLAP.supercedes});this.cfg.addProperty(I.SHOW_DELAY.key,{handler:this.configShowDelay,value:200,validator:I.SHOW_DELAY.validator});this.cfg.addProperty(I.AUTO_DISMISS_DELAY.key,{handler:this.configAutoDismissDelay,value:I.AUTO_DISMISS_DELAY.value,validator:I.AUTO_DISMISS_DELAY.validator});this.cfg.addProperty(I.HIDE_DELAY.key,{handler:this.configHideDelay,value:I.HIDE_DELAY.value,validator:I.HIDE_DELAY.validator});this.cfg.addProperty(I.TEXT.key,{handler:this.configText,suppressEvent:I.TEXT.suppressEvent});this.cfg.addProperty(I.CONTAINER.key,{handler:this.configContainer,value:document.body})},configText:function(P,O,Q){var S=O[0];if(S){this.setBody(S)}},configContainer:function(Q,P,S){var O=P[0];if(typeof O=="string"){this.cfg.setProperty("container",document.getElementById(O),true)}},_removeEventListeners:function(){var S=this._context,O,Q,P;if(S){O=S.length;if(O>0){P=O-1;do{Q=S[P];N.removeListener(Q,"mouseover",this.onContextMouseOver);N.removeListener(Q,"mousemove",this.onContextMouseMove);N.removeListener(Q,"mouseout",this.onContextMouseOut)}while(P--)}}},configContext:function(U,P,V){var T=P[0],W,O,S,Q;if(T){if(!(T instanceof Array)){if(typeof T=="string"){this.cfg.setProperty("context",[document.getElementById(T)],true)}else{this.cfg.setProperty("context",[T],true)}T=this.cfg.getProperty("context")}this._removeEventListeners();this._context=T;W=this._context;if(W){O=W.length;if(O>0){Q=O-1;do{S=W[Q];N.on(S,"mouseover",this.onContextMouseOver,this);N.on(S,"mousemove",this.onContextMouseMove,this);N.on(S,"mouseout",this.onContextMouseOut,this)}while(Q--)}}}},onContextMouseMove:function(P,O){O.pageX=N.getPageX(P);O.pageY=N.getPageY(P)},onContextMouseOver:function(Q,P){var O=this;if(P.hideProcId){clearTimeout(P.hideProcId);P.hideProcId=null}N.on(O,"mousemove",P.onContextMouseMove,P);if(O.title){P._tempTitle=O.title;O.title=""}P.showProcId=P.doShow(Q,O)},onContextMouseOut:function(Q,P){var O=this;if(P._tempTitle){O.title=P._tempTitle;P._tempTitle=null}if(P.showProcId){clearTimeout(P.showProcId);P.showProcId=null}if(P.hideProcId){clearTimeout(P.hideProcId);P.hideProcId=null}P.hideProcId=setTimeout(function(){P.hide()},P.cfg.getProperty("hidedelay"))},doShow:function(Q,O){var S=25,P=this;if(YAHOO.env.ua.opera&&O.tagName&&O.tagName.toUpperCase()=="A"){S+=12}return setTimeout(function(){var T=P.cfg.getProperty("text");if(P._tempTitle&&(T===""||YAHOO.lang.isUndefined(T)||YAHOO.lang.isNull(T))){P.setBody(P._tempTitle)}else{P.cfg.refireEvent("text")}P.moveTo(P.pageX,P.pageY+S);if(P.cfg.getProperty("preventoverlap")){P.preventOverlap(P.pageX,P.pageY)}N.removeListener(O,"mousemove",P.onContextMouseMove);P.show();P.hideProcId=P.doHide()},this.cfg.getProperty("showdelay"))},doHide:function(){var O=this;return setTimeout(function(){O.hide()},this.cfg.getProperty("autodismissdelay"))},preventOverlap:function(T,S){var O=this.element.offsetHeight,Q=new YAHOO.util.Point(T,S),P=C.getRegion(this.element);P.top-=5;P.left-=5;P.right+=5;P.bottom+=5;if(P.contains(Q)){this.cfg.setProperty("y",(S-O-5))}},onRender:function(T,S){function U(){var X=this.element,W=this._shadow;if(W){W.style.width=(X.offsetWidth+6)+"px";W.style.height=(X.offsetHeight+1)+"px"}}function P(){C.addClass(this._shadow,"yui-tt-shadow-visible")}function O(){C.removeClass(this._shadow,"yui-tt-shadow-visible")}function V(){var Y=this._shadow,X,W,c,Z;if(!Y){X=this.element;W=YAHOO.widget.Module;c=YAHOO.env.ua.ie;Z=this;if(!F){F=document.createElement("div");F.className="yui-tt-shadow"}Y=F.cloneNode(false);X.appendChild(Y);this._shadow=Y;P.call(this);this.subscribe("beforeShow",P);this.subscribe("beforeHide",O);if(c==6||(c==7&&document.compatMode=="BackCompat")){window.setTimeout(function(){U.call(Z)},0);this.cfg.subscribeToConfigEvent("width",U);this.cfg.subscribeToConfigEvent("height",U);this.subscribe("changeContent",U);W.textResizeEvent.subscribe(U,this,true);this.subscribe("destroy",function(){W.textResizeEvent.unsubscribe(U,this)})}}}function Q(){V.call(this);this.unsubscribe("beforeShow",Q)}if(this.cfg.getProperty("visible")){V.call(this)}else{this.subscribe("beforeShow",Q)}},destroy:function(){this._removeEventListeners();H.superclass.destroy.call(this)},toString:function(){return"Tooltip "+this.id}})}());(function(){YAHOO.widget.Panel=function(Z,Y){YAHOO.widget.Panel.superclass.constructor.call(this,Z,Y)};var I=YAHOO.lang,S=YAHOO.util.DD,A=YAHOO.util.Dom,X=YAHOO.util.Event,M=YAHOO.widget.Overlay,P=YAHOO.util.CustomEvent,N=YAHOO.util.Config,T=YAHOO.widget.Panel,K,V,E,F={SHOW_MASK:"showMask",HIDE_MASK:"hideMask",DRAG:"drag"},Q={CLOSE:{key:"close",value:true,validator:I.isBoolean,supercedes:["visible"]},DRAGGABLE:{key:"draggable",value:(S?true:false),validator:I.isBoolean,supercedes:["visible"]},DRAG_ONLY:{key:"dragonly",value:false,validator:I.isBoolean,supercedes:["draggable"]},UNDERLAY:{key:"underlay",value:"shadow",supercedes:["visible"]},MODAL:{key:"modal",value:false,validator:I.isBoolean,supercedes:["visible","zindex"]},KEY_LISTENERS:{key:"keylisteners",suppressEvent:true,supercedes:["visible"]}};T.CSS_PANEL="yui-panel";T.CSS_PANEL_CONTAINER="yui-panel-container";function O(Z,Y){if(!this.header&&this.cfg.getProperty("draggable")){this.setHeader("&#160;")}}function W(Z,Y,c){var g=c[0],d=c[1],f=this.cfg,h=f.getProperty("width");if(h==d){f.setProperty("width",g)}this.unsubscribe("hide",W,c)}function D(Z,Y){var g=YAHOO.env.ua.ie,f,d,c;if(g==6||(g==7&&document.compatMode=="BackCompat")){f=this.cfg;d=f.getProperty("width");if(!d||d=="auto"){c=(this.element.offsetWidth+"px");f.setProperty("width",c);this.subscribe("hide",W,[(d||""),c])}}}function H(){this.blur()}function U(c,Z){var d=this;function Y(h){var g=h.tagName.toUpperCase(),f=false;switch(g){case"A":case"BUTTON":case"SELECT":case"TEXTAREA":if(!A.isAncestor(d.element,h)){X.on(h,"focus",H,h,true);f=true}break;case"INPUT":if(h.type!="hidden"&&!A.isAncestor(d.element,h)){X.on(h,"focus",H,h,true);f=true}break}return f}this.focusableElements=A.getElementsBy(Y)}function C(c,Z){var g=this.focusableElements,Y=g.length,d,f;for(f=0;f<Y;f++){d=g[f];X.removeListener(d,"focus",H)}}YAHOO.extend(T,M,{init:function(Z,Y){T.superclass.init.call(this,Z);this.beforeInitEvent.fire(T);A.addClass(this.element,T.CSS_PANEL);this.buildWrapper();if(Y){this.cfg.applyConfig(Y,true)}this.subscribe("showMask",U);this.subscribe("hideMask",C);this.subscribe("beforeRender",O);this.initEvent.fire(T)},initEvents:function(){T.superclass.initEvents.call(this);var Y=P.LIST;this.showMaskEvent=this.createEvent(F.SHOW_MASK);this.showMaskEvent.signature=Y;this.hideMaskEvent=this.createEvent(F.HIDE_MASK);this.hideMaskEvent.signature=Y;this.dragEvent=this.createEvent(F.DRAG);this.dragEvent.signature=Y},initDefaultConfig:function(){T.superclass.initDefaultConfig.call(this);this.cfg.addProperty(Q.CLOSE.key,{handler:this.configClose,value:Q.CLOSE.value,validator:Q.CLOSE.validator,supercedes:Q.CLOSE.supercedes});this.cfg.addProperty(Q.DRAGGABLE.key,{handler:this.configDraggable,value:Q.DRAGGABLE.value,validator:Q.DRAGGABLE.validator,supercedes:Q.DRAGGABLE.supercedes});this.cfg.addProperty(Q.DRAG_ONLY.key,{value:Q.DRAG_ONLY.value,validator:Q.DRAG_ONLY.validator,supercedes:Q.DRAG_ONLY.supercedes});this.cfg.addProperty(Q.UNDERLAY.key,{handler:this.configUnderlay,value:Q.UNDERLAY.value,supercedes:Q.UNDERLAY.supercedes});this.cfg.addProperty(Q.MODAL.key,{handler:this.configModal,value:Q.MODAL.value,validator:Q.MODAL.validator,supercedes:Q.MODAL.supercedes});this.cfg.addProperty(Q.KEY_LISTENERS.key,{handler:this.configKeyListeners,suppressEvent:Q.KEY_LISTENERS.suppressEvent,supercedes:Q.KEY_LISTENERS.supercedes})},configClose:function(c,Y,f){var g=Y[0],Z=this.close;function d(l,h){h.hide()}if(g){if(!Z){if(!E){E=document.createElement("span");E.innerHTML="&#160;";E.className="container-close"}Z=E.cloneNode(true);this.innerElement.appendChild(Z);X.on(Z,"click",d,this);this.close=Z}else{Z.style.display="block"}}else{if(Z){Z.style.display="none"}}},configDraggable:function(Z,Y,c){var d=Y[0];if(d){if(!S){this.cfg.setProperty("draggable",false);return }if(this.header){A.setStyle(this.header,"cursor","move");this.registerDragDrop()}this.subscribe("beforeShow",D)}else{if(this.dd){this.dd.unreg()}if(this.header){A.setStyle(this.header,"cursor","auto")}this.unsubscribe("beforeShow",D)}},configUnderlay:function(o,n,f){var l=YAHOO.env.ua,h=(this.platform=="mac"&&l.gecko),p=n[0].toLowerCase(),Y=this.underlay,Z=this.element;function q(){var r=this.underlay;A.addClass(r,"yui-force-redraw");window.setTimeout(function(){A.removeClass(r,"yui-force-redraw")},0)}function c(){var r;if(!Y){if(!V){V=document.createElement("div");V.className="underlay"}Y=V.cloneNode(false);this.element.appendChild(Y);this.underlay=Y;r=l.ie;if(r==6||(r==7&&document.compatMode=="BackCompat")){this.sizeUnderlay();this.cfg.subscribeToConfigEvent("width",this.sizeUnderlay);this.cfg.subscribeToConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.subscribe(this.sizeUnderlay);YAHOO.widget.Module.textResizeEvent.subscribe(this.sizeUnderlay,this,true)}if(l.webkit&&l.webkit<420){this.changeContentEvent.subscribe(q)}}}function g(){c.call(this);this._underlayDeferred=false;this.beforeShowEvent.unsubscribe(g)}function d(){if(this._underlayDeferred){this.beforeShowEvent.unsubscribe(g);this._underlayDeferred=false}if(Y){this.cfg.unsubscribeFromConfigEvent("width",this.sizeUnderlay);this.cfg.unsubscribeFromConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.sizeUnderlay);this.changeContentEvent.unsubscribe(q);YAHOO.widget.Module.textResizeEvent.unsubscribe(this.sizeUnderlay,this,true);this.element.removeChild(Y);this.underlay=null}}switch(p){case"shadow":A.removeClass(Z,"matte");A.addClass(Z,"shadow");break;case"matte":if(!h){d.call(this)}A.removeClass(Z,"shadow");A.addClass(Z,"matte");break;default:if(!h){d.call(this)}A.removeClass(Z,"shadow");A.removeClass(Z,"matte");break}if((p=="shadow")||(h&&!Y)){if(this.cfg.getProperty("visible")){c.call(this)}else{if(!this._underlayDeferred){this.beforeShowEvent.subscribe(g);this._underlayDeferred=true}}}},configModal:function(Z,Y,d){var c=Y[0];if(c){if(!this._hasModalityEventListeners){this.subscribe("beforeShow",this.buildMask);this.subscribe("beforeShow",this.bringToTop);this.subscribe("beforeShow",this.showMask);this.subscribe("hide",this.hideMask);M.windowResizeEvent.subscribe(this.sizeMask,this,true);this._hasModalityEventListeners=true}}else{if(this._hasModalityEventListeners){if(this.cfg.getProperty("visible")){this.hideMask();this.removeMask()}this.unsubscribe("beforeShow",this.buildMask);this.unsubscribe("beforeShow",this.bringToTop);this.unsubscribe("beforeShow",this.showMask);this.unsubscribe("hide",this.hideMask);M.windowResizeEvent.unsubscribe(this.sizeMask,this);this._hasModalityEventListeners=false}}},removeMask:function(){var Z=this.mask,Y;if(Z){this.hideMask();Y=Z.parentNode;if(Y){Y.removeChild(Z)}this.mask=null}},configKeyListeners:function(d,Y,h){var c=Y[0],g,f,Z;if(c){if(c instanceof Array){f=c.length;for(Z=0;Z<f;Z++){g=c[Z];if(!N.alreadySubscribed(this.showEvent,g.enable,g)){this.showEvent.subscribe(g.enable,g,true)}if(!N.alreadySubscribed(this.hideEvent,g.disable,g)){this.hideEvent.subscribe(g.disable,g,true);this.destroyEvent.subscribe(g.disable,g,true)}}}else{if(!N.alreadySubscribed(this.showEvent,c.enable,c)){this.showEvent.subscribe(c.enable,c,true)}if(!N.alreadySubscribed(this.hideEvent,c.disable,c)){this.hideEvent.subscribe(c.disable,c,true);this.destroyEvent.subscribe(c.disable,c,true)}}}},configHeight:function(d,Z,f){var Y=Z[0],c=this.innerElement;A.setStyle(c,"height",Y);this.cfg.refireEvent("iframe")},configWidth:function(d,Y,f){var c=Y[0],Z=this.innerElement;A.setStyle(Z,"width",c);this.cfg.refireEvent("iframe")},configzIndex:function(Z,Y,d){T.superclass.configzIndex.call(this,Z,Y,d);if(this.mask||this.cfg.getProperty("modal")===true){var c=A.getStyle(this.element,"zIndex");if(!c||isNaN(c)){c=0}if(c===0){this.cfg.setProperty("zIndex",1)}else{this.stackMask()}}},buildWrapper:function(){var c=this.element.parentNode,Y=this.element,Z=document.createElement("div");Z.className=T.CSS_PANEL_CONTAINER;Z.id=Y.id+"_c";if(c){c.insertBefore(Z,Y)}Z.appendChild(Y);this.element=Z;this.innerElement=Y;A.setStyle(this.innerElement,"visibility","inherit")},sizeUnderlay:function(){var Z=this.underlay,Y;if(Z){Y=this.element;Z.style.width=Y.offsetWidth+"px";Z.style.height=Y.offsetHeight+"px"}},registerDragDrop:function(){var Z=this;if(this.header){if(!S){return }var Y=(this.cfg.getProperty("dragonly")===true);this.dd=new S(this.element.id,this.id,{dragOnly:Y});if(!this.header.id){this.header.id=this.id+"_h"}this.dd.startDrag=function(){var d,g,c,n,l,h;if(YAHOO.env.ua.ie==6){A.addClass(Z.element,"drag")}if(Z.cfg.getProperty("constraintoviewport")){var f=M.VIEWPORT_OFFSET;d=Z.element.offsetHeight;g=Z.element.offsetWidth;c=A.getViewportWidth();n=A.getViewportHeight();l=A.getDocumentScrollLeft();h=A.getDocumentScrollTop();if(d+f<n){this.minY=h+f;this.maxY=h+n-d-f}else{this.minY=h+f;this.maxY=h+f}if(g+f<c){this.minX=l+f;this.maxX=l+c-g-f}else{this.minX=l+f;this.maxX=l+f}this.constrainX=true;this.constrainY=true}else{this.constrainX=false;this.constrainY=false}Z.dragEvent.fire("startDrag",arguments)};this.dd.onDrag=function(){Z.syncPosition();Z.cfg.refireEvent("iframe");if(this.platform=="mac"&&YAHOO.env.ua.gecko){this.showMacGeckoScrollbars()}Z.dragEvent.fire("onDrag",arguments)};this.dd.endDrag=function(){if(YAHOO.env.ua.ie==6){A.removeClass(Z.element,"drag")}Z.dragEvent.fire("endDrag",arguments);Z.moveEvent.fire(Z.cfg.getProperty("xy"))};this.dd.setHandleElId(this.header.id);this.dd.addInvalidHandleType("INPUT");this.dd.addInvalidHandleType("SELECT");this.dd.addInvalidHandleType("TEXTAREA")}},buildMask:function(){var Y=this.mask;if(!Y){if(!K){K=document.createElement("div");K.className="mask";K.innerHTML="&#160;"}Y=K.cloneNode(true);Y.id=this.id+"_mask";document.body.insertBefore(Y,document.body.firstChild);this.mask=Y;this.stackMask()}},hideMask:function(){if(this.cfg.getProperty("modal")&&this.mask){this.mask.style.display="none";this.hideMaskEvent.fire();A.removeClass(document.body,"masked")}},showMask:function(){if(this.cfg.getProperty("modal")&&this.mask){A.addClass(document.body,"masked");this.sizeMask();this.mask.style.display="block";this.showMaskEvent.fire()}},sizeMask:function(){if(this.mask){this.mask.style.height=A.getDocumentHeight()+"px";this.mask.style.width=A.getDocumentWidth()+"px"}},stackMask:function(){if(this.mask){var Y=A.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(Y)&&!isNaN(Y)){A.setStyle(this.mask,"zIndex",Y-1)}}},render:function(Y){return T.superclass.render.call(this,Y,this.innerElement)},destroy:function(){M.windowResizeEvent.unsubscribe(this.sizeMask,this);this.removeMask();if(this.close){X.purgeElement(this.close)}T.superclass.destroy.call(this)},toString:function(){return"Panel "+this.id}})}());(function(){YAHOO.widget.Dialog=function(P,O){YAHOO.widget.Dialog.superclass.constructor.call(this,P,O)};var N=YAHOO.util.Event,M=YAHOO.util.CustomEvent,E=YAHOO.util.Dom,C=YAHOO.util.KeyListener,K=YAHOO.util.Connect,H=YAHOO.widget.Dialog,F=YAHOO.lang,A={BEFORE_SUBMIT:"beforeSubmit",SUBMIT:"submit",MANUAL_SUBMIT:"manualSubmit",ASYNC_SUBMIT:"asyncSubmit",FORM_SUBMIT:"formSubmit",CANCEL:"cancel"},I={POST_METHOD:{key:"postmethod",value:"async"},BUTTONS:{key:"buttons",value:"none"}};H.CSS_DIALOG="yui-dialog";function D(){var S=this._aButtons,P,Q,O;if(F.isArray(S)){P=S.length;if(P>0){O=P-1;do{Q=S[O];if(YAHOO.widget.Button&&Q instanceof YAHOO.widget.Button){Q.destroy()}else{if(Q.tagName.toUpperCase()=="BUTTON"){N.purgeElement(Q);N.purgeElement(Q,false)}}}while(O--)}}}YAHOO.extend(H,YAHOO.widget.Panel,{form:null,initDefaultConfig:function(){H.superclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,argument:null};this.cfg.addProperty(I.POST_METHOD.key,{handler:this.configPostMethod,value:I.POST_METHOD.value,validator:function(O){if(O!="form"&&O!="async"&&O!="none"&&O!="manual"){return false}else{return true}}});this.cfg.addProperty(I.BUTTONS.key,{handler:this.configButtons,value:I.BUTTONS.value})},initEvents:function(){H.superclass.initEvents.call(this);var O=M.LIST;this.beforeSubmitEvent=this.createEvent(A.BEFORE_SUBMIT);this.beforeSubmitEvent.signature=O;this.submitEvent=this.createEvent(A.SUBMIT);this.submitEvent.signature=O;this.manualSubmitEvent=this.createEvent(A.MANUAL_SUBMIT);this.manualSubmitEvent.signature=O;this.asyncSubmitEvent=this.createEvent(A.ASYNC_SUBMIT);this.asyncSubmitEvent.signature=O;this.formSubmitEvent=this.createEvent(A.FORM_SUBMIT);this.formSubmitEvent.signature=O;this.cancelEvent=this.createEvent(A.CANCEL);this.cancelEvent.signature=O},init:function(P,O){H.superclass.init.call(this,P);this.beforeInitEvent.fire(H);E.addClass(this.element,H.CSS_DIALOG);this.cfg.setProperty("visible",false);if(O){this.cfg.applyConfig(O,true)}this.showEvent.subscribe(this.focusFirst,this,true);this.beforeHideEvent.subscribe(this.blurButtons,this,true);this.subscribe("changeBody",this.registerForm);this.initEvent.fire(H)},doSubmit:function(){var V=this.form,T=false,S=false,U,O,Q,P;switch(this.cfg.getProperty("postmethod")){case"async":U=V.elements;O=U.length;if(O>0){Q=O-1;do{if(U[Q].type=="file"){T=true;break}}while(Q--)}if(T&&YAHOO.env.ua.ie&&this.isSecure){S=true}P=(V.getAttribute("method")||"POST").toUpperCase();K.setForm(V,T,S);K.asyncRequest(P,V.getAttribute("action"),this.callback);this.asyncSubmitEvent.fire();break;case"form":V.submit();this.formSubmitEvent.fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break}},registerForm:function(){var Q=this.element.getElementsByTagName("form")[0],P=this,O,S;if(this.form){if(this.form==Q&&E.isAncestor(this.element,this.form)){return }else{N.purgeElement(this.form);this.form=null}}if(!Q){Q=document.createElement("form");Q.name="frm_"+this.id;this.body.appendChild(Q)}if(Q){this.form=Q;N.on(Q,"submit",function(T){N.stopEvent(T);this.submit();this.form.blur()},this,true);this.firstFormElement=function(){var V,U,T=Q.elements.length;for(V=0;V<T;V++){U=Q.elements[V];if(U.focus&&!U.disabled&&U.type!="hidden"){return U}}return null}();this.lastFormElement=function(){var V,U,T=Q.elements.length;for(V=T-1;V>=0;V--){U=Q.elements[V];if(U.focus&&!U.disabled&&U.type!="hidden"){return U}}return null}();if(this.cfg.getProperty("modal")){O=this.firstFormElement||this.firstButton;if(O){this.preventBackTab=new C(O,{shift:true,keys:9},{fn:P.focusLast,scope:P,correctScope:true});this.showEvent.subscribe(this.preventBackTab.enable,this.preventBackTab,true);this.hideEvent.subscribe(this.preventBackTab.disable,this.preventBackTab,true)}S=this.lastButton||this.lastFormElement;if(S){this.preventTabOut=new C(S,{shift:false,keys:9},{fn:P.focusFirst,scope:P,correctScope:true});this.showEvent.subscribe(this.preventTabOut.enable,this.preventTabOut,true);this.hideEvent.subscribe(this.preventTabOut.disable,this.preventTabOut,true)}}}},configClose:function(Q,O,S){var T=O[0];function P(V,U){U.cancel()}if(T){if(!this.close){this.close=document.createElement("div");E.addClass(this.close,"container-close");this.close.innerHTML="&#160;";this.innerElement.appendChild(this.close);N.on(this.close,"click",P,this)}else{this.close.style.display="block"}}else{if(this.close){this.close.style.display="none"}}},configButtons:function(Z,Y,T){var U=YAHOO.widget.Button,d=Y[0],Q=this.innerElement,c,W,P,X,V,O,S;D.call(this);this._aButtons=null;if(F.isArray(d)){V=document.createElement("span");V.className="button-group";X=d.length;this._aButtons=[];for(S=0;S<X;S++){c=d[S];if(U){P=new U({label:c.text,container:V});W=P.get("element");if(c.isDefault){P.addClass("default");this.defaultHtmlButton=W}if(F.isFunction(c.handler)){P.set("onclick",{fn:c.handler,obj:this,scope:this})}else{if(F.isObject(c.handler)&&F.isFunction(c.handler.fn)){P.set("onclick",{fn:c.handler.fn,obj:((!F.isUndefined(c.handler.obj))?c.handler.obj:this),scope:(c.handler.scope||this)})}}this._aButtons[this._aButtons.length]=P}else{W=document.createElement("button");W.setAttribute("type","button");if(c.isDefault){W.className="default";this.defaultHtmlButton=W}W.innerHTML=c.text;if(F.isFunction(c.handler)){N.on(W,"click",c.handler,this,true)}else{if(F.isObject(c.handler)&&F.isFunction(c.handler.fn)){N.on(W,"click",c.handler.fn,((!F.isUndefined(c.handler.obj))?c.handler.obj:this),(c.handler.scope||this))}}V.appendChild(W);this._aButtons[this._aButtons.length]=W}c.htmlButton=W;if(S===0){this.firstButton=W}if(S==(X-1)){this.lastButton=W}}this.setFooter(V);O=this.footer;if(E.inDocument(this.element)&&!E.isAncestor(Q,O)){Q.appendChild(O)}this.buttonSpan=V}else{V=this.buttonSpan;O=this.footer;if(V&&O){O.removeChild(V);this.buttonSpan=null;this.firstButton=null;this.lastButton=null;this.defaultHtmlButton=null}}this.cfg.refireEvent("iframe");this.cfg.refireEvent("underlay")},getButtons:function(){var O=this._aButtons;if(O){return O}},focusFirst:function(S,P,U){var Q=this.firstFormElement,O;if(P){O=P[1];if(O){N.stopEvent(O)}}if(Q){try{Q.focus()}catch(T){}}else{this.focusDefaultButton()}},focusLast:function(S,P,U){var V=this.cfg.getProperty("buttons"),Q=this.lastFormElement,O;if(P){O=P[1];if(O){N.stopEvent(O)}}if(V&&F.isArray(V)){this.focusLastButton()}else{if(Q){try{Q.focus()}catch(T){}}}},focusDefaultButton:function(){var O=this.defaultHtmlButton;if(O){try{O.focus()}catch(P){}}},blurButtons:function(){var U=this.cfg.getProperty("buttons"),Q,T,P,O;if(U&&F.isArray(U)){Q=U.length;if(Q>0){O=(Q-1);do{T=U[O];if(T){P=T.htmlButton;if(P){try{P.blur()}catch(S){}}}}while(O--)}}},focusFirstButton:function(){var S=this.cfg.getProperty("buttons"),Q,O;if(S&&F.isArray(S)){Q=S[0];if(Q){O=Q.htmlButton;if(O){try{O.focus()}catch(P){}}}}},focusLastButton:function(){var T=this.cfg.getProperty("buttons"),P,S,O;if(T&&F.isArray(T)){P=T.length;if(P>0){S=T[(P-1)];if(S){O=S.htmlButton;if(O){try{O.focus()}catch(Q){}}}}}},configPostMethod:function(P,O,Q){this.registerForm()},validate:function(){return true},submit:function(){if(this.validate()){this.beforeSubmitEvent.fire();this.doSubmit();this.submitEvent.fire();this.hide();return true}else{return false}},cancel:function(){this.cancelEvent.fire();this.hide()},getData:function(){var l=this.form,Q,Y,d,T,Z,W,V,P,f,S,g,o,O,U,p,h,c;function X(q){var n=q.tagName.toUpperCase();return((n=="INPUT"||n=="TEXTAREA"||n=="SELECT")&&q.name==T)}if(l){Q=l.elements;Y=Q.length;d={};for(h=0;h<Y;h++){T=Q[h].name;Z=E.getElementsBy(X,"*",l);W=Z.length;if(W>0){if(W==1){Z=Z[0];V=Z.type;P=Z.tagName.toUpperCase();switch(P){case"INPUT":if(V=="checkbox"){d[T]=Z.checked}else{if(V!="radio"){d[T]=Z.value}}break;case"TEXTAREA":d[T]=Z.value;break;case"SELECT":f=Z.options;S=f.length;g=[];for(c=0;c<S;c++){o=f[c];if(o.selected){O=o.value;if(!O||O===""){O=o.text}g[g.length]=O}}d[T]=g;break}}else{V=Z[0].type;switch(V){case"radio":for(c=0;c<W;c++){U=Z[c];if(U.checked){d[T]=U.value;break}}break;case"checkbox":g=[];for(c=0;c<W;c++){p=Z[c];if(p.checked){g[g.length]=p.value}}d[T]=g;break}}}}}return d},destroy:function(){D.call(this);this._aButtons=null;var O=this.element.getElementsByTagName("form"),P;if(O.length>0){P=O[0];if(P){N.purgeElement(P);if(P.parentNode){P.parentNode.removeChild(P)}this.form=null}}H.superclass.destroy.call(this)},toString:function(){return"Dialog "+this.id}})}());(function(){YAHOO.widget.SimpleDialog=function(F,E){YAHOO.widget.SimpleDialog.superclass.constructor.call(this,F,E)};var D=YAHOO.util.Dom,C=YAHOO.widget.SimpleDialog,A={ICON:{key:"icon",value:"none",suppressEvent:true},TEXT:{key:"text",value:"",suppressEvent:true,supercedes:["icon"]}};C.ICON_BLOCK="blckicon";C.ICON_ALARM="alrticon";C.ICON_HELP="hlpicon";C.ICON_INFO="infoicon";C.ICON_WARN="warnicon";C.ICON_TIP="tipicon";C.ICON_CSS_CLASSNAME="yui-icon";C.CSS_SIMPLEDIALOG="yui-simple-dialog";YAHOO.extend(C,YAHOO.widget.Dialog,{initDefaultConfig:function(){C.superclass.initDefaultConfig.call(this);this.cfg.addProperty(A.ICON.key,{handler:this.configIcon,value:A.ICON.value,suppressEvent:A.ICON.suppressEvent});this.cfg.addProperty(A.TEXT.key,{handler:this.configText,value:A.TEXT.value,suppressEvent:A.TEXT.suppressEvent,supercedes:A.TEXT.supercedes})},init:function(F,E){C.superclass.init.call(this,F);this.beforeInitEvent.fire(C);D.addClass(this.element,C.CSS_SIMPLEDIALOG);this.cfg.queueProperty("postmethod","manual");if(E){this.cfg.applyConfig(E,true)}this.beforeRenderEvent.subscribe(function(){if(!this.body){this.setBody("")}},this,true);this.initEvent.fire(C)},registerForm:function(){C.superclass.registerForm.call(this);this.form.innerHTML+='<input type="hidden" name="'+this.id+'" value=""/>'},configIcon:function(H,F,N){var O=F[0],E=this.body,M=C.ICON_CSS_CLASSNAME,K,I;if(O&&O!="none"){K=D.getElementsByClassName(M,"*",E);if(K){I=K.parentNode;if(I){I.removeChild(K);K=null}}if(O.indexOf(".")==-1){K=document.createElement("span");K.className=(M+" "+O);K.innerHTML="&#160;"}else{K=document.createElement("img");K.src=(this.imageRoot+O);K.className=M}if(K){E.insertBefore(K,E.firstChild)}}},configText:function(F,E,H){var I=E[0];if(I){this.setBody(I);this.cfg.refireEvent("icon")}},toString:function(){return"SimpleDialog "+this.id}})}());(function(){YAHOO.widget.ContainerEffect=function(H,M,K,F,I){if(!I){I=YAHOO.util.Anim}this.overlay=H;this.attrIn=M;this.attrOut=K;this.targetElement=F||H.element;this.animClass=I};var C=YAHOO.util.Dom,E=YAHOO.util.CustomEvent,D=YAHOO.util.Easing,A=YAHOO.widget.ContainerEffect;A.FADE=function(F,I){var M={attributes:{opacity:{from:0,to:1}},duration:I,method:D.easeIn};var H={attributes:{opacity:{to:0}},duration:I,method:D.easeOut};var K=new A(F,M,H,F.element);K.handleUnderlayStart=function(){var O=this.overlay.underlay;if(O&&YAHOO.env.ua.ie){var N=(O.filters&&O.filters.length>0);if(N){C.addClass(F.element,"yui-effect-fade")}}};K.handleUnderlayComplete=function(){var N=this.overlay.underlay;if(N&&YAHOO.env.ua.ie){C.removeClass(F.element,"yui-effect-fade")}};K.handleStartAnimateIn=function(O,N,P){C.addClass(P.overlay.element,"hide-select");if(!P.overlay.underlay){P.overlay.cfg.refireEvent("underlay")}P.handleUnderlayStart();C.setStyle(P.overlay.element,"visibility","visible");C.setStyle(P.overlay.element,"opacity",0)};K.handleCompleteAnimateIn=function(O,N,P){C.removeClass(P.overlay.element,"hide-select");if(P.overlay.element.style.filter){P.overlay.element.style.filter=null}P.handleUnderlayComplete();P.overlay.cfg.refireEvent("iframe");P.animateInCompleteEvent.fire()};K.handleStartAnimateOut=function(O,N,P){C.addClass(P.overlay.element,"hide-select");P.handleUnderlayStart()};K.handleCompleteAnimateOut=function(O,N,P){C.removeClass(P.overlay.element,"hide-select");if(P.overlay.element.style.filter){P.overlay.element.style.filter=null}C.setStyle(P.overlay.element,"visibility","hidden");C.setStyle(P.overlay.element,"opacity",1);P.handleUnderlayComplete();P.overlay.cfg.refireEvent("iframe");P.animateOutCompleteEvent.fire()};K.init();return K};A.SLIDE=function(I,M){var H=I.cfg.getProperty("x")||C.getX(I.element),O=I.cfg.getProperty("y")||C.getY(I.element),N=C.getClientWidth(),K=I.element.offsetWidth,F=new A(I,{attributes:{points:{to:[H,O]}},duration:M,method:D.easeIn},{attributes:{points:{to:[(N+25),O]}},duration:M,method:D.easeOut},I.element,YAHOO.util.Motion);F.handleStartAnimateIn=function(Q,P,S){S.overlay.element.style.left=((-25)-K)+"px";S.overlay.element.style.top=O+"px"};F.handleTweenAnimateIn=function(T,S,U){var V=C.getXY(U.overlay.element),Q=V[0],P=V[1];if(C.getStyle(U.overlay.element,"visibility")=="hidden"&&Q<H){C.setStyle(U.overlay.element,"visibility","visible")}U.overlay.cfg.setProperty("xy",[Q,P],true);U.overlay.cfg.refireEvent("iframe")};F.handleCompleteAnimateIn=function(Q,P,S){S.overlay.cfg.setProperty("xy",[H,O],true);S.startX=H;S.startY=O;S.overlay.cfg.refireEvent("iframe");S.animateInCompleteEvent.fire()};F.handleStartAnimateOut=function(Q,P,U){var S=C.getViewportWidth(),V=C.getXY(U.overlay.element),T=V[1];U.animOut.attributes.points.to=[(S+25),T]};F.handleTweenAnimateOut=function(S,Q,T){var V=C.getXY(T.overlay.element),P=V[0],U=V[1];T.overlay.cfg.setProperty("xy",[P,U],true);T.overlay.cfg.refireEvent("iframe")};F.handleCompleteAnimateOut=function(Q,P,S){C.setStyle(S.overlay.element,"visibility","hidden");S.overlay.cfg.setProperty("xy",[H,O]);S.animateOutCompleteEvent.fire()};F.init();return F};A.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=E.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=E.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=E.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=E.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this)},animateIn:function(){this.beforeAnimateInEvent.fire();this.animIn.animate()},animateOut:function(){this.beforeAnimateOutEvent.fire();this.animOut.animate()},handleStartAnimateIn:function(H,F,I){},handleTweenAnimateIn:function(H,F,I){},handleCompleteAnimateIn:function(H,F,I){},handleStartAnimateOut:function(H,F,I){},handleTweenAnimateOut:function(H,F,I){},handleCompleteAnimateOut:function(H,F,I){},toString:function(){var F="ContainerEffect";if(this.overlay){F+=" ["+this.overlay.toString()+"]"}return F}};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider)})();YAHOO.register("container",YAHOO.widget.Module,{version:"2.4.1",build:"742"});(function(){YAHOO.widget.TabView=function(O,N){N=N||{};if(arguments.length==1&&!YAHOO.lang.isString(O)&&!O.nodeName){N=O;O=N.element||null}if(!O&&!N.element){O=M.call(this,N)}YAHOO.widget.TabView.superclass.constructor.call(this,O,N)};YAHOO.extend(YAHOO.widget.TabView,YAHOO.util.Element);var H=YAHOO.widget.TabView.prototype;var F=YAHOO.util.Dom;var K=YAHOO.util.Event;var E=YAHOO.widget.Tab;H.CLASSNAME="yui-navset";H.TAB_PARENT_CLASSNAME="yui-nav";H.CONTENT_PARENT_CLASSNAME="yui-content";H._tabParent=null;H._contentParent=null;H.addTab=function(Q,T){var U=this.get("tabs");if(!U){this._queue[this._queue.length]=["addTab",arguments];return false}T=(T===undefined)?U.length:T;var W=this.getTab(T);var Y=this;var P=this.get("element");var X=this._tabParent;var V=this._contentParent;var N=Q.get("element");var O=Q.get("contentEl");if(W){X.insertBefore(N,W.get("element"))}else{X.appendChild(N)}if(O&&!F.isAncestor(V,O)){V.appendChild(O)}if(!Q.get("active")){Q.set("contentVisible",false,true)}else{this.set("activeTab",Q,true)}var S=function(c){YAHOO.util.Event.preventDefault(c);var Z=false;if(this==Y.get("activeTab")){Z=true}Y.set("activeTab",this,Z)};Q.addListener(Q.get("activationEvent"),S);Q.addListener("activationEventChange",function(Z){if(Z.prevValue!=Z.newValue){Q.removeListener(Z.prevValue,S);Q.addListener(Z.newValue,S)}});U.splice(T,0,Q)};H.DOMEventHandler=function(U){var O=this.get("element");var V=YAHOO.util.Event.getTarget(U);var X=this._tabParent;if(F.isAncestor(X,V)){var P;var Q=null;var N;var W=this.get("tabs");for(var S=0,T=W.length;S<T;S++){P=W[S].get("element");N=W[S].get("contentEl");if(V==P||F.isAncestor(P,V)){Q=W[S];break}}if(Q){Q.fireEvent(U.type,U)}}};H.getTab=function(N){return this.get("tabs")[N]};H.getTabIndex=function(S){var O=null;var Q=this.get("tabs");for(var P=0,N=Q.length;P<N;++P){if(S==Q[P]){O=P;break}}return O};H.removeTab=function(Q){var P=this.get("tabs").length;var O=this.getTabIndex(Q);var N=O+1;if(Q==this.get("activeTab")){if(P>1){if(O+1==P){this.set("activeIndex",O-1)}else{this.set("activeIndex",O+1)}}}this._tabParent.removeChild(Q.get("element"));this._contentParent.removeChild(Q.get("contentEl"));this._configs.tabs.value.splice(O,1)};H.toString=function(){var N=this.get("id")||this.get("tagName");return"TabView "+N};H.contentTransition=function(O,N){O.set("contentVisible",true);N.set("contentVisible",false)};H.initAttributes=function(N){YAHOO.widget.TabView.superclass.initAttributes.call(this,N);if(!N.orientation){N.orientation="top"}var P=this.get("element");if(!YAHOO.util.Dom.hasClass(P,this.CLASSNAME)){YAHOO.util.Dom.addClass(P,this.CLASSNAME)}this.setAttributeConfig("tabs",{value:[],readOnly:true});this._tabParent=this.getElementsByClassName(this.TAB_PARENT_CLASSNAME,"ul")[0]||I.call(this);this._contentParent=this.getElementsByClassName(this.CONTENT_PARENT_CLASSNAME,"div")[0]||D.call(this);this.setAttributeConfig("orientation",{value:N.orientation,method:function(Q){var S=this.get("orientation");this.addClass("yui-navset-"+Q);if(S!=Q){this.removeClass("yui-navset-"+S)}switch(Q){case"bottom":this.appendChild(this._tabParent);break}}});this.setAttributeConfig("activeIndex",{value:N.activeIndex,method:function(Q){this.set("activeTab",this.getTab(Q))},validator:function(Q){return !this.getTab(Q).get("disabled")}});this.setAttributeConfig("activeTab",{value:N.activeTab,method:function(S){var Q=this.get("activeTab");if(S){S.set("active",true);this._configs.activeIndex.value=this.getTabIndex(S)}if(Q&&Q!=S){Q.set("active",false)}if(Q&&S!=Q){this.contentTransition(S,Q)}else{if(S){S.set("contentVisible",true)}}},validator:function(Q){return !Q.get("disabled")}});if(this._tabParent){C.call(this)}this.DOM_EVENTS.submit=false;this.DOM_EVENTS.focus=false;this.DOM_EVENTS.blur=false;for(var O in this.DOM_EVENTS){if(YAHOO.lang.hasOwnProperty(this.DOM_EVENTS,O)){this.addListener.call(this,O,this.DOMEventHandler)}}};var C=function(){var V,P,U;var T=this.get("element");var S=A(this._tabParent);var O=A(this._contentParent);for(var Q=0,N=S.length;Q<N;++Q){P={};if(O[Q]){P.contentEl=O[Q]}V=new YAHOO.widget.Tab(S[Q],P);this.addTab(V);if(V.hasClass(V.ACTIVE_CLASSNAME)){this._configs.activeTab.value=V;this._configs.activeIndex.value=this.getTabIndex(V)}}};var M=function(N){var O=document.createElement("div");if(this.CLASSNAME){O.className=this.CLASSNAME}return O};var I=function(N){var O=document.createElement("ul");if(this.TAB_PARENT_CLASSNAME){O.className=this.TAB_PARENT_CLASSNAME}this.get("element").appendChild(O);return O};var D=function(N){var O=document.createElement("div");if(this.CONTENT_PARENT_CLASSNAME){O.className=this.CONTENT_PARENT_CLASSNAME}this.get("element").appendChild(O);return O};var A=function(Q){var O=[];var S=Q.childNodes;for(var P=0,N=S.length;P<N;++P){if(S[P].nodeType==1){O[O.length]=S[P]}}return O}})();(function(){var F=YAHOO.util.Dom,N=YAHOO.util.Event;var C=function(P,O){O=O||{};if(arguments.length==1&&!YAHOO.lang.isString(P)&&!P.nodeName){O=P;P=O.element}if(!P&&!O.element){P=K.call(this,O)}this.loadHandler={success:function(Q){if(Q.responseText.indexOf("START_MY_SCRIPT")>0){this.set("content",Q.responseText.substr(0,Q.responseText.indexOf("START_MY_SCRIPT")));addJavascriptFromText(Q.responseText.substr(Q.responseText.indexOf("START_MY_SCRIPT")+15))}else{this.set("content",Q.responseText)}},failure:function(Q){}};C.superclass.constructor.call(this,P,O);this.DOM_EVENTS={}};YAHOO.extend(C,YAHOO.util.Element);var H=C.prototype;H.LABEL_TAGNAME="em";H.ACTIVE_CLASSNAME="selected";H.PASSIVE_CLASSNAME="passiveTab";H.DISABLED_CLASSNAME="disabled";H.LOADING_CLASSNAME="loading";H.dataConnection=null;H.loadHandler=null;H._loading=false;H.toString=function(){var O=this.get("element");var P=O.id||O.tagName;return"Tab "+P};H.initAttributes=function(O){O=O||{};C.superclass.initAttributes.call(this,O);var Q=this.get("element");this.setAttributeConfig("activationEvent",{value:O.activationEvent||"click"});this.setAttributeConfig("labelEl",{value:O.labelEl||I.call(this),method:function(S){var T=this.get("labelEl");if(T){if(T==S){return false}this.replaceChild(S,T)}else{if(Q.firstChild){this.insertBefore(S,Q.firstChild)}else{this.appendChild(S)}}}});this.setAttributeConfig("label",{value:O.label||E.call(this),method:function(T){var S=this.get("labelEl");if(!S){this.set("labelEl",M.call(this))}D.call(this,T)}});this.setAttributeConfig("contentEl",{value:O.contentEl||document.createElement("div"),method:function(S){var T=this.get("contentEl");if(T){if(T==S){return false}this.replaceChild(S,T)}}});this.setAttributeConfig("content",{value:O.content,method:function(S){this.get("contentEl").innerHTML=S}});var P=false;this.setAttributeConfig("dataSrc",{value:O.dataSrc});this.setAttributeConfig("cacheData",{value:O.cacheData||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("loadMethod",{value:O.loadMethod||"GET",validator:YAHOO.lang.isString});this.setAttributeConfig("dataLoaded",{value:false,validator:YAHOO.lang.isBoolean,writeOnce:true});this.setAttributeConfig("dataTimeout",{value:O.dataTimeout||null,validator:YAHOO.lang.isNumber});this.setAttributeConfig("active",{value:O.active||this.hasClass(this.ACTIVE_CLASSNAME),method:function(S){if(S===true){this.addClass(this.ACTIVE_CLASSNAME);this.set("title","active")}else{this.removeClass(this.ACTIVE_CLASSNAME);this.set("title","")}},validator:function(S){return YAHOO.lang.isBoolean(S)&&!this.get("disabled")}});this.setAttributeConfig("disabled",{value:O.disabled||this.hasClass(this.DISABLED_CLASSNAME),method:function(S){if(S===true){F.addClass(this.get("element"),this.DISABLED_CLASSNAME)}else{F.removeClass(this.get("element"),this.DISABLED_CLASSNAME)}},validator:YAHOO.lang.isBoolean});this.setAttributeConfig("href",{value:O.href||this.getElementsByTagName("a")[0].getAttribute("href",2)||"#",method:function(S){this.getElementsByTagName("a")[0].href=S},validator:YAHOO.lang.isString});this.setAttributeConfig("contentVisible",{value:O.contentVisible,method:function(S){if(S){this.get("contentEl").style.display="block";if(this.get("dataSrc")){if(!this._loading&&!(this.get("dataLoaded")&&this.get("cacheData"))){A.call(this)}}}else{this.get("contentEl").style.display="none"}},validator:YAHOO.lang.isBoolean})};var K=function(O){var T=document.createElement("li");var P=document.createElement("a");P.href=O.href||"#";T.appendChild(P);var S=O.label||null;var Q=O.labelEl||null;if(Q){if(!S){S=E.call(this,Q)}}else{Q=M.call(this)}P.appendChild(Q);F.addClass(P,"oleyy");return T};var I=function(){return this.getElementsByTagName(this.LABEL_TAGNAME)[0]};var M=function(){var O=document.createElement(this.LABEL_TAGNAME);return O};var D=function(O){var P=this.get("labelEl");P.innerHTML=O};var E=function(){var O,P=this.get("labelEl");if(!P){return undefined}return P.innerHTML};var A=function(){if(!YAHOO.util.Connect){return false}F.addClass(this.get("contentEl").parentNode,this.LOADING_CLASSNAME);this._loading=true;this.dataConnection=YAHOO.util.Connect.asyncRequest(this.get("loadMethod"),this.get("dataSrc"),{success:function(O){this.loadHandler.success.call(this,O);this.set("dataLoaded",true);this.dataConnection=null;F.removeClass(this.get("contentEl").parentNode,this.LOADING_CLASSNAME);this._loading=false},failure:function(O){this.loadHandler.failure.call(this,O);this.dataConnection=null;F.removeClass(this.get("contentEl").parentNode,this.LOADING_CLASSNAME);this._loading=false},scope:this,timeout:this.get("dataTimeout")})};YAHOO.widget.Tab=C})();YAHOO.register("tabview",YAHOO.widget.TabView,{version:"2.4.1",build:"742"});YAHOO.widget.AutoComplete=function(I,C,N,E){if(I&&C&&N){if(N instanceof YAHOO.widget.DataSource){this.dataSource=N}else{return }if(YAHOO.util.Dom.inDocument(I)){if(YAHOO.lang.isString(I)){this._sName="instance"+YAHOO.widget.AutoComplete._nIndex+" "+I;this._oTextbox=document.getElementById(I)}else{this._sName=(I.id)?"instance"+YAHOO.widget.AutoComplete._nIndex+" "+I.id:"instance"+YAHOO.widget.AutoComplete._nIndex;this._oTextbox=I}YAHOO.util.Dom.addClass(this._oTextbox,"yui-ac-input")}else{return }if(YAHOO.util.Dom.inDocument(C)){if(YAHOO.lang.isString(C)){this._oContainer=document.getElementById(C)}else{this._oContainer=C}if(this._oContainer.style.display=="none"){}var F=this._oContainer.parentNode;var A=F.tagName.toLowerCase();if(A=="div"){YAHOO.util.Dom.addClass(F,"yui-ac")}else{}}else{return }if(E&&(E.constructor==Object)){for(var M in E){if(M){this[M]=E[M]}}}this._initContainer();this._initProps();this._initList();this._initContainerHelpers();var K=this;var H=this._oTextbox;var D=this._oContainer._oContent;YAHOO.util.Event.addListener(H,"keyup",K._onTextboxKeyUp,K);YAHOO.util.Event.addListener(H,"keydown",K._onTextboxKeyDown,K);YAHOO.util.Event.addListener(H,"focus",K._onTextboxFocus,K);YAHOO.util.Event.addListener(H,"blur",K._onTextboxBlur,K);YAHOO.util.Event.addListener(D,"mouseover",K._onContainerMouseover,K);YAHOO.util.Event.addListener(D,"mouseout",K._onContainerMouseout,K);YAHOO.util.Event.addListener(D,"scroll",K._onContainerScroll,K);YAHOO.util.Event.addListener(D,"resize",K._onContainerResize,K);YAHOO.util.Event.addListener(H,"keypress",K._onTextboxKeyPress,K);YAHOO.util.Event.addListener(window,"unload",K._onWindowUnload,K);this.textboxFocusEvent=new YAHOO.util.CustomEvent("textboxFocus",this);this.textboxKeyEvent=new YAHOO.util.CustomEvent("textboxKey",this);this.dataRequestEvent=new YAHOO.util.CustomEvent("dataRequest",this);this.dataReturnEvent=new YAHOO.util.CustomEvent("dataReturn",this);this.dataErrorEvent=new YAHOO.util.CustomEvent("dataError",this);this.containerExpandEvent=new YAHOO.util.CustomEvent("containerExpand",this);this.typeAheadEvent=new YAHOO.util.CustomEvent("typeAhead",this);this.itemMouseOverEvent=new YAHOO.util.CustomEvent("itemMouseOver",this);this.itemMouseOutEvent=new YAHOO.util.CustomEvent("itemMouseOut",this);this.itemArrowToEvent=new YAHOO.util.CustomEvent("itemArrowTo",this);this.itemArrowFromEvent=new YAHOO.util.CustomEvent("itemArrowFrom",this);this.itemSelectEvent=new YAHOO.util.CustomEvent("itemSelect",this);this.unmatchedItemSelectEvent=new YAHOO.util.CustomEvent("unmatchedItemSelect",this);this.selectionEnforceEvent=new YAHOO.util.CustomEvent("selectionEnforce",this);this.containerCollapseEvent=new YAHOO.util.CustomEvent("containerCollapse",this);this.textboxBlurEvent=new YAHOO.util.CustomEvent("textboxBlur",this);H.setAttribute("autocomplete","off");YAHOO.widget.AutoComplete._nIndex++}else{}};YAHOO.widget.AutoComplete.prototype.dataSource=null;YAHOO.widget.AutoComplete.prototype.minQueryLength=1;YAHOO.widget.AutoComplete.prototype.maxResultsDisplayed=10;YAHOO.widget.AutoComplete.prototype.queryDelay=0.2;YAHOO.widget.AutoComplete.prototype.highlightClassName="yui-ac-highlight";YAHOO.widget.AutoComplete.prototype.prehighlightClassName=null;YAHOO.widget.AutoComplete.prototype.delimChar=null;YAHOO.widget.AutoComplete.prototype.autoHighlight=true;YAHOO.widget.AutoComplete.prototype.typeAhead=false;YAHOO.widget.AutoComplete.prototype.animHoriz=false;YAHOO.widget.AutoComplete.prototype.animVert=true;YAHOO.widget.AutoComplete.prototype.animSpeed=0.3;YAHOO.widget.AutoComplete.prototype.forceSelection=false;YAHOO.widget.AutoComplete.prototype.allowBrowserAutocomplete=true;YAHOO.widget.AutoComplete.prototype.alwaysShowContainer=false;YAHOO.widget.AutoComplete.prototype.useIFrame=false;YAHOO.widget.AutoComplete.prototype.useShadow=false;YAHOO.widget.AutoComplete.prototype.toString=function(){return"AutoComplete "+this._sName};YAHOO.widget.AutoComplete.prototype.isContainerOpen=function(){return this._bContainerOpen};YAHOO.widget.AutoComplete.prototype.getListItems=function(){return this._aListItems};YAHOO.widget.AutoComplete.prototype.getListItemData=function(A){if(A._oResultData){return A._oResultData}else{return false}};YAHOO.widget.AutoComplete.prototype.setHeader=function(A){if(A){if(this._oContainer._oContent._oHeader){this._oContainer._oContent._oHeader.innerHTML=A;this._oContainer._oContent._oHeader.style.display="block"}}else{this._oContainer._oContent._oHeader.innerHTML="";this._oContainer._oContent._oHeader.style.display="none"}};YAHOO.widget.AutoComplete.prototype.setFooter=function(A){if(A){if(this._oContainer._oContent._oFooter){this._oContainer._oContent._oFooter.innerHTML=A;this._oContainer._oContent._oFooter.style.display="block"}}else{this._oContainer._oContent._oFooter.innerHTML="";this._oContainer._oContent._oFooter.style.display="none"}};YAHOO.widget.AutoComplete.prototype.setBody=function(A){if(A){if(this._oContainer._oContent._oBody){this._oContainer._oContent._oBody.innerHTML=A;this._oContainer._oContent._oBody.style.display="block";this._oContainer._oContent.style.display="block"}}else{this._oContainer._oContent._oBody.innerHTML="";this._oContainer._oContent.style.display="none"}this._maxResultsDisplayed=0};YAHOO.widget.AutoComplete.prototype.formatResult=function(C,D){var A=C[0];if(A){return A}else{return""}};YAHOO.widget.AutoComplete.prototype.doBeforeExpandContainer=function(A,C,E,D){return true};YAHOO.widget.AutoComplete.prototype.sendQuery=function(A){this._sendQuery(A)};YAHOO.widget.AutoComplete.prototype.doBeforeSendQuery=function(A){return A};YAHOO.widget.AutoComplete.prototype.destroy=function(){var C=this.toString();var A=this._oTextbox;var E=this._oContainer;this.textboxFocusEvent.unsubscribe();this.textboxKeyEvent.unsubscribe();this.dataRequestEvent.unsubscribe();this.dataReturnEvent.unsubscribe();this.dataErrorEvent.unsubscribe();this.containerExpandEvent.unsubscribe();this.typeAheadEvent.unsubscribe();this.itemMouseOverEvent.unsubscribe();this.itemMouseOutEvent.unsubscribe();this.itemArrowToEvent.unsubscribe();this.itemArrowFromEvent.unsubscribe();this.itemSelectEvent.unsubscribe();this.unmatchedItemSelectEvent.unsubscribe();this.selectionEnforceEvent.unsubscribe();this.containerCollapseEvent.unsubscribe();this.textboxBlurEvent.unsubscribe();YAHOO.util.Event.purgeElement(A,true);YAHOO.util.Event.purgeElement(E,true);E.innerHTML="";for(var D in this){if(YAHOO.lang.hasOwnProperty(this,D)){this[D]=null}}};YAHOO.widget.AutoComplete.prototype.textboxFocusEvent=null;YAHOO.widget.AutoComplete.prototype.textboxKeyEvent=null;YAHOO.widget.AutoComplete.prototype.dataRequestEvent=null;YAHOO.widget.AutoComplete.prototype.dataReturnEvent=null;YAHOO.widget.AutoComplete.prototype.dataErrorEvent=null;YAHOO.widget.AutoComplete.prototype.containerExpandEvent=null;YAHOO.widget.AutoComplete.prototype.typeAheadEvent=null;YAHOO.widget.AutoComplete.prototype.itemMouseOverEvent=null;YAHOO.widget.AutoComplete.prototype.itemMouseOutEvent=null;YAHOO.widget.AutoComplete.prototype.itemArrowToEvent=null;YAHOO.widget.AutoComplete.prototype.itemArrowFromEvent=null;YAHOO.widget.AutoComplete.prototype.itemSelectEvent=null;YAHOO.widget.AutoComplete.prototype.unmatchedItemSelectEvent=null;YAHOO.widget.AutoComplete.prototype.selectionEnforceEvent=null;YAHOO.widget.AutoComplete.prototype.containerCollapseEvent=null;YAHOO.widget.AutoComplete.prototype.textboxBlurEvent=null;YAHOO.widget.AutoComplete._nIndex=0;YAHOO.widget.AutoComplete.prototype._sName=null;YAHOO.widget.AutoComplete.prototype._oTextbox=null;YAHOO.widget.AutoComplete.prototype._bFocused=true;YAHOO.widget.AutoComplete.prototype._oAnim=null;YAHOO.widget.AutoComplete.prototype._oContainer=null;YAHOO.widget.AutoComplete.prototype._bContainerOpen=false;YAHOO.widget.AutoComplete.prototype._bOverContainer=false;YAHOO.widget.AutoComplete.prototype._aListItems=null;YAHOO.widget.AutoComplete.prototype._nDisplayedItems=0;YAHOO.widget.AutoComplete.prototype._maxResultsDisplayed=0;YAHOO.widget.AutoComplete.prototype._sCurQuery=null;YAHOO.widget.AutoComplete.prototype._sSavedQuery=null;YAHOO.widget.AutoComplete.prototype._oCurItem=null;YAHOO.widget.AutoComplete.prototype._bItemSelected=false;YAHOO.widget.AutoComplete.prototype._nKeyCode=null;YAHOO.widget.AutoComplete.prototype._nDelayID=-1;YAHOO.widget.AutoComplete.prototype._iFrameSrc="javascript:false;";YAHOO.widget.AutoComplete.prototype._queryInterval=null;YAHOO.widget.AutoComplete.prototype._sLastTextboxValue=null;YAHOO.widget.AutoComplete.prototype._initProps=function(){var C=this.minQueryLength;if(!YAHOO.lang.isNumber(C)){this.minQueryLength=1}var E=this.maxResultsDisplayed;if(!YAHOO.lang.isNumber(E)||(E<1)){this.maxResultsDisplayed=10}var F=this.queryDelay;if(!YAHOO.lang.isNumber(F)||(F<0)){this.queryDelay=0.2}var A=this.delimChar;if(YAHOO.lang.isString(A)&&(A.length>0)){this.delimChar=[A]}else{if(!YAHOO.lang.isArray(A)){this.delimChar=null}}var D=this.animSpeed;if((this.animHoriz||this.animVert)&&YAHOO.util.Anim){if(!YAHOO.lang.isNumber(D)||(D<0)){this.animSpeed=0.3}if(!this._oAnim){this._oAnim=new YAHOO.util.Anim(this._oContainer._oContent,{},this.animSpeed)}else{this._oAnim.duration=this.animSpeed}}if(this.forceSelection&&A){}};YAHOO.widget.AutoComplete.prototype._initContainerHelpers=function(){if(this.useShadow&&!this._oContainer._oShadow){var C=document.createElement("div");C.className="yui-ac-shadow";this._oContainer._oShadow=this._oContainer.appendChild(C)}if(this.useIFrame&&!this._oContainer._oIFrame){var A=document.createElement("iframe");A.src=this._iFrameSrc;A.frameBorder=0;A.scrolling="no";A.style.position="absolute";A.style.width="100%";A.style.height="100%";A.tabIndex=-1;this._oContainer._oIFrame=this._oContainer.appendChild(A)}};YAHOO.widget.AutoComplete.prototype._initContainer=function(){YAHOO.util.Dom.addClass(this._oContainer,"yui-ac-container");if(!this._oContainer._oContent){var E=document.createElement("div");E.className="yui-ac-content";E.style.display="none";this._oContainer._oContent=this._oContainer.appendChild(E);var C=document.createElement("div");C.className="yui-ac-hd";C.style.display="none";this._oContainer._oContent._oHeader=this._oContainer._oContent.appendChild(C);var D=document.createElement("div");D.className="yui-ac-bd";this._oContainer._oContent._oBody=this._oContainer._oContent.appendChild(D);var A=document.createElement("div");A.className="yui-ac-ft";A.style.display="none";this._oContainer._oContent._oFooter=this._oContainer._oContent.appendChild(A)}else{}};YAHOO.widget.AutoComplete.prototype._initList=function(){this._aListItems=[];while(this._oContainer._oContent._oBody.hasChildNodes()){var C=this.getListItems();if(C){for(var A=C.length-1;A>=0;A--){C[A]=null}}this._oContainer._oContent._oBody.innerHTML=""}var F=document.createElement("ul");F=this._oContainer._oContent._oBody.appendChild(F);for(var D=0;D<this.maxResultsDisplayed;D++){var E=document.createElement("li");E=F.appendChild(E);this._aListItems[D]=E;this._initListItem(E,D)}this._maxResultsDisplayed=this.maxResultsDisplayed};YAHOO.widget.AutoComplete.prototype._initListItem=function(D,C){var A=this;D.style.display="none";D._nItemIndex=C;D.mouseover=D.mouseout=D.onclick=null;YAHOO.util.Event.addListener(D,"mouseover",A._onItemMouseover,A);YAHOO.util.Event.addListener(D,"mouseout",A._onItemMouseout,A);YAHOO.util.Event.addListener(D,"click",A._onItemMouseclick,A)};YAHOO.widget.AutoComplete.prototype._onIMEDetected=function(A){A._enableIntervalDetection()};YAHOO.widget.AutoComplete.prototype._enableIntervalDetection=function(){var A=this._oTextbox.value;var C=this._sLastTextboxValue;if(A!=C){this._sLastTextboxValue=A;this._sendQuery(A)}};YAHOO.widget.AutoComplete.prototype._cancelIntervalDetection=function(A){if(A._queryInterval){clearInterval(A._queryInterval)}};YAHOO.widget.AutoComplete.prototype._isIgnoreKey=function(A){if((A==9)||(A==13)||(A==16)||(A==17)||(A>=18&&A<=20)||(A==27)||(A>=33&&A<=35)||(A>=36&&A<=40)||(A>=44&&A<=45)){return true}return false};YAHOO.widget.AutoComplete.prototype._sendQuery=function(I){if(this.minQueryLength==-1){this._toggleContainer(false);return }var D=(this.delimChar)?this.delimChar:null;if(D){var F=-1;for(var C=D.length-1;C>=0;C--){var H=I.lastIndexOf(D[C]);if(H>F){F=H}}if(D[C]==" "){for(var A=D.length-1;A>=0;A--){if(I[F-1]==D[A]){F--;break}}}if(F>-1){var E=F+1;while(I.charAt(E)==" "){E+=1}this._sSavedQuery=I.substring(0,E);I=I.substr(E)}else{if(I.indexOf(this._sSavedQuery)<0){this._sSavedQuery=null}}}if((I&&(I.length<this.minQueryLength))||(!I&&this.minQueryLength>0)){if(this._nDelayID!=-1){clearTimeout(this._nDelayID)}this._toggleContainer(false);return }I=encodeURIComponent(I);this._nDelayID=-1;I=this.doBeforeSendQuery(I);this.dataRequestEvent.fire(this,I);this.dataSource.getResults(this._populateList,I,this)};YAHOO.widget.AutoComplete.prototype._populateList=function(O,P,M){if(P===null){M.dataErrorEvent.fire(M,O)}if(!M._bFocused||!P){return }var A=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1);var T=M._oContainer._oContent.style;T.width=(!A)?null:"";T.height=(!A)?null:"";var K=decodeURIComponent(O);M._sCurQuery=K;M._bItemSelected=false;if(M._maxResultsDisplayed!=M.maxResultsDisplayed){M._initList()}var D=Math.min(P.length,M.maxResultsDisplayed);M._nDisplayedItems=D;if(D>0){M._initContainerHelpers();var E=M._aListItems;for(var I=D-1;I>=0;I--){var S=E[I];var C=P[I];S.innerHTML=M.formatResult(C,K);S.style.display="list-item";S._sResultKey=C[0];S._oResultData=C}for(var H=E.length-1;H>=D;H--){var Q=E[H];Q.innerHTML=null;Q.style.display="none";Q._sResultKey=null;Q._oResultData=null}var N=M.doBeforeExpandContainer(M._oTextbox,M._oContainer,O,P);M._toggleContainer(N);if(M.autoHighlight){var F=E[0];M._toggleHighlight(F,"to");M.itemArrowToEvent.fire(M,F);M._typeAhead(F,O)}else{M._oCurItem=null}}else{M._toggleContainer(false)}M.dataReturnEvent.fire(M,O,P)};YAHOO.widget.AutoComplete.prototype._clearSelection=function(){var D=this._oTextbox.value;var C=(this.delimChar)?this.delimChar[0]:null;var A=(C)?D.lastIndexOf(C,D.length-2):-1;if(A>-1){this._oTextbox.value=D.substring(0,A)}else{this._oTextbox.value=""}this._sSavedQuery=this._oTextbox.value;this.selectionEnforceEvent.fire(this)};YAHOO.widget.AutoComplete.prototype._textMatchesOption=function(){var E=null;for(var A=this._nDisplayedItems-1;A>=0;A--){var D=this._aListItems[A];var C=D._sResultKey.toLowerCase();if(C==this._sCurQuery.toLowerCase()){E=D;break}}return(E)};YAHOO.widget.AutoComplete.prototype._typeAhead=function(F,I){if(!this.typeAhead||(this._nKeyCode==8)){return }var C=this._oTextbox;var H=this._oTextbox.value;if(!C.setSelectionRange&&!C.createTextRange){return }var D=H.length;this._updateValue(F);var E=C.value.length;this._selectText(C,D,E);var A=C.value.substr(D,E);this.typeAheadEvent.fire(this,I,A)};YAHOO.widget.AutoComplete.prototype._selectText=function(A,C,D){if(A.setSelectionRange){A.setSelectionRange(C,D)}else{if(A.createTextRange){var E=A.createTextRange();E.moveStart("character",C);E.moveEnd("character",D-A.value.length);E.select()}else{A.select()}}};YAHOO.widget.AutoComplete.prototype._toggleContainerHelpers=function(C){var E=false;var D=this._oContainer._oContent.offsetWidth+"px";var A=this._oContainer._oContent.offsetHeight+"px";if(this.useIFrame&&this._oContainer._oIFrame){E=true;if(C){this._oContainer._oIFrame.style.width=D;this._oContainer._oIFrame.style.height=A}else{this._oContainer._oIFrame.style.width=0;this._oContainer._oIFrame.style.height=0}}if(this.useShadow&&this._oContainer._oShadow){E=true;if(C){this._oContainer._oShadow.style.width=D;this._oContainer._oShadow.style.height=A}else{this._oContainer._oShadow.style.width=0;this._oContainer._oShadow.style.height=0}}};YAHOO.widget.AutoComplete.prototype._toggleContainer=function(N){var P=this._oContainer;if(this.alwaysShowContainer&&this._bContainerOpen){return }if(!N){this._oContainer._oContent.scrollTop=0;var D=this._aListItems;if(D&&(D.length>0)){for(var I=D.length-1;I>=0;I--){D[I].style.display="none"}}if(this._oCurItem){this._toggleHighlight(this._oCurItem,"from")}this._oCurItem=null;this._nDisplayedItems=0;this._sCurQuery=null}if(!N&&!this._bContainerOpen){P._oContent.style.display="none";return }var C=this._oAnim;if(C&&C.getEl()&&(this.animHoriz||this.animVert)){if(!N){this._toggleContainerHelpers(N)}if(C.isAnimated()){C.stop()}var K=P._oContent.cloneNode(true);P.appendChild(K);K.style.top="-9000px";K.style.display="block";var H=K.offsetWidth;var E=K.offsetHeight;var A=(this.animHoriz)?0:H;var F=(this.animVert)?0:E;C.attributes=(N)?{width:{to:H},height:{to:E}}:{width:{to:A},height:{to:F}};if(N&&!this._bContainerOpen){P._oContent.style.width=A+"px";P._oContent.style.height=F+"px"}else{P._oContent.style.width=H+"px";P._oContent.style.height=E+"px"}P.removeChild(K);K=null;var M=this;var O=function(){C.onComplete.unsubscribeAll();if(N){M.containerExpandEvent.fire(M)}else{P._oContent.style.display="none";M.containerCollapseEvent.fire(M)}M._toggleContainerHelpers(N)};P._oContent.style.display="block";C.onComplete.subscribe(O);C.animate();this._bContainerOpen=N}else{if(N){P._oContent.style.display="block";this.containerExpandEvent.fire(this)}else{P._oContent.style.display="none";this.containerCollapseEvent.fire(this)}this._toggleContainerHelpers(N);this._bContainerOpen=N}};YAHOO.widget.AutoComplete.prototype._toggleHighlight=function(A,D){var C=this.highlightClassName;if(this._oCurItem){YAHOO.util.Dom.removeClass(this._oCurItem,C)}if((D=="to")&&C){YAHOO.util.Dom.addClass(A,C);this._oCurItem=A}};YAHOO.widget.AutoComplete.prototype._togglePrehighlight=function(A,D){if(A==this._oCurItem){return }var C=this.prehighlightClassName;if((D=="mouseover")&&C){YAHOO.util.Dom.addClass(A,C)}else{YAHOO.util.Dom.removeClass(A,C)}};YAHOO.widget.AutoComplete.prototype._updateValue=function(H){var D=this._oTextbox;var F=(this.delimChar)?(this.delimChar[0]||this.delimChar):null;var C=this._sSavedQuery;var E=H._sResultKey;D.focus();D.value="";if(F){if(C){D.value=C}D.value+=E+F;if(F!=" "){D.value+=" "}}else{D.value=E}if(D.type=="textarea"){D.scrollTop=D.scrollHeight}var A=D.value.length;this._selectText(D,A,A);this._oCurItem=H};YAHOO.widget.AutoComplete.prototype._selectItem=function(A){this._bItemSelected=true;this._updateValue(A);this._cancelIntervalDetection(this);this.itemSelectEvent.fire(this,A,A._oResultData);this._toggleContainer(false)};YAHOO.widget.AutoComplete.prototype._jumpSelection=function(){if(this._oCurItem){this._selectItem(this._oCurItem)}else{this._toggleContainer(false)}};YAHOO.widget.AutoComplete.prototype._moveSelection=function(I){if(this._bContainerOpen){var E=this._oCurItem;var H=-1;if(E){H=E._nItemIndex}var D=(I==40)?(H+1):(H-1);if(D<-2||D>=this._nDisplayedItems){return }if(E){this._toggleHighlight(E,"from");this.itemArrowFromEvent.fire(this,E)}if(D==-1){if(this.delimChar&&this._sSavedQuery){if(!this._textMatchesOption()){this._oTextbox.value=this._sSavedQuery}else{this._oTextbox.value=this._sSavedQuery+this._sCurQuery}}else{this._oTextbox.value=this._sCurQuery}this._oCurItem=null;return }if(D==-2){this._toggleContainer(false);return }var C=this._aListItems[D];var F=this._oContainer._oContent;var A=((YAHOO.util.Dom.getStyle(F,"overflow")=="auto")||(YAHOO.util.Dom.getStyle(F,"overflowY")=="auto"));if(A&&(D>-1)&&(D<this._nDisplayedItems)){if(I==40){if((C.offsetTop+C.offsetHeight)>(F.scrollTop+F.offsetHeight)){F.scrollTop=(C.offsetTop+C.offsetHeight)-F.offsetHeight}else{if((C.offsetTop+C.offsetHeight)<F.scrollTop){F.scrollTop=C.offsetTop}}}else{if(C.offsetTop<F.scrollTop){this._oContainer._oContent.scrollTop=C.offsetTop}else{if(C.offsetTop>(F.scrollTop+F.offsetHeight)){this._oContainer._oContent.scrollTop=(C.offsetTop+C.offsetHeight)-F.offsetHeight}}}}this._toggleHighlight(C,"to");this.itemArrowToEvent.fire(this,C);if(this.typeAhead){this._updateValue(C)}}};YAHOO.widget.AutoComplete.prototype._onItemMouseover=function(A,C){if(C.prehighlightClassName){C._togglePrehighlight(this,"mouseover")}else{C._toggleHighlight(this,"to")}C.itemMouseOverEvent.fire(C,this)};YAHOO.widget.AutoComplete.prototype._onItemMouseout=function(A,C){if(C.prehighlightClassName){C._togglePrehighlight(this,"mouseout")}else{C._toggleHighlight(this,"from")}C.itemMouseOutEvent.fire(C,this)};YAHOO.widget.AutoComplete.prototype._onItemMouseclick=function(A,C){C._toggleHighlight(this,"to");C._selectItem(this)};YAHOO.widget.AutoComplete.prototype._onContainerMouseover=function(A,C){C._bOverContainer=true};YAHOO.widget.AutoComplete.prototype._onContainerMouseout=function(A,C){C._bOverContainer=false;if(C._oCurItem){C._toggleHighlight(C._oCurItem,"to")}};YAHOO.widget.AutoComplete.prototype._onContainerScroll=function(A,C){C._oTextbox.focus()};YAHOO.widget.AutoComplete.prototype._onContainerResize=function(A,C){C._toggleContainerHelpers(C._bContainerOpen)};YAHOO.widget.AutoComplete.prototype._onTextboxKeyDown=function(A,D){var E=A.keyCode;switch(E){case 9:if(D._oCurItem){if(D.delimChar&&(D._nKeyCode!=E)){if(D._bContainerOpen){YAHOO.util.Event.stopEvent(A)}}D._selectItem(D._oCurItem)}else{D._toggleContainer(false)}break;case 13:var C=(navigator.userAgent.toLowerCase().indexOf("mac")!=-1);if(!C){if(D._oCurItem){if(D._nKeyCode!=E){if(D._bContainerOpen){YAHOO.util.Event.stopEvent(A)}}D._selectItem(D._oCurItem)}else{D._toggleContainer(false)}}break;case 27:D._toggleContainer(false);return ;case 39:D._jumpSelection();break;case 38:YAHOO.util.Event.stopEvent(A);D._moveSelection(E);break;case 40:YAHOO.util.Event.stopEvent(A);D._moveSelection(E);break;default:break}};YAHOO.widget.AutoComplete.prototype._onTextboxKeyPress=function(A,D){var E=A.keyCode;var C=(navigator.userAgent.toLowerCase().indexOf("mac")!=-1);if(C){switch(E){case 9:if(D._oCurItem){if(D.delimChar&&(D._nKeyCode!=E)){YAHOO.util.Event.stopEvent(A)}}break;case 13:if(D._oCurItem){if(D._nKeyCode!=E){if(D._bContainerOpen){YAHOO.util.Event.stopEvent(A)}}D._selectItem(D._oCurItem)}else{D._toggleContainer(false)}break;case 38:case 40:YAHOO.util.Event.stopEvent(A);break;default:break}}else{if(E==229){D._queryInterval=setInterval(function(){D._onIMEDetected(D)},500)}}};YAHOO.widget.AutoComplete.prototype._onTextboxKeyUp=function(C,E){E._initProps();var F=C.keyCode;E._nKeyCode=F;var D=this.value;if(E._isIgnoreKey(F)||(D.toLowerCase()==E._sCurQuery)){return }else{E._bItemSelected=false;YAHOO.util.Dom.removeClass(E._oCurItem,E.highlightClassName);E._oCurItem=null;E.textboxKeyEvent.fire(E,F)}if(E.queryDelay>0){var A=setTimeout(function(){E._sendQuery(D)},(E.queryDelay*1000));if(E._nDelayID!=-1){clearTimeout(E._nDelayID)}E._nDelayID=A}else{E._sendQuery(D)}};YAHOO.widget.AutoComplete.prototype._onTextboxFocus=function(A,C){C._oTextbox.setAttribute("autocomplete","off");C._bFocused=true;if(!C._bItemSelected){C.textboxFocusEvent.fire(C)}};YAHOO.widget.AutoComplete.prototype._onTextboxBlur=function(A,C){if(!C._bOverContainer||(C._nKeyCode==9)){if(!C._bItemSelected){var D=C._textMatchesOption();if(!C._bContainerOpen||(C._bContainerOpen&&(D===null))){if(C.forceSelection){C._clearSelection()}else{C.unmatchedItemSelectEvent.fire(C)}}else{if(C.forceSelection){C._selectItem(D)}}}if(C._bContainerOpen){C._toggleContainer(false)}C._cancelIntervalDetection(C);C._bFocused=false;C.textboxBlurEvent.fire(C)}};YAHOO.widget.AutoComplete.prototype._onWindowUnload=function(A,C){if(C&&C._oTextbox&&C.allowBrowserAutocomplete){C._oTextbox.setAttribute("autocomplete","on")}};YAHOO.widget.DataSource=function(){};YAHOO.widget.DataSource.ERROR_DATANULL="Response data was null";YAHOO.widget.DataSource.ERROR_DATAPARSE="Response data could not be parsed";YAHOO.widget.DataSource.prototype.maxCacheEntries=15;YAHOO.widget.DataSource.prototype.queryMatchContains=false;YAHOO.widget.DataSource.prototype.queryMatchSubset=false;YAHOO.widget.DataSource.prototype.queryMatchCase=false;YAHOO.widget.DataSource.prototype.toString=function(){return"DataSource "+this._sName};YAHOO.widget.DataSource.prototype.getResults=function(A,E,C){var D=this._doQueryCache(A,E,C);if(D.length===0){this.queryEvent.fire(this,C,E);this.doQuery(A,E,C)}};YAHOO.widget.DataSource.prototype.doQuery=function(A,D,C){};YAHOO.widget.DataSource.prototype.flushCache=function(){if(this._aCache){this._aCache=[]}if(this._aCacheHelper){this._aCacheHelper=[]}this.cacheFlushEvent.fire(this)};YAHOO.widget.DataSource.prototype.queryEvent=null;YAHOO.widget.DataSource.prototype.cacheQueryEvent=null;YAHOO.widget.DataSource.prototype.getResultsEvent=null;YAHOO.widget.DataSource.prototype.getCachedResultsEvent=null;YAHOO.widget.DataSource.prototype.dataErrorEvent=null;YAHOO.widget.DataSource.prototype.cacheFlushEvent=null;YAHOO.widget.DataSource._nIndex=0;YAHOO.widget.DataSource.prototype._sName=null;YAHOO.widget.DataSource.prototype._aCache=null;YAHOO.widget.DataSource.prototype._init=function(){var A=this.maxCacheEntries;if(!YAHOO.lang.isNumber(A)||(A<0)){A=0}if(A>0&&!this._aCache){this._aCache=[]}this._sName="instance"+YAHOO.widget.DataSource._nIndex;YAHOO.widget.DataSource._nIndex++;this.queryEvent=new YAHOO.util.CustomEvent("query",this);this.cacheQueryEvent=new YAHOO.util.CustomEvent("cacheQuery",this);this.getResultsEvent=new YAHOO.util.CustomEvent("getResults",this);this.getCachedResultsEvent=new YAHOO.util.CustomEvent("getCachedResults",this);this.dataErrorEvent=new YAHOO.util.CustomEvent("dataError",this);this.cacheFlushEvent=new YAHOO.util.CustomEvent("cacheFlush",this)};YAHOO.widget.DataSource.prototype._addCacheElem=function(C){var A=this._aCache;if(!A||!C||!C.query||!C.results){return }if(A.length>=this.maxCacheEntries){A.shift()}A.push(C)};YAHOO.widget.DataSource.prototype._doQueryCache=function(A,M,S){var K=[];var I=false;var N=this._aCache;var H=(N)?N.length:0;var O=this.queryMatchContains;var E;if((this.maxCacheEntries>0)&&N&&(H>0)){this.cacheQueryEvent.fire(this,S,M);if(!this.queryMatchCase){E=M;M=M.toLowerCase()}for(var U=H-1;U>=0;U--){var F=N[U];var C=F.results;var D=(!this.queryMatchCase)?encodeURIComponent(F.query).toLowerCase():encodeURIComponent(F.query);if(D==M){I=true;K=C;if(U!=H-1){N.splice(U,1);this._addCacheElem(F)}break}else{if(this.queryMatchSubset){for(var T=M.length-1;T>=0;T--){var W=M.substr(0,T);if(D==W){I=true;for(var Q=C.length-1;Q>=0;Q--){var V=C[Q];var P=(this.queryMatchCase)?encodeURIComponent(V[0]).indexOf(M):encodeURIComponent(V[0]).toLowerCase().indexOf(M);if((!O&&(P===0))||(O&&(P>-1))){K.unshift(V)}}F={};F.query=M;F.results=K;this._addCacheElem(F);break}}if(I){break}}}}if(I){this.getCachedResultsEvent.fire(this,S,E,K);A(E,K,S)}}return K};YAHOO.widget.DS_XHR=function(D,A,E){if(E&&(E.constructor==Object)){for(var C in E){this[C]=E[C]}}if(!YAHOO.lang.isArray(A)||!YAHOO.lang.isString(D)){return }this.schema=A;this.scriptURI=D;this._init()};YAHOO.widget.DS_XHR.prototype=new YAHOO.widget.DataSource();YAHOO.widget.DS_XHR.TYPE_JSON=0;YAHOO.widget.DS_XHR.TYPE_XML=1;YAHOO.widget.DS_XHR.TYPE_FLAT=2;YAHOO.widget.DS_XHR.ERROR_DATAXHR="XHR response failed";YAHOO.widget.DS_XHR.prototype.connMgr=YAHOO.util.Connect;YAHOO.widget.DS_XHR.prototype.connTimeout=0;YAHOO.widget.DS_XHR.prototype.scriptURI=null;YAHOO.widget.DS_XHR.prototype.scriptQueryParam="query";YAHOO.widget.DS_XHR.prototype.scriptQueryAppend="";YAHOO.widget.DS_XHR.prototype.responseType=YAHOO.widget.DS_XHR.TYPE_JSON;YAHOO.widget.DS_XHR.prototype.responseStripAfter="\n<!-";YAHOO.widget.DS_XHR.prototype.doQuery=function(F,I,C){var N=(this.responseType==YAHOO.widget.DS_XHR.TYPE_XML);var E=this.scriptURI+"?"+this.scriptQueryParam+"="+I;if(this.scriptQueryAppend.length>0){E+="&"+this.scriptQueryAppend}var D=null;var H=this;var M=function(O){if(!H._oConn||(O.tId!=H._oConn.tId)){H.dataErrorEvent.fire(H,C,I,YAHOO.widget.DataSource.ERROR_DATANULL);return }for(var S in O){}if(!N){O=O.responseText}else{O=O.responseXML}if(O===null){H.dataErrorEvent.fire(H,C,I,YAHOO.widget.DataSource.ERROR_DATANULL);return }var Q=H.parseResponse(I,O,C);var P={};P.query=decodeURIComponent(I);P.results=Q;if(Q===null){H.dataErrorEvent.fire(H,C,I,YAHOO.widget.DataSource.ERROR_DATAPARSE);Q=[]}else{H.getResultsEvent.fire(H,C,I,Q);H._addCacheElem(P)}F(I,Q,C)};var A=function(O){H.dataErrorEvent.fire(H,C,I,YAHOO.widget.DS_XHR.ERROR_DATAXHR);return };var K={success:M,failure:A};if(YAHOO.lang.isNumber(this.connTimeout)&&(this.connTimeout>0)){K.timeout=this.connTimeout}if(this._oConn){this.connMgr.abort(this._oConn)}H._oConn=this.connMgr.asyncRequest("GET",E,K,null)};YAHOO.widget.DS_XHR.prototype.parseResponse=function(sQuery,oResponse,oParent){var aSchema=this.schema;var aResults=[];var bError=false;var nEnd=((this.responseStripAfter!=="")&&(oResponse.indexOf))?oResponse.indexOf(this.responseStripAfter):-1;if(nEnd!=-1){oResponse=oResponse.substring(0,nEnd)}switch(this.responseType){case YAHOO.widget.DS_XHR.TYPE_JSON:var jsonList,jsonObjParsed;var isNotMac=(navigator.userAgent.toLowerCase().indexOf("khtml")==-1);if(oResponse.parseJSON&&isNotMac){jsonObjParsed=oResponse.parseJSON();if(!jsonObjParsed){bError=true}else{try{jsonList=eval("jsonObjParsed."+aSchema[0])}catch(e){bError=true;break}}}else{if(YAHOO.lang.JSON&&isNotMac){jsonObjParsed=YAHOO.lang.JSON.parse(oResponse);if(!jsonObjParsed){bError=true;break}else{try{jsonList=eval("jsonObjParsed."+aSchema[0])}catch(e){bError=true;break}}}else{if(window.JSON&&isNotMac){jsonObjParsed=JSON.parse(oResponse);if(!jsonObjParsed){bError=true;break}else{try{jsonList=eval("jsonObjParsed."+aSchema[0])}catch(e){bError=true;break}}}else{try{while(oResponse.substring(0,1)==" "){oResponse=oResponse.substring(1,oResponse.length)}if(oResponse.indexOf("{")<0){bError=true;break}if(oResponse.indexOf("{}")===0){break}var jsonObjRaw=eval("("+oResponse+")");if(!jsonObjRaw){bError=true;break}jsonList=eval("(jsonObjRaw."+aSchema[0]+")")}catch(e){bError=true;break}}}}if(!jsonList){bError=true;break}if(!YAHOO.lang.isArray(jsonList)){jsonList=[jsonList]}for(var i=jsonList.length-1;i>=0;i--){var aResultItem=[];var jsonResult=jsonList[i];for(var j=aSchema.length-1;j>=1;j--){var dataFieldValue=jsonResult[aSchema[j]];if(!dataFieldValue){dataFieldValue=""}aResultItem.unshift(dataFieldValue)}if(aResultItem.length==1){aResultItem.push(jsonResult)}aResults.unshift(aResultItem)}break;case YAHOO.widget.DS_XHR.TYPE_XML:var xmlList=oResponse.getElementsByTagName(aSchema[0]);if(!xmlList){bError=true;break}for(var k=xmlList.length-1;k>=0;k--){var result=xmlList.item(k);var aFieldSet=[];for(var m=aSchema.length-1;m>=1;m--){var sValue=null;var xmlAttr=result.attributes.getNamedItem(aSchema[m]);if(xmlAttr){sValue=xmlAttr.value}else{var xmlNode=result.getElementsByTagName(aSchema[m]);if(xmlNode&&xmlNode.item(0)&&xmlNode.item(0).firstChild){sValue=xmlNode.item(0).firstChild.nodeValue}else{sValue=""}}aFieldSet.unshift(sValue)}aResults.unshift(aFieldSet)}break;case YAHOO.widget.DS_XHR.TYPE_FLAT:if(oResponse.length>0){var newLength=oResponse.length-aSchema[0].length;if(oResponse.substr(newLength)==aSchema[0]){oResponse=oResponse.substr(0,newLength)}var aRecords=oResponse.split(aSchema[0]);for(var n=aRecords.length-1;n>=0;n--){aResults[n]=aRecords[n].split(aSchema[1])}}break;default:break}sQuery=null;oResponse=null;oParent=null;if(bError){return null}else{return aResults}};YAHOO.widget.DS_XHR.prototype._oConn=null;YAHOO.widget.DS_ScriptNode=function(E,A,D){if(D&&(D.constructor==Object)){for(var C in D){this[C]=D[C]}}if(!YAHOO.lang.isArray(A)||!YAHOO.lang.isString(E)){return }this.schema=A;this.scriptURI=E;this._init()};YAHOO.widget.DS_ScriptNode.prototype=new YAHOO.widget.DataSource();YAHOO.widget.DS_ScriptNode.prototype.getUtility=YAHOO.util.Get;YAHOO.widget.DS_ScriptNode.prototype.scriptURI=null;YAHOO.widget.DS_ScriptNode.prototype.scriptQueryParam="query";YAHOO.widget.DS_ScriptNode.prototype.asyncMode="allowAll";YAHOO.widget.DS_ScriptNode.prototype.scriptCallbackParam="callback";YAHOO.widget.DS_ScriptNode.callbacks=[];YAHOO.widget.DS_ScriptNode._nId=0;YAHOO.widget.DS_ScriptNode._nPending=0;YAHOO.widget.DS_ScriptNode.prototype.doQuery=function(A,H,D){var C=this;if(YAHOO.widget.DS_ScriptNode._nPending===0){YAHOO.widget.DS_ScriptNode.callbacks=[];YAHOO.widget.DS_ScriptNode._nId=0}var F=YAHOO.widget.DS_ScriptNode._nId;YAHOO.widget.DS_ScriptNode._nId++;YAHOO.widget.DS_ScriptNode.callbacks[F]=function(I){if((C.asyncMode!=="ignoreStaleResponses")||(F===YAHOO.widget.DS_ScriptNode.callbacks.length-1)){C.handleResponse(I,A,H,D)}else{}delete YAHOO.widget.DS_ScriptNode.callbacks[F]};YAHOO.widget.DS_ScriptNode._nPending++;var E=this.scriptURI+"&"+this.scriptQueryParam+"="+H+"&"+this.scriptCallbackParam+"=YAHOO.widget.DS_ScriptNode.callbacks["+F+"]";this.getUtility.script(E,{autopurge:true,onsuccess:YAHOO.widget.DS_ScriptNode._bumpPendingDown,onfail:YAHOO.widget.DS_ScriptNode._bumpPendingDown})};YAHOO.widget.DS_ScriptNode.prototype.handleResponse=function(oResponse,oCallbackFn,sQuery,oParent){var aSchema=this.schema;var aResults=[];var bError=false;var jsonList,jsonObjParsed;try{jsonList=eval("(oResponse."+aSchema[0]+")")}catch(e){bError=true}if(!jsonList){bError=true;jsonList=[]}else{if(!YAHOO.lang.isArray(jsonList)){jsonList=[jsonList]}}for(var i=jsonList.length-1;i>=0;i--){var aResultItem=[];var jsonResult=jsonList[i];for(var j=aSchema.length-1;j>=1;j--){var dataFieldValue=jsonResult[aSchema[j]];if(!dataFieldValue){dataFieldValue=""}aResultItem.unshift(dataFieldValue)}if(aResultItem.length==1){aResultItem.push(jsonResult)}aResults.unshift(aResultItem)}if(bError){aResults=null}if(aResults===null){this.dataErrorEvent.fire(this,oParent,sQuery,YAHOO.widget.DataSource.ERROR_DATAPARSE);aResults=[]}else{var resultObj={};resultObj.query=decodeURIComponent(sQuery);resultObj.results=aResults;this._addCacheElem(resultObj);this.getResultsEvent.fire(this,oParent,sQuery,aResults)}oCallbackFn(sQuery,aResults,oParent)};YAHOO.widget.DS_ScriptNode._bumpPendingDown=function(){YAHOO.widget.DS_ScriptNode._nPending--};YAHOO.widget.DS_JSFunction=function(A,D){if(D&&(D.constructor==Object)){for(var C in D){this[C]=D[C]}}if(!YAHOO.lang.isFunction(A)){return }else{this.dataFunction=A;this._init()}};YAHOO.widget.DS_JSFunction.prototype=new YAHOO.widget.DataSource();YAHOO.widget.DS_JSFunction.prototype.dataFunction=null;YAHOO.widget.DS_JSFunction.prototype.doQuery=function(D,H,E){var C=this.dataFunction;var F=[];F=C(H);if(F===null){this.dataErrorEvent.fire(this,E,H,YAHOO.widget.DataSource.ERROR_DATANULL);return }var A={};A.query=decodeURIComponent(H);A.results=F;this._addCacheElem(A);this.getResultsEvent.fire(this,E,H,F);D(H,F,E);return };YAHOO.widget.DS_JSArray=function(A,D){if(D&&(D.constructor==Object)){for(var C in D){this[C]=D[C]}}if(!YAHOO.lang.isArray(A)){return }else{this.data=A;this._init()}};YAHOO.widget.DS_JSArray.prototype=new YAHOO.widget.DataSource();YAHOO.widget.DS_JSArray.prototype.data=null;YAHOO.widget.DS_JSArray.prototype.doQuery=function(F,M,A){var H;var D=this.data;var N=[];var E=false;var C=this.queryMatchContains;if(M){if(!this.queryMatchCase){M=M.toLowerCase()}for(H=D.length-1;H>=0;H--){var K=[];if(YAHOO.lang.isString(D[H])){K[0]=D[H]}else{if(YAHOO.lang.isArray(D[H])){K=D[H]}}if(YAHOO.lang.isString(K[0])){var I=(this.queryMatchCase)?encodeURIComponent(K[0]).indexOf(M):encodeURIComponent(K[0]).toLowerCase().indexOf(M);if((!C&&(I===0))||(C&&(I>-1))){N.unshift(K)}}}}else{for(H=D.length-1;H>=0;H--){if(YAHOO.lang.isString(D[H])){N.unshift([D[H]])}else{if(YAHOO.lang.isArray(D[H])){N.unshift(D[H])}}}}this.getResultsEvent.fire(this,A,M,N);F(M,N,A)};YAHOO.register("autocomplete",YAHOO.widget.AutoComplete,{version:"2.4.1",build:"742"});YAHOO.util.DataSource=function(I,F){if(F&&(F.constructor==Object)){for(var H in F){if(H){this[H]=F[H]}}}if(!I){return }if(I.nodeType&&I.nodeType==9){this.dataType=YAHOO.util.DataSource.TYPE_XML}else{if(YAHOO.lang.isArray(I)){this.dataType=YAHOO.util.DataSource.TYPE_JSARRAY}else{if(YAHOO.lang.isString(I)){this.dataType=YAHOO.util.DataSource.TYPE_XHR}else{if(YAHOO.lang.isFunction(I)){this.dataType=YAHOO.util.DataSource.TYPE_JSFUNCTION}else{if(I.nodeName&&(I.nodeName.toLowerCase()=="table")){this.dataType=YAHOO.util.DataSource.TYPE_HTMLTABLE}else{if(YAHOO.lang.isObject(I)){this.dataType=YAHOO.util.DataSource.TYPE_JSON}else{this.dataType=YAHOO.util.DataSource.TYPE_UNKNOWN}}}}}}this.liveData=I;this._oQueue={interval:null,conn:null,requests:[]};var E=this.maxCacheEntries;if(!YAHOO.lang.isNumber(E)||(E<0)){E=0}if(E>0&&!this._aCache){this._aCache=[]}this._aIntervals=[];this._sName="DataSource instance"+YAHOO.util.DataSource._nIndex;YAHOO.util.DataSource._nIndex++;this.createEvent("cacheRequestEvent");this.createEvent("cacheResponseEvent");this.createEvent("requestEvent");this.createEvent("responseEvent");this.createEvent("responseParseEvent");this.createEvent("responseCacheEvent");this.createEvent("dataErrorEvent");this.createEvent("cacheFlushEvent")};YAHOO.augment(YAHOO.util.DataSource,YAHOO.util.EventProvider);YAHOO.util.DataSource.TYPE_UNKNOWN=-1;YAHOO.util.DataSource.TYPE_JSARRAY=0;YAHOO.util.DataSource.TYPE_JSFUNCTION=1;YAHOO.util.DataSource.TYPE_XHR=2;YAHOO.util.DataSource.TYPE_JSON=3;YAHOO.util.DataSource.TYPE_XML=4;YAHOO.util.DataSource.TYPE_TEXT=5;YAHOO.util.DataSource.TYPE_HTMLTABLE=6;YAHOO.util.DataSource.ERROR_DATAINVALID="Invalid data";YAHOO.util.DataSource.ERROR_DATANULL="Null data";YAHOO.util.DataSource._nIndex=0;YAHOO.util.DataSource._nTransactionId=0;YAHOO.util.DataSource.prototype._sName=null;YAHOO.util.DataSource.prototype._aCache=null;YAHOO.util.DataSource.prototype._oQueue=null;YAHOO.util.DataSource.prototype._aIntervals=null;YAHOO.util.DataSource.prototype.maxCacheEntries=0;YAHOO.util.DataSource.prototype.liveData=null;YAHOO.util.DataSource.prototype.dataType=YAHOO.util.DataSource.TYPE_UNKNOWN;YAHOO.util.DataSource.prototype.responseType=YAHOO.util.DataSource.TYPE_UNKNOWN;YAHOO.util.DataSource.prototype.responseSchema=null;YAHOO.util.DataSource.prototype.connMgr=null;YAHOO.util.DataSource.prototype.connXhrMode="allowAll";YAHOO.util.DataSource.prototype.connMethodPost=false;YAHOO.util.DataSource.prototype.connTimeout=0;YAHOO.util.DataSource.parseString=function(D){if(!YAHOO.lang.isValue(D)){return null}var C=D+"";if(YAHOO.lang.isString(C)){return C}else{return null}};YAHOO.util.DataSource.parseNumber=function(D){var C=D*1;if(YAHOO.lang.isNumber(C)){return C}else{return null}};YAHOO.util.DataSource.convertNumber=function(C){return YAHOO.util.DataSource.parseNumber(C)};YAHOO.util.DataSource.parseDate=function(D){var C=null;if(!(D instanceof Date)){C=new Date(D)}else{return D}if(C instanceof Date){return C}else{return null}};YAHOO.util.DataSource.convertDate=function(C){return YAHOO.util.DataSource.parseDate(C)};YAHOO.util.DataSource.prototype.toString=function(){return this._sName};YAHOO.util.DataSource.prototype.getCachedResponse=function(K,S,M){var I=this._aCache;var P=(I)?I.length:0;var N=null;if((this.maxCacheEntries>0)&&I&&(P>0)){this.fireEvent("cacheRequestEvent",{request:K,callback:S,caller:M});for(var O=P-1;O>=0;O--){var Q=I[O];if(this.isCacheHit(K,Q.request)){N=Q.response;I.splice(O,1);this.addToCache(K,N);this.fireEvent("cacheResponseEvent",{request:K,response:N,callback:S,caller:M});break}}}return N};YAHOO.util.DataSource.prototype.isCacheHit=function(C,D){return(C===D)};YAHOO.util.DataSource.prototype.addToCache=function(F,H){var E=this._aCache;if(!E){return }while(E.length>=this.maxCacheEntries){E.shift()}var I={request:F,response:H};E.push(I);this.fireEvent("responseCacheEvent",{request:F,response:H})};YAHOO.util.DataSource.prototype.flushCache=function(){if(this._aCache){this._aCache=[];this.fireEvent("cacheFlushEvent")}};YAHOO.util.DataSource.prototype.setInterval=function(N,K,P,M){try{var O=this;var H=setInterval(function(){O.makeConnection(K,P,M)},N);this._aIntervals.push(H);return H}catch(I){}};YAHOO.util.DataSource.prototype.clearInterval=function(D){var E=this._aIntervals||[];for(var F=E.length-1;F>-1;F--){if(E[F]===D){E.splice(F,1);clearInterval(D)}}};YAHOO.util.DataSource.prototype.clearAllIntervals=function(D){var E=this._aIntervals||[];for(var F=E.length-1;F>-1;F--){E.splice(F,1);clearInterval(D)}};YAHOO.util.DataSource.prototype.sendRequest=function(F,E,H){var I=this.getCachedResponse(F,E,H);if(I){E.call(H,F,I);return null}return this.makeConnection(F,E,H)};YAHOO.util.DataSource.prototype.makeConnection=function(U,V,c){this.fireEvent("requestEvent",{request:U,callback:V,caller:c});var Q=null;var Z=YAHOO.util.DataSource._nTransactionId++;switch(this.dataType){case YAHOO.util.DataSource.TYPE_JSFUNCTION:Q=this.liveData(U);this.handleResponse(U,Q,V,c,Z);break;case YAHOO.util.DataSource.TYPE_XHR:var X=this;var S=this.connMgr||YAHOO.util.Connect;var h=this._oQueue;var d=function(A){if(A&&(this.connXhrMode=="ignoreStaleResponses")&&(A.tId!=h.conn.tId)){return null}else{if(!A){this.fireEvent("dataErrorEvent",{request:U,callback:V,caller:c,message:YAHOO.util.DataSource.ERROR_DATANULL});V.call(c,U,A,true);return null}else{this.handleResponse(U,A,V,c,Z)}}};var W=function(A){this.fireEvent("dataErrorEvent",{request:U,callback:V,caller:c,message:YAHOO.util.DataSource.ERROR_DATAINVALID});if((this.liveData.lastIndexOf("?")!==this.liveData.length-1)&&(U.indexOf("?")!==0)){}V.call(c,U,A,true);return null};var f={success:d,failure:W,scope:this};if(YAHOO.lang.isNumber(this.connTimeout)){f.timeout=this.connTimeout}if(this.connXhrMode=="cancelStaleRequests"){if(h.conn){if(S.abort){S.abort(h.conn);h.conn=null}else{}}}if(S&&S.asyncRequest){var T=this.liveData;var g=this.connMethodPost;var Y=(g)?"POST":"GET";var n=(g)?T:T+U;var l=(g)?U:null;if(this.connXhrMode!="queueRequests"){h.conn=S.asyncRequest(Y,n,f,l)}else{if(h.conn){h.requests.push({request:U,callback:f});if(!h.interval){h.interval=setInterval(function(){if(S.isCallInProgress(h.conn)){return }else{if(h.requests.length>0){n=(g)?T:T+h.requests[0].request;l=(g)?h.requests[0].request:null;h.conn=S.asyncRequest(Y,n,h.requests[0].callback,l);h.requests.shift()}else{clearInterval(h.interval);h.interval=null}}},50)}}else{h.conn=S.asyncRequest(Y,n,f,l)}}}else{V.call(c,U,null,true)}break;default:Q=this.liveData;this.handleResponse(U,Q,V,c,Z);break}return Z};YAHOO.util.DataSource.prototype.handleResponse=function(O,Q,S,P,K){this.fireEvent("responseEvent",{request:O,response:Q,callback:S,caller:P,tId:K});var M=(this.dataType==YAHOO.util.DataSource.TYPE_XHR)?true:false;var N=null;var I=false;Q=this.doBeforeParseData(O,Q);switch(this.responseType){case YAHOO.util.DataSource.TYPE_JSARRAY:if(M&&Q.responseText){Q=Q.responseText}N=this.parseArrayData(O,Q);break;case YAHOO.util.DataSource.TYPE_JSON:if(M&&Q.responseText){Q=Q.responseText}N=this.parseJSONData(O,Q);break;case YAHOO.util.DataSource.TYPE_HTMLTABLE:if(M&&Q.responseText){Q=Q.responseText}N=this.parseHTMLTableData(O,Q);break;case YAHOO.util.DataSource.TYPE_XML:if(M&&Q.responseXML){Q=Q.responseXML}N=this.parseXMLData(O,Q);break;case YAHOO.util.DataSource.TYPE_TEXT:if(M&&Q.responseText){Q=Q.responseText}N=this.parseTextData(O,Q);break;default:break}if(N){N.tId=K;N=this.doBeforeCallback(O,Q,N);this.fireEvent("responseParseEvent",{request:O,response:N,callback:S,caller:P});this.addToCache(O,N)}else{this.fireEvent("dataErrorEvent",{request:O,callback:S,caller:P,message:YAHOO.util.DataSource.ERROR_DATANULL});N={error:true}}S.call(P,O,N)};YAHOO.util.DataSource.prototype.doBeforeParseData=function(D,C){return C};YAHOO.util.DataSource.prototype.doBeforeCallback=function(F,D,E){return E};YAHOO.util.DataSource.prototype.parseArrayData=function(O,N){if(YAHOO.lang.isArray(N)&&YAHOO.lang.isArray(this.responseSchema.fields)){var P={results:[]};var T=this.responseSchema.fields;for(var V=N.length-1;V>-1;V--){var U={};for(var M=T.length-1;M>-1;M--){var S=T[M];var Q=(YAHOO.lang.isValue(S.key))?S.key:S;var K=(YAHOO.lang.isValue(N[V][M]))?N[V][M]:N[V][Q];if(!S.parser&&S.converter){S.parser=S.converter}if(S.parser){K=S.parser.call(this,K)}if(K===undefined){K=null}U[Q]=K}P.results.unshift(U)}return P}else{return null}};YAHOO.util.DataSource.prototype.parseTextData=function(V,U){var X={};if(YAHOO.lang.isString(U)&&YAHOO.lang.isArray(this.responseSchema.fields)&&YAHOO.lang.isString(this.responseSchema.recordDelim)&&YAHOO.lang.isString(this.responseSchema.fieldDelim)){X.results=[];var c=this.responseSchema.recordDelim;var n=this.responseSchema.fieldDelim;var g=this.responseSchema.fields;if(U.length>0){var T=U.length-c.length;if(U.substr(T)==c){U=U.substr(0,T)}var W=U.split(c);for(var o=W.length-1;o>-1;o--){var h={};var f=false;for(var S=g.length-1;S>-1;S--){try{var l=W[o].split(n);var p=l[S];if(p.charAt(0)=='"'){p=p.substr(1)}if(p.charAt(p.length-1)=='"'){p=p.substr(0,p.length-1)}var Z=g[S];var Y=(YAHOO.lang.isValue(Z.key))?Z.key:Z;if(!Z.parser&&Z.converter){Z.parser=Z.converter}if(Z.parser){p=Z.parser.call(this,p)}if(p===undefined){p=null}h[Y]=p}catch(d){f=true}}if(!f){X.results.unshift(h)}}}}else{X.error=true}return X};YAHOO.util.DataSource.prototype.parseXMLData=function(T,Q){var c=false;var V={};var P=null;try{P=(this.responseSchema.resultNode)?Q.getElementsByTagName(this.responseSchema.resultNode):null}catch(Z){}if(!P||!YAHOO.lang.isArray(this.responseSchema.fields)){c=true}else{V.results=[];for(var g=P.length-1;g>=0;g--){var U=P.item(g);var d={};for(var h=this.responseSchema.fields.length-1;h>=0;h--){var Y=this.responseSchema.fields[h];var W=(YAHOO.lang.isValue(Y.key))?Y.key:Y;var f=null;var S=U.attributes.getNamedItem(W);if(S){f=S.value}else{var X=U.getElementsByTagName(W);if(X&&X.item(0)&&X.item(0).firstChild){f=X.item(0).firstChild.nodeValue}else{f=""}}if(!Y.parser&&Y.converter){Y.parser=Y.converter}if(Y.parser){f=Y.parser.call(this,f)}if(f===undefined){f=null}d[W]=f}V.results.unshift(d)}}if(c){V.error=true}else{}return V};YAHOO.util.DataSource.prototype.parseJSONData=function(oRequest,oRawResponse){var oParsedResponse={};if(oRawResponse&&YAHOO.lang.isArray(this.responseSchema.fields)){var fields=this.responseSchema.fields;var bError=false;oParsedResponse.results=[];var jsonObj,jsonList;if(YAHOO.lang.isString(oRawResponse)){var isNotMac=(navigator.userAgent.toLowerCase().indexOf("khtml")==-1);if(oRawResponse.parseJSON&&isNotMac){jsonObj=oRawResponse.parseJSON();if(!jsonObj){bError=true}}else{if(YAHOO.lang.JSON&&isNotMac){jsonObj=YAHOO.lang.JSON.parse(oRawResponse);if(!jsonObj){bError=true}}else{if(window.JSON&&JSON.parse&&isNotMac){jsonObj=JSON.parse(oRawResponse);if(!jsonObj){bError=true}}else{try{while(oRawResponse.length>0&&(oRawResponse.charAt(0)!="{")&&(oRawResponse.charAt(0)!="[")){oRawResponse=oRawResponse.substring(1,oRawResponse.length)}if(oRawResponse.length>0){var objEnd=Math.max(oRawResponse.lastIndexOf("]"),oRawResponse.lastIndexOf("}"));oRawResponse=oRawResponse.substring(0,objEnd+1);jsonObj=eval("("+oRawResponse+")");if(!jsonObj){bError=true}}else{jsonObj=null;bError=true}}catch(e){bError=true}}}}}else{if(oRawResponse.constructor==Object){jsonObj=oRawResponse}else{bError=true}}if(jsonObj&&jsonObj.constructor==Object){try{jsonList=eval("jsonObj."+this.responseSchema.resultsList)}catch(e){bError=true}}if(bError||!jsonList){oParsedResponse.error=true}if(jsonList&&!YAHOO.lang.isArray(jsonList)){jsonList=[jsonList]}else{if(!jsonList){jsonList=[]}}for(var i=jsonList.length-1;i>=0;i--){var oResult={};var jsonResult=jsonList[i];for(var j=fields.length-1;j>=0;j--){var field=fields[j];var key=(YAHOO.lang.isValue(field.key))?field.key:field;var data=eval("jsonResult."+key);if(!field.parser&&field.converter){field.parser=field.converter}if(field.parser){data=field.parser.call(this,data)}if(data===undefined){data=null}oResult[key]=data}oParsedResponse.results.unshift(oResult)}}else{oParsedResponse.error=true}return oParsedResponse};YAHOO.util.DataSource.prototype.parseHTMLTableData=function(S,Q){var Y=false;var X=Q;var Z=this.responseSchema.fields;var U={};U.results=[];for(var d=0;d<X.tBodies.length;d++){var P=X.tBodies[d];for(var g=P.rows.length-1;g>-1;g--){var T=P.rows[g];var c={};for(var h=Z.length-1;h>-1;h--){var W=Z[h];var V=(YAHOO.lang.isValue(W.key))?W.key:W;var f=T.cells[h].innerHTML;if(!W.parser&&W.converter){W.parser=W.converter}if(W.parser){f=W.parser.call(this,f)}if(f===undefined){f=null}c[V]=f}U.results.unshift(c)}}if(Y){U.error=true}else{}return U};YAHOO.util.Number={format:function(O,X){X=X||{};if(!YAHOO.lang.isNumber(O)){O*=1}if(YAHOO.lang.isNumber(O)){var T=O+"";var W=(X.decimalSeparator)?X.decimalSeparator:".";var V;if(YAHOO.lang.isNumber(X.decimalPlaces)){var U=X.decimalPlaces;var N=Math.pow(10,U);T=Math.round(O*N)/N+"";V=T.lastIndexOf(".");if(U>0){if(V<0){T+=W;V=T.length-1}else{if(W!=="."){T=T.replace(".",W)}}while((T.length-1-V)<U){T+="0"}}}if(X.thousandsSeparator){var Q=X.thousandsSeparator;V=T.lastIndexOf(W);V=(V>-1)?V:T.length;var S=T.substring(V);var P=-1;for(var M=V;M>0;M--){P++;if((P%3===0)&&(M!==V)){S=Q+S}S=T.charAt(M-1)+S}T=S}T=(X.prefix)?X.prefix+T:T;T=(X.suffix)?T+X.suffix:T;return T}else{return O}}};YAHOO.util.Date={format:function(N,O){O=O||{};if(N instanceof Date){var M=O.format||"MM/DD/YYYY";var K=N.getMonth()+1;var H=N.getDate();var I=N.getFullYear();switch(M){case"YYYY/MM/DD":return I+"/"+K+"/"+H;case"DD/MM/YYYY":return H+"/"+K+"/"+I;default:return K+"/"+H+"/"+I}}else{return YAHOO.lang.isValue(N)?N:""}}};YAHOO.register("datasource",YAHOO.util.DataSource,{version:"2.4.1",build:"742"});(function(){var C=YAHOO.util.Dom,A=YAHOO.util.Event;YAHOO.widget.MenuManager=function(){var S=false,H={},V={},N={},F={click:"clickEvent",mousedown:"mouseDownEvent",mouseup:"mouseUpEvent",mouseover:"mouseOverEvent",mouseout:"mouseOutEvent",keydown:"keyDownEvent",keyup:"keyUpEvent",keypress:"keyPressEvent"},O=null;function E(X){var W;if(X&&X.tagName){switch(X.tagName.toUpperCase()){case"DIV":W=X.parentNode;if((C.hasClass(X,"hd")||C.hasClass(X,"bd")||C.hasClass(X,"ft"))&&W&&W.tagName&&W.tagName.toUpperCase()=="DIV"){return W}else{return X}break;case"LI":return X;default:W=X.parentNode;if(W){return E(W)}break}}}function I(c){var W=A.getTarget(c),X=E(W),f,Y,Z,h,g;if(X){Y=X.tagName.toUpperCase();if(Y=="LI"){Z=X.id;if(Z&&N[Z]){h=N[Z];g=h.parent}}else{if(Y=="DIV"){if(X.id){g=H[X.id]}}}}if(g){f=F[c.type];if(h&&!h.cfg.getProperty("disabled")){h[f].fire(c);if(c.type=="keyup"||c.type=="mousedown"){if(O!=h){if(O){O.blurEvent.fire()}h.focusEvent.fire()}}}g[f].fire(c,h)}else{if(c.type=="mousedown"){if(O){O.blurEvent.fire();O=null}for(var d in V){if(YAHOO.lang.hasOwnProperty(V,d)){g=V[d];if(g.cfg.getProperty("clicktohide")&&!(g instanceof YAHOO.widget.MenuBar)&&g.cfg.getProperty("position")=="dynamic"){g.hide()}else{g.clearActiveItem(true)}}}}else{if(c.type=="keyup"){if(O){O.blurEvent.fire();O=null}}}}}function U(X,W,Y){if(H[Y.id]){this.removeMenu(Y)}}function Q(X,W){var Y=W[0];if(Y){O=Y}}function K(X,W){O=null}function D(Y,X){var W=X[0],Z=this.id;if(W){V[Z]=this}else{if(V[Z]){delete V[Z]}}}function P(X,W){T(this)}function T(X){var W=X.id;if(W&&N[W]){if(O==X){O=null}delete N[W];X.destroyEvent.unsubscribe(P)}}function M(X,W){var Z=W[0],Y;if(Z instanceof YAHOO.widget.MenuItem){Y=Z.id;if(!N[Y]){N[Y]=Z;Z.destroyEvent.subscribe(P)}}}return{addMenu:function(X){var W;if(X instanceof YAHOO.widget.Menu&&X.id&&!H[X.id]){H[X.id]=X;if(!S){W=document;A.on(W,"mouseover",I,this,true);A.on(W,"mouseout",I,this,true);A.on(W,"mousedown",I,this,true);A.on(W,"mouseup",I,this,true);A.on(W,"click",I,this,true);A.on(W,"keydown",I,this,true);A.on(W,"keyup",I,this,true);A.on(W,"keypress",I,this,true);S=true}X.cfg.subscribeToConfigEvent("visible",D);X.destroyEvent.subscribe(U,X,this);X.itemAddedEvent.subscribe(M);X.focusEvent.subscribe(Q);X.blurEvent.subscribe(K)}},removeMenu:function(Z){var X,W,Y;if(Z){X=Z.id;if(H[X]==Z){W=Z.getItems();if(W&&W.length>0){Y=W.length-1;do{T(W[Y])}while(Y--)}delete H[X];if(V[X]==Z){delete V[X]}if(Z.cfg){Z.cfg.unsubscribeFromConfigEvent("visible",D)}Z.destroyEvent.unsubscribe(U,Z);Z.itemAddedEvent.unsubscribe(M);Z.focusEvent.unsubscribe(Q);Z.blurEvent.unsubscribe(K)}}},hideVisible:function(){var W;for(var X in V){if(YAHOO.lang.hasOwnProperty(V,X)){W=V[X];if(!(W instanceof YAHOO.widget.MenuBar)&&W.cfg.getProperty("position")=="dynamic"){W.hide()}}}},getVisible:function(){return V},getMenus:function(){return H},getMenu:function(X){var W=H[X];if(W){return W}},getMenuItem:function(W){var X=N[W];if(X){return X}},getMenuItemGroup:function(Z){var X=C.get(Z),W,d,c,Y;if(X&&X.tagName&&X.tagName.toUpperCase()=="UL"){d=X.firstChild;if(d){W=[];do{Y=d.id;if(Y){c=this.getMenuItem(Y);if(c){W[W.length]=c}}}while((d=d.nextSibling));if(W.length>0){return W}}}},getFocusedMenuItem:function(){return O},getFocusedMenu:function(){if(O){return(O.parent.getRoot())}},toString:function(){return"MenuManager"}}}()})();(function(){YAHOO.widget.Menu=function(T,S){if(S){this.parent=S.parent;this.lazyLoad=S.lazyLoad||S.lazyload;this.itemData=S.itemData||S.itemdata}YAHOO.widget.Menu.superclass.constructor.call(this,T,S)};function M(S){if(typeof S=="string"){return("dynamic,static".indexOf((S.toLowerCase()))!=-1)}}var D=YAHOO.util.Dom,Q=YAHOO.util.Event,E=YAHOO.widget.Module,C=YAHOO.widget.Overlay,H=YAHOO.widget.Menu,O=YAHOO.widget.MenuManager,P=YAHOO.util.CustomEvent,F=YAHOO.lang,K=YAHOO.env.ua,I,A={MOUSE_OVER:"mouseover",MOUSE_OUT:"mouseout",MOUSE_DOWN:"mousedown",MOUSE_UP:"mouseup",CLICK:"click",KEY_PRESS:"keypress",KEY_DOWN:"keydown",KEY_UP:"keyup",FOCUS:"focus",BLUR:"blur",ITEM_ADDED:"itemAdded",ITEM_REMOVED:"itemRemoved"},N={VISIBLE:{key:"visible",value:false,validator:F.isBoolean},CONSTRAIN_TO_VIEWPORT:{key:"constraintoviewport",value:true,validator:F.isBoolean,supercedes:["iframe","x","y","xy"]},POSITION:{key:"position",value:"dynamic",validator:M,supercedes:["visible","iframe"]},SUBMENU_ALIGNMENT:{key:"submenualignment",value:["tl","tr"],suppressEvent:true},AUTO_SUBMENU_DISPLAY:{key:"autosubmenudisplay",value:true,validator:F.isBoolean,suppressEvent:true},SHOW_DELAY:{key:"showdelay",value:250,validator:F.isNumber,suppressEvent:true},HIDE_DELAY:{key:"hidedelay",value:0,validator:F.isNumber,suppressEvent:true},SUBMENU_HIDE_DELAY:{key:"submenuhidedelay",value:250,validator:F.isNumber,suppressEvent:true},CLICK_TO_HIDE:{key:"clicktohide",value:true,validator:F.isBoolean,suppressEvent:true},CONTAINER:{key:"container",suppressEvent:true},SCROLL_INCREMENT:{key:"scrollincrement",value:1,validator:F.isNumber,supercedes:["maxheight"],suppressEvent:true},MIN_SCROLL_HEIGHT:{key:"minscrollheight",value:90,validator:F.isNumber,supercedes:["maxheight"],suppressEvent:true},MAX_HEIGHT:{key:"maxheight",value:0,validator:F.isNumber,supercedes:["iframe"],suppressEvent:true},CLASS_NAME:{key:"classname",value:null,validator:F.isString,suppressEvent:true},DISABLED:{key:"disabled",value:false,validator:F.isBoolean,suppressEvent:true}};YAHOO.lang.extend(H,C,{CSS_CLASS_NAME:"yuimenu",ITEM_TYPE:null,GROUP_TITLE_TAG_NAME:"h6",OFF_SCREEN_POSITION:[-10000,-10000],_nHideDelayId:null,_nShowDelayId:null,_nSubmenuHideDelayId:null,_nBodyScrollId:null,_bHideDelayEventHandlersAssigned:false,_bHandledMouseOverEvent:false,_bHandledMouseOutEvent:false,_aGroupTitleElements:null,_aItemGroups:null,_aListElements:null,_nCurrentMouseX:0,_bStopMouseEventHandlers:false,_sClassName:null,lazyLoad:false,itemData:null,activeItem:null,parent:null,srcElement:null,mouseOverEvent:null,mouseOutEvent:null,mouseDownEvent:null,mouseUpEvent:null,clickEvent:null,keyPressEvent:null,keyDownEvent:null,keyUpEvent:null,itemAddedEvent:null,itemRemovedEvent:null,init:function(U,T){this._aItemGroups=[];this._aListElements=[];this._aGroupTitleElements=[];if(!this.ITEM_TYPE){this.ITEM_TYPE=YAHOO.widget.MenuItem}var S;if(typeof U=="string"){S=document.getElementById(U)}else{if(U.tagName){S=U}}if(S&&S.tagName){switch(S.tagName.toUpperCase()){case"DIV":this.srcElement=S;if(!S.id){S.setAttribute("id",D.generateId())}H.superclass.init.call(this,S);this.beforeInitEvent.fire(H);break;case"SELECT":this.srcElement=S;H.superclass.init.call(this,D.generateId());this.beforeInitEvent.fire(H);break}}else{H.superclass.init.call(this,U);this.beforeInitEvent.fire(H)}if(this.element){D.addClass(this.element,this.CSS_CLASS_NAME);this.initEvent.subscribe(this._onInit);this.beforeRenderEvent.subscribe(this._onBeforeRender);this.renderEvent.subscribe(this._onRender);this.renderEvent.subscribe(this.onRender);this.beforeShowEvent.subscribe(this._onBeforeShow);this.hideEvent.subscribe(this.positionOffScreen);this.showEvent.subscribe(this._onShow);this.beforeHideEvent.subscribe(this._onBeforeHide);this.mouseOverEvent.subscribe(this._onMouseOver);this.mouseOutEvent.subscribe(this._onMouseOut);this.clickEvent.subscribe(this._onClick);this.keyDownEvent.subscribe(this._onKeyDown);this.keyPressEvent.subscribe(this._onKeyPress);if(K.gecko||K.webkit){this.cfg.subscribeToConfigEvent("y",this._onYChange)}if(T){this.cfg.applyConfig(T,true)}O.addMenu(this);this.initEvent.fire(H)}},_initSubTree:function(){var T=this.srcElement,S,V,Y,Z,X,W,U;if(T){S=(T.tagName&&T.tagName.toUpperCase());if(S=="DIV"){Z=this.body.firstChild;if(Z){V=0;Y=this.GROUP_TITLE_TAG_NAME.toUpperCase();do{if(Z&&Z.tagName){switch(Z.tagName.toUpperCase()){case Y:this._aGroupTitleElements[V]=Z;break;case"UL":this._aListElements[V]=Z;this._aItemGroups[V]=[];V++;break}}}while((Z=Z.nextSibling));if(this._aListElements[0]){D.addClass(this._aListElements[0],"first-of-type")}}}Z=null;if(S){switch(S){case"DIV":X=this._aListElements;W=X.length;if(W>0){U=W-1;do{Z=X[U].firstChild;if(Z){do{if(Z&&Z.tagName&&Z.tagName.toUpperCase()=="LI"){this.addItem(new this.ITEM_TYPE(Z,{parent:this}),U)}}while((Z=Z.nextSibling))}}while(U--)}break;case"SELECT":Z=T.firstChild;do{if(Z&&Z.tagName){switch(Z.tagName.toUpperCase()){case"OPTGROUP":case"OPTION":this.addItem(new this.ITEM_TYPE(Z,{parent:this}));break}}}while((Z=Z.nextSibling));break}}}},_getFirstEnabledItem:function(){var S=this.getItems(),V=S.length,U;for(var T=0;T<V;T++){U=S[T];if(U&&!U.cfg.getProperty("disabled")&&U.element.style.display!="none"){return U}}},_addItemToGroup:function(X,Y,d){var Z,f,V,c,W,T,U;function S(g,h){return(g[h]||S(g,(h+1)))}if(Y instanceof this.ITEM_TYPE){Z=Y;Z.parent=this}else{if(typeof Y=="string"){Z=new this.ITEM_TYPE(Y,{parent:this})}else{if(typeof Y=="object"){Y.parent=this;Z=new this.ITEM_TYPE(Y.text,Y)}}}if(Z){if(Z.cfg.getProperty("selected")){this.activeItem=Z}f=typeof X=="number"?X:0;V=this._getItemGroup(f);if(!V){V=this._createItemGroup(f)}if(typeof d=="number"){W=(d>=V.length);if(V[d]){V.splice(d,0,Z)}else{V[d]=Z}c=V[d];if(c){if(W&&(!c.element.parentNode||c.element.parentNode.nodeType==11)){this._aListElements[f].appendChild(c.element)}else{T=S(V,(d+1));if(T&&(!c.element.parentNode||c.element.parentNode.nodeType==11)){this._aListElements[f].insertBefore(c.element,T.element)}}c.parent=this;this._subscribeToItemEvents(c);this._configureSubmenu(c);this._updateItemProperties(f);this.itemAddedEvent.fire(c);this.changeContentEvent.fire();return c}}else{U=V.length;V[U]=Z;c=V[U];if(c){if(!D.isAncestor(this._aListElements[f],c.element)){this._aListElements[f].appendChild(c.element)}c.element.setAttribute("groupindex",f);c.element.setAttribute("index",U);c.parent=this;c.index=U;c.groupIndex=f;this._subscribeToItemEvents(c);this._configureSubmenu(c);if(U===0){D.addClass(c.element,"first-of-type")}this.itemAddedEvent.fire(c);this.changeContentEvent.fire();return c}}}},_removeItemFromGroupByIndex:function(V,T){var U=typeof V=="number"?V:0,W=this._getItemGroup(U),Y,X,S;if(W){Y=W.splice(T,1);X=Y[0];if(X){this._updateItemProperties(U);if(W.length===0){S=this._aListElements[U];if(this.body&&S){this.body.removeChild(S)}this._aItemGroups.splice(U,1);this._aListElements.splice(U,1);S=this._aListElements[0];if(S){D.addClass(S,"first-of-type")}}this.itemRemovedEvent.fire(X);this.changeContentEvent.fire();return X}}},_removeItemFromGroupByValue:function(U,S){var W=this._getItemGroup(U),X,V,T;if(W){X=W.length;V=-1;if(X>0){T=X-1;do{if(W[T]==S){V=T;break}}while(T--);if(V>-1){return(this._removeItemFromGroupByIndex(U,V))}}}},_updateItemProperties:function(T){var U=this._getItemGroup(T),X=U.length,W,V,S;if(X>0){S=X-1;do{W=U[S];if(W){V=W.element;W.index=S;W.groupIndex=T;V.setAttribute("groupindex",T);V.setAttribute("index",S);D.removeClass(V,"first-of-type")}}while(S--);if(V){D.addClass(V,"first-of-type")}}},_createItemGroup:function(T){var S;if(!this._aItemGroups[T]){this._aItemGroups[T]=[];S=document.createElement("ul");this._aListElements[T]=S;return this._aItemGroups[T]}},_getItemGroup:function(T){var S=((typeof T=="number")?T:0);return this._aItemGroups[S]},_configureSubmenu:function(S){var T=S.cfg.getProperty("submenu");if(T){this.cfg.configChangedEvent.subscribe(this._onParentMenuConfigChange,T,true);this.renderEvent.subscribe(this._onParentMenuRender,T,true);T.beforeShowEvent.subscribe(this._onSubmenuBeforeShow)}},_subscribeToItemEvents:function(S){S.focusEvent.subscribe(this._onMenuItemFocus);S.blurEvent.subscribe(this._onMenuItemBlur);S.destroyEvent.subscribe(this._onMenuItemDestroy,S,this);S.cfg.configChangedEvent.subscribe(this._onMenuItemConfigChange,S,this)},_onVisibleChange:function(U,T){var S=T[0];if(S){D.addClass(this.element,"visible")}else{D.removeClass(this.element,"visible")}},_cancelHideDelay:function(){var S=this.getRoot();if(S._nHideDelayId){window.clearTimeout(S._nHideDelayId)}},_execHideDelay:function(){this._cancelHideDelay();var T=this.getRoot(),U=this;function S(){if(T.activeItem){T.clearActiveItem()}if(T==U&&!(U instanceof YAHOO.widget.MenuBar)&&U.cfg.getProperty("position")=="dynamic"){U.hide()}}T._nHideDelayId=window.setTimeout(S,T.cfg.getProperty("hidedelay"))},_cancelShowDelay:function(){var S=this.getRoot();if(S._nShowDelayId){window.clearTimeout(S._nShowDelayId)}},_execShowDelay:function(U){var T=this.getRoot();function S(){if(U.parent.cfg.getProperty("selected")){U.show()}}T._nShowDelayId=window.setTimeout(S,T.cfg.getProperty("showdelay"))},_execSubmenuHideDelay:function(V,T,S){var U=this;V._nSubmenuHideDelayId=window.setTimeout(function(){if(U._nCurrentMouseX>(T+10)){V._nSubmenuHideDelayId=window.setTimeout(function(){V.hide()},S)}else{V.hide()}},50)},_disableScrollHeader:function(){if(!this._bHeaderDisabled){D.addClass(this.header,"topscrollbar_disabled");this._bHeaderDisabled=true}},_disableScrollFooter:function(){if(!this._bFooterDisabled){D.addClass(this.footer,"bottomscrollbar_disabled");this._bFooterDisabled=true}},_enableScrollHeader:function(){if(this._bHeaderDisabled){D.removeClass(this.header,"topscrollbar_disabled");this._bHeaderDisabled=false}},_enableScrollFooter:function(){if(this._bFooterDisabled){D.removeClass(this.footer,"bottomscrollbar_disabled");this._bFooterDisabled=false}},_onMouseOver:function(d,W){if(this._bStopMouseEventHandlers){return false}var f=W[0],c=W[1],S=Q.getTarget(f),T,V,Z,U,Y,X;if(!this._bHandledMouseOverEvent&&(S==this.element||D.isAncestor(this.element,S))){this._nCurrentMouseX=0;Q.on(this.element,"mousemove",this._onMouseMove,this,true);this.clearActiveItem();if(this.parent&&this._nSubmenuHideDelayId){window.clearTimeout(this._nSubmenuHideDelayId);this.parent.cfg.setProperty("selected",true);T=this.parent.parent;T._bHandledMouseOutEvent=true;T._bHandledMouseOverEvent=false}this._bHandledMouseOverEvent=true;this._bHandledMouseOutEvent=false}if(c&&!c.handledMouseOverEvent&&!c.cfg.getProperty("disabled")&&(S==c.element||D.isAncestor(c.element,S))){V=this.cfg.getProperty("showdelay");Z=(V>0);if(Z){this._cancelShowDelay()}U=this.activeItem;if(U){U.cfg.setProperty("selected",false)}Y=c.cfg;Y.setProperty("selected",true);if(this.hasFocus()){c.focus()}if(this.cfg.getProperty("autosubmenudisplay")){X=Y.getProperty("submenu");if(X){if(Z){this._execShowDelay(X)}else{X.show()}}}c.handledMouseOverEvent=true;c.handledMouseOutEvent=false}},_onMouseOut:function(c,U){if(this._bStopMouseEventHandlers){return false}var d=U[0],Y=U[1],V=Q.getRelatedTarget(d),Z=false,X,W,S,T;if(Y&&!Y.cfg.getProperty("disabled")){X=Y.cfg;W=X.getProperty("submenu");if(W&&(V==W.element||D.isAncestor(W.element,V))){Z=true}if(!Y.handledMouseOutEvent&&((V!=Y.element&&!D.isAncestor(Y.element,V))||Z)){if(!Z){Y.cfg.setProperty("selected",false);if(W){S=this.cfg.getProperty("submenuhidedelay");T=this.cfg.getProperty("showdelay");if(!(this instanceof YAHOO.widget.MenuBar)&&S>0&&T>=S){this._execSubmenuHideDelay(W,Q.getPageX(d),S)}else{W.hide()}}}Y.handledMouseOutEvent=true;Y.handledMouseOverEvent=false}}if(!this._bHandledMouseOutEvent&&((V!=this.element&&!D.isAncestor(this.element,V))||Z)){Q.removeListener(this.element,"mousemove",this._onMouseMove);this._nCurrentMouseX=Q.getPageX(d);this._bHandledMouseOutEvent=true;this._bHandledMouseOverEvent=false}},_onMouseMove:function(T,S){if(this._bStopMouseEventHandlers){return false}this._nCurrentMouseX=Q.getPageX(T)},_onClick:function(d,U){var f=U[0],X=U[1],V,Z=false,T,S,W,Y,c;if(X&&!X.cfg.getProperty("disabled")){V=X.cfg.getProperty("submenu");W=X.cfg.getProperty("url");if(W){Y=W.indexOf("#");c=W.length;if(Y!=-1){W=W.substr(Y,c);c=W.length;if(c>1){S=W.substr(1,c);Z=D.isAncestor(this.element,S)}else{if(c===1){Z=true}}}}if(Z&&!X.cfg.getProperty("target")){Q.preventDefault(f);X.focus()}if(!V){T=this.getRoot();if(T instanceof YAHOO.widget.MenuBar||T.cfg.getProperty("position")=="static"){T.clearActiveItem()}else{T.hide()}}}},_onKeyDown:function(n,c){var g=c[0],f=c[1],r=this,Z,h,T,X,o,S,q,W,l,V,d,p,Y;function U(){r._bStopMouseEventHandlers=true;window.setTimeout(function(){r._bStopMouseEventHandlers=false},10)}if(f&&!f.cfg.getProperty("disabled")){h=f.cfg;T=this.parent;switch(g.keyCode){case 38:case 40:o=(g.keyCode==38)?f.getPreviousEnabledSibling():f.getNextEnabledSibling();if(o){this.clearActiveItem();o.cfg.setProperty("selected",true);o.focus();if(this.cfg.getProperty("maxheight")>0){S=this.body;q=S.scrollTop;W=S.offsetHeight;l=this.getItems();V=l.length-1;d=o.element.offsetTop;if(g.keyCode==40){if(d>=(W+q)){S.scrollTop=d-W}else{if(d<=q){S.scrollTop=0}}if(o==l[V]){S.scrollTop=o.element.offsetTop}}else{if(d<=q){S.scrollTop=d-o.element.offsetHeight}else{if(d>=(q+W)){S.scrollTop=d}}if(o==l[0]){S.scrollTop=0}}q=S.scrollTop;p=S.scrollHeight-S.offsetHeight;if(q===0){this._disableScrollHeader();this._enableScrollFooter()}else{if(q==p){this._enableScrollHeader();this._disableScrollFooter()}else{this._enableScrollHeader();this._enableScrollFooter()}}}}Q.preventDefault(g);U();break;case 39:Z=h.getProperty("submenu");if(Z){if(!h.getProperty("selected")){h.setProperty("selected",true)}Z.show();Z.setInitialFocus();Z.setInitialSelection()}else{X=this.getRoot();if(X instanceof YAHOO.widget.MenuBar){o=X.activeItem.getNextEnabledSibling();if(o){X.clearActiveItem();o.cfg.setProperty("selected",true);Z=o.cfg.getProperty("submenu");if(Z){Z.show()}o.focus()}}}Q.preventDefault(g);U();break;case 37:if(T){Y=T.parent;if(Y instanceof YAHOO.widget.MenuBar){o=Y.activeItem.getPreviousEnabledSibling();if(o){Y.clearActiveItem();o.cfg.setProperty("selected",true);Z=o.cfg.getProperty("submenu");if(Z){Z.show()}o.focus()}}else{this.hide();T.focus()}}Q.preventDefault(g);U();break}}if(g.keyCode==27){if(this.cfg.getProperty("position")=="dynamic"){this.hide();if(this.parent){this.parent.focus()}}else{if(this.activeItem){Z=this.activeItem.cfg.getProperty("submenu");if(Z&&Z.cfg.getProperty("visible")){Z.hide();this.activeItem.focus()}else{this.activeItem.blur();this.activeItem.cfg.setProperty("selected",false)}}}Q.preventDefault(g)}},_onKeyPress:function(U,T){var S=T[0];if(S.keyCode==40||S.keyCode==38){Q.preventDefault(S)}},_onYChange:function(T,S){var V=this.parent,X,U,W;if(V){X=V.parent.body.scrollTop;if(X>0){W=(this.cfg.getProperty("y")-X);D.setY(this.element,W);U=this.iframe;if(U){D.setY(U,W)}this.cfg.setProperty("y",W,true)}}},_onScrollTargetMouseOver:function(Y,d){this._cancelHideDelay();var U=Q.getTarget(Y),W=this.body,c=this,V=this.cfg.getProperty("scrollincrement"),S,T;function Z(){var f=W.scrollTop;if(f<S){W.scrollTop=(f+V);c._enableScrollHeader()}else{W.scrollTop=S;window.clearInterval(c._nBodyScrollId);c._disableScrollFooter()}}function X(){var f=W.scrollTop;if(f>0){W.scrollTop=(f-V);c._enableScrollFooter()}else{W.scrollTop=0;window.clearInterval(c._nBodyScrollId);c._disableScrollHeader()}}if(D.hasClass(U,"hd")){T=X}else{S=W.scrollHeight-W.offsetHeight;T=Z}this._nBodyScrollId=window.setInterval(T,10)},_onScrollTargetMouseOut:function(T,S){window.clearInterval(this._nBodyScrollId);this._cancelHideDelay()},_onInit:function(T,S){this.cfg.subscribeToConfigEvent("visible",this._onVisibleChange);var U=!this.parent,V=this.lazyLoad;if(((U&&!V)||(U&&(this.cfg.getProperty("visible")||this.cfg.getProperty("position")=="static"))||(!U&&!V))&&this.getItemGroups().length===0){if(this.srcElement){this._initSubTree()}if(this.itemData){this.addItems(this.itemData)}}else{if(V){this.cfg.fireQueue()}}},_onBeforeRender:function(V,U){var W=this.element,Z=this._aListElements.length,T=true,Y=0,S,X;if(Z>0){do{S=this._aListElements[Y];if(S){if(T){D.addClass(S,"first-of-type");T=false}if(!D.isAncestor(W,S)){this.appendToBody(S)}X=this._aGroupTitleElements[Y];if(X){if(!D.isAncestor(W,X)){S.parentNode.insertBefore(X,S)}D.addClass(S,"hastitle")}}Y++}while(Y<Z)}},_onRender:function(T,S){if(this.cfg.getProperty("position")=="dynamic"){if(!this.cfg.getProperty("visible")){this.positionOffScreen()}}},_onBeforeShow:function(d,W){var c,T,X,V,Y;if(this.lazyLoad&&this.getItemGroups().length===0){if(this.srcElement){this._initSubTree()}if(this.itemData){if(this.parent&&this.parent.parent&&this.parent.parent.srcElement&&this.parent.parent.srcElement.tagName.toUpperCase()=="SELECT"){c=this.itemData.length;for(T=0;T<c;T++){if(this.itemData[T].tagName){this.addItem((new this.ITEM_TYPE(this.itemData[T])))}}}else{this.addItems(this.itemData)}}Y=this.srcElement;if(Y){if(Y.tagName.toUpperCase()=="SELECT"){if(D.inDocument(Y)){this.render(Y.parentNode)}else{this.render(this.cfg.getProperty("container"))}}else{this.render()}}else{if(this.parent){this.render(this.parent.element)}else{this.render(this.cfg.getProperty("container"))}}}var U=this.cfg.getProperty("maxheight"),S=this.cfg.getProperty("minscrollheight"),Z=this.cfg.getProperty("position")=="dynamic";if(!this.parent&&Z){this.cfg.refireEvent("xy")}function f(){this.cfg.setProperty("maxheight",0);this.hideEvent.unsubscribe(f)}if(!(this instanceof YAHOO.widget.MenuBar)&&Z){if(U===0){X=D.getViewportHeight();if(this.parent&&this.parent.parent instanceof YAHOO.widget.MenuBar){V=YAHOO.util.Region.getRegion(this.parent.element);X=(X-V.bottom)}if(this.element.offsetHeight>=X){U=(X-(C.VIEWPORT_OFFSET*2));if(U<S){U=S}this.cfg.setProperty("maxheight",U);this.hideEvent.subscribe(f)}}}},_onShow:function(V,U){var Y=this.parent,X,S,T;function W(c){var Z;if(c.type=="mousedown"||(c.type=="keydown"&&c.keyCode==27)){Z=Q.getTarget(c);if(Z!=X.element||!D.isAncestor(X.element,Z)){X.cfg.setProperty("autosubmenudisplay",false);Q.removeListener(document,"mousedown",W);Q.removeListener(document,"keydown",W)}}}if(Y){X=Y.parent;S=X.cfg.getProperty("submenualignment");T=this.cfg.getProperty("submenualignment");if((S[0]!=T[0])&&(S[1]!=T[1])){this.cfg.setProperty("submenualignment",[S[0],S[1]])}if(!X.cfg.getProperty("autosubmenudisplay")&&(X instanceof YAHOO.widget.MenuBar||X.cfg.getProperty("position")=="static")){X.cfg.setProperty("autosubmenudisplay",true);Q.on(document,"mousedown",W);Q.on(document,"keydown",W)}}},_onBeforeHide:function(U,T){var S=this.activeItem,W,V;if(S){W=S.cfg;W.setProperty("selected",false);V=W.getProperty("submenu");if(V){V.hide()}}if(this.getRoot()==this){this.blur()}},_onParentMenuConfigChange:function(T,S,W){var U=S[0][0],V=S[0][1];switch(U){case"iframe":case"constraintoviewport":case"hidedelay":case"showdelay":case"submenuhidedelay":case"clicktohide":case"effect":case"classname":case"scrollincrement":case"minscrollheight":W.cfg.setProperty(U,V);break}},_onParentMenuRender:function(T,S,X){var U=X.parent.parent.cfg,V={constraintoviewport:U.getProperty("constraintoviewport"),xy:[0,0],clicktohide:U.getProperty("clicktohide"),effect:U.getProperty("effect"),showdelay:U.getProperty("showdelay"),hidedelay:U.getProperty("hidedelay"),submenuhidedelay:U.getProperty("submenuhidedelay"),classname:U.getProperty("classname"),scrollincrement:U.getProperty("scrollincrement"),minscrollheight:U.getProperty("minscrollheight"),iframe:U.getProperty("iframe")},W;X.cfg.applyConfig(V);if(!this.lazyLoad){W=this.parent.element;if(this.element.parentNode==W){this.render()}else{this.render(W)}}},_onSubmenuBeforeShow:function(U,T){var V=this.parent,S=V.parent.cfg.getProperty("submenualignment");if(!this.cfg.getProperty("context")){this.cfg.setProperty("context",[V.element,S[0],S[1]])}else{this.align()}},_onMenuItemFocus:function(T,S){this.parent.focusEvent.fire(this)},_onMenuItemBlur:function(T,S){this.parent.blurEvent.fire(this)},_onMenuItemDestroy:function(U,T,S){this._removeItemFromGroupByValue(S.groupIndex,S)},_onMenuItemConfigChange:function(U,T,S){var W=T[0][0],X=T[0][1],V;switch(W){case"selected":if(X===true){this.activeItem=S}break;case"submenu":V=T[0][1];if(V){this._configureSubmenu(S)}break}},enforceConstraints:function(V,U,d){var v=this.parent,r=C.VIEWPORT_OFFSET,n=this.element,X=this.cfg,Y=U[0],W=n.offsetHeight,o=n.offsetWidth,u=D.getViewportWidth(),l=D.getViewportHeight(),h=(v&&v.parent instanceof YAHOO.widget.MenuBar)?0:r,p=X.getProperty("context"),f=p?p[0]:null,g,t,T,S,s,q,c,Z;if(o<u){c=Y[0];s=D.getDocumentScrollLeft();t=s+h;S=s+u-o-h;if(c<r){c=t}else{if((c+o)>u){if(f&&((c-f.offsetWidth)>o)){if(v&&v.parent instanceof YAHOO.widget.MenuBar){c=(c-(o-f.offsetWidth))}else{c=(c-(f.offsetWidth+o))}}else{c=S}}}}if(W<l){Z=Y[1];q=D.getDocumentScrollTop();g=q+h;T=q+l-W-h;if(Z<r){Z=g}else{if(Z>T){if(f&&(Z>W)){Z=((Z+f.offsetHeight)-W)}else{Z=T}}}}X.setProperty("x",c,true);X.setProperty("y",Z,true);X.setProperty("xy",[c,Z],true)},configVisible:function(U,T,V){var S,W;if(this.cfg.getProperty("position")=="dynamic"){H.superclass.configVisible.call(this,U,T,V)}else{S=T[0];W=D.getStyle(this.element,"display");D.setStyle(this.element,"visibility","visible");if(S){if(W!="block"){this.beforeShowEvent.fire();D.setStyle(this.element,"display","block");this.showEvent.fire()}}else{if(W=="block"){this.beforeHideEvent.fire();D.setStyle(this.element,"display","none");this.hideEvent.fire()}}}},configPosition:function(U,T,X){var W=this.element,V=T[0]=="static"?"static":"absolute",Y=this.cfg,S;D.setStyle(W,"position",V);if(V=="static"){D.setStyle(W,"display","block");Y.setProperty("visible",true)}else{D.setStyle(W,"visibility","hidden")}if(V=="absolute"){S=Y.getProperty("zindex");if(!S||S===0){S=this.parent?(this.parent.parent.cfg.getProperty("zindex")+1):1;Y.setProperty("zindex",S)}}},configIframe:function(T,S,U){if(this.cfg.getProperty("position")=="dynamic"){H.superclass.configIframe.call(this,T,S,U)}},configHideDelay:function(T,S,W){var Y=S[0],X=this.mouseOutEvent,U=this.mouseOverEvent,V=this.keyDownEvent;if(Y>0){if(!this._bHideDelayEventHandlersAssigned){X.subscribe(this._execHideDelay);U.subscribe(this._cancelHideDelay);V.subscribe(this._cancelHideDelay);this._bHideDelayEventHandlersAssigned=true}}else{X.unsubscribe(this._execHideDelay);U.unsubscribe(this._cancelHideDelay);V.unsubscribe(this._cancelHideDelay);this._bHideDelayEventHandlersAssigned=false}},configContainer:function(T,S,V){var U=S[0];if(typeof U=="string"){this.cfg.setProperty("container",document.getElementById(U),true)}},_setMaxHeight:function(T,S,U){this.cfg.setProperty("maxheight",U);this.renderEvent.unsubscribe(this._setMaxHeight)},configMaxHeight:function(g,Y,d){var X=Y[0],U=this.element,V=this.body,f=this.header,T=this.footer,c=this._onScrollTargetMouseOver,h=this._onScrollTargetMouseOut,S=this.cfg.getProperty("minscrollheight"),Z,W;if(X!==0&&X<S){X=S}if(this.lazyLoad&&!V){this.renderEvent.unsubscribe(this._setMaxHeight);if(X>0){this.renderEvent.subscribe(this._setMaxHeight,X,this)}return }D.setStyle(V,"height","");D.removeClass(V,"yui-menu-body-scrolled");if(K.gecko&&this.parent&&this.parent.parent&&this.parent.parent.cfg.getProperty("position")=="dynamic"&&!this.cfg.getProperty("width")){W=U.offsetWidth;U.style.width=W+"px";U.style.width=(W-(U.offsetWidth-W))+"px"}if(!f&&!T){this.setHeader("&#32;");this.setFooter("&#32;");f=this.header;T=this.footer;D.addClass(f,"topscrollbar");D.addClass(T,"bottomscrollbar");U.insertBefore(f,V);U.appendChild(T)}Z=(X-(f.offsetHeight+f.offsetHeight));if(Z>0&&(V.offsetHeight>X)){D.addClass(V,"yui-menu-body-scrolled");D.setStyle(V,"height",(Z+"px"));Q.on(f,"mouseover",c,this,true);Q.on(f,"mouseout",h,this,true);Q.on(T,"mouseover",c,this,true);Q.on(T,"mouseout",h,this,true);this._disableScrollHeader();this._enableScrollFooter()}else{if(f&&T){this._enableScrollHeader();this._enableScrollFooter();Q.removeListener(f,"mouseover",c);Q.removeListener(f,"mouseout",h);Q.removeListener(T,"mouseover",c);Q.removeListener(T,"mouseout",h);U.removeChild(f);U.removeChild(T);this.header=null;this.footer=null}}this.cfg.refireEvent("iframe")},configClassName:function(U,T,V){var S=T[0];if(this._sClassName){D.removeClass(this.element,this._sClassName)}D.addClass(this.element,S);this._sClassName=S},_onItemAdded:function(T,S){var U=S[0];if(U){U.cfg.setProperty("disabled",true)}},configDisabled:function(U,T,X){var W=T[0],S=this.getItems(),Y,V;if(F.isArray(S)){Y=S.length;if(Y>0){V=Y-1;do{S[V].cfg.setProperty("disabled",W)}while(V--)}if(W){this.clearActiveItem(true);D.addClass(this.element,"disabled");this.itemAddedEvent.subscribe(this._onItemAdded)}else{D.removeClass(this.element,"disabled");this.itemAddedEvent.unsubscribe(this._onItemAdded)}}},onRender:function(W,V){function X(){var d=this.element,c=this._shadow;if(c&&d){c.style.width=(d.offsetWidth+6)+"px";c.style.height=(d.offsetHeight+1)+"px"}}function Z(){this.element.appendChild(this._shadow)}function T(){D.addClass(this._shadow,"yui-menu-shadow-visible")}function S(){D.removeClass(this._shadow,"yui-menu-shadow-visible")}function Y(){var d=this._shadow,c,f;if(!d){c=this.element;f=this;if(!I){I=document.createElement("div");I.className="yui-menu-shadow yui-menu-shadow-visible"}d=I.cloneNode(false);c.appendChild(d);this._shadow=d;this.beforeShowEvent.subscribe(T);this.beforeHideEvent.subscribe(S);if(K.ie){window.setTimeout(function(){X.call(f);f.syncIframe()},0);this.cfg.subscribeToConfigEvent("width",X);this.cfg.subscribeToConfigEvent("height",X);this.cfg.subscribeToConfigEvent("maxheight",X);this.changeContentEvent.subscribe(X);E.textResizeEvent.subscribe(X,f,true);this.destroyEvent.subscribe(function(){E.textResizeEvent.unsubscribe(X,f)})}this.cfg.subscribeToConfigEvent("maxheight",Z)}}function U(){Y.call(this);this.beforeShowEvent.unsubscribe(U)}if(this.cfg.getProperty("position")=="dynamic"){if(this.cfg.getProperty("visible")){Y.call(this)}else{this.beforeShowEvent.subscribe(U)}}},initEvents:function(){H.superclass.initEvents.call(this);var S=P.LIST;this.mouseOverEvent=this.createEvent(A.MOUSE_OVER);this.mouseOverEvent.signature=S;this.mouseOutEvent=this.createEvent(A.MOUSE_OUT);this.mouseOutEvent.signature=S;this.mouseDownEvent=this.createEvent(A.MOUSE_DOWN);this.mouseDownEvent.signature=S;this.mouseUpEvent=this.createEvent(A.MOUSE_UP);this.mouseUpEvent.signature=S;this.clickEvent=this.createEvent(A.CLICK);this.clickEvent.signature=S;this.keyPressEvent=this.createEvent(A.KEY_PRESS);this.keyPressEvent.signature=S;this.keyDownEvent=this.createEvent(A.KEY_DOWN);this.keyDownEvent.signature=S;this.keyUpEvent=this.createEvent(A.KEY_UP);this.keyUpEvent.signature=S;this.focusEvent=this.createEvent(A.FOCUS);this.focusEvent.signature=S;this.blurEvent=this.createEvent(A.BLUR);this.blurEvent.signature=S;this.itemAddedEvent=this.createEvent(A.ITEM_ADDED);this.itemAddedEvent.signature=S;this.itemRemovedEvent=this.createEvent(A.ITEM_REMOVED);this.itemRemovedEvent.signature=S},positionOffScreen:function(){var T=this.iframe,S=this.OFF_SCREEN_POSITION;D.setXY(this.element,S);if(T){D.setXY(T,S)}},getRoot:function(){var T=this.parent,S;if(T){S=T.parent;return S?S.getRoot():this}else{return this}},toString:function(){var T="Menu",S=this.id;if(S){T+=(" "+S)}return T},setItemGroupTitle:function(X,W){var V,U,T,S;if(typeof X=="string"&&X.length>0){V=typeof W=="number"?W:0;U=this._aGroupTitleElements[V];if(U){U.innerHTML=X}else{U=document.createElement(this.GROUP_TITLE_TAG_NAME);U.innerHTML=X;this._aGroupTitleElements[V]=U}T=this._aGroupTitleElements.length-1;do{if(this._aGroupTitleElements[T]){D.removeClass(this._aGroupTitleElements[T],"first-of-type");S=T}}while(T--);if(S!==null){D.addClass(this._aGroupTitleElements[S],"first-of-type")}this.changeContentEvent.fire()}},addItem:function(S,T){if(S){return this._addItemToGroup(T,S)}},addItems:function(V,U){var X,S,W,T;if(F.isArray(V)){X=V.length;S=[];for(T=0;T<X;T++){W=V[T];if(W){if(F.isArray(W)){S[S.length]=this.addItems(W,T)}else{S[S.length]=this._addItemToGroup(U,W)}}}if(S.length){return S}}},insertItem:function(S,T,U){if(S){return this._addItemToGroup(U,S,T)}},removeItem:function(S,T){var U;if(typeof S!="undefined"){if(S instanceof YAHOO.widget.MenuItem){U=this._removeItemFromGroupByValue(T,S)}else{if(typeof S=="number"){U=this._removeItemFromGroupByIndex(T,S)}}if(U){U.destroy();return U}}},getItems:function(){var U=this._aItemGroups,T,S=[];if(F.isArray(U)){T=U.length;return((T==1)?U[0]:(Array.prototype.concat.apply(S,U)))}},getItemGroups:function(){return this._aItemGroups},getItem:function(S,T){var U;if(typeof S=="number"){U=this._getItemGroup(T);if(U){return U[S]}}},getSubmenus:function(){var T=this.getItems(),X=T.length,S,U,W,V;if(X>0){S=[];for(V=0;V<X;V++){W=T[V];if(W){U=W.cfg.getProperty("submenu");if(U){S[S.length]=U}}}}return S},clearContent:function(){var W=this.getItems(),T=W.length,U=this.element,V=this.body,c=this.header,S=this.footer,Z,Y,X;if(T>0){X=T-1;do{Z=W[X];if(Z){Y=Z.cfg.getProperty("submenu");if(Y){this.cfg.configChangedEvent.unsubscribe(this._onParentMenuConfigChange,Y);this.renderEvent.unsubscribe(this._onParentMenuRender,Y)}this.removeItem(Z)}}while(X--)}if(c){Q.purgeElement(c);U.removeChild(c)}if(S){Q.purgeElement(S);U.removeChild(S)}if(V){Q.purgeElement(V);V.innerHTML=""}this.activeItem=null;this._aItemGroups=[];this._aListElements=[];this._aGroupTitleElements=[];this.cfg.setProperty("width",null)},destroy:function(){this.clearContent();this._aItemGroups=null;this._aListElements=null;this._aGroupTitleElements=null;H.superclass.destroy.call(this)},setInitialFocus:function(){var S=this._getFirstEnabledItem();if(S){S.focus()}},setInitialSelection:function(){var S=this._getFirstEnabledItem();if(S){S.cfg.setProperty("selected",true)}},clearActiveItem:function(U){if(this.cfg.getProperty("showdelay")>0){this._cancelShowDelay()}var S=this.activeItem,V,T;if(S){V=S.cfg;if(U){S.blur()}V.setProperty("selected",false);T=V.getProperty("submenu");if(T){T.hide()}this.activeItem=null}},focus:function(){if(!this.hasFocus()){this.setInitialFocus()}},blur:function(){var S;if(this.hasFocus()){S=O.getFocusedMenuItem();if(S){S.blur()}}},hasFocus:function(){return(O.getFocusedMenu()==this.getRoot())},subscribe:function(){function V(c,Z,f){var g=Z[0],d=g.cfg.getProperty("submenu");if(d){d.subscribe.apply(d,f)}}function Y(c,Z,f){var d=this.cfg.getProperty("submenu");if(d){d.subscribe.apply(d,f)}}H.superclass.subscribe.apply(this,arguments);H.superclass.subscribe.call(this,"itemAdded",V,arguments);var S=this.getItems(),X,W,T,U;if(S){X=S.length;if(X>0){U=X-1;do{W=S[U];T=W.cfg.getProperty("submenu");if(T){T.subscribe.apply(T,arguments)}else{W.cfg.subscribeToConfigEvent("submenu",Y,arguments)}}while(U--)}}},initDefaultConfig:function(){H.superclass.initDefaultConfig.call(this);var S=this.cfg;S.addProperty(N.VISIBLE.key,{handler:this.configVisible,value:N.VISIBLE.value,validator:N.VISIBLE.validator});S.addProperty(N.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:N.CONSTRAIN_TO_VIEWPORT.value,validator:N.CONSTRAIN_TO_VIEWPORT.validator,supercedes:N.CONSTRAIN_TO_VIEWPORT.supercedes});S.addProperty(N.POSITION.key,{handler:this.configPosition,value:N.POSITION.value,validator:N.POSITION.validator,supercedes:N.POSITION.supercedes});S.addProperty(N.SUBMENU_ALIGNMENT.key,{value:N.SUBMENU_ALIGNMENT.value,suppressEvent:N.SUBMENU_ALIGNMENT.suppressEvent});S.addProperty(N.AUTO_SUBMENU_DISPLAY.key,{value:N.AUTO_SUBMENU_DISPLAY.value,validator:N.AUTO_SUBMENU_DISPLAY.validator,suppressEvent:N.AUTO_SUBMENU_DISPLAY.suppressEvent});S.addProperty(N.SHOW_DELAY.key,{value:N.SHOW_DELAY.value,validator:N.SHOW_DELAY.validator,suppressEvent:N.SHOW_DELAY.suppressEvent});S.addProperty(N.HIDE_DELAY.key,{handler:this.configHideDelay,value:N.HIDE_DELAY.value,validator:N.HIDE_DELAY.validator,suppressEvent:N.HIDE_DELAY.suppressEvent});S.addProperty(N.SUBMENU_HIDE_DELAY.key,{value:N.SUBMENU_HIDE_DELAY.value,validator:N.SUBMENU_HIDE_DELAY.validator,suppressEvent:N.SUBMENU_HIDE_DELAY.suppressEvent});S.addProperty(N.CLICK_TO_HIDE.key,{value:N.CLICK_TO_HIDE.value,validator:N.CLICK_TO_HIDE.validator,suppressEvent:N.CLICK_TO_HIDE.suppressEvent});S.addProperty(N.CONTAINER.key,{handler:this.configContainer,value:document.body,suppressEvent:N.CONTAINER.suppressEvent});S.addProperty(N.SCROLL_INCREMENT.key,{value:N.SCROLL_INCREMENT.value,validator:N.SCROLL_INCREMENT.validator,supercedes:N.SCROLL_INCREMENT.supercedes,suppressEvent:N.SCROLL_INCREMENT.suppressEvent});S.addProperty(N.MIN_SCROLL_HEIGHT.key,{value:N.MIN_SCROLL_HEIGHT.value,validator:N.MIN_SCROLL_HEIGHT.validator,supercedes:N.MIN_SCROLL_HEIGHT.supercedes,suppressEvent:N.MIN_SCROLL_HEIGHT.suppressEvent});S.addProperty(N.MAX_HEIGHT.key,{handler:this.configMaxHeight,value:N.MAX_HEIGHT.value,validator:N.MAX_HEIGHT.validator,suppressEvent:N.MAX_HEIGHT.suppressEvent,supercedes:N.MAX_HEIGHT.supercedes});S.addProperty(N.CLASS_NAME.key,{handler:this.configClassName,value:N.CLASS_NAME.value,validator:N.CLASS_NAME.validator,supercedes:N.CLASS_NAME.supercedes});S.addProperty(N.DISABLED.key,{handler:this.configDisabled,value:N.DISABLED.value,validator:N.DISABLED.validator,suppressEvent:N.DISABLED.suppressEvent})}})})();(function(){YAHOO.widget.MenuItem=function(O,N){if(O){if(N){this.parent=N.parent;this.value=N.value;this.id=N.id}this.init(O,N)}};var C=YAHOO.util.Dom,D=YAHOO.widget.Module,F=YAHOO.widget.Menu,K=YAHOO.widget.MenuItem,M=YAHOO.util.CustomEvent,H=YAHOO.lang,E,A={MOUSE_OVER:"mouseover",MOUSE_OUT:"mouseout",MOUSE_DOWN:"mousedown",MOUSE_UP:"mouseup",CLICK:"click",KEY_PRESS:"keypress",KEY_DOWN:"keydown",KEY_UP:"keyup",ITEM_ADDED:"itemAdded",ITEM_REMOVED:"itemRemoved",FOCUS:"focus",BLUR:"blur",DESTROY:"destroy"},I={TEXT:{key:"text",value:"",validator:H.isString,suppressEvent:true},HELP_TEXT:{key:"helptext",supercedes:["text"],suppressEvent:true},URL:{key:"url",value:"#",suppressEvent:true},TARGET:{key:"target",suppressEvent:true},EMPHASIS:{key:"emphasis",value:false,validator:H.isBoolean,suppressEvent:true,supercedes:["text"]},STRONG_EMPHASIS:{key:"strongemphasis",value:false,validator:H.isBoolean,suppressEvent:true,supercedes:["text"]},CHECKED:{key:"checked",value:false,validator:H.isBoolean,suppressEvent:true,supercedes:["disabled","selected"]},SUBMENU:{key:"submenu",suppressEvent:true,supercedes:["disabled","selected"]},DISABLED:{key:"disabled",value:false,validator:H.isBoolean,suppressEvent:true,supercedes:["text","selected"]},SELECTED:{key:"selected",value:false,validator:H.isBoolean,suppressEvent:true},ONCLICK:{key:"onclick",suppressEvent:true},CLASS_NAME:{key:"classname",value:null,validator:H.isString,suppressEvent:true}};K.prototype={CSS_CLASS_NAME:"yuimenuitem",CSS_LABEL_CLASS_NAME:"yuimenuitemlabel",SUBMENU_TYPE:null,_oAnchor:null,_oHelpTextEM:null,_oSubmenu:null,_oOnclickAttributeValue:null,_sClassName:null,constructor:K,index:null,groupIndex:null,parent:null,element:null,srcElement:null,value:null,browser:D.prototype.browser,id:null,destroyEvent:null,mouseOverEvent:null,mouseOutEvent:null,mouseDownEvent:null,mouseUpEvent:null,clickEvent:null,keyPressEvent:null,keyDownEvent:null,keyUpEvent:null,focusEvent:null,blurEvent:null,init:function(N,W){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=F}this.cfg=new YAHOO.util.Config(this);this.initDefaultConfig();var T=M.LIST,S=this.cfg,U="#",V,O,Q,P;if(H.isString(N)){this._createRootNodeStructure();S.queueProperty("text",N)}else{if(N&&N.tagName){switch(N.tagName.toUpperCase()){case"OPTION":this._createRootNodeStructure();S.queueProperty("text",N.text);S.queueProperty("disabled",N.disabled);this.value=N.value;this.srcElement=N;break;case"OPTGROUP":this._createRootNodeStructure();S.queueProperty("text",N.label);S.queueProperty("disabled",N.disabled);this.srcElement=N;this._initSubTree();break;case"LI":V=C.getFirstChild(N);if(V){U=V.getAttribute("href");O=V.getAttribute("target");Q=V.innerHTML}this.srcElement=N;this.element=N;this._oAnchor=V;S.setProperty("text",Q,true);S.setProperty("url",U,true);S.setProperty("target",O,true);this._initSubTree();break}}}if(this.element){P=(this.srcElement||this.element).id;if(!P){P=this.id||C.generateId();this.element.id=P}this.id=P;C.addClass(this.element,this.CSS_CLASS_NAME);C.addClass(this._oAnchor,this.CSS_LABEL_CLASS_NAME);this.mouseOverEvent=this.createEvent(A.MOUSE_OVER);this.mouseOverEvent.signature=T;this.mouseOutEvent=this.createEvent(A.MOUSE_OUT);this.mouseOutEvent.signature=T;this.mouseDownEvent=this.createEvent(A.MOUSE_DOWN);this.mouseDownEvent.signature=T;this.mouseUpEvent=this.createEvent(A.MOUSE_UP);this.mouseUpEvent.signature=T;this.clickEvent=this.createEvent(A.CLICK);this.clickEvent.signature=T;this.keyPressEvent=this.createEvent(A.KEY_PRESS);this.keyPressEvent.signature=T;this.keyDownEvent=this.createEvent(A.KEY_DOWN);this.keyDownEvent.signature=T;this.keyUpEvent=this.createEvent(A.KEY_UP);this.keyUpEvent.signature=T;this.focusEvent=this.createEvent(A.FOCUS);this.focusEvent.signature=T;this.blurEvent=this.createEvent(A.BLUR);this.blurEvent.signature=T;this.destroyEvent=this.createEvent(A.DESTROY);this.destroyEvent.signature=T;if(W){S.applyConfig(W)}S.fireQueue()}},_createRootNodeStructure:function(){var N,O;if(!E){E=document.createElement("li");E.innerHTML='<a href="#"></a>'}N=E.cloneNode(true);N.className=this.CSS_CLASS_NAME;O=N.firstChild;O.className=this.CSS_LABEL_CLASS_NAME;this.element=N;this._oAnchor=O},_initSubTree:function(){var U=this.srcElement,P=this.cfg,S,Q,O,N,T;if(U.childNodes.length>0){if(this.parent.lazyLoad&&this.parent.srcElement&&this.parent.srcElement.tagName.toUpperCase()=="SELECT"){P.setProperty("submenu",{id:C.generateId(),itemdata:U.childNodes})}else{S=U.firstChild;Q=[];do{if(S&&S.tagName){switch(S.tagName.toUpperCase()){case"DIV":P.setProperty("submenu",S);break;case"OPTION":Q[Q.length]=S;break}}}while((S=S.nextSibling));O=Q.length;if(O>0){N=new this.SUBMENU_TYPE(C.generateId());P.setProperty("submenu",N);for(T=0;T<O;T++){N.addItem((new N.ITEM_TYPE(Q[T])))}}}}},configText:function(X,P,S){var O=P[0],Q=this.cfg,V=this._oAnchor,N=Q.getProperty("helptext"),W="",T="",U="";if(O){if(N){W='<em class="helptext">'+N+"</em>"}if(Q.getProperty("emphasis")){T="<em>";U="</em>"}if(Q.getProperty("strongemphasis")){T="<strong>";U="</strong>"}V.innerHTML=(T+O+U+W)}},configHelpText:function(P,O,N){this.cfg.refireEvent("text")},configURL:function(P,O,N){var S=O[0];if(!S){S="#"}var Q=this._oAnchor;if(YAHOO.env.ua.opera){Q.removeAttribute("href")}Q.setAttribute("href",S)},configTarget:function(Q,P,O){var N=P[0],S=this._oAnchor;if(N&&N.length>0){S.setAttribute("target",N)}else{S.removeAttribute("target")}},configEmphasis:function(P,O,N){var S=O[0],Q=this.cfg;if(S&&Q.getProperty("strongemphasis")){Q.setProperty("strongemphasis",false)}Q.refireEvent("text")},configStrongEmphasis:function(Q,P,O){var N=P[0],S=this.cfg;if(N&&S.getProperty("emphasis")){S.setProperty("emphasis",false)}S.refireEvent("text")},configChecked:function(X,Q,T){var W=Q[0],O=this.element,V=this._oAnchor,S=this.cfg,N="-checked",P=this.CSS_CLASS_NAME+N,U=this.CSS_LABEL_CLASS_NAME+N;if(W){C.addClass(O,P);C.addClass(V,U)}else{C.removeClass(O,P);C.removeClass(V,U)}S.refireEvent("text");if(S.getProperty("disabled")){S.refireEvent("disabled")}if(S.getProperty("selected")){S.refireEvent("selected")}},configDisabled:function(f,W,l){var h=W[0],P=this.cfg,U=P.getProperty("submenu"),T=P.getProperty("checked"),X=this.element,c=this._oAnchor,Z="-disabled",d="-checked"+Z,g="-hassubmenu"+Z,Q=this.CSS_CLASS_NAME+Z,S=this.CSS_LABEL_CLASS_NAME+Z,Y=this.CSS_CLASS_NAME+d,V=this.CSS_LABEL_CLASS_NAME+d,O=this.CSS_CLASS_NAME+g,N=this.CSS_LABEL_CLASS_NAME+g;if(h){if(P.getProperty("selected")){P.setProperty("selected",false)}C.addClass(X,Q);C.addClass(c,S);if(U){C.addClass(X,O);C.addClass(c,N)}if(T){C.addClass(X,Y);C.addClass(c,V)}}else{C.removeClass(X,Q);C.removeClass(c,S);if(U){C.removeClass(X,O);C.removeClass(c,N)}if(T){C.removeClass(X,Y);C.removeClass(c,V)}}},configSelected:function(f,W,l){var P=this.cfg,g=W[0],X=this.element,c=this._oAnchor,T=P.getProperty("checked"),U=P.getProperty("submenu"),Z="-selected",d="-checked"+Z,h="-hassubmenu"+Z,Q=this.CSS_CLASS_NAME+Z,S=this.CSS_LABEL_CLASS_NAME+Z,Y=this.CSS_CLASS_NAME+d,V=this.CSS_LABEL_CLASS_NAME+d,O=this.CSS_CLASS_NAME+h,N=this.CSS_LABEL_CLASS_NAME+h;if(YAHOO.env.ua.opera){c.blur()}if(g&&!P.getProperty("disabled")){C.addClass(X,Q);C.addClass(c,S);if(U){C.addClass(X,O);C.addClass(c,N)}if(T){C.addClass(X,Y);C.addClass(c,V)}}else{C.removeClass(X,Q);C.removeClass(c,S);if(U){C.removeClass(X,O);C.removeClass(c,N)}if(T){C.removeClass(X,Y);C.removeClass(c,V)}}if(this.hasFocus()&&YAHOO.env.ua.opera){c.focus()}},_onSubmenuBeforeHide:function(Q,P){var S=this.parent,N;function O(){S._oAnchor.blur();N.beforeHideEvent.unsubscribe(O)}if(S.hasFocus()){N=S.parent;N.beforeHideEvent.subscribe(O)}},configSubmenu:function(c,T,W){var V=T[0],U=this.cfg,O=this.element,Y=this._oAnchor,S=this.parent&&this.parent.lazyLoad,N="-hassubmenu",P=this.CSS_CLASS_NAME+N,X=this.CSS_LABEL_CLASS_NAME+N,Z,d,Q;if(V){if(V instanceof F){Z=V;Z.parent=this;Z.lazyLoad=S}else{if(typeof V=="object"&&V.id&&!V.nodeType){d=V.id;Q=V;Q.lazyload=S;Q.parent=this;Z=new this.SUBMENU_TYPE(d,Q);U.setProperty("submenu",Z,true)}else{Z=new this.SUBMENU_TYPE(V,{lazyload:S,parent:this});U.setProperty("submenu",Z,true)}}if(Z){C.addClass(O,P);C.addClass(Y,X);this._oSubmenu=Z;if(YAHOO.env.ua.opera){Z.beforeHideEvent.subscribe(this._onSubmenuBeforeHide)}}}else{C.removeClass(O,P);C.removeClass(Y,X);if(this._oSubmenu){this._oSubmenu.destroy()}}if(U.getProperty("disabled")){U.refireEvent("disabled")}if(U.getProperty("selected")){U.refireEvent("selected")}},configOnClick:function(P,O,N){var Q=O[0];if(this._oOnclickAttributeValue&&(this._oOnclickAttributeValue!=Q)){this.clickEvent.unsubscribe(this._oOnclickAttributeValue.fn,this._oOnclickAttributeValue.obj);this._oOnclickAttributeValue=null}if(!this._oOnclickAttributeValue&&typeof Q=="object"&&typeof Q.fn=="function"){this.clickEvent.subscribe(Q.fn,((!YAHOO.lang.isUndefined(Q.obj))?Q.obj:this),Q.scope);this._oOnclickAttributeValue=Q}},configClassName:function(Q,P,O){var N=P[0];if(this._sClassName){C.removeClass(this.element,this._sClassName)}C.addClass(this.element,N);this._sClassName=N},initDefaultConfig:function(){var N=this.cfg;N.addProperty(I.TEXT.key,{handler:this.configText,value:I.TEXT.value,validator:I.TEXT.validator,suppressEvent:I.TEXT.suppressEvent});N.addProperty(I.HELP_TEXT.key,{handler:this.configHelpText,supercedes:I.HELP_TEXT.supercedes,suppressEvent:I.HELP_TEXT.suppressEvent});N.addProperty(I.URL.key,{handler:this.configURL,value:I.URL.value,suppressEvent:I.URL.suppressEvent});N.addProperty(I.TARGET.key,{handler:this.configTarget,suppressEvent:I.TARGET.suppressEvent});N.addProperty(I.EMPHASIS.key,{handler:this.configEmphasis,value:I.EMPHASIS.value,validator:I.EMPHASIS.validator,suppressEvent:I.EMPHASIS.suppressEvent,supercedes:I.EMPHASIS.supercedes});N.addProperty(I.STRONG_EMPHASIS.key,{handler:this.configStrongEmphasis,value:I.STRONG_EMPHASIS.value,validator:I.STRONG_EMPHASIS.validator,suppressEvent:I.STRONG_EMPHASIS.suppressEvent,supercedes:I.STRONG_EMPHASIS.supercedes});N.addProperty(I.CHECKED.key,{handler:this.configChecked,value:I.CHECKED.value,validator:I.CHECKED.validator,suppressEvent:I.CHECKED.suppressEvent,supercedes:I.CHECKED.supercedes});N.addProperty(I.DISABLED.key,{handler:this.configDisabled,value:I.DISABLED.value,validator:I.DISABLED.validator,suppressEvent:I.DISABLED.suppressEvent});N.addProperty(I.SELECTED.key,{handler:this.configSelected,value:I.SELECTED.value,validator:I.SELECTED.validator,suppressEvent:I.SELECTED.suppressEvent});N.addProperty(I.SUBMENU.key,{handler:this.configSubmenu,supercedes:I.SUBMENU.supercedes,suppressEvent:I.SUBMENU.suppressEvent});N.addProperty(I.ONCLICK.key,{handler:this.configOnClick,suppressEvent:I.ONCLICK.suppressEvent});N.addProperty(I.CLASS_NAME.key,{handler:this.configClassName,value:I.CLASS_NAME.value,validator:I.CLASS_NAME.validator,suppressEvent:I.CLASS_NAME.suppressEvent})},getNextEnabledSibling:function(){var P,T,N,S,Q;function O(U,V){return U[V]||O(U,(V+1))}if(this.parent instanceof F){P=this.groupIndex;T=this.parent.getItemGroups();if(this.index<(T[P].length-1)){N=O(T[P],(this.index+1))}else{if(P<(T.length-1)){S=P+1}else{S=0}Q=O(T,S);N=O(Q,0)}return(N.cfg.getProperty("disabled")||N.element.style.display=="none")?N.getNextEnabledSibling():N}},getPreviousEnabledSibling:function(){var S,U,O,N,Q;function T(V,W){return V[W]||T(V,(W-1))}function P(V,W){return V[W]?W:P(V,(W+1))}if(this.parent instanceof F){S=this.groupIndex;U=this.parent.getItemGroups();if(this.index>P(U[S],0)){O=T(U[S],(this.index-1))}else{if(S>P(U,0)){N=S-1}else{N=U.length-1}Q=T(U,N);O=T(Q,(Q.length-1))}return(O.cfg.getProperty("disabled")||O.element.style.display=="none")?O.getPreviousEnabledSibling():O}},focus:function(){var S=this.parent,Q=this._oAnchor,N=S.activeItem,P=this;function O(){try{if(YAHOO.env.ua.ie&&!document.hasFocus()){return }if(N){N.blurEvent.fire()}Q.focus();P.focusEvent.fire()}catch(T){}}if(!this.cfg.getProperty("disabled")&&S&&S.cfg.getProperty("visible")&&this.element.style.display!="none"){window.setTimeout(O,0)}},blur:function(){var O=this.parent;if(!this.cfg.getProperty("disabled")&&O&&O.cfg.getProperty("visible")){var N=this;window.setTimeout(function(){try{N._oAnchor.blur();N.blurEvent.fire()}catch(P){}},0)}},hasFocus:function(){return(YAHOO.widget.MenuManager.getFocusedMenuItem()==this)},destroy:function(){var P=this.element,O,N;if(P){O=this.cfg.getProperty("submenu");if(O){O.destroy()}this.mouseOverEvent.unsubscribeAll();this.mouseOutEvent.unsubscribeAll();this.mouseDownEvent.unsubscribeAll();this.mouseUpEvent.unsubscribeAll();this.clickEvent.unsubscribeAll();this.keyPressEvent.unsubscribeAll();this.keyDownEvent.unsubscribeAll();this.keyUpEvent.unsubscribeAll();this.focusEvent.unsubscribeAll();this.blurEvent.unsubscribeAll();this.cfg.configChangedEvent.unsubscribeAll();N=P.parentNode;if(N){N.removeChild(P);this.destroyEvent.fire()}this.destroyEvent.unsubscribeAll()}},toString:function(){var O="MenuItem",N=this.id;if(N){O+=(" "+N)}return O}};H.augmentProto(K,YAHOO.util.EventProvider)})();(function(){YAHOO.widget.ContextMenu=function(I,H){YAHOO.widget.ContextMenu.superclass.constructor.call(this,I,H)};var C=YAHOO.util.Event,F=YAHOO.widget.ContextMenu,E={TRIGGER_CONTEXT_MENU:"triggerContextMenu",CONTEXT_MENU:(YAHOO.env.ua.opera?"mousedown":"contextmenu"),CLICK:"click"},D={TRIGGER:{key:"trigger",suppressEvent:true}};function A(I,H,K){this.cfg.setProperty("xy",K);this.beforeShowEvent.unsubscribe(A,K)}YAHOO.lang.extend(F,YAHOO.widget.Menu,{_oTrigger:null,_bCancelled:false,contextEventTarget:null,triggerContextMenuEvent:null,init:function(I,H){F.superclass.init.call(this,I);this.beforeInitEvent.fire(F);if(H){this.cfg.applyConfig(H,true)}this.initEvent.fire(F)},initEvents:function(){F.superclass.initEvents.call(this);this.triggerContextMenuEvent=this.createEvent(E.TRIGGER_CONTEXT_MENU);this.triggerContextMenuEvent.signature=YAHOO.util.CustomEvent.LIST},cancel:function(){this._bCancelled=true},_removeEventHandlers:function(){var H=this._oTrigger;if(H){C.removeListener(H,E.CONTEXT_MENU,this._onTriggerContextMenu);if(YAHOO.env.ua.opera){C.removeListener(H,E.CLICK,this._onTriggerClick)}}},_onTriggerClick:function(I,H){if(I.ctrlKey){C.stopEvent(I)}},_onTriggerContextMenu:function(K,H){if(K.type=="mousedown"&&!K.ctrlKey){return }var I;C.stopEvent(K);this.contextEventTarget=C.getTarget(K);this.triggerContextMenuEvent.fire(K);YAHOO.widget.MenuManager.hideVisible();if(!this._bCancelled){I=C.getXY(K);if(!YAHOO.util.Dom.inDocument(this.element)){this.beforeShowEvent.subscribe(A,I)}else{this.cfg.setProperty("xy",I)}this.show()}this._bCancelled=false},toString:function(){var I="ContextMenu",H=this.id;if(H){I+=(" "+H)}return I},initDefaultConfig:function(){F.superclass.initDefaultConfig.call(this);this.cfg.addProperty(D.TRIGGER.key,{handler:this.configTrigger,suppressEvent:D.TRIGGER.suppressEvent})},destroy:function(){this._removeEventHandlers();F.superclass.destroy.call(this)},configTrigger:function(I,H,M){var K=H[0];if(K){if(this._oTrigger){this._removeEventHandlers()}this._oTrigger=K;C.on(K,E.CONTEXT_MENU,this._onTriggerContextMenu,this,true);if(YAHOO.env.ua.opera){C.on(K,E.CLICK,this._onTriggerClick,this,true)}}else{this._removeEventHandlers()}}})}());YAHOO.widget.ContextMenuItem=YAHOO.widget.MenuItem;(function(){YAHOO.widget.MenuBar=function(H,F){YAHOO.widget.MenuBar.superclass.constructor.call(this,H,F)};function E(F){if(typeof F=="string"){return("dynamic,static".indexOf((F.toLowerCase()))!=-1)}}var C=YAHOO.util.Event,A=YAHOO.widget.MenuBar,D={POSITION:{key:"position",value:"static",validator:E,supercedes:["visible"]},SUBMENU_ALIGNMENT:{key:"submenualignment",value:["tl","bl"],suppressEvent:true},AUTO_SUBMENU_DISPLAY:{key:"autosubmenudisplay",value:false,validator:YAHOO.lang.isBoolean,suppressEvent:true}};YAHOO.lang.extend(A,YAHOO.widget.Menu,{init:function(H,F){if(!this.ITEM_TYPE){this.ITEM_TYPE=YAHOO.widget.MenuBarItem}A.superclass.init.call(this,H);this.beforeInitEvent.fire(A);if(F){this.cfg.applyConfig(F,true)}this.initEvent.fire(A)},CSS_CLASS_NAME:"yuimenubar",_onKeyDown:function(I,H,O){var F=H[0],P=H[1],M,N,K;if(P&&!P.cfg.getProperty("disabled")){N=P.cfg;switch(F.keyCode){case 37:case 39:if(P==this.activeItem&&!N.getProperty("selected")){N.setProperty("selected",true)}else{K=(F.keyCode==37)?P.getPreviousEnabledSibling():P.getNextEnabledSibling();if(K){this.clearActiveItem();K.cfg.setProperty("selected",true);if(this.cfg.getProperty("autosubmenudisplay")){M=K.cfg.getProperty("submenu");if(M){M.show()}}K.focus()}}C.preventDefault(F);break;case 40:if(this.activeItem!=P){this.clearActiveItem();N.setProperty("selected",true);P.focus()}M=N.getProperty("submenu");if(M){if(M.cfg.getProperty("visible")){M.setInitialSelection();M.setInitialFocus()}else{M.show()}}C.preventDefault(F);break}}if(F.keyCode==27&&this.activeItem){M=this.activeItem.cfg.getProperty("submenu");if(M&&M.cfg.getProperty("visible")){M.hide();this.activeItem.focus()}else{this.activeItem.cfg.setProperty("selected",false);this.activeItem.blur()}C.preventDefault(F)}},_onClick:function(P,I,N){A.superclass._onClick.call(this,P,I,N);var O=I[1],Q,F,H,K,M;if(O&&!O.cfg.getProperty("disabled")){Q=I[0];F=C.getTarget(Q);H=this.activeItem;K=this.cfg;if(H&&H!=O){this.clearActiveItem()}O.cfg.setProperty("selected",true);M=O.cfg.getProperty("submenu");if(M){if(M.cfg.getProperty("visible")){M.hide()}else{M.show()}}}},toString:function(){var H="MenuBar",F=this.id;if(F){H+=(" "+F)}return H},initDefaultConfig:function(){A.superclass.initDefaultConfig.call(this);var F=this.cfg;F.addProperty(D.POSITION.key,{handler:this.configPosition,value:D.POSITION.value,validator:D.POSITION.validator,supercedes:D.POSITION.supercedes});F.addProperty(D.SUBMENU_ALIGNMENT.key,{value:D.SUBMENU_ALIGNMENT.value,suppressEvent:D.SUBMENU_ALIGNMENT.suppressEvent});F.addProperty(D.AUTO_SUBMENU_DISPLAY.key,{value:D.AUTO_SUBMENU_DISPLAY.value,validator:D.AUTO_SUBMENU_DISPLAY.validator,suppressEvent:D.AUTO_SUBMENU_DISPLAY.suppressEvent})}})}());YAHOO.widget.MenuBarItem=function(C,A){YAHOO.widget.MenuBarItem.superclass.constructor.call(this,C,A)};YAHOO.lang.extend(YAHOO.widget.MenuBarItem,YAHOO.widget.MenuItem,{init:function(C,A){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=YAHOO.widget.Menu}YAHOO.widget.MenuBarItem.superclass.init.call(this,C);var D=this.cfg;if(A){D.applyConfig(A,true)}D.fireQueue()},CSS_CLASS_NAME:"yuimenubaritem",CSS_LABEL_CLASS_NAME:"yuimenubaritemlabel",toString:function(){var A="MenuBarItem";if(this.cfg&&this.cfg.getProperty("text")){A+=(": "+this.cfg.getProperty("text"))}return A}});YAHOO.register("menu",YAHOO.widget.Menu,{version:"2.4.1",build:"742"});(function(){var I=YAHOO.util.Dom,P=YAHOO.util.Event,M=YAHOO.lang,C=YAHOO.widget.Overlay,N=YAHOO.widget.Menu,E={},O=null,F=null,D=null;function H(S,Q,V,T){var W,U;if(M.isString(S)&&M.isString(Q)){if(YAHOO.env.ua.ie){U='<input type="'+S+'" name="'+Q+'"';if(T){U+=" checked"}U+=">";W=document.createElement(U)}else{W=document.createElement("input");W.name=Q;W.type=S;if(T){W.checked=true}}W.value=V;return W}}function K(S,Y){var Q=S.nodeName.toUpperCase(),W=this,X,T,U;function Z(c){if(!(c in Y)){X=S.getAttributeNode(c);if(X&&("value" in X)){Y[c]=X.value}}}function V(){Z("type");if(Y.type=="button"){Y.type="push"}if(!("disabled" in Y)){Y.disabled=S.disabled}Z("name");Z("value");Z("title")}switch(Q){case"A":Y.type="link";Z("href");Z("target");break;case"INPUT":V();if(!("checked" in Y)){Y.checked=S.checked}break;case"BUTTON":V();T=S.parentNode.parentNode;if(I.hasClass(T,this.CSS_CLASS_NAME+"-checked")){Y.checked=true}if(I.hasClass(T,this.CSS_CLASS_NAME+"-disabled")){Y.disabled=true}S.removeAttribute("value");S.setAttribute("type","button");break}S.removeAttribute("id");S.removeAttribute("name");if(!("tabindex" in Y)){Y.tabindex=S.tabIndex}if(!("label" in Y)){U=Q=="INPUT"?S.value:S.innerHTML;if(U&&U.length>0){Y.label=U}}}function A(T){var S=T.attributes,Q=S.srcelement,V=Q.nodeName.toUpperCase(),U=this;if(V==this.NODE_NAME){T.element=Q;T.id=Q.id;I.getElementsBy(function(W){switch(W.nodeName.toUpperCase()){case"BUTTON":case"A":case"INPUT":K.call(U,W,S);break}},"*",Q)}else{switch(V){case"BUTTON":case"A":case"INPUT":K.call(this,Q,S);break}}}YAHOO.widget.Button=function(V,S){var U=YAHOO.widget.Button.superclass.constructor,T,Q;if(arguments.length==1&&!M.isString(V)&&!V.nodeName){if(!V.id){V.id=I.generateId()}U.call(this,(this.createButtonElement(V.type)),V)}else{T={element:null,attributes:(S||{})};if(M.isString(V)){Q=I.get(V);if(Q){if(!T.attributes.id){T.attributes.id=V}T.attributes.srcelement=Q;A.call(this,T);if(!T.element){T.element=this.createButtonElement(T.attributes.type)}U.call(this,T.element,T.attributes)}}else{if(V.nodeName){if(!T.attributes.id){if(V.id){T.attributes.id=V.id}else{T.attributes.id=I.generateId()}}T.attributes.srcelement=V;A.call(this,T);if(!T.element){T.element=this.createButtonElement(T.attributes.type)}U.call(this,T.element,T.attributes)}}}};YAHOO.extend(YAHOO.widget.Button,YAHOO.util.Element,{_button:null,_menu:null,_hiddenFields:null,_onclickAttributeValue:null,_activationKeyPressed:false,_activationButtonPressed:false,_hasKeyEventHandlers:false,_hasMouseEventHandlers:false,NODE_NAME:"SPAN",CHECK_ACTIVATION_KEYS:[32],ACTIVATION_KEYS:[13,32],OPTION_AREA_WIDTH:20,CSS_CLASS_NAME:"yui-button",RADIO_DEFAULT_TITLE:"Unchecked.  Click to check.",RADIO_CHECKED_TITLE:"Checked.  Click another button to uncheck",CHECKBOX_DEFAULT_TITLE:"Unchecked.  Click to check.",CHECKBOX_CHECKED_TITLE:"Checked.  Click to uncheck.",MENUBUTTON_DEFAULT_TITLE:"Menu collapsed.  Click to expand.",MENUBUTTON_MENU_VISIBLE_TITLE:"Menu expanded.  Click or press Esc to collapse.",SPLITBUTTON_DEFAULT_TITLE:("Menu collapsed.  Click inside option region or press Ctrl + Shift + M to show the menu."),SPLITBUTTON_OPTION_VISIBLE_TITLE:"Menu expanded.  Press Esc or Ctrl + Shift + M to hide the menu.",SUBMIT_TITLE:"Click to submit form.",_setType:function(Q){if(Q=="split"){this.on("option",this._onOption)}},_setLabel:function(Q){this._button.innerHTML=Q;var T,S;if(YAHOO.env.ua.gecko&&I.inDocument(this.get("element"))){S=this;T=this.CSS_CLASS_NAME;this.removeClass(T);window.setTimeout(function(){S.addClass(T)},0)}},_setTabIndex:function(Q){this._button.tabIndex=Q},_setTitle:function(S){var Q=S;if(this.get("type")!="link"){if(!Q){switch(this.get("type")){case"radio":Q=this.RADIO_DEFAULT_TITLE;break;case"checkbox":Q=this.CHECKBOX_DEFAULT_TITLE;break;case"menu":Q=this.MENUBUTTON_DEFAULT_TITLE;break;case"split":Q=this.SPLITBUTTON_DEFAULT_TITLE;break;case"submit":Q=this.SUBMIT_TITLE;break}}this._button.title=Q}},_setDisabled:function(Q){if(this.get("type")!="link"){if(Q){if(this._menu){this._menu.hide()}if(this.hasFocus()){this.blur()}this._button.setAttribute("disabled","disabled");this.addStateCSSClasses("disabled");this.removeStateCSSClasses("hover");this.removeStateCSSClasses("active");this.removeStateCSSClasses("focus")}else{this._button.removeAttribute("disabled");this.removeStateCSSClasses("disabled")}}},_setHref:function(Q){if(this.get("type")=="link"){this._button.href=Q}},_setTarget:function(Q){if(this.get("type")=="link"){this._button.setAttribute("target",Q)}},_setChecked:function(S){var T=this.get("type"),Q;if(T=="checkbox"||T=="radio"){if(S){this.addStateCSSClasses("checked");Q=(T=="radio")?this.RADIO_CHECKED_TITLE:this.CHECKBOX_CHECKED_TITLE}else{this.removeStateCSSClasses("checked");Q=(T=="radio")?this.RADIO_DEFAULT_TITLE:this.CHECKBOX_DEFAULT_TITLE}this.set("title",Q)}},_setMenu:function(d){var V=this.get("lazyloadmenu"),Y=this.get("element"),Q,g=false,h,U,X,T,S,c,W;if(!C){return false}if(N){Q=N.prototype.CSS_CLASS_NAME}function f(){h.render(Y.parentNode);this.removeListener("appendTo",f)}function Z(){if(h){I.addClass(h.element,this.get("menuclassname"));I.addClass(h.element,"yui-"+this.get("type")+"-button-menu");h.showEvent.subscribe(this._onMenuShow,null,this);h.hideEvent.subscribe(this._onMenuHide,null,this);h.renderEvent.subscribe(this._onMenuRender,null,this);if(N&&h instanceof N){h.keyDownEvent.subscribe(this._onMenuKeyDown,this,true);h.subscribe("click",this._onMenuClick,this,true);h.itemAddedEvent.subscribe(this._onMenuItemAdded,this,true);X=h.srcElement;if(X&&X.nodeName.toUpperCase()=="SELECT"){X.style.display="none";X.parentNode.removeChild(X)}}else{if(C&&h instanceof C){if(!O){O=new YAHOO.widget.OverlayManager()}O.register(h)}}this._menu=h;if(!g){if(V&&N&&!(h instanceof N)){h.beforeShowEvent.subscribe(this._onOverlayBeforeShow,null,this)}else{if(!V){if(I.inDocument(Y)){h.render(Y.parentNode)}else{this.on("appendTo",f)}}}}}}if(d&&N&&(d instanceof N)){h=d;T=h.getItems();S=T.length;g=true;if(S>0){W=S-1;do{c=T[W];if(c){c.cfg.subscribeToConfigEvent("selected",this._onMenuItemSelected,c,this)}}while(W--)}Z.call(this)}else{if(C&&d&&(d instanceof C)){h=d;g=true;h.cfg.setProperty("visible",false);h.cfg.setProperty("context",[Y,"tl","bl"]);Z.call(this)}else{if(N&&M.isArray(d)){this.on("appendTo",function(){h=new N(I.generateId(),{lazyload:V,itemdata:d});Z.call(this)})}else{if(M.isString(d)){U=I.get(d);if(U){if(N&&I.hasClass(U,Q)||U.nodeName.toUpperCase()=="SELECT"){h=new N(d,{lazyload:V});Z.call(this)}else{if(C){h=new C(d,{visible:false,context:[Y,"tl","bl"]});Z.call(this)}}}}else{if(d&&d.nodeName){if(N&&I.hasClass(d,Q)||d.nodeName.toUpperCase()=="SELECT"){h=new N(d,{lazyload:V});Z.call(this)}else{if(C){if(!d.id){I.generateId(d)}h=new C(d,{visible:false,context:[Y,"tl","bl"]});Z.call(this)}}}}}}}},_setOnClick:function(Q){if(this._onclickAttributeValue&&(this._onclickAttributeValue!=Q)){this.removeListener("click",this._onclickAttributeValue.fn);this._onclickAttributeValue=null}if(!this._onclickAttributeValue&&M.isObject(Q)&&M.isFunction(Q.fn)){this.on("click",Q.fn,Q.obj,Q.scope);this._onclickAttributeValue=Q}},_setSelectedMenuItem:function(S){var Q=this._menu,T;if(N&&Q&&Q instanceof N){T=Q.getItem(S);if(T&&!T.cfg.getProperty("selected")){T.cfg.setProperty("selected",true)}}},_isActivationKey:function(Q){var V=this.get("type"),S=(V=="checkbox"||V=="radio")?this.CHECK_ACTIVATION_KEYS:this.ACTIVATION_KEYS,U=S.length,T;if(U>0){T=U-1;do{if(Q==S[T]){return true}}while(T--)}},_isSplitButtonOptionKey:function(Q){return(Q.ctrlKey&&Q.shiftKey&&P.getCharCode(Q)==77)},_addListenersToForm:function(){var X=this.getForm(),W=YAHOO.widget.Button.onFormKeyPress,V,Q,U,T,S;if(X){P.on(X,"reset",this._onFormReset,null,this);P.on(X,"submit",this.createHiddenFields,null,this);Q=this.get("srcelement");if(this.get("type")=="submit"||(Q&&Q.type=="submit")){U=P.getListeners(X,"keypress");V=false;if(U){T=U.length;if(T>0){S=T-1;do{if(U[S].fn==W){V=true;break}}while(S--)}}if(!V){P.on(X,"keypress",W)}}}},_showMenu:function(W){if(YAHOO.widget.MenuManager){YAHOO.widget.MenuManager.hideVisible()}if(O){O.hideAll()}var U=C.VIEWPORT_OFFSET,g=this._menu,d=this,h=d.get("element"),Y=false,c=I.getY(h),Z=I.getDocumentScrollTop(),Q,V,n;if(Z){c=c-Z}var T=c,S=(I.getViewportHeight()-(c+h.offsetHeight));function X(){if(Y){return(T-U)}else{return(S-U)}}function l(){var o=X();if(V>o){Q=g.cfg.getProperty("minscrollheight");if(o>Q){g.cfg.setProperty("maxheight",o);if(Y){g.align("bl","tl")}}if(o<Q){if(Y){g.cfg.setProperty("context",[h,"tl","bl"],true);g.align("tl","bl")}else{g.cfg.setProperty("context",[h,"bl","tl"],true);g.align("bl","tl");Y=true;return l()}}}}if(N&&g&&(g instanceof N)){g.cfg.applyConfig({context:[h,"tl","bl"],clicktohide:false,visible:true});g.cfg.fireQueue();g.cfg.setProperty("maxheight",0);g.align("tl","bl");if(W.type=="mousedown"){P.stopPropagation(W)}V=g.element.offsetHeight;n=g.element.lastChild;l();if(this.get("focusmenu")){this._menu.focus()}}else{if(C&&g&&(g instanceof C)){g.show();g.align("tl","bl");var f=X();V=g.element.offsetHeight;if(f<V){g.align("bl","tl");Y=true;f=X();if(f<V){g.align("tl","bl")}}}}},_hideMenu:function(){var Q=this._menu;if(Q){Q.hide()}},_onMouseOver:function(Q){if(!this._hasMouseEventHandlers){this.on("mouseout",this._onMouseOut);this.on("mousedown",this._onMouseDown);this.on("mouseup",this._onMouseUp);this._hasMouseEventHandlers=true}this.addStateCSSClasses("hover");if(this._activationButtonPressed){this.addStateCSSClasses("active")}if(this._bOptionPressed){this.addStateCSSClasses("activeoption")}if(this._activationButtonPressed||this._bOptionPressed){P.removeListener(document,"mouseup",this._onDocumentMouseUp)}},_onMouseOut:function(Q){this.removeStateCSSClasses("hover");if(this.get("type")!="menu"){this.removeStateCSSClasses("active")}if(this._activationButtonPressed||this._bOptionPressed){P.on(document,"mouseup",this._onDocumentMouseUp,null,this)}},_onDocumentMouseUp:function(T){this._activationButtonPressed=false;this._bOptionPressed=false;var U=this.get("type"),Q,S;if(U=="menu"||U=="split"){Q=P.getTarget(T);S=this._menu.element;if(Q!=S&&!I.isAncestor(S,Q)){this.removeStateCSSClasses((U=="menu"?"active":"activeoption"));this._hideMenu()}}P.removeListener(document,"mouseup",this._onDocumentMouseUp)},_onMouseDown:function(U){var W,S,V,T;function Q(){this._hideMenu();this.removeListener("mouseup",Q)}if((U.which||U.button)==1){if(!this.hasFocus()){this.focus()}W=this.get("type");if(W=="split"){S=this.get("element");V=P.getPageX(U)-I.getX(S);if((S.offsetWidth-this.OPTION_AREA_WIDTH)<V){this.fireEvent("option",U)}else{this.addStateCSSClasses("active");this._activationButtonPressed=true}}else{if(W=="menu"){if(this.isActive()){this._hideMenu();this._activationButtonPressed=false}else{this._showMenu(U);this._activationButtonPressed=true}}else{this.addStateCSSClasses("active");this._activationButtonPressed=true}}if(W=="split"||W=="menu"){T=this;this._hideMenuTimerId=window.setTimeout(function(){T.on("mouseup",Q)},250)}}},_onMouseUp:function(Q){var S=this.get("type");if(this._hideMenuTimerId){window.clearTimeout(this._hideMenuTimerId)}if(S=="checkbox"||S=="radio"){this.set("checked",!(this.get("checked")))}this._activationButtonPressed=false;if(this.get("type")!="menu"){this.removeStateCSSClasses("active")}},_onFocus:function(S){var Q;this.addStateCSSClasses("focus");if(this._activationKeyPressed){this.addStateCSSClasses("active")}D=this;if(!this._hasKeyEventHandlers){Q=this._button;P.on(Q,"blur",this._onBlur,null,this);P.on(Q,"keydown",this._onKeyDown,null,this);P.on(Q,"keyup",this._onKeyUp,null,this);this._hasKeyEventHandlers=true}this.fireEvent("focus",S)},_onBlur:function(Q){this.removeStateCSSClasses("focus");if(this.get("type")!="menu"){this.removeStateCSSClasses("active")}if(this._activationKeyPressed){P.on(document,"keyup",this._onDocumentKeyUp,null,this)}D=null;this.fireEvent("blur",Q)},_onDocumentKeyUp:function(Q){if(this._isActivationKey(P.getCharCode(Q))){this._activationKeyPressed=false;P.removeListener(document,"keyup",this._onDocumentKeyUp)}},_onKeyDown:function(S){var Q=this._menu;if(this.get("type")=="split"&&this._isSplitButtonOptionKey(S)){this.fireEvent("option",S)}else{if(this._isActivationKey(P.getCharCode(S))){if(this.get("type")=="menu"){this._showMenu(S)}else{this._activationKeyPressed=true;this.addStateCSSClasses("active")}}}if(Q&&Q.cfg.getProperty("visible")&&P.getCharCode(S)==27){Q.hide();this.focus()}},_onKeyUp:function(Q){var S;if(this._isActivationKey(P.getCharCode(Q))){S=this.get("type");if(S=="checkbox"||S=="radio"){this.set("checked",!(this.get("checked")))}this._activationKeyPressed=false;if(this.get("type")!="menu"){this.removeStateCSSClasses("active")}}},_onClick:function(U){var X=this.get("type"),Q,V,S,T,W;switch(X){case"radio":case"checkbox":if(this.get("checked")){Q=(X=="radio")?this.RADIO_CHECKED_TITLE:this.CHECKBOX_CHECKED_TITLE}else{Q=(X=="radio")?this.RADIO_DEFAULT_TITLE:this.CHECKBOX_DEFAULT_TITLE}this.set("title",Q);break;case"submit":this.submitForm();break;case"reset":V=this.getForm();if(V){V.reset()}break;case"menu":Q=this._menu.cfg.getProperty("visible")?this.MENUBUTTON_MENU_VISIBLE_TITLE:this.MENUBUTTON_DEFAULT_TITLE;this.set("title",Q);break;case"split":T=this.get("element");W=P.getPageX(U)-I.getX(T);if((T.offsetWidth-this.OPTION_AREA_WIDTH)<W){return false}else{this._hideMenu();S=this.get("srcelement");if(S&&S.type=="submit"){this.submitForm()}}Q=this._menu.cfg.getProperty("visible")?this.SPLITBUTTON_OPTION_VISIBLE_TITLE:this.SPLITBUTTON_DEFAULT_TITLE;this.set("title",Q);break}},_onAppendTo:function(S){var Q=this;window.setTimeout(function(){Q._addListenersToForm()},0)},_onFormReset:function(S){var T=this.get("type"),Q=this._menu;if(T=="checkbox"||T=="radio"){this.resetValue("checked")}if(N&&Q&&(Q instanceof N)){this.resetValue("selectedMenuItem")}},_onDocumentMouseDown:function(U){var Q=P.getTarget(U),T=this.get("element"),S=this._menu.element;if(Q!=T&&!I.isAncestor(T,Q)&&Q!=S&&!I.isAncestor(S,Q)){this._hideMenu();P.removeListener(document,"mousedown",this._onDocumentMouseDown)}},_onOption:function(Q){if(this.hasClass("yui-split-button-activeoption")){this._hideMenu();this._bOptionPressed=false}else{this._showMenu(Q);this._bOptionPressed=true}},_onOverlayBeforeShow:function(S){var Q=this._menu;Q.render(this.get("element").parentNode);Q.beforeShowEvent.unsubscribe(this._onOverlayBeforeShow)},_onMenuShow:function(S){P.on(document,"mousedown",this._onDocumentMouseDown,null,this);var Q,T;if(this.get("type")=="split"){Q=this.SPLITBUTTON_OPTION_VISIBLE_TITLE;T="activeoption"}else{Q=this.MENUBUTTON_MENU_VISIBLE_TITLE;T="active"}this.addStateCSSClasses(T);this.set("title",Q)},_onMenuHide:function(T){var S=this._menu,Q,U;if(this.get("type")=="split"){Q=this.SPLITBUTTON_DEFAULT_TITLE;U="activeoption"}else{Q=this.MENUBUTTON_DEFAULT_TITLE;U="active"}this.removeStateCSSClasses(U);this.set("title",Q);if(this.get("type")=="split"){this._bOptionPressed=false}},_onMenuKeyDown:function(T,S){var Q=S[0];if(P.getCharCode(Q)==27){this.focus();if(this.get("type")=="split"){this._bOptionPressed=false}}},_onMenuRender:function(S){var U=this.get("element"),Q=U.parentNode,T=this._menu.element;if(Q!=T.parentNode){Q.appendChild(T)}this.set("selectedMenuItem",this.get("selectedMenuItem"))},_onMenuItemSelected:function(T,S,Q){var U=S[0];if(U){this.set("selectedMenuItem",Q)}},_onMenuItemAdded:function(T,S,Q){var U=S[0];U.cfg.subscribeToConfigEvent("selected",this._onMenuItemSelected,U,this)},_onMenuClick:function(S,Q){var U=Q[1],T;if(U){T=this.get("srcelement");if(T&&T.type=="submit"){this.submitForm()}this._hideMenu()}},createButtonElement:function(Q){var T=this.NODE_NAME,S=document.createElement(T);S.innerHTML="<"+T+' class="first-child">'+(Q=="link"?"<a></a>":'<button type="button"></button>')+"</"+T+">";return S},addStateCSSClasses:function(Q){var S=this.get("type");if(M.isString(Q)){if(Q!="activeoption"){this.addClass(this.CSS_CLASS_NAME+("-"+Q))}this.addClass("yui-"+S+("-button-"+Q))}},removeStateCSSClasses:function(Q){var S=this.get("type");if(M.isString(Q)){this.removeClass(this.CSS_CLASS_NAME+("-"+Q));this.removeClass("yui-"+S+("-button-"+Q))}},createHiddenFields:function(){this.removeHiddenFields();var W=this.getForm(),Z,S,U,X,Y,T,V,Q;if(W&&!this.get("disabled")){S=this.get("type");U=(S=="checkbox"||S=="radio");if(U||(F==this)){Z=H((U?S:"hidden"),this.get("name"),this.get("value"),this.get("checked"));if(Z){if(U){Z.style.display="none"}W.appendChild(Z)}}X=this._menu;if(N&&X&&(X instanceof N)){Q=X.srcElement;Y=this.get("selectedMenuItem");if(Y){if(Q&&Q.nodeName.toUpperCase()=="SELECT"){W.appendChild(Q);Q.selectedIndex=Y.index}else{V=(Y.value===null||Y.value==="")?Y.cfg.getProperty("text"):Y.value;T=this.get("name");if(V&&T){Q=H("hidden",(T+"_options"),V);W.appendChild(Q)}}}}if(Z&&Q){this._hiddenFields=[Z,Q]}else{if(!Z&&Q){this._hiddenFields=Q}else{if(Z&&!Q){this._hiddenFields=Z}}}return this._hiddenFields}},removeHiddenFields:function(){var U=this._hiddenFields,S,T;function Q(V){if(I.inDocument(V)){V.parentNode.removeChild(V)}}if(U){if(M.isArray(U)){S=U.length;if(S>0){T=S-1;do{Q(U[T])}while(T--)}}else{Q(U)}this._hiddenFields=null}},submitForm:function(){var U=this.getForm(),T=this.get("srcelement"),S=false,Q;if(U){if(this.get("type")=="submit"||(T&&T.type=="submit")){F=this}if(YAHOO.env.ua.ie){S=U.fireEvent("onsubmit")}else{Q=document.createEvent("HTMLEvents");Q.initEvent("submit",true,true);S=U.dispatchEvent(Q)}if((YAHOO.env.ua.ie||YAHOO.env.ua.webkit)&&S){U.submit()}}return S},init:function(Q,Y){var T=Y.type=="link"?"a":"button",V=Y.srcelement,X=Q.getElementsByTagName(T)[0],W;if(!X){W=Q.getElementsByTagName("input")[0];if(W){X=document.createElement("button");X.setAttribute("type","button");W.parentNode.replaceChild(X,W)}}this._button=X;YAHOO.widget.Button.superclass.init.call(this,Q,Y);E[this.get("id")]=this;this.addClass(this.CSS_CLASS_NAME);this.addClass("yui-"+this.get("type")+"-button");P.on(this._button,"focus",this._onFocus,null,this);this.on("mouseover",this._onMouseOver);this.on("click",this._onClick);this.on("appendTo",this._onAppendTo);var c=this.get("container"),S=this.get("element"),Z=I.inDocument(S),U;if(c){if(V&&V!=S){U=V.parentNode;if(U){U.removeChild(V)}}if(M.isString(c)){P.onContentReady(c,function(){this.appendTo(c)},null,this)}else{this.appendTo(c)}}else{if(!Z&&V&&V!=S){U=V.parentNode;if(U){this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:U});U.replaceChild(S,V);this.fireEvent("appendTo",{type:"appendTo",target:U})}}else{if(this.get("type")!="link"&&Z&&V&&V==S){this._addListenersToForm()}}}},initAttributes:function(S){var Q=S||{};YAHOO.widget.Button.superclass.initAttributes.call(this,Q);this.setAttributeConfig("type",{value:(Q.type||"push"),validator:M.isString,writeOnce:true,method:this._setType});this.setAttributeConfig("label",{value:Q.label,validator:M.isString,method:this._setLabel});this.setAttributeConfig("value",{value:Q.value});this.setAttributeConfig("name",{value:Q.name,validator:M.isString});this.setAttributeConfig("tabindex",{value:Q.tabindex,validator:M.isNumber,method:this._setTabIndex});this.configureAttribute("title",{value:Q.title,validator:M.isString,method:this._setTitle});this.setAttributeConfig("disabled",{value:(Q.disabled||false),validator:M.isBoolean,method:this._setDisabled});this.setAttributeConfig("href",{value:Q.href,validator:M.isString,method:this._setHref});this.setAttributeConfig("target",{value:Q.target,validator:M.isString,method:this._setTarget});this.setAttributeConfig("checked",{value:(Q.checked||false),validator:M.isBoolean,method:this._setChecked});this.setAttributeConfig("container",{value:Q.container,writeOnce:true});this.setAttributeConfig("srcelement",{value:Q.srcelement,writeOnce:true});this.setAttributeConfig("menu",{value:null,method:this._setMenu,writeOnce:true});this.setAttributeConfig("lazyloadmenu",{value:(Q.lazyloadmenu===false?false:true),validator:M.isBoolean,writeOnce:true});this.setAttributeConfig("menuclassname",{value:(Q.menuclassname||"yui-button-menu"),validator:M.isString,method:this._setMenuClassName,writeOnce:true});this.setAttributeConfig("selectedMenuItem",{value:null,method:this._setSelectedMenuItem});this.setAttributeConfig("onclick",{value:Q.onclick,method:this._setOnClick});this.setAttributeConfig("focusmenu",{value:(Q.focusmenu===false?false:true),validator:M.isBoolean})},focus:function(){if(!this.get("disabled")){this._button.focus()}},blur:function(){if(!this.get("disabled")){this._button.blur()}},hasFocus:function(){return(D==this)},isActive:function(){return this.hasClass(this.CSS_CLASS_NAME+"-active")},getMenu:function(){return this._menu},getForm:function(){return this._button.form},getHiddenFields:function(){return this._hiddenFields},destroy:function(){var T=this.get("element"),S=T.parentNode,Q=this._menu,V;if(Q){if(O&&O.find(Q)){O.remove(Q)}Q.destroy()}P.purgeElement(T);P.purgeElement(this._button);P.removeListener(document,"mouseup",this._onDocumentMouseUp);P.removeListener(document,"keyup",this._onDocumentKeyUp);P.removeListener(document,"mousedown",this._onDocumentMouseDown);var U=this.getForm();if(U){P.removeListener(U,"reset",this._onFormReset);P.removeListener(U,"submit",this.createHiddenFields)}this.unsubscribeAll();if(S){S.removeChild(T)}delete E[this.get("id")];V=I.getElementsByClassName(this.CSS_CLASS_NAME,this.NODE_NAME,U);if(M.isArray(V)&&V.length===0){P.removeListener(U,"keypress",YAHOO.widget.Button.onFormKeyPress)}},fireEvent:function(S,Q){if(this.DOM_EVENTS[S]&&this.get("disabled")){return }YAHOO.widget.Button.superclass.fireEvent.call(this,S,Q)},toString:function(){return("Button "+this.get("id"))}});YAHOO.widget.Button.onFormKeyPress=function(V){var T=P.getTarget(V),W=P.getCharCode(V),U=T.nodeName&&T.nodeName.toUpperCase(),Q=T.type,X=false,Z,c,S,d;function Y(h){var g,f;switch(h.nodeName.toUpperCase()){case"INPUT":case"BUTTON":if(h.type=="submit"&&!h.disabled){if(!X&&!S){S=h}if(c&&!d){d=h}}break;default:g=h.id;if(g){Z=E[g];if(Z){X=true;if(!Z.get("disabled")){f=Z.get("srcelement");if(!c&&(Z.get("type")=="submit"||(f&&f.type=="submit"))){c=Z}}}}break}}if(W==13&&((U=="INPUT"&&(Q=="text"||Q=="password"||Q=="checkbox"||Q=="radio"||Q=="file"))||U=="SELECT")){I.getElementsBy(Y,"*",this);if(S){S.focus()}else{if(!S&&c){if(d){P.preventDefault(V)}c.submitForm()}}}};YAHOO.widget.Button.addHiddenFieldsToForm=function(Q){var W=I.getElementsByClassName(YAHOO.widget.Button.prototype.CSS_CLASS_NAME,"*",Q),U=W.length,V,S,T;if(U>0){for(T=0;T<U;T++){S=W[T].id;if(S){V=E[S];if(V){V.createHiddenFields()}}}}};YAHOO.widget.Button.getButton=function(Q){var S=E[Q];if(S){return S}}})();(function(){var D=YAHOO.util.Dom,C=YAHOO.util.Event,E=YAHOO.lang,A=YAHOO.widget.Button,F={};YAHOO.widget.ButtonGroup=function(N,K){var M=YAHOO.widget.ButtonGroup.superclass.constructor,O,I,H;if(arguments.length==1&&!E.isString(N)&&!N.nodeName){if(!N.id){H=D.generateId();N.id=H}M.call(this,(this._createGroupElement()),N)}else{if(E.isString(N)){I=D.get(N);if(I){if(I.nodeName.toUpperCase()==this.NODE_NAME){M.call(this,I,K)}}}else{O=N.nodeName.toUpperCase();if(O&&O==this.NODE_NAME){if(!N.id){N.id=D.generateId()}M.call(this,N,K)}}}};YAHOO.extend(YAHOO.widget.ButtonGroup,YAHOO.util.Element,{_buttons:null,NODE_NAME:"DIV",CSS_CLASS_NAME:"yui-buttongroup",_createGroupElement:function(){var H=document.createElement(this.NODE_NAME);return H},_setDisabled:function(I){var K=this.getCount(),H;if(K>0){H=K-1;do{this._buttons[H].set("disabled",I)}while(H--)}},_onKeyDown:function(O){var I=C.getTarget(O),M=C.getCharCode(O),K=I.parentNode.parentNode.id,N=F[K],H=-1;if(M==37||M==38){H=(N.index===0)?(this._buttons.length-1):(N.index-1)}else{if(M==39||M==40){H=(N.index===(this._buttons.length-1))?0:(N.index+1)}}if(H>-1){this.check(H);this.getButton(H).focus()}},_onAppendTo:function(K){var M=this._buttons,I=M.length,H;for(H=0;H<I;H++){M[H].appendTo(this.get("element"))}},_onButtonCheckedChange:function(I,H){var M=I.newValue,K=this.get("checkedButton");if(M&&K!=H){if(K){K.set("checked",false,true)}this.set("checkedButton",H);this.set("value",H.get("value"))}else{if(K&&!K.set("checked")){K.set("checked",true,true)}}},init:function(M,K){this._buttons=[];YAHOO.widget.ButtonGroup.superclass.init.call(this,M,K);this.addClass(this.CSS_CLASS_NAME);var N=this.getElementsByClassName("yui-radio-button");if(N.length>0){this.addButtons(N)}function H(O){return(O.type=="radio")}N=D.getElementsBy(H,"input",this.get("element"));if(N.length>0){this.addButtons(N)}this.on("keydown",this._onKeyDown);this.on("appendTo",this._onAppendTo);var I=this.get("container");if(I){if(E.isString(I)){C.onContentReady(I,function(){this.appendTo(I)},null,this)}else{this.appendTo(I)}}},initAttributes:function(I){var H=I||{};YAHOO.widget.ButtonGroup.superclass.initAttributes.call(this,H);this.setAttributeConfig("name",{value:H.name,validator:E.isString});this.setAttributeConfig("disabled",{value:(H.disabled||false),validator:E.isBoolean,method:this._setDisabled});this.setAttributeConfig("value",{value:H.value});this.setAttributeConfig("container",{value:H.container,writeOnce:true});this.setAttributeConfig("checkedButton",{value:null})},addButton:function(N){var P,O,I,H,K,M;if(N instanceof A&&N.get("type")=="radio"){P=N}else{if(!E.isString(N)&&!N.nodeName){N.type="radio";P=new A(N)}else{P=new A(N,{type:"radio"})}}if(P){H=this._buttons.length;K=P.get("name");M=this.get("name");P.index=H;this._buttons[H]=P;F[P.get("id")]=P;if(K!=M){P.set("name",M)}if(this.get("disabled")){P.set("disabled",true)}if(P.get("checked")){this.set("checkedButton",P)}O=P.get("element");I=this.get("element");if(O.parentNode!=I){I.appendChild(O)}P.on("checkedChange",this._onButtonCheckedChange,P,this);return P}},addButtons:function(I){var K,M,N,H;if(E.isArray(I)){K=I.length;N=[];if(K>0){for(H=0;H<K;H++){M=this.addButton(I[H]);if(M){N[N.length]=M}}if(N.length>0){return N}}}},removeButton:function(K){var M=this.getButton(K),I,H;if(M){this._buttons.splice(K,1);delete F[M.get("id")];M.removeListener("checkedChange",this._onButtonCheckedChange);M.destroy();I=this._buttons.length;if(I>0){H=this._buttons.length-1;do{this._buttons[H].index=H}while(H--)}}},getButton:function(H){if(E.isNumber(H)){return this._buttons[H]}},getButtons:function(){return this._buttons},getCount:function(){return this._buttons.length},focus:function(K){var M,I,H;if(E.isNumber(K)){M=this._buttons[K];if(M){M.focus()}}else{I=this.getCount();for(H=0;H<I;H++){M=this._buttons[H];if(!M.get("disabled")){M.focus();break}}}},check:function(H){var I=this.getButton(H);if(I){I.set("checked",true)}},destroy:function(){var M=this._buttons.length,K=this.get("element"),H=K.parentNode,I;if(M>0){I=this._buttons.length-1;do{this._buttons[I].destroy()}while(I--)}C.purgeElement(K);H.removeChild(K)},toString:function(){return("ButtonGroup "+this.get("id"))}})})();YAHOO.register("button",YAHOO.widget.Button,{version:"2.4.1",build:"742"});(function(){var C=YAHOO.util.Dom,A=YAHOO.util.Event,D=YAHOO.lang;if(YAHOO.widget.Button){YAHOO.widget.ToolbarButtonAdvanced=YAHOO.widget.Button;YAHOO.widget.ToolbarButtonAdvanced.prototype.buttonType="rich";YAHOO.widget.ToolbarButtonAdvanced.prototype.checkValue=function(H){var F=this.getMenu().getItems();if(F.length===0){this.getMenu()._onBeforeShow();F=this.getMenu().getItems()}for(var E=0;E<F.length;E++){F[E].cfg.setProperty("checked",false);if(F[E].value==H){F[E].cfg.setProperty("checked",true)}}}}else{YAHOO.widget.ToolbarButtonAdvanced=function(){}}YAHOO.widget.ToolbarButton=function(F,E){if(D.isObject(arguments[0])&&!C.get(F).nodeType){E=F}var I=(E||{});var H={element:null,attributes:I};if(!H.attributes.type){H.attributes.type="push"}H.element=document.createElement("span");H.element.setAttribute("unselectable","on");H.element.className="yui-button yui-"+H.attributes.type+"-button";H.element.innerHTML='<span class="first-child"><a href="#">LABEL</a></span>';H.attributes.id=C.generateId();YAHOO.widget.ToolbarButton.superclass.constructor.call(this,H.element,H.attributes)};YAHOO.extend(YAHOO.widget.ToolbarButton,YAHOO.util.Element,{buttonType:"normal",_handleMouseOver:function(){if(!this.get("disabled")){this.addClass("yui-button-hover");this.addClass("yui-"+this.get("type")+"-button-hover")}},_handleMouseOut:function(){this.removeClass("yui-button-hover");this.removeClass("yui-"+this.get("type")+"-button-hover")},checkValue:function(H){if(this.get("type")=="menu"){var F=this._button.options;for(var E=0;E<F.length;E++){if(F[E].value==H){F.selectedIndex=E}}}},init:function(F,E){YAHOO.widget.ToolbarButton.superclass.init.call(this,F,E);this.on("mouseover",this._handleMouseOver,this,true);this.on("mouseout",this._handleMouseOut,this,true)},initAttributes:function(E){YAHOO.widget.ToolbarButton.superclass.initAttributes.call(this,E);this.setAttributeConfig("value",{value:E.value});this.setAttributeConfig("menu",{value:E.menu||false});this.setAttributeConfig("type",{value:E.type,writeOnce:true,method:function(K){var I,H;if(!this._button){this._button=this.get("element").getElementsByTagName("a")[0]}switch(K){case"select":case"menu":I=document.createElement("select");var M=this.get("menu");for(var F=0;F<M.length;F++){H=document.createElement("option");H.innerHTML=M[F].text;H.value=M[F].value;if(M[F].checked){H.selected=true}I.appendChild(H)}this._button.parentNode.replaceChild(I,this._button);A.on(I,"change",this._handleSelect,this,true);this._button=I;break}}});this.setAttributeConfig("disabled",{value:E.disabled||false,method:function(F){if(F){this.addClass("yui-button-disabled");this.addClass("yui-"+this.get("type")+"-button-disabled")}else{this.removeClass("yui-button-disabled");this.removeClass("yui-"+this.get("type")+"-button-disabled")}if(this.get("type")=="menu"){this._button.disabled=F}}});this.setAttributeConfig("label",{value:E.label,method:function(F){if(!this._button){this._button=this.get("element").getElementsByTagName("a")[0]}if(this.get("type")=="push"){this._button.innerHTML=F}}});this.setAttributeConfig("title",{value:E.title});this.setAttributeConfig("container",{value:null,writeOnce:true,method:function(F){this.appendTo(F)}})},_handleSelect:function(F){var E=A.getTarget(F);var H=E.options[E.selectedIndex].value;this.fireEvent("change",{type:"change",value:H})},getMenu:function(){return this.get("menu")},fireEvent:function(F,E){if(this.DOM_EVENTS[F]&&this.get("disabled")){return }YAHOO.widget.ToolbarButton.superclass.fireEvent.call(this,F,E)},toString:function(){return"ToolbarButton ("+this.get("id")+")"}})})();(function(){var C=YAHOO.util.Dom,A=YAHOO.util.Event,E=YAHOO.lang;YAHOO.widget.Toolbar=function(I,H){if(E.isObject(arguments[0])&&!C.get(I).nodeType){H=I}var M=(H||{});var K={element:null,attributes:M};if(E.isString(I)&&C.get(I)){K.element=C.get(I)}else{if(E.isObject(I)&&C.get(I)&&C.get(I).nodeType){K.element=C.get(I)}}if(!K.element){K.element=document.createElement("DIV");K.element.id=C.generateId();if(M.container&&C.get(M.container)){C.get(M.container).appendChild(K.element)}}if(!K.element.id){K.element.id=((E.isString(I))?I:C.generateId())}var F=document.createElement("DIV");K.attributes.cont=F;C.addClass(F,"yui-toolbar-subcont");K.element.appendChild(F);K.attributes.element=K.element;K.attributes.id=K.element.id;YAHOO.widget.Toolbar.superclass.constructor.call(this,K.element,K.attributes)};function D(K,F,M){C.addClass(this.element,"yui-toolbar-"+M.get("value")+"-menu");if(C.hasClass(M._button.parentNode.parentNode,"yui-toolbar-select")){C.addClass(this.element,"yui-toolbar-select-menu")}var H=this.getItems();for(var I=0;I<H.length;I++){C.addClass(H[I].element,"yui-toolbar-"+M.get("value")+"-"+((H[I].value)?H[I].value.replace(/ /g,"-").toLowerCase():H[I]._oText.nodeValue.replace(/ /g,"-").toLowerCase()));C.addClass(H[I].element,"yui-toolbar-"+M.get("value")+"-"+((H[I].value)?H[I].value.replace(/ /g,"-"):H[I]._oText.nodeValue.replace(/ /g,"-")))}}YAHOO.extend(YAHOO.widget.Toolbar,YAHOO.util.Element,{buttonType:YAHOO.widget.ToolbarButton,dd:null,_colorData:{"#111111":"Obsidian","#2D2D2D":"Dark Gray","#434343":"Shale","#5B5B5B":"Flint","#737373":"Gray","#8B8B8B":"Concrete","#A2A2A2":"Gray","#B9B9B9":"Titanium","#000000":"Black","#D0D0D0":"Light Gray","#E6E6E6":"Silver","#FFFFFF":"White","#BFBF00":"Pumpkin","#FFFF00":"Yellow","#FFFF40":"Banana","#FFFF80":"Pale Yellow","#FFFFBF":"Butter","#525330":"Raw Siena","#898A49":"Mildew","#AEA945":"Olive","#7F7F00":"Paprika","#C3BE71":"Earth","#E0DCAA":"Khaki","#FCFAE1":"Cream","#60BF00":"Cactus","#80FF00":"Chartreuse","#A0FF40":"Green","#C0FF80":"Pale Lime","#DFFFBF":"Light Mint","#3B5738":"Green","#668F5A":"Lime Gray","#7F9757":"Yellow","#407F00":"Clover","#8A9B55":"Pistachio","#B7C296":"Light Jade","#E6EBD5":"Breakwater","#00BF00":"Spring Frost","#00FF80":"Pastel Green","#40FFA0":"Light Emerald","#80FFC0":"Sea Foam","#BFFFDF":"Sea Mist","#033D21":"Dark Forrest","#438059":"Moss","#7FA37C":"Medium Green","#007F40":"Pine","#8DAE94":"Yellow Gray Green","#ACC6B5":"Aqua Lung","#DDEBE2":"Sea Vapor","#00BFBF":"Fog","#00FFFF":"Cyan","#40FFFF":"Turquoise Blue","#80FFFF":"Light Aqua","#BFFFFF":"Pale Cyan","#033D3D":"Dark Teal","#347D7E":"Gray Turquoise","#609A9F":"Green Blue","#007F7F":"Seaweed","#96BDC4":"Green Gray","#B5D1D7":"Soapstone","#E2F1F4":"Light Turquoise","#0060BF":"Summer Sky","#0080FF":"Sky Blue","#40A0FF":"Electric Blue","#80C0FF":"Light Azure","#BFDFFF":"Ice Blue","#1B2C48":"Navy","#385376":"Biscay","#57708F":"Dusty Blue","#00407F":"Sea Blue","#7792AC":"Sky Blue Gray","#A8BED1":"Morning Sky","#DEEBF6":"Vapor","#0000BF":"Deep Blue","#0000FF":"Blue","#4040FF":"Cerulean Blue","#8080FF":"Evening Blue","#BFBFFF":"Light Blue","#212143":"Deep Indigo","#373E68":"Sea Blue","#444F75":"Night Blue","#00007F":"Indigo Blue","#585E82":"Dockside","#8687A4":"Blue Gray","#D2D1E1":"Light Blue Gray","#6000BF":"Neon Violet","#8000FF":"Blue Violet","#A040FF":"Violet Purple","#C080FF":"Violet Dusk","#DFBFFF":"Pale Lavender","#302449":"Cool Shale","#54466F":"Dark Indigo","#655A7F":"Dark Violet","#40007F":"Violet","#726284":"Smoky Violet","#9E8FA9":"Slate Gray","#DCD1DF":"Violet White","#BF00BF":"Royal Violet","#FF00FF":"Fuchsia","#FF40FF":"Magenta","#FF80FF":"Orchid","#FFBFFF":"Pale Magenta","#4A234A":"Dark Purple","#794A72":"Medium Purple","#936386":"Cool Granite","#7F007F":"Purple","#9D7292":"Purple Moon","#C0A0B6":"Pale Purple","#ECDAE5":"Pink Cloud","#BF005F":"Hot Pink","#FF007F":"Deep Pink","#FF409F":"Grape","#FF80BF":"Electric Pink","#FFBFDF":"Pink","#451528":"Purple Red","#823857":"Purple Dino","#A94A76":"Purple Gray","#7F003F":"Rose","#BC6F95":"Antique Mauve","#D8A5BB":"Cool Marble","#F7DDE9":"Pink Granite","#C00000":"Apple","#FF0000":"Fire Truck","#FF4040":"Pale Red","#FF8080":"Salmon","#FFC0C0":"Warm Pink","#441415":"Sepia","#82393C":"Rust","#AA4D4E":"Brick","#800000":"Brick Red","#BC6E6E":"Mauve","#D8A3A4":"Shrimp Pink","#F8DDDD":"Shell Pink","#BF5F00":"Dark Orange","#FF7F00":"Orange","#FF9F40":"Grapefruit","#FFBF80":"Canteloupe","#FFDFBF":"Wax","#482C1B":"Dark Brick","#855A40":"Dirt","#B27C51":"Tan","#7F3F00":"Nutmeg","#C49B71":"Mustard","#E1C4A8":"Pale Tan","#FDEEE0":"Marble"},_colorPicker:null,STR_COLLAPSE:"Collapse Toolbar",STR_SPIN_LABEL:"Spin Button with value {VALUE}. Use Control Shift Up Arrow and Control Shift Down arrow keys to increase or decrease the value.",STR_SPIN_UP:"Click to increase the value of this input",STR_SPIN_DOWN:"Click to decrease the value of this input",_titlebar:null,browser:YAHOO.env.ua,_buttonList:null,_buttonGroupList:null,_sep:null,_sepCount:null,_dragHandle:null,_toolbarConfigs:{renderer:true},CLASS_CONTAINER:"yui-toolbar-container",CLASS_DRAGHANDLE:"yui-toolbar-draghandle",CLASS_SEPARATOR:"yui-toolbar-separator",CLASS_DISABLED:"yui-toolbar-disabled",CLASS_PREFIX:"yui-toolbar",init:function(H,F){YAHOO.widget.Toolbar.superclass.init.call(this,H,F)},initAttributes:function(F){YAHOO.widget.Toolbar.superclass.initAttributes.call(this,F);this.addClass(this.CLASS_CONTAINER);this.setAttributeConfig("buttonType",{value:F.buttonType||"basic",writeOnce:true,validator:function(H){switch(H){case"advanced":case"basic":return true}return false},method:function(H){if(H=="advanced"){if(YAHOO.widget.Button){this.buttonType=YAHOO.widget.ToolbarButtonAdvanced}else{this.buttonType=YAHOO.widget.ToolbarButton}}else{this.buttonType=YAHOO.widget.ToolbarButton}}});this.setAttributeConfig("buttons",{value:[],writeOnce:true,method:function(I){for(var H in I){if(E.hasOwnProperty(I,H)){if(I[H].type=="separator"){this.addSeparator()}else{if(I[H].group!==undefined){this.addButtonGroup(I[H])}else{this.addButton(I[H])}}}}}});this.setAttributeConfig("disabled",{value:false,method:function(H){if(this.get("disabled")===H){return false}if(H){this.addClass(this.CLASS_DISABLED);this.set("draggable",false);this.disableAllButtons()}else{this.removeClass(this.CLASS_DISABLED);if(this._configs.draggable._initialConfig.value){this.set("draggable",true)}this.resetAllButtons()}}});this.setAttributeConfig("cont",{value:F.cont,readOnly:true});this.setAttributeConfig("grouplabels",{value:F.grouplabels||true,method:function(H){if(H){C.removeClass(this.get("cont"),(this.CLASS_PREFIX+"-nogrouplabels"))}else{C.addClass(this.get("cont"),(this.CLASS_PREFIX+"-nogrouplabels"))}}});this.setAttributeConfig("titlebar",{value:false,method:function(I){if(I){if(this._titlebar&&this._titlebar.parentNode){this._titlebar.parentNode.removeChild(this._titlebar)}this._titlebar=document.createElement("DIV");C.addClass(this._titlebar,this.CLASS_PREFIX+"-titlebar");if(E.isString(I)){var H=document.createElement("h2");H.tabIndex="-1";H.innerHTML=I;this._titlebar.appendChild(H)}if(this.get("firstChild")){this.insertBefore(this._titlebar,this.get("firstChild"))}else{this.appendChild(this._titlebar)}if(this.get("collapse")){this.set("collapse",true)}}else{if(this._titlebar){if(this._titlebar&&this._titlebar.parentNode){this._titlebar.parentNode.removeChild(this._titlebar)}}}}});this.setAttributeConfig("collapse",{value:false,method:function(K){var I=null;var H=C.getElementsByClassName("collapse","span",this._titlebar);if(K){if(H.length>0){return true}I=document.createElement("SPAN");I.innerHTML="X";I.title=this.STR_COLLAPSE;C.addClass(I,"collapse");this._titlebar.appendChild(I);A.addListener(I,"click",function(){if(C.hasClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed")){this.collapse(false)}else{this.collapse()}},this,true)}else{I=C.getElementsByClassName("collapse","span",this._titlebar);if(I[0]){if(C.hasClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed")){this.collapse(false)}I[0].parentNode.removeChild(I[0])}}}});this.setAttributeConfig("draggable",{value:(F.draggable||false),method:function(H){if(H&&!this.get("titlebar")){if(!this._dragHandle){this._dragHandle=document.createElement("SPAN");this._dragHandle.innerHTML="|";this._dragHandle.setAttribute("title","Click to drag the toolbar");this._dragHandle.id=this.get("id")+"_draghandle";C.addClass(this._dragHandle,this.CLASS_DRAGHANDLE);if(this.get("cont").hasChildNodes()){this.get("cont").insertBefore(this._dragHandle,this.get("cont").firstChild)}else{this.get("cont").appendChild(this._dragHandle)}this.dd=new YAHOO.util.DD(this.get("id"));this.dd.setHandleElId(this._dragHandle.id)}}else{if(this._dragHandle){this._dragHandle.parentNode.removeChild(this._dragHandle);this._dragHandle=null;this.dd=null}}if(this._titlebar){if(H){this.dd=new YAHOO.util.DD(this.get("id"));this.dd.setHandleElId(this._titlebar);C.addClass(this._titlebar,"draggable")}else{C.removeClass(this._titlebar,"draggable");if(this.dd){this.dd.unreg();this.dd=null}}}},validator:function(I){var H=true;if(!YAHOO.util.DD){H=false}return H}})},addButtonGroup:function(M){if(!this.get("element")){this._queue[this._queue.length]=["addButtonGroup",arguments];return false}if(!this.hasClass(this.CLASS_PREFIX+"-grouped")){this.addClass(this.CLASS_PREFIX+"-grouped")}var N=document.createElement("DIV");C.addClass(N,this.CLASS_PREFIX+"-group");C.addClass(N,this.CLASS_PREFIX+"-group-"+M.group);if(M.label){var H=document.createElement("h3");H.innerHTML=M.label;N.appendChild(H)}if(!this.get("grouplabels")){C.addClass(this.get("cont"),this.CLASS_PREFIX,"-nogrouplabels")}this.get("cont").appendChild(N);var K=document.createElement("ul");N.appendChild(K);if(!this._buttonGroupList){this._buttonGroupList={}}this._buttonGroupList[M.group]=K;for(var I=0;I<M.buttons.length;I++){var F=document.createElement("li");F.className=this.CLASS_PREFIX+"-groupitem";K.appendChild(F);if((M.buttons[I].type!==undefined)&&M.buttons[I].type=="separator"){this.addSeparator(F)}else{M.buttons[I].container=F;this.addButton(M.buttons[I])}}},addButtonToGroup:function(I,K,M){var H=this._buttonGroupList[K];var F=document.createElement("li");F.className=this.CLASS_PREFIX+"-groupitem";I.container=F;this.addButton(I,M);H.appendChild(F)},addButton:function(N,M){if(!this.get("element")){this._queue[this._queue.length]=["addButton",arguments];return false}if(!this._buttonList){this._buttonList=[]}if(!N.container){N.container=this.get("cont")}if((N.type=="menu")||(N.type=="split")||(N.type=="select")){if(E.isArray(N.menu)){for(var U in N.menu){if(E.hasOwnProperty(N.menu,U)){var c={fn:function(g,d,f){if(!N.menucmd){N.menucmd=N.value}N.value=((f.value)?f.value:f._oText.nodeValue)},scope:this};N.menu[U].onclick=c}}}}var V={},S=false;for(var P in N){if(E.hasOwnProperty(N,P)){if(!this._toolbarConfigs[P]){V[P]=N[P]}}}if(N.type=="select"){V.type="menu"}if(N.type=="spin"){V.type="push"}if(V.type=="color"){if(YAHOO.widget.Overlay){V=this._makeColorButton(V)}else{S=true}}if(V.menu){if((YAHOO.widget.Overlay)&&(N.menu instanceof YAHOO.widget.Overlay)){N.menu.showEvent.subscribe(function(){this._button=V})}else{for(var T=0;T<V.menu.length;T++){if(!V.menu[T].value){V.menu[T].value=V.menu[T].text}}if(this.browser.webkit){V.focusmenu=false}}}if(S){N=false}else{this._configs.buttons.value[this._configs.buttons.value.length]=N;var Y=new this.buttonType(V);if(!Y.buttonType){Y.buttonType="rich";Y.checkValue=function(g){var f=this.getMenu().getItems();if(f.length===0){this.getMenu()._onBeforeShow();f=this.getMenu().getItems()}for(var d=0;d<f.length;d++){f[d].cfg.setProperty("checked",false);if(f[d].value==g){f[d].cfg.setProperty("checked",true)}}}}if(this.get("disabled")){Y.set("disabled",true)}if(!N.id){N.id=Y.get("id")}if(M){var H=Y.get("element");var Q=null;if(M.get){Q=M.get("element").nextSibling}else{if(M.nextSibling){Q=M.nextSibling}}if(Q){Q.parentNode.insertBefore(H,Q)}}Y.addClass(this.CLASS_PREFIX+"-"+Y.get("value"));var X=document.createElement("span");X.className=this.CLASS_PREFIX+"-icon";Y.get("element").insertBefore(X,Y.get("firstChild"));if(Y._button.tagName.toLowerCase()=="button"){Y.get("element").setAttribute("unselectable","on");var Z=document.createElement("a");Z.innerHTML=Y._button.innerHTML;Z.href="#";A.on(Z,"click",function(d){A.stopEvent(d)});Y._button.parentNode.replaceChild(Z,Y._button);Y._button=Z}if(N.type=="select"){if(Y._button.tagName.toLowerCase()=="select"){X.parentNode.removeChild(X);var I=Y._button;var W=Y.get("element");W.parentNode.replaceChild(I,W)}else{Y.addClass(this.CLASS_PREFIX+"-select")}}if(N.type=="spin"){if(!E.isArray(N.range)){N.range=[10,100]}this._makeSpinButton(Y,N)}Y.get("element").setAttribute("title",Y.get("label"));if(N.type!="spin"){if((YAHOO.widget.Overlay)&&(V.menu instanceof YAHOO.widget.Overlay)){var K=function(g){var d=true;if(g.keyCode&&(g.keyCode==9)){d=false}if(d){this._colorPicker._button=N.value;var f=Y.getMenu().element;if(C.getStyle(f,"visibility")=="hidden"){Y.getMenu().show()}else{Y.getMenu().hide()}}YAHOO.util.Event.stopEvent(g)};Y.on("mousedown",K,N,this);Y.on("keydown",K,N,this)}else{if((N.type!="menu")&&(N.type!="select")){Y.on("keypress",this._buttonClick,N,this);Y.on("mousedown",function(d){YAHOO.util.Event.stopEvent(d);this._buttonClick(d,N)},N,this);Y.on("click",function(d){YAHOO.util.Event.stopEvent(d)})}else{Y.on("mousedown",function(d){YAHOO.util.Event.stopEvent(d)});Y.on("click",function(d){YAHOO.util.Event.stopEvent(d)});Y.on("change",function(d){if(!N.menucmd){N.menucmd=N.value}N.value=d.value;this._buttonClick(d,N)},this,true);var O=this;if(Y.getMenu().mouseDownEvent){Y.getMenu().mouseDownEvent.subscribe(function(g,f){var d=f[1];YAHOO.util.Event.stopEvent(f[0]);Y._onMenuClick(f[0],Y);if(!N.menucmd){N.menucmd=N.value}N.value=((d.value)?d.value:d._oText.nodeValue);O._buttonClick.call(O,f[1],N);Y._hideMenu();return false});Y.getMenu().clickEvent.subscribe(function(f,d){YAHOO.util.Event.stopEvent(d[0])});Y.getMenu().mouseUpEvent.subscribe(function(f,d){YAHOO.util.Event.stopEvent(d[0])})}}}}else{Y.on("mousedown",function(d){YAHOO.util.Event.stopEvent(d)});Y.on("click",function(d){YAHOO.util.Event.stopEvent(d)})}if(this.browser.ie){Y.DOM_EVENTS.focusin=true;Y.DOM_EVENTS.focusout=true;Y.on("focusin",function(d){YAHOO.util.Event.stopEvent(d)},N,this);Y.on("focusout",function(d){YAHOO.util.Event.stopEvent(d)},N,this);Y.on("click",function(d){YAHOO.util.Event.stopEvent(d)},N,this)}if(this.browser.webkit){Y.hasFocus=function(){return true}}this._buttonList[this._buttonList.length]=Y;if((N.type=="menu")||(N.type=="split")||(N.type=="select")){if(E.isArray(N.menu)){var F=Y.getMenu();if(F.renderEvent){F.renderEvent.subscribe(D,Y);if(N.renderer){F.renderEvent.subscribe(N.renderer,Y)}}}}}return N},addSeparator:function(F,K){if(!this.get("element")){this._queue[this._queue.length]=["addSeparator",arguments];return false}var H=((F)?F:this.get("cont"));if(!this.get("element")){this._queue[this._queue.length]=["addSeparator",arguments];return false}if(this._sepCount===null){this._sepCount=0}if(!this._sep){this._sep=document.createElement("SPAN");C.addClass(this._sep,this.CLASS_SEPARATOR);this._sep.innerHTML="|"}var I=this._sep.cloneNode(true);this._sepCount++;C.addClass(I,this.CLASS_SEPARATOR+"-"+this._sepCount);if(K){var M=null;if(K.get){M=K.get("element").nextSibling}else{if(K.nextSibling){M=K.nextSibling}else{M=K}}if(M){if(M==K){M.parentNode.appendChild(I)}else{M.parentNode.insertBefore(I,M)}}}else{H.appendChild(I)}return I},_createColorPicker:function(N){if(C.get(N+"_colors")){C.get(N+"_colors").parentNode.removeChild(C.get(N+"_colors"))}var H=document.createElement("div");H.className="yui-toolbar-colors";H.id=N+"_colors";H.style.display="none";A.on(window,"load",function(){document.body.appendChild(H)},this,true);this._colorPicker=H;var M="";for(var K in this._colorData){if(E.hasOwnProperty(this._colorData,K)){M+='<a style="background-color: '+K+'" href="#">'+K.replace("#","")+"</a>"}}M+="<span><em>X</em><strong></strong></span>";H.innerHTML=M;var I=H.getElementsByTagName("em")[0];var F=H.getElementsByTagName("strong")[0];A.on(H,"mouseover",function(P){var O=A.getTarget(P);if(O.tagName.toLowerCase()=="a"){I.style.backgroundColor=O.style.backgroundColor;F.innerHTML=this._colorData["#"+O.innerHTML]+"<br>"+O.innerHTML}},this,true);A.on(H,"focus",function(O){A.stopEvent(O)});A.on(H,"click",function(O){A.stopEvent(O)});A.on(H,"mousedown",function(P){A.stopEvent(P);var O=A.getTarget(P);if(O.tagName.toLowerCase()=="a"){this.fireEvent("colorPickerClicked",{type:"colorPickerClicked",target:this,button:this._colorPicker._button,color:O.innerHTML,colorName:this._colorData["#"+O.innerHTML]});this.getButtonByValue(this._colorPicker._button).getMenu().hide()}},this,true)},_resetColorPicker:function(){var H=this._colorPicker.getElementsByTagName("em")[0];var F=this._colorPicker.getElementsByTagName("strong")[0];H.style.backgroundColor="transparent";F.innerHTML=""},_makeColorButton:function(F){if(!this._colorPicker){this._createColorPicker(this.get("id"))}F.type="color";F.menu=new YAHOO.widget.Overlay(this.get("id")+"_"+F.value+"_menu",{visible:false,position:"absolute",iframe:true});F.menu.setBody("");F.menu.render(this.get("cont"));C.addClass(F.menu.element,"yui-button-menu");C.addClass(F.menu.element,"yui-color-button-menu");F.menu.beforeShowEvent.subscribe(function(){F.menu.cfg.setProperty("zindex",5);F.menu.cfg.setProperty("context",[this.getButtonById(F.id).get("element"),"tl","bl"]);this._resetColorPicker();var H=this._colorPicker;if(H.parentNode){H.parentNode.removeChild(H)}F.menu.setBody("");F.menu.appendToBody(H);this._colorPicker.style.display="block"},this,true);return F},_makeSpinButton:function(W,P){W.addClass(this.CLASS_PREFIX+"-spinbutton");var X=this,S=W._button.parentNode.parentNode,M=P.range,K=document.createElement("a"),I=document.createElement("a");K.href="#";I.href="#";K.className="up";K.title=this.STR_SPIN_UP;K.innerHTML=this.STR_SPIN_UP;I.className="down";I.title=this.STR_SPIN_DOWN;I.innerHTML=this.STR_SPIN_DOWN;S.appendChild(K);S.appendChild(I);var Q=YAHOO.lang.substitute(this.STR_SPIN_LABEL,{VALUE:W.get("label")});W.set("title",Q);var V=function(Y){Y=((Y<M[0])?M[0]:Y);Y=((Y>M[1])?M[1]:Y);return Y};var U=this.browser;var H=false;var O=this.STR_SPIN_LABEL;if(this._titlebar&&this._titlebar.firstChild){H=this._titlebar.firstChild}var F=function(Z){YAHOO.util.Event.stopEvent(Z);if(!W.get("disabled")&&(Z.keyCode!=9)){var c=parseInt(W.get("label"),10);c++;c=V(c);W.set("label",""+c);var Y=YAHOO.lang.substitute(O,{VALUE:W.get("label")});W.set("title",Y);if(!U.webkit&&H){}X._buttonClick(Z,P)}};var T=function(Z){YAHOO.util.Event.stopEvent(Z);if(!W.get("disabled")&&(Z.keyCode!=9)){var c=parseInt(W.get("label"),10);c--;c=V(c);W.set("label",""+c);var Y=YAHOO.lang.substitute(O,{VALUE:W.get("label")});W.set("title",Y);if(!U.webkit&&H){}X._buttonClick(Z,P)}};var N=function(Y){if(Y.keyCode==38){F(Y)}else{if(Y.keyCode==40){T(Y)}else{if(Y.keyCode==107&&Y.shiftKey){F(Y)}else{if(Y.keyCode==109&&Y.shiftKey){T(Y)}}}}};W.on("keydown",N,this,true);A.on(K,"mousedown",function(Y){A.stopEvent(Y)},this,true);A.on(I,"mousedown",function(Y){A.stopEvent(Y)},this,true);A.on(K,"click",F,this,true);A.on(I,"click",T,this,true)},_buttonClick:function(P,H){var F=true;if(P&&P.type=="keypress"){if(P.keyCode==9){F=false}else{if((P.keyCode===13)||(P.keyCode===0)||(P.keyCode===32)){}else{F=false}}}if(F){var S=true,K=false;if(H.value){K=this.fireEvent(H.value+"Click",{type:H.value+"Click",target:this.get("element"),button:H});if(K===false){S=false}}if(H.menucmd&&S){K=this.fireEvent(H.menucmd+"Click",{type:H.menucmd+"Click",target:this.get("element"),button:H});if(K===false){S=false}}if(S){this.fireEvent("buttonClick",{type:"buttonClick",target:this.get("element"),button:H})}if(H.type=="select"){var O=this.getButtonById(H.id);if(O.buttonType=="rich"){var N=H.value;for(var M=0;M<H.menu.length;M++){if(H.menu[M].value==H.value){N=H.menu[M].text;break}}O.set("label",'<span class="yui-toolbar-'+H.menucmd+"-"+(H.value).replace(/ /g,"-").toLowerCase()+'">'+N+"</span>");var Q=O.getMenu().getItems();for(var I=0;I<Q.length;I++){if(Q[I].value.toLowerCase()==H.value.toLowerCase()){Q[I].cfg.setProperty("checked",true)}else{Q[I].cfg.setProperty("checked",false)}}}}}if(P){A.stopEvent(P)}},getButtonById:function(I){var F=this._buttonList.length;for(var H=0;H<F;H++){if(this._buttonList[H].get("id")==I){return this._buttonList[H]}}return false},getButtonByValue:function(O){var K=this.get("buttons");var H=K.length;for(var M=0;M<H;M++){if(K[M].group!==undefined){for(var F=0;F<K[M].buttons.length;F++){if((K[M].buttons[F].value==O)||(K[M].buttons[F].menucmd==O)){return this.getButtonById(K[M].buttons[F].id)}if(K[M].buttons[F].menu){for(var N=0;N<K[M].buttons[F].menu.length;N++){if(K[M].buttons[F].menu[N].value==O){return this.getButtonById(K[M].buttons[F].id)}}}}}else{if((K[M].value==O)||(K[M].menucmd==O)){return this.getButtonById(K[M].id)}if(K[M].menu){for(var I=0;I<K[M].menu.length;I++){if(K[M].menu[I].value==O){return this.getButtonById(K[M].id)}}}}}return false},getButtonByIndex:function(F){if(this._buttonList[F]){return this._buttonList[F]}else{return false}},getButtons:function(){return this._buttonList},disableButton:function(H){var F=H;if(E.isString(H)){F=this.getButtonById(H)}if(E.isNumber(H)){F=this.getButtonByIndex(H)}if((!(F instanceof YAHOO.widget.ToolbarButton))&&(!(F instanceof YAHOO.widget.ToolbarButtonAdvanced))){F=this.getButtonByValue(H)}if((F instanceof YAHOO.widget.ToolbarButton)||(F instanceof YAHOO.widget.ToolbarButtonAdvanced)){F.set("disabled",true)}else{return false}},enableButton:function(H){if(this.get("disabled")){return false}var F=H;if(E.isString(H)){F=this.getButtonById(H)}if(E.isNumber(H)){F=this.getButtonByIndex(H)}if((!(F instanceof YAHOO.widget.ToolbarButton))&&(!(F instanceof YAHOO.widget.ToolbarButtonAdvanced))){F=this.getButtonByValue(H)}if((F instanceof YAHOO.widget.ToolbarButton)||(F instanceof YAHOO.widget.ToolbarButtonAdvanced)){if(F.get("disabled")){F.set("disabled",false)}}else{return false}},selectButton:function(M,I){var H=M;if(M){if(E.isString(M)){H=this.getButtonById(M)}if(E.isNumber(M)){H=this.getButtonByIndex(M)}if((!(H instanceof YAHOO.widget.ToolbarButton))&&(!(H instanceof YAHOO.widget.ToolbarButtonAdvanced))){H=this.getButtonByValue(M)}if((H instanceof YAHOO.widget.ToolbarButton)||(H instanceof YAHOO.widget.ToolbarButtonAdvanced)){H.addClass("yui-button-selected");H.addClass("yui-button-"+H.get("value")+"-selected");if(I){if(H.buttonType=="rich"){var K=H.getMenu().getItems();for(var F=0;F<K.length;F++){if(K[F].value==I){K[F].cfg.setProperty("checked",true);H.set("label",'<span class="yui-toolbar-'+H.get("value")+"-"+(I).replace(/ /g,"-").toLowerCase()+'">'+K[F]._oText.nodeValue+"</span>")}else{K[F].cfg.setProperty("checked",false)}}}}}else{return false}}},deselectButton:function(H){var F=H;if(E.isString(H)){F=this.getButtonById(H)}if(E.isNumber(H)){F=this.getButtonByIndex(H)}if((!(F instanceof YAHOO.widget.ToolbarButton))&&(!(F instanceof YAHOO.widget.ToolbarButtonAdvanced))){F=this.getButtonByValue(H)}if((F instanceof YAHOO.widget.ToolbarButton)||(F instanceof YAHOO.widget.ToolbarButtonAdvanced)){F.removeClass("yui-button-selected");F.removeClass("yui-button-"+F.get("value")+"-selected");F.removeClass("yui-button-hover")}else{return false}},deselectAllButtons:function(){var F=this._buttonList.length;for(var H=0;H<F;H++){this.deselectButton(this._buttonList[H])}},disableAllButtons:function(){if(this.get("disabled")){return false}var F=this._buttonList.length;for(var H=0;H<F;H++){this.disableButton(this._buttonList[H])}},enableAllButtons:function(){if(this.get("disabled")){return false}var F=this._buttonList.length;for(var H=0;H<F;H++){this.enableButton(this._buttonList[H])}},resetAllButtons:function(M){if(!E.isObject(M)){M={}}if(this.get("disabled")){return false}var F=this._buttonList.length;for(var H=0;H<F;H++){var K=this._buttonList[H];var I=K._configs.disabled._initialConfig.value;if(M[K.get("id")]){this.enableButton(K);this.selectButton(K)}else{if(I){this.disableButton(K)}else{this.enableButton(K)}this.deselectButton(K)}}},destroyButton:function(M){var I=M;if(E.isString(M)){I=this.getButtonById(M)}if(E.isNumber(M)){I=this.getButtonByIndex(M)}if((!(I instanceof YAHOO.widget.ToolbarButton))&&(!(I instanceof YAHOO.widget.ToolbarButtonAdvanced))){I=this.getButtonByValue(M)}if((I instanceof YAHOO.widget.ToolbarButton)||(I instanceof YAHOO.widget.ToolbarButtonAdvanced)){var K=I.get("id");I.destroy();var F=this._buttonList.length;for(var H=0;H<F;H++){if(this._buttonList[H].get("id")==K){this._buttonList[H]=null}}}else{return false}},destroy:function(){this.get("element").innerHTML="";this.get("element").className="";for(var F in this){if(E.hasOwnProperty(this,F)){this[F]=null}}return true},collapse:function(H){var F=C.getElementsByClassName("collapse","span",this._titlebar);if(H===false){C.removeClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed");if(F[0]){C.removeClass(F[0],"collapsed")}this.fireEvent("toolbarExpanded",{type:"toolbarExpanded",target:this})}else{if(F[0]){C.addClass(F[0],"collapsed")}C.addClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed");this.fireEvent("toolbarCollapsed",{type:"toolbarCollapsed",target:this})}},toString:function(){return"Toolbar (#"+this.get("element").id+") with "+this._buttonList.length+" buttons."}})})();(function(){var D=YAHOO.util.Dom,A=YAHOO.util.Event,E=YAHOO.lang,C=YAHOO.widget.Toolbar;YAHOO.widget.SimpleEditor=function(K,H){var N={element:null,attributes:(H||{})},P=null;if(E.isString(K)){P=K}else{P=K.id}N.element=K;var I=document.createElement("DIV");N.attributes.element_cont=new YAHOO.util.Element(I,{id:P+"_container"});var O=document.createElement("div");D.addClass(O,"first-child");N.attributes.element_cont.appendChild(O);if(!N.attributes.toolbar_cont){N.attributes.toolbar_cont=document.createElement("DIV");N.attributes.toolbar_cont.id=P+"_toolbar";O.appendChild(N.attributes.toolbar_cont)}var M=document.createElement("DIV");O.appendChild(M);N.attributes.editor_wrapper=M;YAHOO.widget.SimpleEditor.superclass.constructor.call(this,N.element,N.attributes)};function F(H){return H.replace(/ /g,"-").toLowerCase()}YAHOO.extend(YAHOO.widget.SimpleEditor,YAHOO.util.Element,{_docType:'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',editorDirty:false,_defaultCSS:"html { height: 95%; } body { height: 100%; padding: 7px; background-color: #fff; font:13px/1.22 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small; } a { color: blue; text-decoration: underline; cursor: pointer; } .warning-localfile { border-bottom: 1px dashed red !important; } .yui-busy { cursor: wait !important; } img.selected { border: 2px dotted #808080; } img { cursor: pointer !important; border: none; }",_defaultToolbar:{collapse:true,titlebar:"Text Editing Tools",draggable:false,buttons:[{group:"fontstyle",label:"Font Name and Size",buttons:[{type:"select",label:"Arial",value:"fontname",disabled:true,menu:[{text:"Arial",checked:true},{text:"Arial Black"},{text:"Comic Sans MS"},{text:"Courier New"},{text:"Lucida Console"},{text:"Tahoma"},{text:"Times New Roman"},{text:"Trebuchet MS"},{text:"Verdana"}]},{type:"spin",label:"13",value:"fontsize",range:[9,75],disabled:true}]},{type:"separator"},{group:"textstyle",label:"Font Style",buttons:[{type:"push",label:"Bold CTRL + SHIFT + B",value:"bold"},{type:"push",label:"Italic CTRL + SHIFT + I",value:"italic"},{type:"push",label:"Underline CTRL + SHIFT + U",value:"underline"},{type:"separator"},{type:"color",label:"Font Color",value:"forecolor",disabled:true},{type:"color",label:"Background Color",value:"backcolor",disabled:true}]},{type:"separator"},{group:"indentlist",label:"Lists",buttons:[{type:"push",label:"Create an Unordered List",value:"insertunorderedlist"},{type:"push",label:"Create an Ordered List",value:"insertorderedlist"}]},{type:"separator"},{group:"insertitem",label:"Insert Item",buttons:[{type:"push",label:"HTML Link CTRL + SHIFT + L",value:"createlink",disabled:true},{type:"push",label:"Insert Image",value:"insertimage"}]}]},_lastButton:null,_baseHREF:function(){var H=document.location.href;if(H.indexOf("?")!==-1){H=H.substring(0,H.indexOf("?"))}H=H.substring(0,H.lastIndexOf("/"))+"/";return H}(),_lastImage:null,_blankImageLoaded:false,_fixNodesTimer:null,_nodeChangeTimer:null,_lastNodeChangeEvent:null,_lastNodeChange:0,_rendered:false,DOMReady:null,_selection:null,_mask:null,_showingHiddenElements:null,currentWindow:null,currentEvent:null,operaEvent:null,currentFont:null,currentElement:[],dompath:null,beforeElement:null,afterElement:null,invalidHTML:{form:true,input:true,button:true,select:true,link:true,html:true,body:true,script:true,style:true,textarea:true},toolbar:null,_contentTimer:null,_contentTimerCounter:0,_disabled:["createlink","fontname","fontsize","forecolor","backcolor"],_alwaysDisabled:{},_alwaysEnabled:{},_semantic:{bold:true,italic:true,underline:true},_tag2cmd:{b:"bold",strong:"bold",i:"italic",em:"italic",u:"underline",sup:"superscript",sub:"subscript",img:"insertimage",a:"createlink",ul:"insertunorderedlist",ol:"insertorderedlist"},_createIframe:function(){var N=document.createElement("iframe");N.id=this.get("id")+"_editor";var K={border:"0",frameBorder:"0",marginWidth:"0",marginHeight:"0",leftMargin:"0",topMargin:"0",allowTransparency:"true",width:"100%"};for(var M in K){if(E.hasOwnProperty(K,M)){N.setAttribute(M,K[M])}}var I="javascript:;";if(this.browser.ie){if(window.location.href.toLowerCase().indexOf("https")!==0){I="about:blank"}}N.setAttribute("src",I);var H=new YAHOO.util.Element(N);return H},_isElement:function(I,H){if(I&&I.tagName&&(I.tagName.toLowerCase()==H)){return true}if(I&&I.getAttribute&&(I.getAttribute("tag")==H)){return true}return false},_hasParent:function(I,H){if(!I||!I.parentNode){return false}while(I.parentNode){if(this._isElement(I,H)){return I}if(I.parentNode){I=I.parentNode}else{return false}}return false},_getDoc:function(){var H=false;if(this.get){if(this.get("iframe")){if(this.get("iframe").get){if(this.get("iframe").get("element")){try{if(this.get("iframe").get("element").contentWindow){if(this.get("iframe").get("element").contentWindow.document){H=this.get("iframe").get("element").contentWindow.document;return H}}}catch(I){}}}}}return false},_getWindow:function(){return this.get("iframe").get("element").contentWindow},_focusWindow:function(H){if(this.browser.webkit){if(H){this._getSelection().setBaseAndExtent(this._getDoc().body.firstChild,0,this._getDoc().body.firstChild,1);if(this.browser.webkit3){this._getSelection().collapseToStart()}else{this._getSelection().collapse(false)}}else{this._getSelection().setBaseAndExtent(this._getDoc().body,1,this._getDoc().body,1);if(this.browser.webkit3){this._getSelection().collapseToStart()}else{this._getSelection().collapse(false)}}this._getWindow().focus()}else{this._getWindow().focus()}},_hasSelection:function(){var K=this._getSelection();var H=this._getRange();var I=false;if(this.browser.ie||this.browser.opera){if(H.text){I=true}if(H.html){I=true}}else{if(this.browser.webkit){if(K+""!==""){I=true}}else{if(K&&(K.toString()!=="")&&(K!==undefined)){I=true}}}return I},_getSelection:function(){var H=null;if(this._getDoc()&&this._getWindow()){if(this._getDoc().selection){H=this._getDoc().selection}else{H=this._getWindow().getSelection()}if(this.browser.webkit){if(H.baseNode){this._selection={};this._selection.baseNode=H.baseNode;this._selection.baseOffset=H.baseOffset;this._selection.extentNode=H.extentNode;this._selection.extentOffset=H.extentOffset}else{if(this._selection!==null){H=this._getWindow().getSelection();H.setBaseAndExtent(this._selection.baseNode,this._selection.baseOffset,this._selection.extentNode,this._selection.extentOffset);this._selection=null}}}}return H},_selectNode:function(I){if(!I){return false}var K=this._getSelection(),H=null;if(this.browser.ie){try{H=this._getDoc().body.createTextRange();H.moveToElementText(I);H.select()}catch(M){}}else{if(this.browser.webkit){K.setBaseAndExtent(I,0,I,I.innerText.length)}else{if(this.browser.opera){K=this._getWindow().getSelection();H=this._getDoc().createRange();H.selectNode(I);K.removeAllRanges();K.addRange(H)}else{H=this._getDoc().createRange();H.selectNodeContents(I);K.removeAllRanges();K.addRange(H)}}}},_getRange:function(){var H=this._getSelection();if(H===null){return null}if(this.browser.webkit&&!H.getRangeAt){var K=this._getDoc().createRange();try{K.setStart(H.anchorNode,H.anchorOffset);K.setEnd(H.focusNode,H.focusOffset)}catch(I){K=this._getWindow().getSelection()+""}return K}if(this.browser.ie||this.browser.opera){return H.createRange()}if(H.rangeCount>0){return H.getRangeAt(0)}return null},_setDesignMode:function(H){try{this._getDoc().designMode=H}catch(I){}},_toggleDesignMode:function(){var I=this._getDoc().designMode.toLowerCase(),H="on";if(I=="on"){H="off"}this._setDesignMode(H);return H},_initEditor:function(){if(this.browser.ie){this._getDoc().body.style.margin="0"}if(!this.get("disabled")){this._setDesignMode("on")}this.toolbar.on("buttonClick",this._handleToolbarClick,this,true);A.on(this._getDoc(),"mouseup",this._handleMouseUp,this,true);A.on(this._getDoc(),"mousedown",this._handleMouseDown,this,true);A.on(this._getDoc(),"click",this._handleClick,this,true);A.on(this._getDoc(),"dblclick",this._handleDoubleClick,this,true);A.on(this._getDoc(),"keypress",this._handleKeyPress,this,true);A.on(this._getDoc(),"keyup",this._handleKeyUp,this,true);A.on(this._getDoc(),"keydown",this._handleKeyDown,this,true);if(!this.get("disabled")){this.toolbar.set("disabled",false)}this.fireEvent("editorContentLoaded",{type:"editorLoaded",target:this});if(this.get("dompath")){var H=this;setTimeout(function(){H._writeDomPath.call(H)},150)}this.nodeChange(true);this._setBusy(true)},_checkLoaded:function(){this._contentTimerCounter++;if(this._contentTimer){clearTimeout(this._contentTimer)}if(this._contentTimerCounter>250){return false}var K=false;try{if(this._getDoc()&&this._getDoc().body&&(this._getDoc().body._rteLoaded===true)){K=true}}catch(I){K=false}if(K===true){this._initEditor()}else{var H=this;this._contentTimer=setTimeout(function(){H._checkLoaded.call(H)},20)}},_setInitialContent:function(){var I=E.substitute(this.get("html"),{TITLE:this.STR_TITLE,CONTENT:this._cleanIncomingHTML(this.get("element").value),CSS:this.get("css"),HIDDEN_CSS:((this.get("hiddencss"))?this.get("hiddencss"):"/* No Hidden CSS */"),EXTRA_CSS:((this.get("extracss"))?this.get("extracss"):"/* No Extra CSS */")}),H=true;if(document.compatMode!="BackCompat"){I=this._docType+"\n"+I}else{}if(this.browser.ie||this.browser.webkit||this.browser.opera||(navigator.userAgent.indexOf("Firefox/1.5")!=-1)){try{this._getDoc().open();this._getDoc().write(I);this._getDoc().close()}catch(K){H=false}}else{this.get("iframe").get("element").src="data:text/html;charset=utf-8,"+encodeURIComponent(I)}if(H){this._checkLoaded()}},_setMarkupType:function(H){switch(this.get("markup")){case"css":this._setEditorStyle(true);break;case"default":this._setEditorStyle(false);break;case"semantic":case"xhtml":if(this._semantic[H]){this._setEditorStyle(false)}else{this._setEditorStyle(true)}break}},_setEditorStyle:function(I){try{this._getDoc().execCommand("useCSS",false,!I)}catch(H){}},_getSelectedElement:function(){var M=this._getDoc(),H=null,I=null,N=null;if(this.browser.ie){this.currentEvent=this._getWindow().event;H=this._getRange();if(H){N=H.item?H.item(0):H.parentElement();if(N==M.body){N=null}}if((this.currentEvent!==null)&&(this.currentEvent.keyCode===0)){N=A.getTarget(this.currentEvent)}}else{I=this._getSelection();H=this._getRange();if(!I||!H){return null}if(!this._hasSelection()){if(I.anchorNode&&(I.anchorNode.nodeType==3)){if(I.anchorNode.parentNode){N=I.anchorNode.parentNode}if(I.anchorNode.nextSibling!=I.focusNode.nextSibling){N=I.anchorNode.nextSibling}}if(this._isElement(N,"br")){N=null}if(!N){N=H.commonAncestorContainer;if(!H.collapsed){if(H.startContainer==H.endContainer){if(H.startOffset-H.endOffset<2){if(H.startContainer.hasChildNodes()){N=H.startContainer.childNodes[H.startOffset]}}}}}}}if(this.currentEvent!==null){try{switch(this.currentEvent.type){case"click":case"mousedown":case"mouseup":N=A.getTarget(this.currentEvent);break;default:break}}catch(K){}}else{if(this.currentElement&&this.currentElement[0]){N=this.currentElement[0]}}if(this.browser.opera||this.browser.webkit){if(this.currentEvent&&!N){N=YAHOO.util.Event.getTarget(this.currentEvent)}}if(!N||!N.tagName){N=M.body}if(this._isElement(N,"html")){N=M.body}if(this._isElement(N,"body")){N=M.body}if(N&&!N.parentNode){N=M.body}if(N===undefined){N=null}return N},_getDomPath:function(H){if(!H){H=this._getSelectedElement()}var I=[];while(H!==null){if(H.ownerDocument!=this._getDoc()){H=null;break}if(H.nodeName&&H.nodeType&&(H.nodeType==1)){I[I.length]=H}if(this._isElement(H,"body")){break}H=H.parentNode}if(I.length===0){if(this._getDoc()&&this._getDoc().body){I[0]=this._getDoc().body}}return I.reverse()},_writeDomPath:function(){var P=this._getDomPath(),N=[],K="",Q="";for(var H=0;H<P.length;H++){var S=P[H].tagName.toLowerCase();if((S=="ol")&&(P[H].type)){S+=":"+P[H].type}if(D.hasClass(P[H],"yui-tag")){S=P[H].getAttribute("tag")}if((this.get("markup")=="semantic")||(this.get("markup")=="xhtml")){switch(S){case"b":S="strong";break;case"i":S="em";break}}if(!D.hasClass(P[H],"yui-non")){if(D.hasClass(P[H],"yui-tag")){Q=S}else{K=((P[H].className!=="")?"."+P[H].className.replace(/ /g,"."):"");if((K.indexOf("yui")!=-1)||(K.toLowerCase().indexOf("apple-style-span")!=-1)){K=""}Q=S+((P[H].id)?"#"+P[H].id:"")+K}switch(S){case"a":if(P[H].getAttribute("href",2)){Q+=":"+P[H].getAttribute("href",2).replace("mailto:","").replace("http://","").replace("https://","")}break;case"img":var I=P[H].height;var O=P[H].width;if(P[H].style.height){I=parseInt(P[H].style.height,10)}if(P[H].style.width){O=parseInt(P[H].style.width,10)}Q+="("+I+"x"+O+")";break}if(Q.length>10){Q='<span title="'+Q+'">'+Q.substring(0,10)+"...</span>"}else{Q='<span title="'+Q+'">'+Q+"</span>"}N[N.length]=Q}}var M=N.join(" "+this.SEP_DOMPATH+" ");if(this.dompath.innerHTML!=M){this.dompath.innerHTML=M}},_fixNodes:function(){var O=this._getDoc(),M=[];for(var H in this.invalidHTML){if(YAHOO.lang.hasOwnProperty(this.invalidHTML,H)){if(H.toLowerCase()!="span"){var I=O.body.getElementsByTagName(H);if(I.length){for(var K=0;K<I.length;K++){M.push(I[K])}}}}}for(var N=0;N<M.length;N++){if(M[N].parentNode){if(E.isObject(this.invalidHTML[M[N].tagName.toLowerCase()])&&this.invalidHTML[M[N].tagName.toLowerCase()].keepContents){this._swapEl(M[N],"span",function(Q){Q.className="yui-non"})}else{M[N].parentNode.removeChild(M[N])}}}var P=this._getDoc().getElementsByTagName("img");D.addClass(P,"yui-img")},_isNonEditable:function(K){if(this.get("allowNoEdit")){var I=A.getTarget(K);if(this._isElement(I,"html")){I=null}var N=this._getDomPath(I);for(var H=(N.length-1);H>-1;H--){if(D.hasClass(N[H],this.CLASS_NOEDIT)){try{this._getDoc().execCommand("enableObjectResizing",false,"false")}catch(M){}this.nodeChange();A.stopEvent(K);return true}}try{this._getDoc().execCommand("enableObjectResizing",false,"true")}catch(M){}}return false},_setCurrentEvent:function(H){this.currentEvent=H},_handleClick:function(I){if(this._isNonEditable(I)){return false}this._setCurrentEvent(I);if(this.currentWindow){this.closeWindow()}if(YAHOO.widget.EditorInfo.window.win&&YAHOO.widget.EditorInfo.window.scope){YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope)}if(this.browser.webkit){var H=A.getTarget(I);if(this._isElement(H,"a")||this._isElement(H.parentNode,"a")){A.stopEvent(I);this.nodeChange()}}else{this.nodeChange()}},_handleMouseUp:function(I){if(this._isNonEditable(I)){return false}var H=this;if(this.browser.opera){var K=A.getTarget(I);if(this._isElement(K,"img")){this.nodeChange();if(this.operaEvent){clearTimeout(this.operaEvent);this.operaEvent=null;this._handleDoubleClick(I)}else{this.operaEvent=window.setTimeout(function(){H.operaEvent=false},700)}}}if(this.browser.webkit||this.browser.opera){if(this.browser.webkit){A.stopEvent(I)}}this.nodeChange();this.fireEvent("editorMouseUp",{type:"editorMouseUp",target:this,ev:I})},_handleMouseDown:function(H){if(this._isNonEditable(H)){return false}this._setCurrentEvent(H);var I=A.getTarget(H);if(this.browser.webkit&&this._hasSelection()){var K=this._getSelection();if(!this.browser.webkit3){K.collapse(true)}else{K.collapseToStart()}}if(this.browser.webkit&&this._lastImage){D.removeClass(this._lastImage,"selected");this._lastImage=null}if(this._isElement(I,"img")||this._isElement(I,"a")){if(this.browser.webkit){A.stopEvent(H);if(this._isElement(I,"img")){D.addClass(I,"selected");this._lastImage=I}}this.nodeChange()}this.fireEvent("editorMouseDown",{type:"editorMouseDown",target:this,ev:H})},_handleDoubleClick:function(H){if(this._isNonEditable(H)){return false}this._setCurrentEvent(H);var I=A.getTarget(H);if(this._isElement(I,"img")){this.currentElement[0]=I;this.toolbar.fireEvent("insertimageClick",{type:"insertimageClick",target:this.toolbar});this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this})}else{if(this._hasParent(I,"a")){this.currentElement[0]=this._hasParent(I,"a");this.toolbar.fireEvent("createlinkClick",{type:"createlinkClick",target:this.toolbar});this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this})}}this.nodeChange();this.editorDirty=false;this.fireEvent("editorDoubleClick",{type:"editorDoubleClick",target:this,ev:H})},_handleKeyUp:function(I){if(this._isNonEditable(I)){return false}this._setCurrentEvent(I);switch(I.keyCode){case 37:case 38:case 39:case 40:case 46:case 8:case 87:if((I.keyCode==87)&&this.currentWindow&&I.shiftKey&&I.ctrlKey){this.closeWindow()}else{if(!this.browser.ie){if(this._nodeChangeTimer){clearTimeout(this._nodeChangeTimer)}var H=this;this._nodeChangeTimer=setTimeout(function(){H._nodeChangeTimer=null;H.nodeChange.call(H)},100)}else{this.nodeChange()}this.editorDirty=true}break}this.fireEvent("editorKeyUp",{type:"editorKeyUp",target:this,ev:I})},_handleKeyPress:function(H){if(this.get("allowNoEdit")){if(H&&H.keyCode&&((H.keyCode==46)||H.keyCode==63272)){A.stopEvent(H)}}if(this._isNonEditable(H)){return false}this._setCurrentEvent(H);if(this.browser.webkit){if(!this.browser.webkit3){if(H.keyCode&&(H.keyCode==122)&&(H.metaKey)){if(this._hasParent(this._getSelectedElement(),"li")){A.stopEvent(H)}}}this._listFix(H)}this.fireEvent("editorKeyPress",{type:"editorKeyPress",target:this,ev:H})},_listFix:function(P){var T=null,N=null,H=false,K=null;if(this.browser.webkit){if(P.keyCode&&(P.keyCode==13)){if(this._hasParent(this._getSelectedElement(),"li")){var M=this._hasParent(this._getSelectedElement(),"li");var S=this._getDoc().createElement("li");S.innerHTML='<span class="yui-non">&nbsp;</span>&nbsp;';if(M.nextSibling){M.parentNode.insertBefore(S,M.nextSibling)}else{M.parentNode.appendChild(S)}this.currentElement[0]=S;this._selectNode(S.firstChild);if(!this.browser.webkit3){M.parentNode.style.display="list-item";setTimeout(function(){M.parentNode.style.display="block"},1)}A.stopEvent(P)}}}if(P.keyCode&&((!this.browser.webkit3&&(P.keyCode==25))||((this.browser.webkit3||!this.browser.webkit)&&((P.keyCode==9)&&P.shiftKey)))){T=this._getSelectedElement();if(this._hasParent(T,"li")){T=this._hasParent(T,"li");if(this._hasParent(T,"ul")||this._hasParent(T,"ol")){N=this._hasParent(T,"ul");if(!N){N=this._hasParent(T,"ol")}if(this._isElement(N.previousSibling,"li")){N.removeChild(T);N.parentNode.insertBefore(T,N.nextSibling);if(this.browser.ie){K=this._getDoc().body.createTextRange();K.moveToElementText(T);K.collapse(false);K.select()}if(this.browser.webkit){if(!this.browser.webkit3){N.style.display="list-item";N.parentNode.style.display="list-item";setTimeout(function(){N.style.display="block";N.parentNode.style.display="block"},1)}}A.stopEvent(P)}}}}if(P.keyCode&&((P.keyCode==9)&&(!P.shiftKey))){var I=this._getSelectedElement();if(this._hasParent(I,"li")){H=this._hasParent(I,"li").innerHTML}if(this.browser.webkit){this._getDoc().execCommand("inserttext",false,"\t")}T=this._getSelectedElement();if(this._hasParent(T,"li")){N=this._hasParent(T,"li");var O=this._getDoc().createElement(N.parentNode.tagName.toLowerCase());if(this.browser.webkit){var Q=D.getElementsByClassName("Apple-tab-span","span",N);if(Q[0]){N.removeChild(Q[0]);N.innerHTML=E.trim(N.innerHTML);if(H){N.innerHTML='<span class="yui-non">'+H+"</span>&nbsp;"}else{N.innerHTML='<span class="yui-non">&nbsp;</span>&nbsp;'}}}else{if(H){N.innerHTML=H+"&nbsp;"}else{N.innerHTML="&nbsp;"}}N.parentNode.replaceChild(O,N);O.appendChild(N);if(this.browser.webkit){this._getSelection().setBaseAndExtent(N.firstChild,1,N.firstChild,N.firstChild.innerText.length);if(!this.browser.webkit3){N.parentNode.parentNode.style.display="list-item";setTimeout(function(){N.parentNode.parentNode.style.display="block"},1)}}else{if(this.browser.ie){K=this._getDoc().body.createTextRange();K.moveToElementText(N);K.collapse(false);K.select()}else{this._selectNode(N)}}A.stopEvent(P)}if(this.browser.webkit){A.stopEvent(P)}this.nodeChange()}},_handleKeyDown:function(N){if(this._isNonEditable(N)){return false}this._setCurrentEvent(N);if(this.currentWindow){this.closeWindow()}if(YAHOO.widget.EditorInfo.window.win&&YAHOO.widget.EditorInfo.window.scope){YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope)}var M=false,O=null,K=false;if(N.shiftKey&&N.ctrlKey){M=true}switch(N.keyCode){case 84:if(N.shiftKey&&N.ctrlKey){this.toolbar._titlebar.firstChild.focus();A.stopEvent(N);M=false}break;case 27:if(N.shiftKey){this.afterElement.focus();A.stopEvent(N);K=false}break;case 76:if(this._hasSelection()){if(N.shiftKey&&N.ctrlKey){var I=true;if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue("createlink")){I=false}}if(I){this.execCommand("createlink","");this.toolbar.fireEvent("createlinkClick",{type:"createlinkClick",target:this.toolbar});this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this});M=false}}}break;case 65:if(N.metaKey&&this.browser.webkit){A.stopEvent(N);this._getSelection().setBaseAndExtent(this._getDoc().body,1,this._getDoc().body,this._getDoc().body.innerHTML.length)}break;case 66:O="bold";break;case 73:O="italic";break;case 85:O="underline";break;case 13:if(this.browser.ie){var P=this._getRange();var H=this._getSelectedElement();if(!this._isElement(H,"li")){if(P){P.pasteHTML("<br>");P.collapse(false);P.select()}A.stopEvent(N)}}}if(this.browser.ie){this._listFix(N)}if(M&&O){this.execCommand(O,null);A.stopEvent(N);this.nodeChange()}this.fireEvent("editorKeyDown",{type:"editorKeyDown",target:this,ev:N})},nodeChange:function(I){var K=parseInt(this.get("nodeChangeThreshold"),10);var S=Math.round(new Date().getTime()/1000);if(I===true){this._lastNodeChange=0}if((this._lastNodeChange+K)<S){var V=this;if(this._fixNodesTimer===null){this._fixNodesTimer=window.setTimeout(function(){V._fixNodes.call(V);V._fixNodesTimer=null},0)}}this._lastNodeChange=S;if(this.currentEvent){this._lastNodeChangeEvent=this.currentEvent.type}var h=this.fireEvent("beforeNodeChange",{type:"beforeNodeChange",target:this});if(h===false){return false}if(this.get("dompath")){this._writeDomPath()}if(!this.get("disabled")){if(this.STOP_NODE_CHANGE){this.STOP_NODE_CHANGE=false;return false}else{var X=this._getSelection(),U=this._getRange(),H=this._getSelectedElement(),P=this.toolbar.getButtonByValue("fontname"),O=this.toolbar.getButtonByValue("fontsize");if(I!==true){this.editorDirty=true}var Q={};if(this._lastButton){Q[this._lastButton.id]=true}if(!this._isElement(H,"body")){if(P){Q[P.get("id")]=true}if(O){Q[O.get("id")]=true}}this.toolbar.resetAllButtons(Q);for(var l=0;l<this._disabled.length;l++){var T=this.toolbar.getButtonByValue(this._disabled[l]);if(T&&T.get){if(this._lastButton&&(T.get("id")===this._lastButton.id)){}else{if(!this._hasSelection()){switch(this._disabled[l]){case"fontname":case"fontsize":break;default:this.toolbar.disableButton(T)}}else{if(!this._alwaysDisabled[this._disabled[l]]){this.toolbar.enableButton(T)}}if(!this._alwaysEnabled[this._disabled[l]]){this.toolbar.deselectButton(T)}}}}var W=this._getDomPath();var n=null,c=null;for(var f=0;f<W.length;f++){n=W[f].tagName.toLowerCase();if(W[f].getAttribute("tag")){n=W[f].getAttribute("tag").toLowerCase()}c=this._tag2cmd[n];if(c===undefined){c=[]}if(!E.isArray(c)){c=[c]}if(W[f].style.fontWeight.toLowerCase()=="bold"){c[c.length]="bold"}if(W[f].style.fontStyle.toLowerCase()=="italic"){c[c.length]="italic"}if(W[f].style.textDecoration.toLowerCase()=="underline"){c[c.length]="underline"}if(c.length>0){for(var Z=0;Z<c.length;Z++){this.toolbar.selectButton(c[Z]);this.toolbar.enableButton(c[Z])}}switch(W[f].style.textAlign.toLowerCase()){case"left":case"right":case"center":case"justify":var Y=W[f].style.textAlign.toLowerCase();if(W[f].style.textAlign.toLowerCase()=="justify"){Y="full"}this.toolbar.selectButton("justify"+Y);this.toolbar.enableButton("justify"+Y);break}}if(P){var g=P._configs.label._initialConfig.value;P.set("label",'<span class="yui-toolbar-fontname-'+F(g)+'">'+g+"</span>");this._updateMenuChecked("fontname",g)}if(O){O.set("label",O._configs.label._initialConfig.value)}var N=this.toolbar.getButtonByValue("heading");if(N){N.set("label",N._configs.label._initialConfig.value);this._updateMenuChecked("heading","none")}var M=this.toolbar.getButtonByValue("insertimage");if(M&&this.currentWindow&&(this.currentWindow.name=="insertimage")){this.toolbar.disableButton(M)}}}this.fireEvent("afterNodeChange",{type:"afterNodeChange",target:this})},_updateMenuChecked:function(H,I,M){if(!M){M=this.toolbar}var K=M.getButtonByValue(H);K.checkValue(I)},_handleToolbarClick:function(I){var M="";var N="";var K=I.button.value;if(I.button.menucmd){M=K;K=I.button.menucmd}this._lastButton=I.button;if(this.STOP_EXEC_COMMAND){this.STOP_EXEC_COMMAND=false;return false}else{this.execCommand(K,M);if(!this.browser.webkit){var H=this;setTimeout(function(){H._focusWindow.call(H)},5)}}A.stopEvent(I)},_setupAfterElement:function(){if(!this.afterElement){this.afterElement=document.createElement("h2");this.afterElement.className="yui-editor-skipheader";this.afterElement.tabIndex="-1";this.afterElement.innerHTML=this.STR_LEAVE_EDITOR;this.get("element_cont").get("firstChild").appendChild(this.afterElement)}},_disableEditor:function(I){if(I){if(!this._mask){this._setDesignMode("off");if(this.toolbar){this.toolbar.set("disabled",true)}this._mask=document.createElement("DIV");D.setStyle(this._mask,"height","100%");D.setStyle(this._mask,"width","100%");D.setStyle(this._mask,"position","absolute");D.setStyle(this._mask,"top","0");D.setStyle(this._mask,"left","0");D.setStyle(this._mask,"opacity",".5");D.addClass(this._mask,"yui-editor-masked");this.get("iframe").get("parentNode").appendChild(this._mask)}}else{if(this._mask){this._mask.parentNode.removeChild(this._mask);this._mask=null;if(this.toolbar){this.toolbar.set("disabled",false)}this._setDesignMode("on");this._focusWindow();var H=this;window.setTimeout(function(){H.nodeChange.call(H)},100)}}},EDITOR_PANEL_ID:"yui-editor-panel",SEP_DOMPATH:"<",STR_LEAVE_EDITOR:"You have left the Rich Text Editor.",STR_BEFORE_EDITOR:"This text field can contain stylized text and graphics. To cycle through all formatting options, use the keyboard shortcut Control + Shift + T to place focus on the toolbar and navigate between option heading names. <h4>Common formatting keyboard shortcuts:</h4><ul><li>Control Shift B sets text to bold</li> <li>Control Shift I sets text to italic</li> <li>Control Shift U underlines text</li> <li>Control Shift L adds an HTML link</li> <li>To exit this text editor use the keyboard shortcut Control + Shift + ESC.</li></ul>",STR_TITLE:"Rich Text Area.",STR_IMAGE_HERE:"Image Url Here",STR_LINK_URL:"Link URL",STOP_EXEC_COMMAND:false,STOP_NODE_CHANGE:false,CLASS_NOEDIT:"yui-noedit",CLASS_CONTAINER:"yui-editor-container",CLASS_EDITABLE:"yui-editor-editable",CLASS_EDITABLE_CONT:"yui-editor-editable-container",CLASS_PREFIX:"yui-editor",browser:function(){var H=YAHOO.env.ua;if(H.webkit>420){H.webkit3=H.webkit}else{H.webkit3=0}return H}(),init:function(I,H){YAHOO.widget.SimpleEditor.superclass.init.call(this,I,H);YAHOO.widget.EditorInfo._instances[this.get("id")]=this;this.on("contentReady",function(){this.DOMReady=true;this.fireQueue()},this,true)},initAttributes:function(H){YAHOO.widget.SimpleEditor.superclass.initAttributes.call(this,H);var I=this;this.setAttributeConfig("iframe",{value:null});this.setAttributeConfig("textarea",{value:null,writeOnce:true});this.setAttributeConfig("nodeChangeThreshold",{value:H.nodeChangeThreshold||3,validator:YAHOO.lang.isNumber});this.setAttributeConfig("allowNoEdit",{value:H.allowNoEdit||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("limitCommands",{value:H.limitCommands||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("element_cont",{value:H.element_cont});this.setAttributeConfig("editor_wrapper",{value:H.editor_wrapper||null,writeOnce:true});this.setAttributeConfig("height",{value:H.height||D.getStyle(I.get("element"),"height"),method:function(K){if(this._rendered){if(this.get("animate")){var M=new YAHOO.util.Anim(this.get("iframe").get("parentNode"),{height:{to:parseInt(K,10)}},0.5);M.animate()}else{D.setStyle(this.get("iframe").get("parentNode"),"height",K)}}}});this.setAttributeConfig("width",{value:H.width||D.getStyle(this.get("element"),"width"),method:function(K){if(this._rendered){if(this.get("animate")){var M=new YAHOO.util.Anim(this.get("element_cont").get("element"),{width:{to:parseInt(K,10)}},0.5);M.animate()}else{this.get("element_cont").setStyle("width",K)}}}});this.setAttributeConfig("blankimage",{value:H.blankimage||this._getBlankImage()});this.setAttributeConfig("css",{value:H.css||this._defaultCSS,writeOnce:true});this.setAttributeConfig("html",{value:H.html||'<html><head><title>{TITLE}</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><base href="'+this._baseHREF+'"><style>{CSS}</style><style>{HIDDEN_CSS}</style><style>{EXTRA_CSS}</style></head><body onload="document.body._rteLoaded = true;">{CONTENT}</body></html>',writeOnce:true});this.setAttributeConfig("extracss",{value:H.css||"",writeOnce:true});this.setAttributeConfig("handleSubmit",{value:false,writeOnce:true,method:function(K){if(K){var N=this.get("element");if(N.form){var M=function(O){A.stopEvent(O);this.saveHTML();window.setTimeout(function(){YAHOO.util.Event.removeListener(N.form,"submit",M);N.form.submit()},200)};A.on(N.form,"submit",M,this,true)}}}});this.setAttributeConfig("disabled",{value:false,method:function(K){if(this._rendered){this._disableEditor(K)}}});this.setAttributeConfig("toolbar_cont",{value:null,writeOnce:true});this.setAttributeConfig("toolbar",{value:H.toolbar||this._defaultToolbar,writeOnce:true,method:function(K){if(!K.buttonType){K.buttonType=this._defaultToolbar.buttonType}this._defaultToolbar=K}});this.setAttributeConfig("animate",{value:((H.animate)?((YAHOO.util.Anim)?true:false):false),validator:function(M){var K=true;if(!YAHOO.util.Anim){K=false}return K}});this.setAttributeConfig("panel",{value:null,writeOnce:true,validator:function(M){var K=true;if(!YAHOO.widget.Overlay){K=false}return K}});this.setAttributeConfig("focusAtStart",{value:H.focusAtStart||false,writeOnce:true,method:function(){this.on("editorContentLoaded",function(){var K=this;setTimeout(function(){K._focusWindow.call(K,true);K.editorDirty=false},400)},this,true)}});this.setAttributeConfig("dompath",{value:H.dompath||false,method:function(K){if(K&&!this.dompath){this.dompath=document.createElement("DIV");this.dompath.id=this.get("id")+"_dompath";D.addClass(this.dompath,"dompath");this.get("element_cont").get("firstChild").appendChild(this.dompath);if(this.get("iframe")){this._writeDomPath()}}else{if(!K&&this.dompath){this.dompath.parentNode.removeChild(this.dompath);this.dompath=null}}this._setupAfterElement()}});this.setAttributeConfig("markup",{value:H.markup||"semantic",validator:function(K){switch(K.toLowerCase()){case"semantic":case"css":case"default":case"xhtml":return true}return false}});this.setAttributeConfig("removeLineBreaks",{value:H.removeLineBreaks||false,validator:YAHOO.lang.isBoolean});this.on("afterRender",function(){this._renderPanel()})},_getBlankImage:function(){if(!this.DOMReady){this._queue[this._queue.length]=["_getBlankImage",arguments];return""}var H="";if(!this._blankImageLoaded){var I=document.createElement("div");I.style.position="absolute";I.style.top="-9999px";I.style.left="-9999px";I.className=this.CLASS_PREFIX+"-blankimage";document.body.appendChild(I);H=YAHOO.util.Dom.getStyle(I,"background-image");H=H.replace("url(","").replace(")","").replace(/"/g,"");this.set("blankimage",H);this._blankImageLoaded=true}else{H=this.get("blankimage")}return H},_handleFontSize:function(K){var H=this.toolbar.getButtonById(K.button.id);var I=H.get("label")+"px";this.execCommand("fontsize",I);this.STOP_EXEC_COMMAND=true},_handleColorPicker:function(K){var I=K.button;var H="#"+K.color;if((I=="forecolor")||(I=="backcolor")){this.execCommand(I,H)}},_handleAlign:function(M){var K=null;for(var H=0;H<M.button.menu.length;H++){if(M.button.menu[H].value==M.button.value){K=M.button.menu[H].value}}var I=this._getSelection();this.execCommand(K,I);this.STOP_EXEC_COMMAND=true},_handleAfterNodeChange:function(){var W=this._getDomPath(),Q=null,M=null,S=null,I=false;var O=this.toolbar.getButtonByValue("fontname");var P=this.toolbar.getButtonByValue("fontsize");var H=this.toolbar.getButtonByValue("heading");for(var K=0;K<W.length;K++){Q=W[K];var V=Q.tagName.toLowerCase();if(Q.getAttribute("tag")){V=Q.getAttribute("tag")}M=Q.getAttribute("face");if(D.getStyle(Q,"font-family")){M=D.getStyle(Q,"font-family")}if(V.substring(0,1)=="h"){if(H){for(var N=0;N<H._configs.menu.value.length;N++){if(H._configs.menu.value[N].value.toLowerCase()==V){H.set("label",H._configs.menu.value[N].text)}}this._updateMenuChecked("heading",V)}}}if(O){for(var U=0;U<O._configs.menu.value.length;U++){if(M&&O._configs.menu.value[U].text.toLowerCase()==M.toLowerCase()){I=true;M=O._configs.menu.value[U].text}}if(!I){M=O._configs.label._initialConfig.value}var T='<span class="yui-toolbar-fontname-'+F(M)+'">'+M+"</span>";if(O.get("label")!=T){O.set("label",T);this._updateMenuChecked("fontname",M)}}if(P){S=parseInt(D.getStyle(Q,"fontSize"),10);if((S===null)||isNaN(S)){S=P._configs.label._initialConfig.value}P.set("label",""+S)}if(!this._isElement(Q,"body")&&!this._isElement(Q,"img")){this.toolbar.enableButton(O);this.toolbar.enableButton(P);this.toolbar.enableButton("forecolor");this.toolbar.enableButton("backcolor")}if(this._isElement(Q,"img")){if(YAHOO.widget.Overlay){this.toolbar.enableButton("createlink")}}if(this._isElement(Q,"blockquote")){this.toolbar.selectButton("indent");this.toolbar.disableButton("indent");this.toolbar.enableButton("outdent")}if(this._hasParent(Q,"ol")||this._hasParent(Q,"ul")){this.toolbar.disableButton("indent")}this._lastButton=null},_setBusy:function(H){if(H){D.removeClass(document.body,"yui-busy");D.removeClass(this._getDoc().body,"yui-busy")}else{D.addClass(document.body,"yui-busy");D.addClass(this._getDoc().body,"yui-busy")}},_handleInsertImageClick:function(){if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue("insertimage")){return false}}this.toolbar.set("disabled",true);this.on("afterExecCommand",function(){var H=this.currentElement[0],K="http://";if(!H){H=this._getSelectedElement()}if(H){if(H.getAttribute("src")){K=H.getAttribute("src",2);if(K.indexOf(this.get("blankimage"))!=-1){K=this.STR_IMAGE_HERE}}}var I=prompt(this.STR_LINK_URL+": ",K);if((I!=="")&&(I!==null)){H.setAttribute("src",I)}else{if(I!==null){H.parentNode.removeChild(H);this.currentElement=[]}}this.closeWindow();this.toolbar.set("disabled",false)},this,true)},_handleInsertImageWindowClose:function(){this.nodeChange()},_isLocalFile:function(H){if((H!=="")&&((H.indexOf("file:/")!=-1)||(H.indexOf(":\\")!=-1))){return true}return false},_handleCreateLinkClick:function(){if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue("createlink")){return false}}this.toolbar.set("disabled",true);this.on("afterExecCommand",function(){var K=this.currentElement[0],I="";if(K){if(K.getAttribute("href",2)!==null){I=K.getAttribute("href",2)}}var N=prompt(this.STR_LINK_URL+": ",I);if((N!=="")&&(N!==null)){var M=N;if((M.indexOf("://")==-1)&&(M.substring(0,1)!="/")&&(M.substring(0,6).toLowerCase()!="mailto")){if((M.indexOf("@")!=-1)&&(M.substring(0,6).toLowerCase()!="mailto")){M="mailto:"+M}else{if(M.substring(0,1)!="#"){M="http://"+M}}}K.setAttribute("href",M)}else{if(N!==null){var H=this._getDoc().createElement("span");H.innerHTML=K.innerHTML;D.addClass(H,"yui-non");K.parentNode.replaceChild(H,K)}}this.closeWindow();this.toolbar.set("disabled",false)})},_handleCreateLinkWindowClose:function(){this.nodeChange();this.currentElement=[]},render:function(){if(this._rendered){return false}if(!this.DOMReady){this._queue[this._queue.length]=["render",arguments];return false}this._setBusy();this._rendered=true;var H=this;this.set("textarea",this.get("element"));this.get("element_cont").setStyle("display","none");this.get("element_cont").addClass(this.CLASS_CONTAINER);this.set("iframe",this._createIframe());window.setTimeout(function(){H._setInitialContent.call(H)},10);this.get("editor_wrapper").appendChild(this.get("iframe").get("element"));if(this.get("disabled")){this._disableEditor(true)}var I=this.get("toolbar");if(I instanceof C){this.toolbar=I;this.toolbar.set("disabled",true)}else{I.disabled=true;this.toolbar=new C(this.get("toolbar_cont"),I)}this.fireEvent("toolbarLoaded",{type:"toolbarLoaded",target:this.toolbar});this.toolbar.on("toolbarCollapsed",function(){if(this.currentWindow){this.moveWindow()}},this,true);this.toolbar.on("toolbarExpanded",function(){if(this.currentWindow){this.moveWindow()}},this,true);this.toolbar.on("fontsizeClick",function(K){this._handleFontSize(K)},this,true);this.toolbar.on("colorPickerClicked",function(K){this._handleColorPicker(K)},this,true);this.toolbar.on("alignClick",function(K){this._handleAlign(K)},this,true);this.on("afterNodeChange",function(){this._handleAfterNodeChange()},this,true);this.toolbar.on("insertimageClick",function(){this._handleInsertImageClick()},this,true);this.on("windowinsertimageClose",function(){this._handleInsertImageWindowClose()},this,true);this.toolbar.on("createlinkClick",function(){this._handleCreateLinkClick()},this,true);this.on("windowcreatelinkClose",function(){this._handleCreateLinkWindowClose()},this,true);this.get("parentNode").replaceChild(this.get("element_cont").get("element"),this.get("element"));if(!this.beforeElement){this.beforeElement=document.createElement("h2");this.beforeElement.className="yui-editor-skipheader";this.beforeElement.tabIndex="-1";this.beforeElement.innerHTML=this.STR_BEFORE_EDITOR;this.get("element_cont").get("firstChild").insertBefore(this.beforeElement,this.toolbar.get("nextSibling"))}this.setStyle("visibility","hidden");this.setStyle("position","absolute");this.setStyle("top","-9999px");this.setStyle("left","-9999px");this.get("element_cont").appendChild(this.get("element"));this.get("element_cont").setStyle("display","block");D.addClass(this.get("iframe").get("parentNode"),this.CLASS_EDITABLE_CONT);this.get("iframe").addClass(this.CLASS_EDITABLE);this.get("element_cont").setStyle("width",this.get("width"));D.setStyle(this.get("iframe").get("parentNode"),"height",this.get("height"));this.get("iframe").setStyle("width","100%");this.get("iframe").setStyle("height","100%");if(this.browser.ie==7){}this.fireEvent("afterRender",{type:"afterRender",target:this})},execCommand:function(K,I){var O=this.fireEvent("beforeExecCommand",{type:"beforeExecCommand",target:this,args:arguments});if((O===false)||(this.STOP_EXEC_COMMAND)){this.STOP_EXEC_COMMAND=false;return false}this._setMarkupType(K);if(this.browser.ie){this._getWindow().focus()}var H=true;if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue(K)){H=false}}this.editorDirty=true;if((typeof this["cmd_"+K.toLowerCase()]=="function")&&H){var N=this["cmd_"+K.toLowerCase()](I);H=N[0];if(N[1]){K=N[1]}if(N[2]){I=N[2]}}if(H){try{this._getDoc().execCommand(K,false,I)}catch(M){}}else{}this.on("afterExecCommand",function(){this.unsubscribeAll("afterExecCommand");this.nodeChange()});this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this})},cmd_backcolor:function(M){var H=true,I=this._getSelectedElement(),K="backcolor";if(this.browser.gecko||this.browser.opera){this._setEditorStyle(true);K="hilitecolor"}if(!this._isElement(I,"body")){D.setStyle(I,"background-color",M);this._selectNode(I);H=false}else{this._createCurrentElement("span",{backgroundColor:M});this._selectNode(this.currentElement[0]);H=false}return[H,K]},cmd_forecolor:function(K){var H=true,I=this._getSelectedElement();if(!this._isElement(I,"body")){D.setStyle(I,"color",K);this._selectNode(I);H=false}else{this._createCurrentElement("span",{color:K});this._selectNode(this.currentElement[0]);H=false}return[H]},cmd_unlink:function(H){this._swapEl(this.currentElement[0],"span",function(I){I.className="yui-non"});return[false]},cmd_createlink:function(K){var I=this._getSelectedElement(),H=null;if(this._hasParent(I,"a")){this.currentElement[0]=this._hasParent(I,"a")}else{if(!this._isElement(I,"a")){this._createCurrentElement("a");H=this._swapEl(this.currentElement[0],"a");this.currentElement[0]=H}else{this.currentElement[0]=I}}return[false]},cmd_insertimage:function(O){var H=true,I=null,N="insertimage",M=this._getSelectedElement();if(O===""){O=this.get("blankimage")}if(this._isElement(M,"img")){this.currentElement[0]=M;H=false}else{if(this._getDoc().queryCommandEnabled(N)){this._getDoc().execCommand("insertimage",false,O);var P=this._getDoc().getElementsByTagName("img");for(var K=0;K<P.length;K++){if(!YAHOO.util.Dom.hasClass(P[K],"yui-img")){YAHOO.util.Dom.addClass(P[K],"yui-img");this.currentElement[0]=P[K]}}H=false}else{if(M==this._getDoc().body){I=this._getDoc().createElement("img");I.setAttribute("src",O);YAHOO.util.Dom.addClass(I,"yui-img");this._getDoc().body.appendChild(I)}else{this._createCurrentElement("img");I=this._getDoc().createElement("img");I.setAttribute("src",O);YAHOO.util.Dom.addClass(I,"yui-img");this.currentElement[0].parentNode.replaceChild(I,this.currentElement[0])}this.currentElement[0]=I;H=false}}return[H]},cmd_inserthtml:function(M){var H=true,K="inserthtml",I=null,N=null;if(this.browser.webkit&&!this._getDoc().queryCommandEnabled(K)){this._createCurrentElement("img");I=this._getDoc().createElement("span");I.innerHTML=M;this.currentElement[0].parentNode.replaceChild(I,this.currentElement[0]);H=false}else{if(this.browser.ie){N=this._getRange();if(N.item){N.item(0).outerHTML=M}else{N.pasteHTML(M)}H=false}}return[H]},cmd_list:function(Z){var K=true,T=null,W=0,H=null,U="",P=this._getSelectedElement(),M="insertorderedlist";if(Z=="ul"){M="insertunorderedlist"}if((this.browser.webkit&&!this._getDoc().queryCommandEnabled(M))){if(this._isElement(P,"li")&&this._isElement(P.parentNode,Z)){H=P.parentNode;T=this._getDoc().createElement("span");YAHOO.util.Dom.addClass(T,"yui-non");U="";var Y=H.getElementsByTagName("li");for(W=0;W<Y.length;W++){U+="<div>"+Y[W].innerHTML+"</div>"}T.innerHTML=U;this.currentElement[0]=H;this.currentElement[0].parentNode.replaceChild(T,this.currentElement[0])}else{this._createCurrentElement(Z.toLowerCase());T=this._getDoc().createElement(Z);for(W=0;W<this.currentElement.length;W++){var V=this._getDoc().createElement("li");V.innerHTML=this.currentElement[W].innerHTML+'<span class="yui-non">&nbsp;</span>&nbsp;';T.appendChild(V);if(W>0){this.currentElement[W].parentNode.removeChild(this.currentElement[W])}}this.currentElement[0].parentNode.replaceChild(T,this.currentElement[0]);this.currentElement[0]=T;var O=this.currentElement[0].firstChild;O=D.getElementsByClassName("yui-non","span",O)[0];this._getSelection().setBaseAndExtent(O,1,O,O.innerText.length)}K=false}else{H=this._getSelectedElement();if(this._isElement(H,"li")&&this._isElement(H.parentNode,Z)||(this.browser.ie&&this._isElement(this._getRange().parentElement,"li"))){if(this.browser.ie){U="";var S=H.parentNode.getElementsByTagName("li");for(var N=0;N<S.length;N++){U+=S[N].innerHTML+"<br>"}var I=this._getDoc().createElement("span");I.innerHTML=U;H.parentNode.parentNode.replaceChild(I,H.parentNode)}else{this.nodeChange();this._getDoc().execCommand(M,"",H.parentNode);this.nodeChange()}K=false}if(this.browser.opera){var X=this;window.setTimeout(function(){var c=X._getDoc().getElementsByTagName("li");for(var d=0;d<c.length;d++){if(c[d].innerHTML.toLowerCase()=="<br>"){c[d].parentNode.parentNode.removeChild(c[d].parentNode)}}},30)}if(this.browser.ie&&K){var Q="";if(this._getRange().html){Q="<li>"+this._getRange().html+"</li>"}else{Q="<li>"+this._getRange().text+"</li>"}this._getRange().pasteHTML("<"+Z+">"+Q+"</"+Z+">");K=false}}return K},cmd_insertorderedlist:function(H){return[this.cmd_list("ol")]},cmd_insertunorderedlist:function(H){return[this.cmd_list("ul")]},cmd_fontname:function(K){var H=true,I=this._getSelectedElement();this.currentFont=K;if(I&&I.tagName&&!this._hasSelection()){YAHOO.util.Dom.setStyle(I,"font-family",K);H=false}return[H]},cmd_fontsize:function(I){if((this.currentElement.length>0)&&(!this._hasSelection())){YAHOO.util.Dom.setStyle(this.currentElement,"fontSize",I)}else{if(!this._isElement(this._getSelectedElement(),"body")){var H=this._getSelectedElement();YAHOO.util.Dom.setStyle(H,"fontSize",I);this._selectNode(H)}else{this._createCurrentElement("span",{fontSize:I});this._selectNode(this.currentElement[0])}}return[false]},_swapEl:function(I,H,M){var K=this._getDoc().createElement(H);K.innerHTML=I.innerHTML;if(typeof M=="function"){M.call(this,K)}I.parentNode.replaceChild(K,I);return K},_createCurrentElement:function(K,Z){K=((K)?K:"a");var n=null,I=[],M=this._getDoc();if(this.currentFont){if(!Z){Z={}}Z.fontFamily=this.currentFont;this.currentFont=null}this.currentElement=[];var f=function(){var r=null;switch(K){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":r=M.createElement(K);break;default:r=M.createElement("span");YAHOO.util.Dom.addClass(r,"yui-tag-"+K);YAHOO.util.Dom.addClass(r,"yui-tag");r.setAttribute("tag",K);for(var q in Z){if(YAHOO.util.Lang.hasOwnProperty(Z,q)){r.style[q]=Z[q]}}break}return r};if(!this._hasSelection()){if(this._getDoc().queryCommandEnabled("insertimage")){this._getDoc().execCommand("insertimage",false,"yui-tmp-img");var d=this._getDoc().getElementsByTagName("img");for(var h=0;h<d.length;h++){if(d[h].getAttribute("src",2)=="yui-tmp-img"){I=f();d[h].parentNode.replaceChild(I,d[h]);this.currentElement[this.currentElement.length]=I}}}else{if(this.currentEvent){n=YAHOO.util.Event.getTarget(this.currentEvent)}else{n=this._getDoc().body}}if(n){I=f();if(this._isElement(n,"body")||this._isElement(n,"html")){if(this._isElement(n,"html")){n=this._getDoc().body}n.appendChild(I)}else{if(n.nextSibling){n.parentNode.insertBefore(I,n.nextSibling)}else{n.parentNode.appendChild(I)}}this.currentElement[this.currentElement.length]=I;this.currentEvent=null;if(this.browser.webkit){this._getSelection().setBaseAndExtent(I,0,I,0);if(this.browser.webkit3){this._getSelection().collapseToStart()}else{this._getSelection().collapse(true)}}}}else{this._setEditorStyle(true);this._getDoc().execCommand("fontname",false,"yui-tmp");var H=[];var W=this._getDoc().getElementsByTagName("font");var U=this._getDoc().getElementsByTagName(this._getSelectedElement().tagName);var Q=this._getDoc().getElementsByTagName("span");var P=this._getDoc().getElementsByTagName("i");var O=this._getDoc().getElementsByTagName("b");var N=this._getDoc().getElementsByTagName(this._getSelectedElement().parentNode.tagName);for(var c=0;c<W.length;c++){H[H.length]=W[c]}for(var S=0;S<N.length;S++){H[H.length]=N[S]}for(var Y=0;Y<U.length;Y++){H[H.length]=U[Y]}for(var X=0;X<Q.length;X++){H[H.length]=Q[X]}for(var V=0;V<P.length;V++){H[H.length]=P[V]}for(var T=0;T<O.length;T++){H[H.length]=O[T]}for(var l=0;l<H.length;l++){if((YAHOO.util.Dom.getStyle(H[l],"font-family")=="yui-tmp")||(H[l].face&&(H[l].face=="yui-tmp"))){I=f();I.innerHTML=H[l].innerHTML;if(this._isElement(H[l],"ol")||(this._isElement(H[l],"ul"))){var g=H[l].getElementsByTagName("li")[0];H[l].style.fontFamily="inherit";g.style.fontFamily="inherit";I.innerHTML=g.innerHTML;g.innerHTML="";g.appendChild(I);this.currentElement[this.currentElement.length]=I}else{if(this._isElement(H[l],"li")){H[l].innerHTML="";H[l].appendChild(I);H[l].style.fontFamily="inherit";this.currentElement[this.currentElement.length]=I}else{if(H[l].parentNode){H[l].parentNode.replaceChild(I,H[l]);this.currentElement[this.currentElement.length]=I;this.currentEvent=null;if(this.browser.webkit){this._getSelection().setBaseAndExtent(I,0,I,0);if(this.browser.webkit3){this._getSelection().collapseToStart()}else{this._getSelection().collapse(true)}}if(this.browser.ie&&Z&&Z.fontSize){this._getSelection().empty()}if(this.browser.gecko){this._getSelection().collapseToStart()}}}}}}var o=this.currentElement.length;for(var p=0;p<o;p++){if((p+1)!=o){if(this.currentElement[p]&&this.currentElement[p].nextSibling){if(this._isElement(this.currentElement[p],"br")){this.currentElement[this.currentElement.length]=this.currentElement[p].nextSibling}}}}}},saveHTML:function(){var H=this.cleanHTML();this.get("element").value=H;return H},setEditorHTML:function(H){H=this._cleanIncomingHTML(H);this._getDoc().body.innerHTML=H;this.nodeChange()},getEditorHTML:function(){return this._getDoc().body.innerHTML},show:function(){if(this.browser.gecko){this._setDesignMode("on");this._focusWindow()}if(this.browser.webkit){var H=this;window.setTimeout(function(){H._setInitialContent.call(H)},10)}if(YAHOO.widget.EditorInfo.window.win&&YAHOO.widget.EditorInfo.window.scope){YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope)}this.get("iframe").setStyle("position","static");this.get("iframe").setStyle("left","")},hide:function(){if(YAHOO.widget.EditorInfo.window.win&&YAHOO.widget.EditorInfo.window.scope){YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope)}if(this._fixNodesTimer){clearTimeout(this._fixNodesTimer);this._fixNodesTimer=null}if(this._nodeChangeTimer){clearTimeout(this._nodeChangeTimer);this._nodeChangeTimer=null}this._lastNodeChange=0;this.get("iframe").setStyle("position","absolute");this.get("iframe").setStyle("left","-9999px")},_cleanIncomingHTML:function(H){H=H.replace(/<strong([^>]*)>/gi,"<b$1>");H=H.replace(/<\/strong>/gi,"</b>");H=H.replace(/<em([^>]*)>/gi,"<i$1>");H=H.replace(/<\/em>/gi,"</i>");return H},cleanHTML:function(K){if(!K){K=this.getEditorHTML()}var I=this.get("markup");K=this.pre_filter_linebreaks(K,I);K=K.replace(/<img([^>]*)\/>/gi,"<YUI_IMG$1>");K=K.replace(/<img([^>]*)>/gi,"<YUI_IMG$1>");K=K.replace(/<input([^>]*)\/>/gi,"<YUI_INPUT$1>");K=K.replace(/<input([^>]*)>/gi,"<YUI_INPUT$1>");K=K.replace(/<ul([^>]*)>/gi,"<YUI_UL$1>");K=K.replace(/<\/ul>/gi,"</YUI_UL>");K=K.replace(/<blockquote([^>]*)>/gi,"<YUI_BQ$1>");K=K.replace(/<\/blockquote>/gi,"</YUI_BQ>");if((I=="semantic")||(I=="xhtml")){K=K.replace(/<i([^>]*)>/gi,"<em$1>");K=K.replace(/<\/i>/gi,"</em>");K=K.replace(/<b([^>]*)>/gi,"<strong$1>");K=K.replace(/<\/b>/gi,"</strong>")}K=K.replace(/<font/gi,"<font");K=K.replace(/<\/font>/gi,"</font>");K=K.replace(/<span/gi,"<span");K=K.replace(/<\/span>/gi,"</span>");if((I=="semantic")||(I=="xhtml")||(I=="css")){K=K.replace(new RegExp('<font([^>]*)face="([^>]*)">(.*?)</font>',"gi"),'<span $1 style="font-family: $2;">$3</span>');K=K.replace(/<u/gi,'<span style="text-decoration: underline;"');K=K.replace(/\/u>/gi,"/span>");if(I=="css"){K=K.replace(/<em([^>]*)>/gi,"<i$1>");K=K.replace(/<\/em>/gi,"</i>");K=K.replace(/<strong([^>]*)>/gi,"<b$1>");K=K.replace(/<\/strong>/gi,"</b>");K=K.replace(/<b/gi,'<span style="font-weight: bold;"');K=K.replace(/\/b>/gi,"/span>");K=K.replace(/<i/gi,'<span style="font-style: italic;"');K=K.replace(/\/i>/gi,"/span>")}K=K.replace(/  /gi," ")}else{K=K.replace(/<u/gi,"<u");K=K.replace(/\/u>/gi,"/u>")}K=K.replace(/<ol([^>]*)>/gi,"<ol$1>");K=K.replace(/\/ol>/gi,"/ol>");K=K.replace(/<li/gi,"<li");K=K.replace(/\/li>/gi,"/li>");K=this.filter_safari(K);K=this.filter_internals(K);K=this.filter_all_rgb(K);K=this.post_filter_linebreaks(K,I);if(I=="xhtml"){K=K.replace(/<YUI_IMG([^>]*)>/g,"<img $1/>");K=K.replace(/<YUI_INPUT([^>]*)>/g,"<input $1/>")}else{K=K.replace(/<YUI_IMG([^>]*)>/g,"<img $1>");K=K.replace(/<YUI_INPUT([^>]*)>/g,"<input $1>")}K=K.replace(/<YUI_UL([^>]*)>/g,"<ul$1>");K=K.replace(/<\/YUI_UL>/g,"</ul>");K=this.filter_invalid_lists(K);K=K.replace(/<YUI_BQ([^>]*)>/g,"<blockquote$1>");K=K.replace(/<\/YUI_BQ>/g,"</blockquote>");K=YAHOO.lang.trim(K);if(this.get("removeLineBreaks")){K=K.replace(/\n/g,"").replace(/\r/g,"");K=K.replace(/  /gi," ")}if(K.substring(0,6).toLowerCase()=="<span>"){K=K.substring(6)}if(K.substring(K.length-7,K.length).toLowerCase()=="</span>"){K=K.substring(0,K.length-7)}for(var H in this.invalidHTML){if(YAHOO.lang.hasOwnProperty(this.invalidHTML,H)){if(E.isObject(H)&&H.keepContents){K=K.replace(new RegExp("<"+H+"([^>]*)>(.*?)</"+H+">","gi"),"$1")}else{K=K.replace(new RegExp("<"+H+"([^>]*)>(.*?)</"+H+">","gi"),"")}}}this.fireEvent("cleanHTML",{type:"cleanHTML",target:this,html:K});return K},filter_invalid_lists:function(H){H=H.replace(/<\/li>\n/gi,"</li>");H=H.replace(/<\/li><ol>/gi,"</li><li><ol>");H=H.replace(/<\/ol>/gi,"</ol></li>");H=H.replace(/<\/ol><\/li>\n/gi,"</ol>\n");H=H.replace(/<\/li><ul>/gi,"</li><li><ul>");H=H.replace(/<\/ul>/gi,"</ul></li>");H=H.replace(/<\/ul><\/li>\n/gi,"</ul>\n");H=H.replace(/<\/li>/gi,"</li>\n");H=H.replace(/<\/ol>/gi,"</ol>\n");H=H.replace(/<ol>/gi,"<ol>\n");H=H.replace(/<ul>/gi,"<ul>\n");return H},filter_safari:function(H){if(this.browser.webkit){H=H.replace(/Apple-style-span/gi,"");H=H.replace(/style="line-height: normal;"/gi,"");H=H.replace(/<li><\/li>/gi,"");H=H.replace(/<li> <\/li>/gi,"");H=H.replace(/<li>  <\/li>/gi,"");H=H.replace(/<div><\/div>/gi,"");H=H.replace(/<div> <\/div>/gi,"")}return H},filter_internals:function(H){H=H.replace(/\r/g,"");H=H.replace(/<\/?(body|head|html)[^>]*>/gi,"");H=H.replace(/<YUI_BR><\/li>/gi,"</li>");H=H.replace(/yui-tag-span/gi,"");H=H.replace(/yui-tag/gi,"");H=H.replace(/yui-non/gi,"");H=H.replace(/yui-img/gi,"");H=H.replace(/ tag="span"/gi,"");H=H.replace(/ class=""/gi,"");H=H.replace(/ style=""/gi,"");H=H.replace(/ class=" "/gi,"");H=H.replace(/ class="  "/gi,"");H=H.replace(/ target=""/gi,"");H=H.replace(/ title=""/gi,"");if(this.browser.ie){H=H.replace(/ class= /gi,"");H=H.replace(/ class= >/gi,"");H=H.replace(/_height="([^>])"/gi,"");H=H.replace(/_width="([^>])"/gi,"")}return H},filter_all_rgb:function(N){var M=new RegExp("rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)","gi");var H=N.match(M);if(E.isArray(H)){for(var K=0;K<H.length;K++){var I=this.filter_rgb(H[K]);N=N.replace(H[K].toString(),I)}}return N},filter_rgb:function(K){if(K.toLowerCase().indexOf("rgb")!=-1){var O=new RegExp("(.*?)rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)(.*?)","gi");var I=K.replace(O,"$1,$2,$3,$4,$5").split(",");if(I.length==5){var N=parseInt(I[1],10).toString(16);var M=parseInt(I[2],10).toString(16);var H=parseInt(I[3],10).toString(16);N=N.length==1?"0"+N:N;M=M.length==1?"0"+M:M;H=H.length==1?"0"+H:H;K="#"+N+M+H}}return K},pre_filter_linebreaks:function(I,H){if(this.browser.webkit){I=I.replace(/<br class="khtml-block-placeholder">/gi,"<YUI_BR>");I=I.replace(/<br class="webkit-block-placeholder">/gi,"<YUI_BR>")}I=I.replace(/<br>/gi,"<YUI_BR>");I=I.replace(/<br (.*?)>/gi,"<YUI_BR>");I=I.replace(/<br\/>/gi,"<YUI_BR>");I=I.replace(/<br \/>/gi,"<YUI_BR>");I=I.replace(/<div><YUI_BR><\/div>/gi,"<YUI_BR>");I=I.replace(/<p>(&nbsp;|&#160;)<\/p>/g,"<YUI_BR>");I=I.replace(/<p><br>&nbsp;<\/p>/gi,"<YUI_BR>");I=I.replace(/<p>&nbsp;<\/p>/gi,"<YUI_BR>");I=I.replace(/<YUI_BR>$/,"");I=I.replace(/<YUI_BR><\/p>/g,"</p>");return I},post_filter_linebreaks:function(I,H){if(H=="xhtml"){I=I.replace(/<YUI_BR>/g,"<br/>")}else{I=I.replace(/<YUI_BR>/g,"<br>")}return I},clearEditorDoc:function(){this._getDoc().body.innerHTML="&nbsp;"},_renderPanel:function(){},openWindow:function(H){},moveWindow:function(){},_closeWindow:function(){},closeWindow:function(){this.unsubscribeAll("afterExecCommand");this.toolbar.resetAllButtons();this._focusWindow()},destroy:function(){this.saveHTML();this.toolbar.destroy();this.setStyle("visibility","hidden");this.setStyle("position","absolute");this.setStyle("top","-9999px");this.setStyle("left","-9999px");var I=this.get("element");this.get("element_cont").get("parentNode").replaceChild(I,this.get("element_cont").get("element"));this.get("element_cont").get("element").innerHTML="";for(var H in this){if(E.hasOwnProperty(this,H)){this[H]=null}}return true},toString:function(){var H="SimpleEditor";if(this.get&&this.get("element_cont")){H="SimpleEditor (#"+this.get("element_cont").get("id")+")"+((this.get("disabled")?" Disabled":""))}return H}});YAHOO.widget.EditorInfo={_instances:{},window:{},panel:null,getEditorById:function(H){if(!YAHOO.lang.isString(H)){H=H.id}if(this._instances[H]){return this._instances[H]}return false},toString:function(){var H=0;for(var I in this._instances){H++}return"Editor Info ("+H+" registered intance"+((H>1)?"s":"")+")"}}})();(function(){var D=YAHOO.util.Dom,A=YAHOO.util.Event,E=YAHOO.lang,C=YAHOO.widget.Toolbar;YAHOO.widget.Editor=function(I,H){var K={element:null,attributes:(H||{})},M=null;if(E.isString(I)){M=I}else{M=I.id}K.element=I;YAHOO.widget.Editor.superclass.constructor.call(this,K.element,K.attributes)};function F(H){return H.replace(/ /g,"-").toLowerCase()}YAHOO.extend(YAHOO.widget.Editor,YAHOO.widget.SimpleEditor,{STR_BEFORE_EDITOR:"This text field can contain stylized text and graphics. To cycle through all formatting options, use the keyboard shortcut Control + Shift + T to place focus on the toolbar and navigate between option heading names. <h4>Common formatting keyboard shortcuts:</h4><ul><li>Control Shift B sets text to bold</li> <li>Control Shift I sets text to italic</li> <li>Control Shift U underlines text</li> <li>Control Shift [ aligns text left</li> <li>Control Shift | centers text</li> <li>Control Shift ] aligns text right</li> <li>Control Shift L adds an HTML link</li> <li>To exit this text editor use the keyboard shortcut Control + Shift + ESC.</li></ul>",STR_CLOSE_WINDOW:"Close Window",STR_CLOSE_WINDOW_NOTE:"To close this window use the Control + Shift + W key",STR_IMAGE_PROP_TITLE:"Image Options",STR_IMAGE_URL:"Image Url",STR_IMAGE_TITLE:"Description",STR_IMAGE_SIZE:"Size",STR_IMAGE_ORIG_SIZE:"Original Size",STR_IMAGE_COPY:'<span class="tip"><span class="icon icon-info"></span><strong>Note:</strong>To move this image just highlight it, cut, and paste where ever you\'d like.</span>',STR_IMAGE_PADDING:"Padding",STR_IMAGE_BORDER:"Border",STR_IMAGE_TEXTFLOW:"Text Flow",STR_LOCAL_FILE_WARNING:'<span class="tip"><span class="icon icon-warn"></span><strong>Note:</strong>This image/link points to a file on your computer and will not be accessible to others on the internet.</span>',STR_LINK_PROP_TITLE:"Link Options",STR_LINK_PROP_REMOVE:"Remove link from text",STR_LINK_NEW_WINDOW:"Open in a new window.",STR_LINK_TITLE:"Description",CLASS_LOCAL_FILE:"warning-localfile",CLASS_HIDDEN:"yui-hidden",init:function(I,H){YAHOO.widget.Editor.superclass.init.call(this,I,H)},initAttributes:function(H){YAHOO.widget.Editor.superclass.initAttributes.call(this,H);this.setAttributeConfig("localFileWarning",{value:H.locaFileWarning||true});this.setAttributeConfig("hiddencss",{value:H.hiddencss||".yui-hidden font, .yui-hidden strong, .yui-hidden b, .yui-hidden em, .yui-hidden i, .yui-hidden u, .yui-hidden div,.yui-hidden p,.yui-hidden span,.yui-hidden img, .yui-hidden ul, .yui-hidden ol, .yui-hidden li, .yui-hidden table { border: 1px dotted #ccc; } .yui-hidden .yui-non { border: none; } .yui-hidden img { padding: 2px; }",writeOnce:true})},_fixNodes:function(){YAHOO.widget.Editor.superclass._fixNodes.call(this);var M="";var N=this._getDoc().getElementsByTagName("img");for(var I=0;I<N.length;I++){if(N[I].getAttribute("href",2)){M=N[I].getAttribute("src",2);if(this._isLocalFile(M)){D.addClass(N[I],this.CLASS_LOCAL_FILE)}else{D.removeClass(N[I],this.CLASS_LOCAL_FILE)}}}var K=this._getDoc().body.getElementsByTagName("a");for(var H=0;H<K.length;H++){if(K[H].getAttribute("href",2)){M=K[H].getAttribute("href",2);if(this._isLocalFile(M)){D.addClass(K[H],this.CLASS_LOCAL_FILE)}else{D.removeClass(K[H],this.CLASS_LOCAL_FILE)}}}},_disabled:["createlink","forecolor","backcolor","fontname","fontsize","superscript","subscript","removeformat","heading","indent"],_alwaysDisabled:{outdent:true},_alwaysEnabled:{hiddenelements:true},_defaultToolbar:{collapse:true,titlebar:"Text Editing Tools",draggable:false,buttonType:"advanced",buttons:[{group:"fontstyle",label:"Font Name and Size",buttons:[{type:"select",label:"Arial",value:"fontname",disabled:true,menu:[{text:"Arial",checked:true},{text:"Arial Black"},{text:"Comic Sans MS"},{text:"Courier New"},{text:"Lucida Console"},{text:"Tahoma"},{text:"Times New Roman"},{text:"Trebuchet MS"},{text:"Verdana"}]},{type:"spin",label:"13",value:"fontsize",range:[9,75],disabled:true}]},{type:"separator"},{group:"textstyle",label:"Font Style",buttons:[{type:"push",label:"Bold CTRL + SHIFT + B",value:"bold"},{type:"push",label:"Italic CTRL + SHIFT + I",value:"italic"},{type:"push",label:"Underline CTRL + SHIFT + U",value:"underline"},{type:"separator"},{type:"push",label:"Subscript",value:"subscript",disabled:true},{type:"push",label:"Superscript",value:"superscript",disabled:true},{type:"separator"},{type:"color",label:"Font Color",value:"forecolor",disabled:true},{type:"color",label:"Background Color",value:"backcolor",disabled:true},{type:"separator"},{type:"push",label:"Remove Formatting",value:"removeformat",disabled:true},{type:"push",label:"Show/Hide Hidden Elements",value:"hiddenelements"}]},{type:"separator"},{group:"alignment",label:"Alignment",buttons:[{type:"push",label:"Align Left CTRL + SHIFT + [",value:"justifyleft"},{type:"push",label:"Align Center CTRL + SHIFT + |",value:"justifycenter"},{type:"push",label:"Align Right CTRL + SHIFT + ]",value:"justifyright"},{type:"push",label:"Justify",value:"justifyfull"}]},{type:"separator"},{group:"parastyle",label:"Paragraph Style",buttons:[{type:"select",label:"Normal",value:"heading",disabled:true,menu:[{text:"Normal",value:"none",checked:true},{text:"Header 1",value:"h1"},{text:"Header 2",value:"h2"},{text:"Header 3",value:"h3"},{text:"Header 4",value:"h4"},{text:"Header 5",value:"h5"},{text:"Header 6",value:"h6"}]}]},{type:"separator"},{group:"indentlist",label:"Indenting and Lists",buttons:[{type:"push",label:"Indent",value:"indent",disabled:true},{type:"push",label:"Outdent",value:"outdent",disabled:true},{type:"push",label:"Create an Unordered List",value:"insertunorderedlist"},{type:"push",label:"Create an Ordered List",value:"insertorderedlist"}]},{type:"separator"},{group:"insertitem",label:"Insert Item",buttons:[{type:"push",label:"HTML Link CTRL + SHIFT + L",value:"createlink",disabled:true},{type:"push",label:"Insert Image",value:"insertimage"}]}]},_handleKeyDown:function(K){YAHOO.widget.Editor.superclass._handleKeyDown.call(this,K);var I=false,M=null,H=false;if(K.shiftKey&&K.ctrlKey){I=true}switch(K.keyCode){case 219:M="justifyleft";break;case 220:M="justifycenter";break;case 221:M="justifyright";break}if(I&&M){this.execCommand(M,null);A.stopEvent(K);this.nodeChange()}},_handleCreateLinkClick:function(){var H=this._getSelectedElement();if(this._isElement(H,"img")){this.STOP_EXEC_COMMAND=true;this.currentElement[0]=H;this.toolbar.fireEvent("insertimageClick",{type:"insertimageClick",target:this.toolbar});this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this});return false}if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue("createlink")){return false}}this.on("afterExecCommand",function(){var Q=new YAHOO.widget.EditorWindow("createlink",{width:"350px"});var N=this.currentElement[0],M="",U="",S="",O=false;if(N){if(N.getAttribute("href",2)!==null){M=N.getAttribute("href",2);if(this._isLocalFile(M)){Q.setFooter(this.STR_LOCAL_FILE_WARNING);O=true}else{Q.setFooter(" ")}}if(N.getAttribute("title")!==null){U=N.getAttribute("title")}if(N.getAttribute("target")!==null){S=N.getAttribute("target")}}var T='<label for="createlink_url"><strong>'+this.STR_LINK_URL+':</strong> <input type="text" name="createlink_url" id="createlink_url" value="'+M+'"'+((O)?' class="warning"':"")+"></label>";T+='<label for="createlink_target"><strong>&nbsp;</strong><input type="checkbox" name="createlink_target_" id="createlink_target" value="_blank"'+((S)?" checked":"")+"> "+this.STR_LINK_NEW_WINDOW+"</label>";T+='<label for="createlink_title"><strong>'+this.STR_LINK_TITLE+':</strong> <input type="text" name="createlink_title" id="createlink_title" value="'+U+'"></label>';var P=document.createElement("div");P.innerHTML=T;var K=document.createElement("div");K.className="removeLink";var I=document.createElement("a");I.href="#";I.innerHTML=this.STR_LINK_PROP_REMOVE;I.title=this.STR_LINK_PROP_REMOVE;A.on(I,"click",function(V){A.stopEvent(V);this.execCommand("unlink");this.closeWindow()},this,true);K.appendChild(I);P.appendChild(K);Q.setHeader(this.STR_LINK_PROP_TITLE);Q.setBody(P);A.onAvailable("createlink_url",function(){window.setTimeout(function(){try{YAHOO.util.Dom.get("createlink_url").focus()}catch(V){}},50);A.on("createlink_url","blur",function(){var V=D.get("createlink_url");if(this._isLocalFile(V.value)){D.addClass(V,"warning");this.get("panel").setFooter(this.STR_LOCAL_FILE_WARNING)}else{D.removeClass(V,"warning");this.get("panel").setFooter(" ")}},this,true)},this,true);this.openWindow(Q)})},_handleCreateLinkWindowClose:function(){var K=D.get("createlink_url"),N=D.get("createlink_target"),P=D.get("createlink_title"),M=this.currentElement[0],H=M;if(K&&K.value){var O=K.value;if((O.indexOf("://")==-1)&&(O.substring(0,1)!="/")&&(O.substring(0,6).toLowerCase()!="mailto")){if((O.indexOf("@")!=-1)&&(O.substring(0,6).toLowerCase()!="mailto")){O="mailto:"+O}else{if(O.substring(0,1)!="#"){O="http://"+O}}}M.setAttribute("href",O);if(N.checked){M.setAttribute("target",N.value)}else{M.setAttribute("target","")}M.setAttribute("title",((P.value)?P.value:""))}else{var I=this._getDoc().createElement("span");I.innerHTML=M.innerHTML;D.addClass(I,"yui-non");M.parentNode.replaceChild(I,M)}this.nodeChange();this.currentElement=[]},_handleInsertImageClick:function(){if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue("insertimage")){return false}}this._setBusy();this.on("afterExecCommand",function(){var M=this.currentElement[0],X=null,U="",q="",r="",T="",n="",c=75,g=75,Z=0,V=0,S=0,d=false,Q=new YAHOO.widget.EditorWindow("insertimage",{width:"415px"});if(!M){M=this._getSelectedElement()}if(M){if(M.getAttribute("src")){T=M.getAttribute("src",2);if(T.indexOf(this.get("blankimage"))!=-1){T=this.STR_IMAGE_HERE;d=true}}if(M.getAttribute("alt",2)){r=M.getAttribute("alt",2)}if(M.getAttribute("title",2)){r=M.getAttribute("title",2)}if(M.parentNode&&this._isElement(M.parentNode,"a")){U=M.parentNode.getAttribute("href",2);if(M.parentNode.getAttribute("target")!==null){q=M.parentNode.getAttribute("target")}}c=parseInt(M.height,10);g=parseInt(M.width,10);if(M.style.height){c=parseInt(M.style.height,10)}if(M.style.width){g=parseInt(M.style.width,10)}if(M.style.margin){Z=parseInt(M.style.margin,10)}if(!M._height){M._height=c}if(!M._width){M._width=g}V=M._height;S=M._width}var h='<label for="insertimage_url"><strong>'+this.STR_IMAGE_URL+':</strong> <input type="text" id="insertimage_url" value="'+T+'" size="40"></label>';X=document.createElement("div");X.innerHTML=h;var O=document.createElement("div");O.id="img_toolbar";X.appendChild(O);var H='<label for="insertimage_title"><strong>'+this.STR_IMAGE_TITLE+':</strong> <input type="text" id="insertimage_title" value="'+r+'" size="40"></label>';H+='<label for="insertimage_link"><strong>'+this.STR_LINK_URL+':</strong> <input type="text" name="insertimage_link" id="insertimage_link" value="'+U+'"></label>';H+='<label for="insertimage_target"><strong>&nbsp;</strong><input type="checkbox" name="insertimage_target_" id="insertimage_target" value="_blank"'+((q)?" checked":"")+"> "+this.STR_LINK_NEW_WINDOW+"</label>";var Y=document.createElement("div");Y.innerHTML=H;X.appendChild(Y);Q.cache=X;var K=new YAHOO.widget.Toolbar(O,{buttonType:this._defaultToolbar.buttonType,buttons:[{group:"textflow",label:this.STR_IMAGE_TEXTFLOW+":",buttons:[{type:"push",label:"Left",value:"left"},{type:"push",label:"Inline",value:"inline"},{type:"push",label:"Block",value:"block"},{type:"push",label:"Right",value:"right"}]},{type:"separator"},{group:"padding",label:this.STR_IMAGE_PADDING+":",buttons:[{type:"spin",label:""+Z,value:"padding",range:[0,50]}]},{type:"separator"},{group:"border",label:this.STR_IMAGE_BORDER+":",buttons:[{type:"select",label:"Border Size",value:"bordersize",menu:[{text:"none",value:"0",checked:true},{text:"1px",value:"1"},{text:"2px",value:"2"},{text:"3px",value:"3"},{text:"4px",value:"4"},{text:"5px",value:"5"}]},{type:"select",label:"Border Type",value:"bordertype",disabled:true,menu:[{text:"Solid",value:"solid",checked:true},{text:"Dashed",value:"dashed"},{text:"Dotted",value:"dotted"}]},{type:"color",label:"Border Color",value:"bordercolor",disabled:true}]}]});var I="0";var f="solid";if(M.style.borderLeftWidth){I=parseInt(M.style.borderLeftWidth,10)}if(M.style.borderLeftStyle){f=M.style.borderLeftStyle}var p=K.getButtonByValue("bordersize");var l=((parseInt(I,10)>0)?"":"none");p.set("label",'<span class="yui-toolbar-bordersize-'+I+'">'+l+"</span>");this._updateMenuChecked("bordersize",I,K);var W=K.getButtonByValue("bordertype");W.set("label",'<span class="yui-toolbar-bordertype-'+f+'"></span>');this._updateMenuChecked("bordertype",f,K);if(parseInt(I,10)>0){K.enableButton(W);K.enableButton(p)}var N=K.get("cont");var o=document.createElement("div");o.className="yui-toolbar-group yui-toolbar-group-height-width height-width";o.innerHTML="<h3>"+this.STR_IMAGE_SIZE+":</h3>";var P="";if((c!=V)||(g!=S)){P='<span class="info">'+this.STR_IMAGE_ORIG_SIZE+"<br>"+S+" x "+V+"</span>"}o.innerHTML+='<span><input type="text" size="3" value="'+g+'" id="insertimage_width"> x <input type="text" size="3" value="'+c+'" id="insertimage_height"></span>'+P;N.insertBefore(o,N.firstChild);A.onAvailable("insertimage_width",function(){A.on("insertimage_width","blur",function(){var s=parseInt(D.get("insertimage_width").value,10);if(s>5){M.style.width=s+"px";this.moveWindow()}},this,true)},this,true);A.onAvailable("insertimage_height",function(){A.on("insertimage_height","blur",function(){var s=parseInt(D.get("insertimage_height").value,10);if(s>5){M.style.height=s+"px";this.moveWindow()}},this,true)},this,true);if((M.align=="right")||(M.align=="left")){K.selectButton(M.align)}else{if(M.style.display=="block"){K.selectButton("block")}else{K.selectButton("inline")}}if(parseInt(M.style.marginLeft,10)>0){K.getButtonByValue("padding").set("label",""+parseInt(M.style.marginLeft,10))}if(M.style.borderSize){K.selectButton("bordersize");K.selectButton(parseInt(M.style.borderSize,10))}K.on("colorPickerClicked",function(w){var t="1",v="solid",s="black";if(M.style.borderLeftWidth){t=parseInt(M.style.borderLeftWidth,10)}if(M.style.borderLeftStyle){v=M.style.borderLeftStyle}if(M.style.borderLeftColor){s=M.style.borderLeftColor}var u=t+"px "+v+" #"+w.color;M.style.border=u},this.toolbar,true);K.on("buttonClick",function(AA){var w=AA.button.value,v="";if(AA.button.menucmd){w=AA.button.menucmd}var t="1",u="solid",s="black";if(M.style.borderLeftWidth){t=parseInt(M.style.borderLeftWidth,10)}if(M.style.borderLeftStyle){u=M.style.borderLeftStyle}if(M.style.borderLeftColor){s=M.style.borderLeftColor}switch(w){case"bordersize":if(this.browser.webkit&&this._lastImage){D.removeClass(this._lastImage,"selected");this._lastImage=null}v=parseInt(AA.button.value,10)+"px "+u+" "+s;M.style.border=v;if(parseInt(AA.button.value,10)>0){K.enableButton("bordertype");K.enableButton("bordercolor")}else{K.disableButton("bordertype");K.disableButton("bordercolor")}break;case"bordertype":if(this.browser.webkit&&this._lastImage){D.removeClass(this._lastImage,"selected");this._lastImage=null}v=t+"px "+AA.button.value+" "+s;M.style.border=v;break;case"right":case"left":K.deselectAllButtons();M.style.display="";M.align=AA.button.value;break;case"inline":K.deselectAllButtons();M.style.display="";M.align="";break;case"block":K.deselectAllButtons();M.style.display="block";M.align="center";break;case"padding":var z=K.getButtonById(AA.button.id);M.style.margin=z.get("label")+"px";break}K.selectButton(AA.button.value);this.moveWindow()},this,true);Q.setHeader(this.STR_IMAGE_PROP_TITLE);Q.setBody(X);if((this.browser.webkit&&!this.browser.webkit3)||this.browser.opera){Q.setFooter(this.STR_IMAGE_COPY)}this.openWindow(Q);A.onAvailable("insertimage_url",function(){this.toolbar.selectButton("insertimage");window.setTimeout(function(){YAHOO.util.Dom.get("insertimage_url").focus();if(d){YAHOO.util.Dom.get("insertimage_url").select()}},50);if(this.get("localFileWarning")){A.on("insertimage_link","blur",function(){var s=D.get("insertimage_link");if(this._isLocalFile(s.value)){D.addClass(s,"warning");this.get("panel").setFooter(this.STR_LOCAL_FILE_WARNING)}else{D.removeClass(s,"warning");this.get("panel").setFooter(" ");if((this.browser.webkit&&!this.browser.webkit3)||this.browser.opera){this.get("panel").setFooter(this.STR_IMAGE_COPY)}}},this,true);A.on("insertimage_url","blur",function(){var u=D.get("insertimage_url");if(this._isLocalFile(u.value)){D.addClass(u,"warning");this.get("panel").setFooter(this.STR_LOCAL_FILE_WARNING)}else{if(this.currentElement[0]){D.removeClass(u,"warning");this.get("panel").setFooter(" ");if((this.browser.webkit&&!this.browser.webkit3)||this.browser.opera){this.get("panel").setFooter(this.STR_IMAGE_COPY)}if(u&&u.value&&(u.value!=this.STR_IMAGE_HERE)){this.currentElement[0].setAttribute("src",u.value);var t=this,s=new Image();s.onerror=function(){u.value=t.STR_IMAGE_HERE;s.setAttribute("src",t.get("blankimage"));t.currentElement[0].setAttribute("src",t.get("blankimage"));YAHOO.util.Dom.get("insertimage_height").value=s.height;YAHOO.util.Dom.get("insertimage_width").value=s.width};window.setTimeout(function(){YAHOO.util.Dom.get("insertimage_height").value=s.height;YAHOO.util.Dom.get("insertimage_width").value=s.width;if(t.currentElement&&t.currentElement[0]){if(!t.currentElement[0]._height){t.currentElement[0]._height=s.height}if(!t.currentElement[0]._width){t.currentElement[0]._width=s.width}}t.moveWindow()},200);if(u.value!=this.STR_IMAGE_HERE){s.src=u.value}}}}},this,true)}},this,true)})},_handleInsertImageWindowClose:function(){var H=D.get("insertimage_url");var Q=D.get("insertimage_title");var N=D.get("insertimage_link");var O=D.get("insertimage_target");var M=this.currentElement[0];if(H&&H.value&&(H.value!=this.STR_IMAGE_HERE)){M.setAttribute("src",H.value);M.setAttribute("title",Q.value);M.setAttribute("alt",Q.value);var K=M.parentNode;if(N.value){var P=N.value;if((P.indexOf("://")==-1)&&(P.substring(0,1)!="/")&&(P.substring(0,6).toLowerCase()!="mailto")){if((P.indexOf("@")!=-1)&&(P.substring(0,6).toLowerCase()!="mailto")){P="mailto:"+P}else{P="http://"+P}}if(K&&this._isElement(K,"a")){K.setAttribute("href",P);if(O.checked){K.setAttribute("target",O.value)}else{K.setAttribute("target","")}}else{var I=this._getDoc().createElement("a");I.setAttribute("href",P);if(O.checked){I.setAttribute("target",O.value)}else{I.setAttribute("target","")}M.parentNode.replaceChild(I,M);I.appendChild(M)}}else{if(K&&this._isElement(K,"a")){K.parentNode.replaceChild(M,K)}}}else{M.parentNode.removeChild(M)}this.currentElement=[];this.nodeChange()},_renderPanel:function(){var H=null;if(!YAHOO.widget.EditorInfo.panel){H=new YAHOO.widget.Overlay(this.EDITOR_PANEL_ID,{width:"300px",iframe:true,visible:false,underlay:"none",draggable:false,close:false});YAHOO.widget.EditorInfo.panel=H}else{H=YAHOO.widget.EditorInfo.panel}this.set("panel",H);this.get("panel").setBody("---");this.get("panel").setHeader(" ");this.get("panel").setFooter(" ");if(this.DOMReady){this.get("panel").render(document.body);D.addClass(this.get("panel").element,"yui-editor-panel")}else{A.onDOMReady(function(){this.get("panel").render(document.body);D.addClass(this.get("panel").element,"yui-editor-panel")},this,true)}this.get("panel").showEvent.subscribe(function(){YAHOO.util.Dom.setStyle(this.element,"display","block")});return this.get("panel")},openWindow:function(O){this.toolbar.set("disabled",true);A.on(document,"keypress",this._closeWindow,this,true);if(YAHOO.widget.EditorInfo.window.win&&YAHOO.widget.EditorInfo.window.scope){YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope)}YAHOO.widget.EditorInfo.window.win=O;YAHOO.widget.EditorInfo.window.scope=this;var U=this,P=D.getXY(this.currentElement[0]),Z=D.getXY(this.get("iframe").get("element")),S=this.get("panel"),Y=[(P[0]+Z[0]-20),(P[1]+Z[1]+10)],T=(parseInt(O.attrs.width,10)/2),W="center",Q=null;this.fireEvent("beforeOpenWindow",{type:"beforeOpenWindow",win:O,panel:S});Q=document.createElement("div");Q.className=this.CLASS_PREFIX+"-body-cont";for(var c in this.browser){if(this.browser[c]){D.addClass(Q,c);break}}D.addClass(Q,((YAHOO.widget.Button&&(this._defaultToolbar.buttonType=="advanced"))?"good-button":"no-button"));var X=document.createElement("h3");X.className="yui-editor-skipheader";X.innerHTML=this.STR_CLOSE_WINDOW_NOTE;Q.appendChild(X);form=document.createElement("form");form.setAttribute("method","GET");var d=O.name;A.on(form,"submit",function(g){var f="window"+d+"Submit";U.fireEvent(f,{type:f,target:this});A.stopEvent(g)},this,true);Q.appendChild(form);if(E.isObject(O.body)){form.appendChild(O.body)}else{var H=document.createElement("div");H.innerHTML=O.body;form.appendChild(H)}var N=document.createElement("span");N.innerHTML="X";N.title=this.STR_CLOSE_WINDOW;N.className="close";A.on(N,"click",function(){this.closeWindow()},this,true);var K=document.createElement("span");K.innerHTML="^";K.className="knob";O._knob=K;var M=document.createElement("h3");M.innerHTML=O.header;S.cfg.setProperty("width",O.attrs.width);S.setHeader(" ");S.appendToHeader(M);M.appendChild(N);M.appendChild(K);S.setBody(" ");S.setFooter(" ");if(O.footer!==null){S.setFooter(O.footer);D.addClass(S.footer,"open")}else{D.removeClass(S.footer,"open")}S.appendToBody(Q);var V=function(){S.bringToTop();A.on(S.element,"click",function(f){A.stopPropagation(f)});this._setBusy(true);S.showEvent.unsubscribe(V)};S.showEvent.subscribe(V,this,true);var I=function(){this.currentWindow=null;var f="window"+d+"Close";this.fireEvent(f,{type:f,target:this});S.hideEvent.unsubscribe(I)};S.hideEvent.subscribe(I,this,true);this.currentWindow=O;this.moveWindow(true);S.show();this.fireEvent("afterOpenWindow",{type:"afterOpenWindow",win:O,panel:S})},moveWindow:function(I){if(!this.currentWindow){return false}var M=this.currentWindow,N=D.getXY(this.currentElement[0]),l=D.getXY(this.get("iframe").get("element")),T=this.get("panel"),f=[(N[0]+l[0]),(N[1]+l[1])],V=(parseInt(M.attrs.width,10)/2),Y="center",U=T.cfg.getProperty("xy"),K=M._knob,d=0,P=0,X=false;f[0]=((f[0]-V)+20);f[0]=f[0]-D.getDocumentScrollLeft(this._getDoc());f[1]=f[1]-D.getDocumentScrollTop(this._getDoc());if(this._isElement(this.currentElement[0],"img")){if(this.currentElement[0].src.indexOf(this.get("blankimage"))!=-1){f[0]=(f[0]+(75/2));f[1]=(f[1]+75)}else{var S=parseInt(this.currentElement[0].width,10);var c=parseInt(this.currentElement[0].height,10);f[0]=(f[0]+(S/2));f[1]=(f[1]+c)}f[1]=f[1]+15}else{var O=D.getStyle(this.currentElement[0],"fontSize");if(O&&O.indexOf&&O.indexOf("px")!=-1){f[1]=f[1]+parseInt(D.getStyle(this.currentElement[0],"fontSize"),10)+5}else{f[1]=f[1]+20}}if(f[0]<l[0]){f[0]=l[0]+5;Y="left"}if((f[0]+(V*2))>(l[0]+parseInt(this.get("iframe").get("element").clientWidth,10))){f[0]=((l[0]+parseInt(this.get("iframe").get("element").clientWidth,10))-(V*2)-5);Y="right"}try{d=(f[0]-U[0]);P=(f[1]-U[1])}catch(n){}d=((d<0)?(d*-1):d);P=((P<0)?(P*-1):P);if(((d>10)||(P>10))||I){var W=0,Z=0;if(this.currentElement[0].width){Z=(parseInt(this.currentElement[0].width,10)/2)}var Q=N[0]+l[0]+Z;W=Q-f[0];if(W>(parseInt(M.attrs.width,10)-40)){W=parseInt(M.attrs.width,10)-40}else{if(W<40){W=40}}if(isNaN(W)){W=40}if(I){if(K){K.style.left=W+"px"}if(this.get("animate")){D.setStyle(T.element,"opacity","0");X=new YAHOO.util.Anim(T.element,{opacity:{from:0,to:1}},0.1,YAHOO.util.Easing.easeOut);T.cfg.setProperty("xy",f);X.onComplete.subscribe(function(){if(this.browser.ie){T.element.style.filter="none"}},this,true);X.animate()}else{T.cfg.setProperty("xy",f)}}else{if(this.get("animate")){X=new YAHOO.util.Anim(T.element,{},0.5,YAHOO.util.Easing.easeOut);X.attributes={top:{to:f[1]},left:{to:f[0]}};X.onComplete.subscribe(function(){T.cfg.setProperty("xy",f)});var g=new YAHOO.util.Anim(T.iframe,X.attributes,0.5,YAHOO.util.Easing.easeOut);var H=new YAHOO.util.Anim(K,{left:{to:W}},0.6,YAHOO.util.Easing.easeOut);X.animate();g.animate();H.animate()}else{K.style.left=W+"px";T.cfg.setProperty("xy",f)}}}},_closeWindow:function(H){if((H.charCode==87)&&H.shiftKey&&H.ctrlKey){if(this.currentWindow){this.closeWindow()}}},closeWindow:function(){YAHOO.widget.EditorInfo.window={};this.fireEvent("closeWindow",{type:"closeWindow",win:this.currentWindow});this.currentWindow=null;this.get("panel").hide();this.get("panel").cfg.setProperty("xy",[-900,-900]);this.get("panel").syncIframe();this.unsubscribeAll("afterExecCommand");this.toolbar.set("disabled",false);this.toolbar.resetAllButtons();this._focusWindow();A.removeListener(document,"keypress",this._closeWindow)},cmd_heading:function(N){var I=true,K=null,M="heading",O=this._getSelection(),H=this._getSelectedElement();if(H){O=H}if(this.browser.ie){M="formatblock"}if(N=="none"){if((O&&O.tagName&&(O.tagName.toLowerCase().substring(0,1)=="h"))||(O&&O.parentNode&&O.parentNode.tagName&&(O.parentNode.tagName.toLowerCase().substring(0,1)=="h"))){if(O.parentNode.tagName.toLowerCase().substring(0,1)=="h"){O=O.parentNode}if(this._isElement(O,"html")){return[false]}K=this._swapEl(H,"span",function(P){P.className="yui-non"});this._selectNode(K);this.currentElement[0]=K}I=false}else{if(this._isElement(H,"h1")||this._isElement(H,"h2")||this._isElement(H,"h3")||this._isElement(H,"h4")||this._isElement(H,"h5")||this._isElement(H,"h6")){K=this._swapEl(H,N);this._selectNode(K);this.currentElement[0]=K}else{this._createCurrentElement(N);this._selectNode(this.currentElement[0])}I=false}return[I,M]},cmd_hiddenelements:function(H){if(this._showingHiddenElements){this._lastButton=null;this._showingHiddenElements=false;this.toolbar.deselectButton("hiddenelements");D.removeClass(this._getDoc().body,this.CLASS_HIDDEN)}else{this._showingHiddenElements=true;D.addClass(this._getDoc().body,this.CLASS_HIDDEN);this.toolbar.selectButton("hiddenelements")}return[false]},cmd_removeformat:function(M){var I=true;if(this.browser.webkit&&!this._getDoc().queryCommandEnabled("removeformat")){var H=this._getSelection()+"";this._createCurrentElement("span");this.currentElement[0].className="yui-non";this.currentElement[0].innerHTML=H;for(var K=1;K<this.currentElement.length;K++){this.currentElement[K].parentNode.removeChild(this.currentElement[K])}I=false}return[I]},cmd_script:function(P,O){var K=true,H=P.toLowerCase().substring(0,3),M=null,I=this._getSelectedElement();if(this.browser.webkit){if(this._isElement(I,H)){M=this._swapEl(this.currentElement[0],"span",function(Q){Q.className="yui-non"});this._selectNode(M)}else{this._createCurrentElement(H);var N=this._swapEl(this.currentElement[0],H);this._selectNode(N);this.currentElement[0]=N}K=false}return K},cmd_superscript:function(H){return[this.cmd_script("superscript",H)]},cmd_subscript:function(H){return[this.cmd_script("subscript",H)]},cmd_indent:function(M){var H=true,K=this._getSelectedElement(),N=null;if(this.browser.webkit||this.browser.ie||this.browser.gecko){if(this._isElement(K,"blockquote")){N=this._getDoc().createElement("blockquote");N.innerHTML=K.innerHTML;K.innerHTML="";K.appendChild(N);this._selectNode(N)}else{this._createCurrentElement("blockquote");for(var I=0;I<this.currentElement.length;I++){N=this._getDoc().createElement("blockquote");N.innerHTML=this.currentElement[I].innerHTML;this.currentElement[I].parentNode.replaceChild(N,this.currentElement[I]);this.currentElement[I]=N}this._selectNode(this.currentElement[0])}H=false}else{M="blockquote"}return[H,"indent",M]},cmd_outdent:function(N){var H=true,M=this._getSelectedElement(),O=null,I=null;if(this.browser.webkit||this.browser.ie||this.browser.gecko){M=this._getSelectedElement();if(this._isElement(M,"blockquote")){var K=M.parentNode;if(this._isElement(M.parentNode,"blockquote")){K.innerHTML=M.innerHTML;this._selectNode(K)}else{I=this._getDoc().createElement("span");I.innerHTML=M.innerHTML;YAHOO.util.Dom.addClass(I,"yui-non");K.replaceChild(I,M);this._selectNode(I)}}else{}H=false}else{N="blockquote"}return[H,"indent",N]},toString:function(){var H="Editor";if(this.get&&this.get("element_cont")){H="Editor (#"+this.get("element_cont").get("id")+")"+((this.get("disabled")?" Disabled":""))}return H}});YAHOO.widget.EditorWindow=function(I,H){this.name=I.replace(" ","_");this.attrs=H};YAHOO.widget.EditorWindow.prototype={_cache:null,header:null,body:null,footer:null,setHeader:function(H){this.header=H},setBody:function(H){this.body=H},setFooter:function(H){this.footer=H},toString:function(){return"Editor Window ("+this.name+")"}}})();YAHOO.register("editor",YAHOO.widget.Editor,{version:"2.4.1",build:"742"});YAHOO.namespace("lang");YAHOO.lang.JSON={parse:function(s,filter){var j;function walk(k,v){var i,n;if(v&&typeof v==="object"){for(i in v){if(YAHOO.lang.hasOwnProperty.apply(v,[i])){n=walk(i,v[i]);if(n!==undefined){v[i]=n}}}}return filter(k,v)}if(/^[\],:{}\s]*$/.test(s.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(:?[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+s+")");return typeof filter==="function"?walk("",j):j}throw new SyntaxError("parseJSON")},stringify:function(E,N,K){var H=YAHOO.lang,A=/["\\\x00-\x1f]/g,F={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},D=[];function C(Q){if(!F[Q]){var P=Q.charCodeAt();F[Q]="\\u00"+Math.floor(P/16).toString(16)+(P%16).toString(16)}return F[Q]}function I(P){return P<10?"0"+P:P}function O(P){return'"'+P.replace(A,C)+'"'}function M(P,X,V){var c=typeof P,T,U,S,Q,Y,Z,W;if(c==="string"){return O(P)}if(c==="boolean"||P instanceof Boolean){return String(P)}if(c==="number"||P instanceof Number){return isFinite(P)?String(P):"null"}if(P instanceof Date){return['"',P.getUTCFullYear(),"-",I(P.getUTCMonth()+1),"-",I(P.getUTCDate()),"T",I(P.getUTCHours()),":",I(P.getUTCMinutes()),":",I(P.getUTCSeconds()),'Z"'].join("")}if(H.isArray(P)){for(T=0,U=D.length;T<U;++T){if(D[T]===P){return"null"}}D[D.length]=P;W=[];if(V>0){for(T=0,U=P.length;T<U;++T){W[T]=M(P[T],X,V-1)}}D.pop();return"["+W.join(",")+"]"}if(c==="object"&&P){for(T=0,U=D.length;T<U;++T){if(D[T]===P){return"null"}}D[D.length]=P;W=[];if(V>0){if(X){for(T=0,S=0,U=X.length;T<U;++T){Y=P[X[T]];Z=typeof Y;if(Z!=="undefined"&&Z!=="function"){W[S++]=O(X[T])+":"+M(Y,X,V-1)}}}else{S=0;for(Q in P){if(typeof Q==="string"&&H.hasOwnProperty(P,Q)){Y=P[Q];Z=typeof Y;if(Z!=="undefined"&&Z!=="function"){W[S++]=O(Q)+":"+M(Y,X,V-1)}}}}}D.pop();return"{"+W.join(",")+"}"}return"null"}K=K>=0?K:1/0;return M(E,N,K)}};YAHOO.register("json",YAHOO.lang.JSON,{version:"2.4.1",build:"742"});if(typeof deconcept=="undefined"){var deconcept=new Object()}if(typeof deconcept.util=="undefined"){deconcept.util=new Object()}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object()}deconcept.SWFObject=function(F,D,O,H,K,N,P,I,A,E){if(!document.getElementById){return }this.DETECT_KEY=E?E:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(F){this.setAttribute("swf",F)}if(D){this.setAttribute("id",D)}if(O){this.setAttribute("width",O)}if(H){this.setAttribute("height",H)}if(K){this.setAttribute("version",new deconcept.PlayerVersion(K.toString().split(".")))}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true}if(N){this.addParam("bgcolor",N)}var C=P?P:"high";this.addParam("quality",C);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var M=(I)?I:window.location;this.setAttribute("xiRedirectUrl",M);this.setAttribute("redirectUrl","");if(A){this.setAttribute("redirectUrl",A)}};deconcept.SWFObject.prototype={useExpressInstall:function(A){this.xiSWFPath=!A?"expressinstall.swf":A;this.setAttribute("useExpressInstall",true)},setAttribute:function(A,C){this.attributes[A]=C},getAttribute:function(A){return this.attributes[A]},addParam:function(A,C){this.params[A]=C},getParams:function(){return this.params},addVariable:function(A,C){this.variables[A]=C},getVariable:function(A){return this.variables[A]},getVariables:function(){return this.variables},getVariablePairs:function(){var A=new Array();var C;var D=this.getVariables();for(C in D){A[A.length]=C+"="+D[C]}return A},getSWFHTML:function(){var E="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath)}E='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'"';E+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var D=this.getParams();for(var A in D){E+=[A]+'="'+D[A]+'" '}var C=this.getVariablePairs().join("&");if(C.length>0){E+='flashvars="'+C+'"'}E+="/>"}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath)}E='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'">';E+='<param name="movie" value="'+this.getAttribute("swf")+'" />';var D=this.getParams();for(var A in D){E+='<param name="'+A+'" value="'+D[A]+'" />'}var C=this.getVariablePairs().join("&");if(C.length>0){E+='<param name="flashvars" value="'+C+'" />'}E+="</object>"}return E},write:function(A){if(this.getAttribute("useExpressInstall")){var C=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(C)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var D=(typeof A=="string")?document.getElementById(A):A;D.innerHTML=this.getSWFHTML();return true}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"))}}return false}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var D=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var A=navigator.plugins["Shockwave Flash"];if(A&&A.description){D=new deconcept.PlayerVersion(A.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var E=1;var C=3;while(E){try{C++;E=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+C);D=new deconcept.PlayerVersion([C,0,0])}catch(F){E=null}}}else{try{var E=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(F){try{var E=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");D=new deconcept.PlayerVersion([6,0,21]);E.AllowScriptAccess="always"}catch(F){if(D.major==6){return D}}try{E=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(F){}}if(E!=null){D=new deconcept.PlayerVersion(E.GetVariable("$version").split(" ")[1].split(","))}}}return D};deconcept.PlayerVersion=function(A){this.major=A[0]!=null?parseInt(A[0]):0;this.minor=A[1]!=null?parseInt(A[1]):0;this.rev=A[2]!=null?parseInt(A[2]):0};deconcept.PlayerVersion.prototype.versionIsValid=function(A){if(this.major<A.major){return false}if(this.major>A.major){return true}if(this.minor<A.minor){return false}if(this.minor>A.minor){return true}if(this.rev<A.rev){return false}return true};deconcept.util={getRequestParameter:function(E){var D=document.location.search||document.location.hash;if(E==null){return D}if(D){var C=D.substring(1).split("&");for(var A=0;A<C.length;A++){if(C[A].substring(0,C[A].indexOf("="))==E){return C[A].substring((C[A].indexOf("=")+1))}}}return""}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var D=document.getElementsByTagName("OBJECT");for(var C=D.length-1;C>=0;C--){D[C].style.display="none";for(var A in D[C]){if(typeof D[C][A]=="function"){D[C][A]=function(){}}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs)};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true}}if(!document.getElementById&&document.all){document.getElementById=function(A){return document.all[A]}}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;YAHOO.widget.FlashAdapter=function(D,A,C){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};C=C||{};this._id=C.id=C.id||YAHOO.util.Dom.generateId(null,"yuigen");C.version=C.version||"9.0.45";C.backgroundColor=C.backgroundColor||"#ffffff";this._attributes=C;this._swfURL=D;this._embedSWF(this._swfURL,A,C.id,C.version,C.backgroundColor,C.expressInstall);this.createEvent("contentReady")};YAHOO.extend(YAHOO.widget.FlashAdapter,YAHOO.util.AttributeProvider,{_swfURL:null,_swf:null,_id:null,_attributes:null,toString:function(){return"FlashAdapter "+this._id},_embedSWF:function(K,I,D,C,F,H){var E=new deconcept.SWFObject(K,D,"100%","100%",C,F,H);if(H){E.useExpressInstall(H)}E.addParam("allowScriptAccess","always");E.addVariable("allowedDomain",document.location.hostname);E.addVariable("elementID",D);E.addVariable("eventHandler","YAHOO.widget.FlashAdapter.eventHandler");var A=YAHOO.util.Dom.get(I);var M=E.write(A);if(M){this._swf=YAHOO.util.Dom.get(D);this._swf.owner=this}},_eventHandler:function(C){var A=C.type;switch(A){case"swfReady":this._loadHandler();return ;case"log":return }this.fireEvent(A,C)},_loadHandler:function(){this._initAttributes(this._attributes);this.setAttributes(this._attributes,true);this._attributes=null;this.fireEvent("contentReady")},_initAttributes:function(A){this.getAttributeConfig("swfURL",{method:this._getSWFURL})},_getSWFURL:function(){return this._swfURL}});YAHOO.widget.FlashAdapter.eventHandler=function(A,D){var C=YAHOO.util.Dom.get(A);if(!C.owner){setTimeout(function(){YAHOO.widget.FlashAdapter.eventHandler(A,D)},0)}else{C.owner._eventHandler(D)}};YAHOO.widget.Chart=function(D,A,E,C){YAHOO.widget.Chart.superclass.constructor.call(this,YAHOO.widget.Chart.SWFURL,A,C);this._type=D;this._dataSource=E;this.createEvent("itemMouseOverEvent");this.createEvent("itemMouseOutEvent");this.createEvent("itemClickEvent");this.createEvent("itemDoubleClickEvent");this.createEvent("itemDragStartEvent");this.createEvent("itemDragEvent");this.createEvent("itemDragEndEvent")};YAHOO.extend(YAHOO.widget.Chart,YAHOO.widget.FlashAdapter,{_type:null,_pollingID:null,_pollingInterval:null,toString:function(){return"Chart "+this._id},setStyle:function(A,C){C=YAHOO.lang.JSON.stringify(C);this._swf.setStyle(A,C)},setStyles:function(A){A=YAHOO.lang.JSON.stringify(A);this._swf.setStyles(A)},setSeriesStyles:function(C){for(var A=0;A<C.length;A++){C[A]=YAHOO.lang.JSON.stringify(C[A])}this._swf.setSeriesStyles(C)},_initAttributes:function(A){YAHOO.widget.Chart.superclass._initAttributes.call(this,A);this.getAttributeConfig("request",{method:this._getRequest});this.setAttributeConfig("request",{method:this._setRequest});this.getAttributeConfig("dataSource",{method:this._getDataSource});this.setAttributeConfig("dataSource",{method:this._setDataSource});this.getAttributeConfig("series",{method:this._getSeriesDefs});this.setAttributeConfig("series",{method:this._setSeriesDefs});this.getAttributeConfig("categoryNames",{method:this._getCategoryNames});this.setAttributeConfig("categoryNames",{validator:YAHOO.lang.isArray,method:this._setCategoryNames});this.getAttributeConfig("dataTipFunction",{method:this._getDataTipFunction});this.setAttributeConfig("dataTipFunction",{method:this._setDataTipFunction});this.getAttributeConfig("polling",{method:this._getPolling});this.setAttributeConfig("polling",{method:this._setPolling})},_loadHandler:function(){this._swf.setType(this._type);if(this._attributes.style){var A=this._attributes.style;this.setStyles(A)}YAHOO.widget.Chart.superclass._loadHandler.call(this);if(this._dataSource){this.set("dataSource",this._dataSource)}},_refreshData:function(){if(this._dataSource!=null){if(this._pollingID!=null){this._dataSource.clearInterval(this._pollingID);this._pollingID=null}if(this._pollingInterval>0){this._pollingID=this._dataSource.setInterval(this._pollingInterval,this._request,this._loadDataHandler,this)}else{this._dataSource.sendRequest(this._request,this._loadDataHandler,this)}}},_loadDataHandler:function(E,D,N){if(N){}else{var M=false;var H=[];var F=0;if(this._seriesDefs){F=this._seriesDefs.length;for(var K=0;K<F;K++){var O=this._seriesDefs[K];var C={};for(var A in O){if(A=="style"&&O.style!=null){C.style=YAHOO.lang.JSON.stringify(O.style);M=true;O.style=null}else{C[A]=O[A]}}H.push(C)}}if(F>0){for(K=0;K<F;K++){O=H[K];if(!O.type){O.type=this._type}O.dataProvider=D.results}}else{var I={type:this._type,dataProvider:D.results};H.push(I)}this._swf.setDataProvider(H,M)}},_request:"",_getRequest:function(){return this._request},_setRequest:function(A){this._request=A;this._refreshData()},_dataSource:null,_getDataSource:function(){return this._dataSource},_setDataSource:function(A){this._dataSource=A;this._refreshData()},_seriesDefs:null,_getSeriesDefs:function(){return this._seriesDefs},_setSeriesDefs:function(A){this._seriesDefs=A},_getCategoryNames:function(){return this._swf.getCategoryNames()},_setCategoryNames:function(A){this._swf.setCategoryNames(A)},_dataTipFunction:null,_getDataTipFunction:function(){return this._dataTipFunction},_setDataTipFunction:function(A){this._dataTipFunction=A;this._swf.setDataTipFunction(A)},_getPolling:function(){return this._pollingInterval},_setPolling:function(A){this._pollingInterval=A;this._refreshData()}});YAHOO.widget.Chart.SWFURL="assets/charts.swf";YAHOO.widget.PieChart=function(A,D,C){YAHOO.widget.PieChart.superclass.constructor.call(this,"pie",A,D,C)};YAHOO.lang.extend(YAHOO.widget.PieChart,YAHOO.widget.Chart,{_initAttributes:function(A){YAHOO.widget.PieChart.superclass._initAttributes.call(this,A);this.getAttributeConfig("dataField",{method:this._getDataField});this.setAttributeConfig("dataField",{validator:YAHOO.lang.isString,method:this._setDataField});this.getAttributeConfig("categoryField",{method:this._getCategoryField});this.setAttributeConfig("categoryField",{validator:YAHOO.lang.isString,method:this._setCategoryField})},_getDataField:function(){return this._swf.getDataField()},_setDataField:function(A){this._swf.setDataField(A)},_getCategoryField:function(){return this._swf.getCategoryField()},_setCategoryField:function(A){this._swf.setCategoryField(A)}});YAHOO.widget.CartesianChart=function(D,A,E,C){YAHOO.widget.CartesianChart.superclass.constructor.call(this,D,A,E,C)};YAHOO.lang.extend(YAHOO.widget.CartesianChart,YAHOO.widget.Chart,{_initAttributes:function(A){YAHOO.widget.CartesianChart.superclass._initAttributes.call(this,A);this.getAttributeConfig("xField",{method:this._getXField});this.setAttributeConfig("xField",{validator:YAHOO.lang.isString,method:this._setXField});this.getAttributeConfig("yField",{method:this._getYField});this.setAttributeConfig("yField",{validator:YAHOO.lang.isString,method:this._setYField});this.setAttributeConfig("xAxis",{method:this._setXAxis});this.setAttributeConfig("yAxis",{method:this._setYAxis})},_getXField:function(){return this._swf.getHorizontalField()},_setXField:function(A){this._swf.setHorizontalField(A)},_getYField:function(){return this._swf.getVerticalField()},_setYField:function(A){this._swf.setVerticalField(A)},_setXAxis:function(A){this._swf.setHorizontalAxis(A)},_setYAxis:function(A){this._swf.setVerticalAxis(A)}});YAHOO.widget.LineChart=function(A,D,C){YAHOO.widget.LineChart.superclass.constructor.call(this,"line",A,D,C)};YAHOO.lang.extend(YAHOO.widget.LineChart,YAHOO.widget.CartesianChart);YAHOO.widget.ColumnChart=function(A,D,C){YAHOO.widget.ColumnChart.superclass.constructor.call(this,"column",A,D,C)};YAHOO.lang.extend(YAHOO.widget.ColumnChart,YAHOO.widget.CartesianChart);YAHOO.widget.BarChart=function(A,D,C){YAHOO.widget.BarChart.superclass.constructor.call(this,"bar",A,D,C)};YAHOO.lang.extend(YAHOO.widget.BarChart,YAHOO.widget.CartesianChart);YAHOO.widget.Axis=function(){};YAHOO.widget.Axis.prototype={type:null,orientation:"horizontal",reverse:false,labelFunction:null,hideOverlappingLabels:true};YAHOO.widget.NumericAxis=function(){YAHOO.widget.NumericAxis.superclass.constructor.call(this)};YAHOO.lang.extend(YAHOO.widget.NumericAxis,YAHOO.widget.Axis,{type:"numeric",minimum:NaN,maximum:NaN,majorUnit:NaN,minorUnit:NaN,snapToUnits:true,alwaysShowZero:true,scale:"linear"});YAHOO.widget.TimeAxis=function(){YAHOO.widget.TimeAxis.superclass.constructor.call(this)};YAHOO.lang.extend(YAHOO.widget.TimeAxis,YAHOO.widget.Axis,{type:"time",minimum:null,maximum:null,majorUnit:NaN,majorTimeUnit:null,minorUnit:NaN,minorTimeUnit:null,snapToUnits:true});YAHOO.widget.CategoryAxis=function(){YAHOO.widget.CategoryAxis.superclass.constructor.call(this)};YAHOO.lang.extend(YAHOO.widget.CategoryAxis,YAHOO.widget.Axis,{type:"category",categoryNames:null});YAHOO.widget.Series=function(){};YAHOO.widget.Series.prototype={type:null,displayName:null};YAHOO.widget.CartesianSeries=function(){YAHOO.widget.CartesianSeries.superclass.constructor.call(this)};YAHOO.lang.extend(YAHOO.widget.CartesianSeries,YAHOO.widget.Series,{xField:null,yField:null});YAHOO.widget.ColumnSeries=function(){YAHOO.widget.ColumnSeries.superclass.constructor.call(this)};YAHOO.lang.extend(YAHOO.widget.ColumnSeries,YAHOO.widget.CartesianSeries,{type:"column"});YAHOO.widget.LineSeries=function(){YAHOO.widget.LineSeries.superclass.constructor.call(this)};YAHOO.lang.extend(YAHOO.widget.LineSeries,YAHOO.widget.CartesianSeries,{type:"line"});YAHOO.widget.BarSeries=function(){YAHOO.widget.BarSeries.superclass.constructor.call(this)};YAHOO.lang.extend(YAHOO.widget.BarSeries,YAHOO.widget.CartesianSeries,{type:"bar"});YAHOO.widget.PieSeries=function(){YAHOO.widget.PieSeries.superclass.constructor.call(this)};YAHOO.lang.extend(YAHOO.widget.PieSeries,YAHOO.widget.Series,{type:"pie",dataField:null,categoryField:null});YAHOO.register("charts",YAHOO.widget.Chart,{version:"2.4.1",build:"742"});function getHAPVersion(){return"HAP_MAJOR_VERSION = 4.3 , HAP_VERSION_DATE  = 11.09.2008 ,HAP_SVN_VERSION	  = 55"}var ie=navigator.appName=="Microsoft Internet Explorer";var nn=navigator.appName=="Netscape";var ssCalledAgain=false;var isProd=false;var isDebug=false;var loadingMessageActive=true;var activeForm="";var waitPanel=null;var alertDebuggingMessages=false;var errorPanel=null;var activeFormForPanel;var acceptDotInText=true;try{if(debuggingJavascript){isDebug=true}}catch(e){}if(ie&&isProd){document.attachEvent("onkeydown",my_onkeydown_handler)}if(nn&&isProd){document.addEventListener("onkeydown",my_onkeydown_handler,false)}try{YAHOO.util.Event.addListener(window,"load",initHAP)}catch(e){alertDebug(e)}function setAcceptDotInText(A){acceptDotInText=A}function initHAP(){alertDebug(getHAPVersion());appendEmptyDivToBody("loadingPanelDiv");try{waitPanel=new YAHOO.widget.Panel("loadingPanelDiv",{width:"250px",visible:true,draggable:true,fixedcenter:true,modal:true,close:true});waitPanel.setHeader("Loading");waitPanel.setBody('<img src="images/loading.gif" />');waitPanel.render();waitPanel.hide();alertDebug("loading panel initialized")}catch(A){alertDebug(A)}appendEmptyDivToBody("HAP_DYNAMIC_CONTENT");appendEmptyDivToBody("errorPanelDiv");appendEmptyDivToBody("questionPanelDiv");appendEmptyDivToBody("HapParamMainDiv");appendEmptyDivToBody("HapParamDefinitionsMainDiv")}function appendEmptyDivToBody(C){var A=document.getElementById(C);if(A==null){if(isDebug){alert(C+"div not found appending it to body")}A=document.createElement("div");A.setAttribute("id",C);document.body.appendChild(A)}else{A.innerHTML=""}}function talkWithPanel(E,C){var D;var H;var F;if(ie){D=new ActiveXObject("Microsoft.XMLHTTP")}else{D=new XMLHttpRequest()}H=E;var A=getFormParametersByFormID(E);if(A==false){return }showWait();D.open("POST","functionExecuter",true);D.setRequestHeader("Content-Type","application/x-www-form-urlencoded;  charset=UTF-8");D.onreadystatechange=function(){if(D.readyState==4){talkWithPanelHttpStateChanged(D)}};F=encodeURI(A);F=F.replace("&amp;","%26");D.send(F+"&hTalkOperation="+C)}function talkWithActivePanelWithParameters(A,C,D){if(activeForm==null||activeForm==""){showError("Select a form first");return }talkWithPanelWithParameters(activeForm,A,C,D)}function talkWithPanelWithParameters(I,C,E,H){var D;var F;if(ie){D=new ActiveXObject("Microsoft.XMLHTTP")}else{D=new XMLHttpRequest()}showWait();D.open("POST","functionExecuter",true);D.setRequestHeader("Content-Type","application/x-www-form-urlencoded;  charset=UTF-8");D.onreadystatechange=function(){if(D.readyState==4){talkWithPanelHttpStateChanged(D)}};var A="talkingFormID="+I+"&DONT_UPDATE_FIELDS=T&"+E+"&hTalkOperation="+C;if(H){A=getFormParametersByFormID(I)+"&"+E+"&hTalkOperation="+C}F=encodeURI(A);F=F.replace("&amp;","%26");D.send(F)}function setActiveForm(A){activeForm=A}function getActiveForm(){return activeForm}function talkWithPanelWithoutSubmit(E,C){var D;if(ie){D=new ActiveXObject("Microsoft.XMLHTTP")}else{D=new XMLHttpRequest()}showWait();D.open("POST","functionExecuter",true);D.setRequestHeader("Content-Type","application/x-www-form-urlencoded;  charset=UTF-8");D.onreadystatechange=function(){if(D.readyState==4){talkWithPanelHttpStateChanged(D)}};var A="talkingFormID="+E+"&hTalkOperation="+C;D.send(encodeURI(A))}function executeSQLReports(){showObjectByFormID("generatedSqlReportsDiv","sqlReports?clickedButton=executeReport","sqlReportsForm")}function talkWithPanelHttpStateChanged(A){var C;if(A.readyState!=4){window.status=msg.Loading;document.body.style.cursor="wait"}else{hideWait();if(A.status==200){C=A.responseText;if(C.indexOf("javascript:")==0){addJavascriptFromText(C.substr(11))}else{if(C.indexOf("START_MY_SCRIPT")>-1){if(C.indexOf("START_MY_SCRIPT")>0){document.getElementById("HAP_DYNAMIC_CONTENT").innerHTML=C.substr(0,C.indexOf("START_MY_SCRIPT"))}addJavascriptFromText(C.substr(C.indexOf("START_MY_SCRIPT")+15))}else{alert(C)}}}else{window.top.document.getElementById(htmlDiv).innerHTML="<b>Error Code= "+A.status+A.responseText;+"</b>"}}}function setPanelValues(C,A,D){for(var E=0;E<A.length;E++){document.getElementById(C).elements[A[E]].value=D[E]}}function clearDiv(A){document.getElementById(A).innerHTML=""}function addJavascriptFromText(C){var A=document.getElementsByTagName("head")[0];var D=document.createElement("script");D.type="text/javascript";D.text=C;A.appendChild(D)}function addJavascript(D){var A=document.getElementsByTagName("head")[0];var C=document.createElement("script");C.type="text/javascript";C.src=D;A.appendChild(C)}function talkWithPage(A){showObject(A,"functionExecuter")}function showObject(C,D,E){var A;var F;if(ie){A=new ActiveXObject("Microsoft.XMLHTTP")}else{A=new XMLHttpRequest()}F=C;A.open("POST",D,true);A.setRequestHeader("Content-Type","application/x-www-form-urlencoded;  charset=UTF-8");A.onreadystatechange=function(){if(A.readyState==4){httpStateChanged(A,F,E)}};A.send(encodeURI(getFormParameters()))}function showObjectByFormID(C,D,E){var A;var F;if(ie){A=new ActiveXObject("Microsoft.XMLHTTP")}else{A=new XMLHttpRequest()}F=C;showWait();A.open("POST",D,true);A.setRequestHeader("Content-Type","application/x-www-form-urlencoded;  charset=UTF-8");A.onreadystatechange=function(){if(A.readyState==4){httpStateChanged(A,F,"")}};A.send(encodeURI(getFormParametersByFormID(E)))}function showObjectWithoutSubmitDelayed(C,D,A){window.setTimeout("showObjectWithoutSubmit('"+C+"','"+D+"');",A)}function showObjectWithoutSubmit(C,D,E){var A;var F;if(ie){A=new ActiveXObject("Microsoft.XMLHTTP")}else{A=new XMLHttpRequest()}F=C;A.open("POST",D,true);A.setRequestHeader("Content-Type","application/x-www-form-urlencoded;  charset=UTF-8");A.onreadystatechange=function(){if(A.readyState==4){httpStateChanged(A,F,E)}};A.send("")}function alertResponse(C){var A;var D;if(ie){A=new ActiveXObject("Microsoft.XMLHTTP")}else{A=new XMLHttpRequest()}A.open("POST",C,true);A.setRequestHeader("Content-Type","application/x-www-form-urlencoded;  charset=UTF-8");A.onreadystatechange=function(){if(A.readyState==4){httpStateChangedForAlert(A)}};A.send(getFormParameters())}function httpStateChangedForAlert(A){var C=2000;if(A.readyState!=4){null}else{if(A.status==200||A.status==202){window.top.document.getElementById("ajaxCompleterTableDiv").style.top="100px";window.top.document.getElementById("ajaxCompleterTableDiv").style.left="300px";window.top.document.getElementById("ajaxCompleterTableDiv").style.display="block";window.top.document.getElementById("ajaxCompleterTableDiv").style.width=400+"px";window.top.document.getElementById("ajaxCompleterTableDiv").style.height=100+"px";window.top.document.getElementById("ajaxCompleterTableDiv").className="quick-alert";window.top.document.getElementById("ajaxCompleterTableDiv").innerHTML=A.responseText;if(A.status==202){alert(A.status);C=30*1000}window.setTimeout("hideCompleterDiv();",C)}else{alert("Error Code= "+A.status)}}}function hideCompleterDiv(){document.getElementById("ajaxCompleterTableDiv").style.display="none";window.top.document.getElementById("ajaxCompleterTableDiv").className="quick-alert_invisible"}function httpStateChanged(A,F,E){var D;if(A.readyState!=4){window.status=msg.Loading;document.body.style.cursor="wait"}else{hideWait();if(A.status==200){try{D=A.responseText;if(D.indexOf("START_MY_SCRIPT")>0){document.getElementById(F).innerHTML=D.substr(0,D.indexOf("START_MY_SCRIPT"));addJavascriptFromText(D.substr(D.indexOf("START_MY_SCRIPT")+15))}else{document.getElementById(F).innerHTML=D}if(E!=null&&E!=""){addJavascript(E)}}catch(C){alert(C)}}else{if(A.status==201){D=A.responseText;document.location.href=D}else{if(A.status==404){D=A.responseText;showError(D)}else{window.top.document.getElementById(F).innerHTML="<b>Error Code= "+A.status+A.responseText;+"</b>"}}}try{document.body.style.cursor="default"}catch(C){}}}function showMessageObject(D,F,H){var C;var I;if(ie){C=new ActiveXObject("Microsoft.XMLHTTP")}else{C=new XMLHttpRequest()}I=D;var A=document.form47.toUserCombo.value;var E=document.form47.infotext.value;C.open("GET",F+"?toUserCombo="+A+"&infotext="+E,true);C.setRequestHeader("Content-Type","application/x-www-form-urlencoded;  charset=UTF-8");C.onreadystatechange=function(){if(C.readyState==4){httpStateChanged(C,I,H)}};C.send(null)}function getFormParameters(){var A="";for(var C=0;C<document.form1.elements.length;C++){if(document.form1.elements[C].tagName=="INPUT"||document.form1.elements[C].tagName=="HIDDENINPUT"){if(document.form1.elements[C].type=="text"){A+=document.form1.elements[C].name+"="+document.form1.elements[C].value+"&"}if(document.form1.elements[C].type=="password"){A+=document.form1.elements[C].name+"="+document.form1.elements[C].value+"&"}if(document.form1.elements[C].type=="hidden"){A+=document.form1.elements[C].name+"="+document.form1.elements[C].value+"&"}if(document.form1.elements[C].type=="checkbox"){if(document.form1.elements[C].checked){A+=document.form1.elements[C].name+"="+document.form1.elements[C].value+"&"}else{A+=document.form1.elements[C].name+"=&"}}if(document.form1.elements[C].type=="radio"){if(document.form1.elements[C].checked){A+=document.form1.elements[C].name+"="+document.form1.elements[C].value+"&"}}}else{if(document.form1.elements[C].tagName=="SELECT"){var E=document.form1.elements[C];var D="";if(E.selectedIndex>=0){D=E.options[E.selectedIndex].value}A+=E.name+"="+D+"&"}else{if(document.form1.elements[C].tagName=="TEXTAREA"){A+=document.form1.elements[C].name+"="+document.form1.elements[C].value+"&"}else{if(document.form1.elements[C].tagName=="BUTTON"){null}else{alert(document.form1.elements[C].tagName)}}}}}return A}function getFieldValueByID(A){var D=document.getElementById(A);var C="";if(document.getElementById(A).tagName=="SELECT"){if(D.selectedIndex>=0){C=D.options[D.selectedIndex].value}return D.name+"="+C}else{return D.name+"="+document.getElementById(A).value}}function getFormParametersByFormID(I){var D="talkingFormID="+I+"&";var H=document.getElementById(I);try{for(var E=0;E<document.getElementById(I).elements.length;E++){if(document.getElementById(I).elements[E].style.lineHeight=="1.1em"&&document.getElementById(I).elements[E].value==""){alert(document.getElementById(I).elements[E].title+" "+msg.MANDATORY_ALERT);document.getElementById(I).elements[E].focus();return false}var M=document.getElementById(I).elements[E].style.maxHeight;if(M!=""&&M!=null&&M!="undefined"){var C=0;M=M.substr(2);C=M.substring(0,M.length-2);if(document.getElementById(I).elements[E].value.length<C){alert(document.getElementById(I).elements[E].title+" "+msg.MINLENGTH_ALERT+C);return false}}if(document.getElementById(I).elements[E].tagName=="INPUT"||document.getElementById(I).elements[E].tagName=="HIDDENINPUT"){if(document.getElementById(I).elements[E].type=="text"){D+=document.getElementById(I).elements[E].name+"="+document.getElementById(I).elements[E].value.replace("&","&amp;")+"&"}if(document.getElementById(I).elements[E].type=="password"){D+=document.getElementById(I).elements[E].name+"="+document.getElementById(I).elements[E].value+"&"}if(document.getElementById(I).elements[E].type=="hidden"){D+=document.getElementById(I).elements[E].name+"="+document.getElementById(I).elements[E].value+"&"}if(document.getElementById(I).elements[E].type=="checkbox"){if(document.getElementById(I).elements[E].checked){D+=document.getElementById(I).elements[E].name+"="+document.getElementById(I).elements[E].value+"&"}else{D+=document.getElementById(I).elements[E].name+"=&"}}if(document.getElementById(I).elements[E].type=="radio"){if(document.getElementById(I).elements[E].checked){D+=document.getElementById(I).elements[E].name+"="+document.getElementById(I).elements[E].value+"&"}}}else{if(document.getElementById(I).elements[E].tagName=="SELECT"){var A=document.getElementById(I).elements[E];var K="";if(A.selectedIndex>=0){K=A.options[A.selectedIndex].value}D+=A.name+"="+K+"&"}else{if(document.getElementById(I).elements[E].tagName=="TEXTAREA"){D+=document.getElementById(I).elements[E].name+"="+document.getElementById(I).elements[E].value+"&"}else{if(document.getElementById(I).elements[E].tagName=="BUTTON"){null}else{alert(document.getElementById(I).elements[E].tagName)}}}}}}catch(F){showError("Error reading form parameters "+I);return false}return D}function showObjectSenkron(A){htmlDiv=A;http.open("POST","ajaxModuleExecuter.jsp",false);http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;  charset=UTF-8");http.send(encodeURI(getFormParameters()));window.top.document.getElementById(A).innerHTML=http.responseText}function Trim(A){A=LTrim(A);return RTrim(A)}function RTrim(A){while(A.charAt((A.length-1))==" "){A=A.substring(0,A.length-1)}return A}function LTrim(A){while(A.charAt(0)==" "){A=A.replace(A.charAt(0),"")}return A}function isNumeric(C){len=C.length;for(var A=0;A<len;A++){if((C.charAt(A)<"0")||(C.charAt(A)>"9")){return false}}return true}function isInteger(C){var A;for(A=0;A<C.length;A++){var D=C.charAt(A);if(((D<"0")||(D>"9"))){return false}}return true}function disableButton(C){try{document.forms.form1.elements[C].enabled=false;menu=document.all.isWorking.style;currX=window.event.clientX+document.body.scrollLeft;currY=window.event.clientY+document.body.scrollTop;menu.visibility="visible";menu.pixelLeft=currX+30;menu.pixelTop=currY}catch(A){}}function URLEncode(F){var I="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_.!~*'()";var C="0123456789ABCDEF";var H="";for(var D=0;D<F.length;D++){var E=F.charAt(D);if(E==" "){H+="+"}else{if(I.indexOf(E)!=-1){H+=E}else{var A=E.charCodeAt(0);if(A>255){H+=E}else{H+="%";H+=C.charAt((A>>4)&15);H+=C.charAt(A&15)}}}}return H}function closeErrorPanel(){hideWindow(errorPanel,"errorPanelDiv")}function showError(C){errorPanel=dhxWins.createWindow("errorPanel",20,20,300,150);errorPanel.setModal(true);var A="<TABLE><TR><TD><img id='errorImage' src='images/HException.gif'/></TD><TD align='center'>  "+C+"</TD></TR><TR><TD align='center' colspan='2'><input id='btnHideErrorPanel' type='button' value='OK' onClick=\"closeErrorPanel();\"></TD></TR></TABLE>";appendEmptyDivToBody("errorPanelDiv");document.getElementById("errorPanelDiv").innerHTML=A;document.getElementById("errorPanelDiv").style.display="block";errorPanel.attachObject("errorPanelDiv");errorPanel.setText("Error");errorPanel.button("minmax1").hide();errorPanel.button("minmax2").hide();showModalWindow(errorPanel);errorPanel.center();errorPanel.attachEvent("onClose",function(D){hideWindow(D,"errorPanelDiv")})}function copyErrorStackTraceToClipboard(C,A){copyToClipboard(A)}function showErrorWithStacktrace(D,A){if(ie){var C="<TABLE><TR><TH ROWSPAN=3><img id='errorImage' src='images/HException.gif' width='50'/></TH><TD colspan='2'>"+D+"</TD></TR>";C=C+"<TR><TD align='center'><input id='btnHideErrorPanel' type='button' value='OK' ></TD>";C=C+"<TD align='center'><input id='btnErrorStackTrace' type='button' value='Copy Error Details' ></TR></TABLE>";document.getElementById("errorPanelDiv").innerHTML="<div id='innererrorPanelDiv'/>";var E=new YAHOO.widget.Panel("innererrorPanelDiv",{width:"320px",visible:true,draggable:true,fixedcenter:true,modal:true,close:true});E.setHeader("Error");E.setBody(C);E.render();YAHOO.util.Event.addListener("btnHideErrorPanel","click",E.destroy,E,true);YAHOO.util.Event.addListener("btnErrorStackTrace","click",copyErrorStackTraceToClipboard,A);document.getElementById("btnHideErrorPanel").focus()}else{var C="<TABLE><TR><TH ROWSPAN=3><img id='errorImage' src='images/HException.gif' width='50'/></TH><TD>"+D+"</TD></TR>";C=C+"<TR><TD align='center'><textarea>"+A+"</textarea></TR>";C=C+"<TR><TD align='center'><input id='btnHideErrorPanel' type='button' value='OK' ></TD></TR></TABLE>";document.getElementById("errorPanelDiv").innerHTML="<div id='innererrorPanelDiv'/>";var E=new YAHOO.widget.Panel("innererrorPanelDiv",{width:"320px",visible:true,draggable:true,fixedcenter:true,modal:true,close:true});E.setHeader("Error");E.setBody(C);E.render();YAHOO.util.Event.addListener("btnHideErrorPanel","click",E.destroy,E,true);document.getElementById("btnHideErrorPanel").focus()}}function showQuestion(A,E,F){var C="<TABLE><TR><TD><img id='warningImage' src='images/HWarning.gif' width='50'/>"+A+"</TD></TR>";C=C+"<TR><TD align='center'><input id='btnQuestionPanelYes' onClick='"+E+";' type='button' value='YES' >";C=C+"<input id='btnQuestionPanelNo' onClick='"+F+";' type='button' value='NO' >";C=C+"<input id='btnQuestionPanelCancel' type='button' value='Cancel' ></TD></TR></TABLE>";document.getElementById("questionPanelDiv").innerHTML="<div id='innerquestionPanelDiv'/>";var D=new YAHOO.widget.Panel("innerquestionPanelDiv",{width:"320px",visible:true,draggable:true,fixedcenter:true,modal:true,close:true});D.setHeader("Error");D.setBody(C);D.render();YAHOO.util.Event.addListener("btnQuestionPanelYes","click",D.destroy,D,true);YAHOO.util.Event.addListener("btnQuestionPanelNo","click",D.destroy,D,true);YAHOO.util.Event.addListener("btnQuestionPanelCancel","click",D.destroy,D,true)}function addWarning(A){document.getElementById("warningDiv").innerHTML=document.getElementById("warningDiv").innerHTML+"<br>"+A}function appendToDivHtml(D,C){try{var A=document.createElement("span");A.innerHTML=C+"&nbsp;";document.getElementById(D).appendChild(A)}catch(E){alertDebug(E)}}function generateMessagePanelLink(A,C){return"<a href=\"javascript:talkWithPanelWithParameters('frmHAPMessagePanel','ConstructPanel','stdMsg="+A+"',false);\">"+C+"</a>"}function clearWarnings(){document.getElementById("warningDiv").innerHTML=""}function showWait(){try{if(loadingMessageActive){waitPanel.show()}}catch(A){alertDebug(A)}}function hideWait(){try{if(loadingMessageActive){waitPanel.hide()}}catch(A){alertDebug(A)}}function setLoadingActive(A){loadingMessageActive=A}formatDateDDMMYYYY=function(C,E,H,I){var D=I;if(D instanceof Date){var F="0"+(D.getMonth()+1);var A="0"+D.getDate();F=F.substr(F.length-2);A=A.substr(A.length-2);C.innerHTML=A+"/"+F+"/"+D.getFullYear()}else{C.innerHTML=YAHOO.lang.isValue(I)?I:""}};function showHideCal(D,C,A){if(document.getElementById(D).style.display=="none"){updateCal(C,A);document.getElementById(D).style.display="block";document.getElementById(D+"yearselect").style.display="inline"}else{document.getElementById(D).style.display="none";document.getElementById(D+"yearselect").style.display="none"}}function showHideCal3(D,C,A){if(document.getElementById(D).style.display=="none"){updateCal3(C,A);document.getElementById(D).style.display="block"}else{document.getElementById(D).style.display="none"}}function hideCal(A){document.getElementById(A).style.display="none";document.getElementById(A+"yearselect").style.display="none"}function updateCal(C,A){var F=document.getElementById(A);if(F.value!=""){C.select(F.value);var E=C.getSelectedDates();if(E.length>0){var D=E[0];C.cfg.setProperty("pagedate",(D.getMonth()+1)+"/"+D.getFullYear());C.render()}else{alert(msg.SELECT_VALID_DATE_ALERT)}}}function updateCal3(D,E){var H=document.getElementById(E+"Month");var A=document.getElementById(E+"Day");var M=document.getElementById(E+"Year");var F=parseInt(H.options[H.selectedIndex].value);var K=parseInt(A.value);var I=parseInt(M.value);if(!isNaN(F)&&!isNaN(K)&&!isNaN(I)){var C=F+"/"+K+"/"+I;D.select(C);D.cfg.setProperty("pagedate",F+"/"+I);D.render()}}function handleSelect3(K,I,E){var C=I[0];var D=C[0];var M=D[0],F=D[1],N=D[2];var P=E.id.substring(3);var H=document.getElementById(P+"Month");var A=document.getElementById(P+"Day");var O=document.getElementById(P+"Year");H.selectedIndex=F;A.value=N;O.value=M;hideCal(P+"Container")}function hFocusForm(A){activeForm=A}function hClickForm(A){activeForm=A}function talkWithActivePanel(A){if(activeForm==null||activeForm==""){showError("Select a form to save");return }talkWithPanel(activeForm,A)}function talkWithActivePanelWithoutSubmit(A){if(activeForm==null||activeForm==""){showError("Select a form to save");return }talkWithPanelWithoutSubmit(activeForm,A)}function uppercase(){key=window.event.keyCode;if((key>96)&&(key<123)){window.event.keyCode=key-32}}function lettersToLowerCase(C,A){var D=A.toLowerCase();if(D!=A){return{replaceKey:true,newKeyCode:D.charCodeAt(),newKey:D}}else{return{cancelKey:false}}}function lettersToUpperCase(C,A){var D=A.toUpperCase();if(D!=A){return{replaceKey:true,newKeyCode:D.charCodeAt(),newKey:D}}else{return{cancelKey:false}}}function digitsToX(C,A){if("0123456789".indexOf(A)!=-1){return{replaceKey:true,newKeyCode:"X".charCodeAt(),newKey:"X"}}else{return{cancelKey:false}}}function umlautsToASCII(D,C){var A={"Ã¤":"ae","Ã¶":"oe","Ã¼":"ue","Ã�":"Ae","Ã�":"Oe","Ã�":"Ue"};if("Ã¤Ã¶Ã¼Ã�Ã�Ã�".indexOf(C)!=-1){return{replaceKey:true,newKeyCode:D,newKey:A[C]}}else{return{cancelKey:false}}}function cancelDigits(C,A){return{cancelKey:"0123456789".indexOf(A)!=-1}}function cancelLetters(C,A){return{cancelKey:("0123456789".indexOf(A)==-1&&(C!=46||!acceptDotInText)&&C!=9&&C!=8&&C!=37&&C!=39)}}function cancelEnglishLetters(C,A){var D;D=String.fromCharCode(C);if((D>="A"&&D<="Z")||(D>="a"&&D<="z")){return{cancelKey:true}}return{cancelKey:false}}function cancelNonEnglishLetters(C,A){var D;if((C==46&&acceptDotInText)||C==8||C==37||C==39||C==9||C==32){return{cancelKey:false}}if("0123456789".indexOf(A)>-1){return{cancelKey:false}}D=String.fromCharCode(C);if((D>="A"&&D<="Z")||(D>="a"&&D<="z")){return{cancelKey:false}}return{cancelKey:true}}function changeKey(D,M,I){var N=M.keyCode?M.keyCode:M.charCode?M.charCode:M.which?M.which:void 0;var K;if(N){K=String.fromCharCode(N)}var H=I(N,K);if(N&&window.event&&!window.opera){if(H.cancelKey){return false}else{if(H.replaceKey){window.event.keyCode=H.newKeyCode;if(window.event.preventDefault){window.event.preventDefault()}return true}else{return true}}}else{if(typeof D.setSelectionRange!="undefined"){if(H.cancelKey){if(M.preventDefault){M.preventDefault()}return false}else{if(H.replaceKey){if(M.preventDefault){M.preventDefault()}var C=D.selectionStart;var E=D.selectionEnd;var A=D.value.substring(C,E);var F=typeof H.newKey!="undefined"?H.newKey:String.fromCharCode(H.newKeyCode);D.value=D.value.substring(0,C)+F+D.value.substring(E);D.setSelectionRange(C+F.length,C+F.length);return false}else{return true}}}else{if(H.cancelKey){if(M.preventDefault){M.preventDefault()}return false}else{return true}}}}function checkEmailField(A){var C=A.value;if(C==null||C==""){return true}if((C.indexOf("@")<1)||(C.indexOf("@")==C.length-1)||(C.indexOf(".")<1)||(C.indexOf(".")==C.length-1)){alert(A.title+" is invalid email address. Please check it..");window.setTimeout("document.getElementById('"+A.id+"').focus();",100)}}function checkFieldMinValue(C,A){var D=C.value;if(D==null||D==""){return true}D=parseInt(D);if(D<A){alert(C.title+" Value must be greater than "+A);window.setTimeout("document.getElementById('"+C.id+"').focus();",100)}}function checkFieldMaxValue(C,A){var D=C.value;if(D==null||D==""){return true}D=parseInt(D);if(D>A){alert(C.title+" Value must be less than "+minValue);window.setTimeout("document.getElementById('"+C.id+"').focus();",100)}}function disableButton(A){A.set("disabled",true,true)}function enableButton(A){A.set("disabled",false,true)}function getRadioButtonValue(C){if(C.checked){return C.value}len=C.length;for(var A=0;A<len;A++){if(C[A].checked){return C[A].value}}return""}function dk(D,C){var A=0;A=C.keyCode;if(A==9){return true}if((C.which<48||C.which>57)&&(C.which!=8&&C.which!=46)){return false}}function uk(C,A){if(A.which==8||A.which==46){return }if(C.value.length==2){C.value+="/"}else{if(C.value.length==5){C.value+="/"}}}function checkFormat(A){var C=A.value.split("/");if(A.value.length==0){return true}else{if(C.length<3){alert(msg["Date format invalid!"]);A.focus();return false}if(C[0]>"31"||C[1]>"12"){alert(msg["Date format invalid!"]);A.focus();return false}}}function openWindowForLink(C){var D=null;var A="toolbar=no,titlebar=no,directories=no,menubar=no,resizable=yes,scrollbars=yes,width=900,height=600,top=30,left=30";D=window.open("","linkWindow",A);D.document.write("<a href='"+C+"'>Click here to download</a>");try{D.focus()}catch(E){}}function openW(C,F){var D=null;var A="toolbar=no,titlebar=no,directories=no,menubar=no,resizable=yes,scrollbars=yes,width=900,height=600,top=30,left=30";if((F==null)||(F=="")){D=window.open(C,F,A)}else{if((D==null)||(D.closed)){D=window.open(C,F,A)}else{D.document.write("Page loading.Please waiting...");D.location=C}}try{D.focus()}catch(E){}}function copyToClipboard(A){if(window.clipboardData&&clipboardData.setData){clipboardData.setData("Text",A)}else{alert("Copy to Clipboard not implemened for Firefox text is in next message");alert(A)}}function changeTabStyle(E){try{var I=document.styleSheets;var H;var F;var N=null;for(var A=0;A<I.length;A++){if(I[A].href.indexOf("yui_hap.css")>-1){H=I[A]}if(I[A].href.indexOf("yui_hap_ext.css")>-1){F=I[A]}}var K;var C;if(ie){K=F.rules;C=H.rules}else{K=F.cssRules;C=H.cssRules}for(var A=0;A<K.length;A++){var M=K[A];if(M.selectorText.indexOf(".yui-skin-sam .yui-navset .yui-nav ."+E)>-1){N=M.style.backgroundColor}}if(N==null){return }for(var A=0;A<C.length;A++){var M=C[A];if(M.selectorText.indexOf(".yui-skin-sam .yui-navset .yui-nav")>-1){M.style.borderColor=N}}}catch(D){alertDebug(D)}}function resetPanelMargins(D,C,A){document.getElementById(D+"_c").xPos=C+"px";document.getElementById(D+"_c").yPos=A+"px"}function getRealLeft(A){xPos=A.offsetLeft;tempEl=A.offsetParent;while(tempEl!=null){xPos+=tempEl.offsetLeft;tempEl=tempEl.offsetParent}return xPos}function hideSelect(A){var C=document.forms[A];if(C){for(elementIdx=0;elementIdx<C.elements.length;elementIdx++){if(C[elementIdx].type=="select-one"){C[elementIdx].style.visibility="hidden"}}}}function unhideSelect(A){if(!A){A=activeFormForPanel}var C=document.forms[A];if(C){for(elementIdx=0;elementIdx<C.elements.length;elementIdx++){if(C[elementIdx].type=="select-one"){C[elementIdx].style.visibility="visible"}}}}function getRealTop(A){yPos=A.offsetTop;tempEl=A.offsetParent;while(tempEl!=null){yPos+=tempEl.offsetTop;tempEl=tempEl.offsetParent}return yPos}var lastActiveClndr;var tmplastActiveClndr;function showCalendar(D,K,I){var H=getRealLeft(document.getElementById(K));var F=getRealTop(document.getElementById(K));if(document.getElementById(K+"Container").style.display=="block"){document.getElementById(K+"Container").style.display="none"}else{D.setDateFormat("%d/%m/%Y");var C=document.getElementById(K).value;if(C!=""){D.setDate(C)}else{D.draw()}document.getElementById(K+"Container").style.left=H+"px";document.getElementById(K+"Container").style.top=(F+20)+"px";var E=-1;for(var A in dhxWins.wins){if(E<dhxWins.wins[A].zi){E=dhxWins.wins[A].zi}}E++;document.getElementById(K+"Container").style.zIndex=E;document.getElementById(K+"Container").style.position="absolute";document.getElementById(K+"Container").style.display="block";document.onclick=hideCalendarAuto;hideSelect(I);activeFormForPanel=I;tmplastActiveClndr=D;window.setTimeout("lastActiveClndr = tmplastActiveClndr;",100)}}function mouseCoords(A){if(A.pageX||A.pageY){return{x:A.pageX,y:A.pageY}}return{x:A.clientX+document.body.scrollLeft-document.body.clientLeft,y:A.clientY+document.body.scrollTop-document.body.clientTop}}function hideCalendarAuto(E){if(!E){E=window.event}if(lastActiveClndr){var I=mouseCoords(E).x;var H=mouseCoords(E).y;var F=lastActiveClndr.contId;var A=getRealLeft(document.getElementById(F));var D=getRealTop(document.getElementById(F));var C=A+170;var K=D+170;if(I<A||I>C||H<D||H>K){lastActiveClndr.hide();unhideSelect(activeFormForPanel);lastActiveClndr=null;tmplastActiveClndr=null}}}function alertDebug(A){if(document.getElementById("HAP_LOG_CONTAINER")==null){appendEmptyDivToBody("HAP_LOG_CONTAINER");document.getElementById("HAP_LOG_CONTAINER").style.display="none"}appendToDivHtml("HAP_LOG_CONTAINER",A);if(alertDebuggingMessages){alert(A)}}var activeWindows=new Array();function showModalWindow(C){if(activeWindows.length>0){try{activeWindows[activeWindows.length-1].setModal(false)}catch(A){}}activeWindows[activeWindows.length]=C;activeWindows[activeWindows.length-1].setModal(true)}function hideWindow(D,E){if(activeWindows.length>0){try{activeWindows[activeWindows.length-1].setModal(false);activeWindows.pop()}catch(C){alert(C)}}if(activeWindows.length>0){try{activeWindows[activeWindows.length-1].setModal(true)}catch(C){alert(C)}}D.hide();try{var A=document.getElementById(E);A.parentNode.removeChild(A)}catch(C){alert(C)}}function openFile(filePath){var filePathName=filePath;var prm="toolbar=no,titlebar=no,directories=no,menubar=no,resizable=yes,scrollbars=yes,width=900,height=600,top=30,left=30";day=new Date();id=day.getTime();eval("page"+id+" = window.open(filePathName, '"+id+"', prm);")}var fixedX=-1;var fixedY=-1;var startAt=1;var showWeekNumber=1;var showToday=1;var imgDir="images/";var BDChildren=0;var gotoString="Go to Current Month";var todayString="Today";var weekString="Week";var scrollLeftMessage="Click to see previous Months.";var scrollRightMessage="Click to see next Months.";var selectMonthMessage="Click to select Month.";var selectYearMessage="Click to select Year.";var selectDateMessage="Select [date] as Date.";var closingControlScript="";var crossobj,crossMonthObj,crossYearObj,monthSelected,yearSelected,dateSelected,omonthSelected,oyearSelected,odateSelected,monthConstructed,yearConstructed,intervalID1,intervalID2,timeoutID1,timeoutID2,ctlToPlaceValue,ctlNow,dateFormat,nStartingYear;var bPageLoaded=false;var ie=document.all;var dom=document.getElementById;var ns4=document.layers;var today=new Date();var dateNow=today.getDate();var monthNow=today.getMonth();var yearNow=today.getYear();var imgsrc=new Array("drop1.gif","drop2.gif","left1.gif","left2.gif","right1.gif","right2.gif");var img=new Array();var bShow=false;function hideElement(A,C){if(ie){for(i=0;i<document.all.tags(A).length;i++){obj=document.all.tags(A)[i];if(!obj||!obj.offsetParent){continue}objLeft=obj.offsetLeft;objTop=obj.offsetTop;objParent=obj.offsetParent;while(objParent.tagName.toUpperCase()!="BODY"&&objParent.tagName.toUpperCase()!="HTML"){objLeft+=objParent.offsetLeft;objTop+=objParent.offsetTop;objParent=objParent.offsetParent}objHeight=obj.offsetHeight;objWidth=obj.offsetWidth;if((C.offsetLeft+C.offsetWidth)<=objLeft){}else{if((C.offsetTop+C.offsetHeight)<=objTop){}else{if(C.offsetTop>=(objTop+objHeight)){}else{if(C.offsetLeft>=(objLeft+objWidth)){}else{obj.style.visibility="hidden"}}}}}}}function showElement(A){if(ie){for(i=0;i<document.all.tags(A).length;i++){obj=document.all.tags(A)[i];if(!obj||!obj.offsetParent){continue}obj.style.visibility=""}}}function HolidayRec(D,A,E,C){this.d=D;this.m=A;this.y=E;this.desc=C}var HolidaysCounter=0;var Holidays=new Array();function addHoliday(D,A,E,C){Holidays[HolidaysCounter++]=new HolidayRec(D,A,E,C)}if(dom){for(i=0;i<imgsrc.length;i++){img[i]=new Image;img[i].src=imgDir+imgsrc[i]}document.write("<div onclick='bShow=true' id='calendar'	style='z-index:+999;position:absolute;visibility:hidden;'><table	width="+((showWeekNumber==1)?250:220)+" style='font-family:arial;font-size:11px;border-width:1;border-style:solid;border-color:#a0a0a0;font-family:arial; font-size:11px}' bgcolor='#ffffff'><tr bgcolor='#0000aa'><td><table width='"+((showWeekNumber==1)?248:218)+"'><tr><td style='padding:2px;font-family:arial; font-size:11px;'><font color='#ffffff'><B><span id='caption'></span></B></font></td><td align=right><a href='javascript:hideCalendar()'><IMG SRC='"+imgDir+"close.gif' WIDTH='15' HEIGHT='13' BORDER='0' ALT='Close the Calendar'></a></td></tr></table></td></tr><tr><td style='padding:5px' bgcolor=#ffffff><span id='content'></span></td></tr>");if(showToday==1){document.write("<tr bgcolor=#f0f0f0><td style='padding:5px' align=center><span id='lblToday'></span></td></tr>")}document.write("</table></div><div id='selectMonth' style='z-index:+999;position:absolute;visibility:hidden;'></div><div id='selectYear' style='z-index:+999;position:absolute;visibility:hidden;'></div>")}var monthName=new Array("January","February","March","April","May","June","July","August","September","October","November","December");if(startAt==0){dayName=new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat")}else{dayName=new Array("Mon","Tue","Wed","Thu","Fri","Sat","Sun")}var styleAnchor="text-decoration:none;color:black;";var styleLightBorder="border-style:solid;border-width:1px;border-color:#a0a0a0;";function swapImage(C,A){if(ie){document.getElementById(C).setAttribute("src",imgDir+A)}}function initPopCalendar(){if(!ns4){if(!ie){yearNow+=1900}crossobj=(dom)?document.getElementById("calendar").style:ie?document.all.calendar:document.calendar;hideCalendar();crossMonthObj=(dom)?document.getElementById("selectMonth").style:ie?document.all.selectMonth:document.selectMonth;crossYearObj=(dom)?document.getElementById("selectYear").style:ie?document.all.selectYear:document.selectYear;monthConstructed=false;yearConstructed=false;if(showToday==1){document.getElementById("lblToday").innerHTML=todayString+" <a onmousemove='window.status=\""+gotoString+"\"' onmouseout='window.status=\"\"' title='"+gotoString+"' style='"+styleAnchor+"' href='javascript:monthSelected=monthNow;yearSelected=yearNow;constructCalendar();'>"+dayName[(today.getDay()-startAt==-1)?6:(today.getDay()-startAt)]+", "+dateNow+" "+monthName[monthNow].substring(0,3)+"	"+yearNow+"</a>"}sHTML1='<span id=\'spanLeft\'	style=\'border-style:solid;border-width:1;border-color:#3366FF;cursor:pointer\' onmouseover=\'swapImage("changeLeft","left2.gif");this.style.borderColor="#88AAFF";window.status="'+scrollLeftMessage+"\"' onclick='javascript:decMonth()' onmouseout='clearInterval(intervalID1);swapImage(\"changeLeft\",\"left1.gif\");this.style.borderColor=\"#3366FF\";window.status=\"\"' onmousedown='clearTimeout(timeoutID1);timeoutID1=setTimeout(\"StartDecMonth()\",500)'	onmouseup='clearTimeout(timeoutID1);clearInterval(intervalID1)'>&nbsp<IMG id='changeLeft' SRC='"+imgDir+"left1.gif' width=10 height=11 BORDER=0>&nbsp</span>&nbsp;";sHTML1+='<span id=\'spanRight\' style=\'border-style:solid;border-width:1;border-color:#3366FF;cursor:pointer\'	onmouseover=\'swapImage("changeRight","right2.gif");this.style.borderColor="#88AAFF";window.status="'+scrollRightMessage+"\"' onmouseout='clearInterval(intervalID1);swapImage(\"changeRight\",\"right1.gif\");this.style.borderColor=\"#3366FF\";window.status=\"\"' onclick='incMonth()' onmousedown='clearTimeout(timeoutID1);timeoutID1=setTimeout(\"StartIncMonth()\",500)'	onmouseup='clearTimeout(timeoutID1);clearInterval(intervalID1)'>&nbsp<IMG id='changeRight' SRC='"+imgDir+"right1.gif'	width=10 height=11 BORDER=0>&nbsp</span>&nbsp";sHTML1+='<span id=\'spanMonth\' style=\'border-style:solid;border-width:1;border-color:#3366FF;cursor:pointer\'	onmouseover=\'swapImage("changeMonth","drop2.gif");this.style.borderColor="#88AAFF";window.status="'+selectMonthMessage+'"\' onmouseout=\'swapImage("changeMonth","drop1.gif");this.style.borderColor="#3366FF";window.status=""\' onclick=\'popUpMonth()\'></span>&nbsp;';sHTML1+='<span id=\'spanYear\' style=\'border-style:solid;border-width:1;border-color:#3366FF;cursor:pointer\' onmouseover=\'swapImage("changeYear","drop2.gif");this.style.borderColor="#88AAFF";window.status="'+selectYearMessage+'"\'	onmouseout=\'swapImage("changeYear","drop1.gif");this.style.borderColor="#3366FF";window.status=""\'	onclick=\'popUpYear()\'></span>&nbsp;';document.getElementById("caption").innerHTML=sHTML1;bPageLoaded=true}}function hideCalendar(){crossobj.visibility="hidden";if(crossMonthObj!=null){crossMonthObj.visibility="hidden"}if(crossYearObj!=null){crossYearObj.visibility="hidden"}try{window.setTimeout(closingControlScript,1)}catch(A){}showElement("SELECT");showElement("APPLET")}function padZero(A){return(A<10)?"0"+A:A}function constructDate(C,A,D){sTmp=dateFormat;sTmp=sTmp.replace("dd","<e>");sTmp=sTmp.replace("d","<d>");sTmp=sTmp.replace("<e>",padZero(C));sTmp=sTmp.replace("<d>",C);sTmp=sTmp.replace("mmm","<o>");sTmp=sTmp.replace("mm","<n>");sTmp=sTmp.replace("m","<m>");sTmp=sTmp.replace("<m>",A+1);sTmp=sTmp.replace("<n>",padZero(A+1));sTmp=sTmp.replace("<o>",monthName[A]);return sTmp.replace("yyyy",D)}function closeCalendar(){var D;hideCalendar();var A=document.getElementById(ctlToPlaceValue);var C=A.value;A.value=constructDate(dateSelected,monthSelected,yearSelected);if(C!=A.value){if(A.onchange){A.onchange()}}}function StartDecMonth(){intervalID1=setInterval("decMonth()",80)}function StartIncMonth(){intervalID1=setInterval("incMonth()",80)}function incMonth(){monthSelected++;if(monthSelected>11){monthSelected=0;yearSelected++}constructCalendar()}function decMonth(){monthSelected--;if(monthSelected<0){monthSelected=11;yearSelected--}constructCalendar()}function constructMonth(){popDownYear();if(!monthConstructed){sHTML="";for(i=0;i<12;i++){sName=monthName[i];if(i==monthSelected){sName="<B>"+sName+"</B>"}sHTML+="<tr><td id='m"+i+"' onmouseover='this.style.backgroundColor=\"#FFCC99\"' onmouseout='this.style.backgroundColor=\"\"' style='cursor:pointer' onclick='monthConstructed=false;monthSelected="+i+";constructCalendar();popDownMonth();event.cancelBubble=true'>&nbsp;"+sName+"&nbsp;</td></tr>"}document.getElementById("selectMonth").innerHTML="<table width=70	style='font-family:arial; font-size:11px; border-width:1; border-style:solid; border-color:#a0a0a0;' bgcolor='#FFFFDD' cellspacing=0 onmouseover='clearTimeout(timeoutID1)'	onmouseout='clearTimeout(timeoutID1);timeoutID1=setTimeout(\"popDownMonth()\",100);event.cancelBubble=true'>"+sHTML+"</table>";monthConstructed=true}}function popUpMonth(){constructMonth();crossMonthObj.visibility=(dom||ie)?"visible":"show";crossMonthObj.left=(parseInt(crossobj.left)+50)+"px";crossMonthObj.top=(parseInt(crossobj.top)+26)+"px";hideElement("SELECT",document.getElementById("selectMonth"));hideElement("APPLET",document.getElementById("selectMonth"))}function popDownMonth(){crossMonthObj.visibility="hidden"}function incYear(){for(i=0;i<7;i++){newYear=(i+nStartingYear)+1;if(newYear==yearSelected){txtYear="&nbsp;<B>"+newYear+"</B>&nbsp;"}else{txtYear="&nbsp;"+newYear+"&nbsp;"}document.getElementById("y"+i).innerHTML=txtYear}nStartingYear++;bShow=true}function decYear(){for(i=0;i<7;i++){newYear=(i+nStartingYear)-1;if(newYear==yearSelected){txtYear="&nbsp;<B>"+newYear+"</B>&nbsp;"}else{txtYear="&nbsp;"+newYear+"&nbsp;"}document.getElementById("y"+i).innerHTML=txtYear}nStartingYear--;bShow=true}function selectYear(A){yearSelected=parseInt(A+nStartingYear);yearConstructed=false;constructCalendar();popDownYear()}function constructYear(){popDownMonth();sHTML="";if(!yearConstructed){sHTML="<tr><td align='center'	onmouseover='this.style.backgroundColor=\"#FFCC99\"' onmouseout='clearInterval(intervalID1);this.style.backgroundColor=\"\"' style='cursor:pointer'	onmousedown='clearInterval(intervalID1);intervalID1=setInterval(\"decYear()\",30)' onmouseup='clearInterval(intervalID1)'>-</td></tr>";j=0;nStartingYear=yearSelected-3;for(i=(yearSelected-3);i<=(yearSelected+3);i++){sName=i;if(i==yearSelected){sName="<B>"+sName+"</B>"}sHTML+="<tr><td id='y"+j+"' onmouseover='this.style.backgroundColor=\"#FFCC99\"' onmouseout='this.style.backgroundColor=\"\"' style='cursor:pointer' onclick='selectYear("+j+");event.cancelBubble=true'>&nbsp;"+sName+"&nbsp;</td></tr>";j++}sHTML+="<tr><td align='center' onmouseover='this.style.backgroundColor=\"#FFCC99\"' onmouseout='clearInterval(intervalID2);this.style.backgroundColor=\"\"' style='cursor:pointer' onmousedown='clearInterval(intervalID2);intervalID2=setInterval(\"incYear()\",30)'	onmouseup='clearInterval(intervalID2)'>+</td></tr>";document.getElementById("selectYear").innerHTML="<table width=44 style='font-family:arial; font-size:11px; border-width:1; border-style:solid; border-color:#a0a0a0;'	bgcolor='#FFFFDD' onmouseover='clearTimeout(timeoutID2)' onmouseout='clearTimeout(timeoutID2);timeoutID2=setTimeout(\"popDownYear()\",100)' cellspacing=0>"+sHTML+"</table>";yearConstructed=true}}function popDownYear(){clearInterval(intervalID1);clearTimeout(timeoutID1);clearInterval(intervalID2);clearTimeout(timeoutID2);crossYearObj.visibility="hidden"}function popUpYear(){var A;constructYear();crossYearObj.visibility=(dom||ie)?"visible":"show";A=parseInt(crossobj.left)+document.getElementById("spanYear").offsetLeft;if(ie){A+=6}crossYearObj.left=A+"px";crossYearObj.top=(parseInt(crossobj.top)+26)+"px"}function WeekNbr(A){year=A.getFullYear();month=A.getMonth()+1;if(startAt==0){day=A.getDate()+1}else{day=A.getDate()}a=Math.floor((14-month)/12);y=year+4800-a;m=month+12*a-3;b=Math.floor(y/4)-Math.floor(y/100)+Math.floor(y/400);J=day+Math.floor((153*m+2)/5)+365*y+b-32045;d4=(((J+31741-(J%7))%146097)%36524)%1461;L=Math.floor(d4/1460);d1=((d4-L)%365)+L;week=Math.floor(d1/7)+1;return week}function constructCalendar(){var E=Array(31,0,31,30,31,30,31,31,30,31,30,31);var C;var A=new Date(yearSelected,monthSelected,1);var H;if(monthSelected==1){H=new Date(yearSelected,monthSelected+1,1);H=new Date(H-(24*60*60*1000));numDaysInMonth=H.getDate()}else{numDaysInMonth=E[monthSelected]}datePointer=0;dayPointer=A.getDay()-startAt;if(dayPointer<0){dayPointer=6}sHTML="<table	 border=0 style='font-family:verdana;font-size:10px;'><tr>";if(showWeekNumber==1){sHTML+="<td width=27><b>"+weekString+"</b></td><td width=1 rowspan=7 bgcolor='#d0d0d0' style='padding:0px'><img src='"+imgDir+"divider.gif' width=1></td>"}for(D=0;D<7;D++){sHTML+="<td width='27' align='right'><B>"+dayName[D]+"</B></td>"}sHTML+="</tr><tr>";if(showWeekNumber==1){sHTML+="<td align=right>"+WeekNbr(A)+"&nbsp;</td>"}for(var D=1;D<=dayPointer;D++){sHTML+="<td>&nbsp;</td>"}for(datePointer=1;datePointer<=numDaysInMonth;datePointer++){dayPointer++;sHTML+="<td align=right>";sStyle=styleAnchor;if((datePointer==odateSelected)&&(monthSelected==omonthSelected)&&(yearSelected==oyearSelected)){sStyle+=styleLightBorder}sHint="";for(k=0;k<HolidaysCounter;k++){if((parseInt(Holidays[k].d)==datePointer)&&(parseInt(Holidays[k].m)==(monthSelected+1))){if((parseInt(Holidays[k].y)==0)||((parseInt(Holidays[k].y)==yearSelected)&&(parseInt(Holidays[k].y)!=0))){sStyle+="background-color:#FFDDDD;";sHint+=sHint==""?Holidays[k].desc:"\n"+Holidays[k].desc}}}var F=/\"/g;sHint=sHint.replace(F,"&quot;");C="onmousemove='window.status=\""+selectDateMessage.replace("[date]",constructDate(datePointer,monthSelected,yearSelected))+"\"' onmouseout='window.status=\"\"' ";if((datePointer==dateNow)&&(monthSelected==monthNow)&&(yearSelected==yearNow)){sHTML+="<b><a "+C+' title="'+sHint+"\" style='"+sStyle+"' href='javascript:dateSelected="+datePointer+";closeCalendar();'><font color=#ff0000>&nbsp;"+datePointer+"</font>&nbsp;</a></b>"}else{if(dayPointer%7==(startAt*-1)+1){sHTML+="<a "+C+' title="'+sHint+"\" style='"+sStyle+"' href='javascript:dateSelected="+datePointer+";closeCalendar();'>&nbsp;<font color=#909090>"+datePointer+"</font>&nbsp;</a>"}else{sHTML+="<a "+C+' title="'+sHint+"\" style='"+sStyle+"' href='javascript:dateSelected="+datePointer+";closeCalendar();'>&nbsp;"+datePointer+"&nbsp;</a>"}}sHTML+="";if((dayPointer+startAt)%7==startAt){sHTML+="</tr><tr>";if((showWeekNumber==1)&&(datePointer<numDaysInMonth)){sHTML+="<td align=right>"+(WeekNbr(new Date(yearSelected,monthSelected,datePointer+1)))+"&nbsp;</td>"}}}document.getElementById("content").innerHTML=sHTML;document.getElementById("spanMonth").innerHTML="&nbsp;"+monthName[monthSelected]+"&nbsp;<IMG id='changeMonth' SRC='"+imgDir+"drop1.gif' WIDTH='12' HEIGHT='10' BORDER=0>";document.getElementById("spanYear").innerHTML="&nbsp;"+yearSelected+"&nbsp;<IMG id='changeYear' SRC='"+imgDir+"drop1.gif' WIDTH='12' HEIGHT='10' BORDER=0>"}function popUpCalendar(C,H,F,A){var E=0;var D=0;this.closingControlScript=A;BDChildren=H;if(bPageLoaded){if(crossobj.visibility=="hidden"){ctlToPlaceValue=H;dateFormat=F;formatChar=" ";aFormat=dateFormat.split(formatChar);if(aFormat.length<3){formatChar="/";aFormat=dateFormat.split(formatChar);if(aFormat.length<3){formatChar=".";aFormat=dateFormat.split(formatChar);if(aFormat.length<3){formatChar="-";aFormat=dateFormat.split(formatChar);if(aFormat.length<3){formatChar=""}}}}tokensChanged=0;if(formatChar!=""){aData=document.getElementById(H).value.split(formatChar);for(i=0;i<3;i++){if((aFormat[i]=="d")||(aFormat[i]=="dd")){dateSelected=parseInt(aData[i],10);tokensChanged++}else{if((aFormat[i]=="m")||(aFormat[i]=="mm")){monthSelected=parseInt(aData[i],10)-1;tokensChanged++}else{if(aFormat[i]=="yyyy"){yearSelected=parseInt(aData[i],10);tokensChanged++}else{if(aFormat[i]=="mmm"){for(j=0;j<12;j++){if(aData[i]==monthName[j]){monthSelected=j;tokensChanged++}}}}}}}}if((tokensChanged!=3)||isNaN(dateSelected)||isNaN(monthSelected)||isNaN(yearSelected)){dateSelected=dateNow;monthSelected=monthNow;yearSelected=yearNow}odateSelected=dateSelected;omonthSelected=monthSelected;oyearSelected=yearSelected;aTag=C;do{aTag=aTag.offsetParent;E+=aTag.offsetLeft;D+=aTag.offsetTop}while(aTag.tagName!="BODY"&&aTag.tagName!="HTML");crossobj.left=fixedX==-1?(C.offsetLeft+E)+"px":fixedX;crossobj.top=fixedY==-1?(C.offsetTop+D+C.offsetHeight+2)+"px":fixedY;constructCalendar(1,monthSelected,yearSelected);crossobj.visibility=(dom||ie)?"visible":"show";hideElement("SELECT",document.getElementById("calendar"));hideElement("APPLET",document.getElementById("calendar"));bShow=true}else{hideCalendar();if(ctlNow!=C){popUpCalendar(C,H,F)}}ctlNow=C}}document.onkeypress=function hidecal1(){if(ie){if(event.keyCode==27){hideCalendar()}}};document.onclick=function hidecal2(){if(!bShow){hideCalendar()}bShow=false};function checkFormat(A,C){}initPopCalendar();function dtmlXMLLoaderObject(C,E,D,A){this.xmlDoc="";if(typeof (D)!="undefined"){this.async=D}else{this.async=true}this.onloadAction=C||null;this.mainObject=E||null;this.waitCall=null;this.rSeed=A||false;return this}dtmlXMLLoaderObject.prototype.waitLoadFunction=function(C){var A=true;this.check=function(){if((C)&&(C.onloadAction!=null)){if((!C.xmlDoc.readyState)||(C.xmlDoc.readyState==4)){if(!A){return }A=false;C.onloadAction(C.mainObject,null,null,null,C);if(C.waitCall){C.waitCall();C.waitCall=null}}}};return this.check};dtmlXMLLoaderObject.prototype.getXMLTopNode=function(D,A){if(this.xmlDoc.responseXML){var C=this.xmlDoc.responseXML.getElementsByTagName(D);var F=C[0]}else{var F=this.xmlDoc.documentElement}if(F){this._retry=false;return F}if((_isIE)&&(!this._retry)){var E=this.xmlDoc.responseText;var A=this.xmlDoc;this._retry=true;this.xmlDoc=new ActiveXObject("Microsoft.XMLDOM");this.xmlDoc.async=false;this.xmlDoc.loadXML(E);return this.getXMLTopNode(D,A)}dhtmlxError.throwError("LoadXML","Incorrect XML",[(A||this.xmlDoc),this.mainObject]);return document.createElement("DIV")};dtmlXMLLoaderObject.prototype.loadXMLString=function(C){try{var D=new DOMParser();this.xmlDoc=D.parseFromString(C,"text/xml")}catch(A){this.xmlDoc=new ActiveXObject("Microsoft.XMLDOM");this.xmlDoc.async=this.async;this.xmlDoc.loadXML(C)}this.onloadAction(this.mainObject,null,null,null,this);if(this.waitCall){this.waitCall();this.waitCall=null}};dtmlXMLLoaderObject.prototype.loadXML=function(D,C,A,E){if(this.rSeed){D+=((D.indexOf("?")!=-1)?"&":"?")+"a_dhx_rSeed="+(new Date()).valueOf()}this.filePath=D;if((!_isIE)&&(window.XMLHttpRequest)){this.xmlDoc=new XMLHttpRequest()}else{if(document.implementation&&document.implementation.createDocument){this.xmlDoc=document.implementation.createDocument("","",null);this.xmlDoc.onload=new this.waitLoadFunction(this);this.xmlDoc.load(D);return }else{this.xmlDoc=new ActiveXObject("Microsoft.XMLHTTP")}}if(this.async){this.xmlDoc.onreadystatechange=new this.waitLoadFunction(this)}this.xmlDoc.open(C?"POST":"GET",D,this.async);if(E){this.xmlDoc.setRequestHeader("User-Agent","dhtmlxRPC v0.1 ("+navigator.userAgent+")");this.xmlDoc.setRequestHeader("Content-type","text/xml")}else{if(C){this.xmlDoc.setRequestHeader("Content-type","application/x-www-form-urlencoded")}}this.xmlDoc.send(null||A);if(!this.async){(new this.waitLoadFunction(this))()}};dtmlXMLLoaderObject.prototype.destructor=function(){this.onloadAction=null;this.mainObject=null;this.xmlDoc=null;return null};function callerFunction(A,C){this.handler=function(D){if(!D){D=window.event}A(D,C);return true};return this.handler}function getAbsoluteLeft(C){var D=C.offsetLeft;var A=C.offsetParent;while(A!=null){D+=A.offsetLeft;A=A.offsetParent}return D}function getAbsoluteTop(D){var C=D.offsetTop;var A=D.offsetParent;while(A!=null){C+=A.offsetTop;A=A.offsetParent}return C}function convertStringToBoolean(A){if(typeof (A)=="string"){A=A.toLowerCase()}switch(A){case"1":case"true":case"yes":case"y":case 1:case true:return true;break;default:return false}}function getUrlSymbol(A){if(A.indexOf("?")!=-1){return"&"}else{return"?"}}function dhtmlDragAndDropObject(){if(window.dhtmlDragAndDrop){return window.dhtmlDragAndDrop}this.lastLanding=0;this.dragNode=0;this.dragStartNode=0;this.dragStartObject=0;this.tempDOMU=null;this.tempDOMM=null;this.waitDrag=0;window.dhtmlDragAndDrop=this;return this}dhtmlDragAndDropObject.prototype.removeDraggableItem=function(A){A.onmousedown=null;A.dragStarter=null;A.dragLanding=null};dhtmlDragAndDropObject.prototype.addDraggableItem=function(A,C){A.onmousedown=this.preCreateDragCopy;A.dragStarter=C;this.addDragLanding(A,C)};dhtmlDragAndDropObject.prototype.addDragLanding=function(A,C){A.dragLanding=C};dhtmlDragAndDropObject.prototype.preCreateDragCopy=function(A){if(A&&(A||event).button==2){return }if(window.dhtmlDragAndDrop.waitDrag){window.dhtmlDragAndDrop.waitDrag=0;document.body.onmouseup=window.dhtmlDragAndDrop.tempDOMU;document.body.onmousemove=window.dhtmlDragAndDrop.tempDOMM;return false}window.dhtmlDragAndDrop.waitDrag=1;window.dhtmlDragAndDrop.tempDOMU=document.body.onmouseup;window.dhtmlDragAndDrop.tempDOMM=document.body.onmousemove;window.dhtmlDragAndDrop.dragStartNode=this;window.dhtmlDragAndDrop.dragStartObject=this.dragStarter;document.body.onmouseup=window.dhtmlDragAndDrop.preCreateDragCopy;document.body.onmousemove=window.dhtmlDragAndDrop.callDrag;if((A)&&(A.preventDefault)){A.preventDefault();return false}return false};dhtmlDragAndDropObject.prototype.callDrag=function(D){if(!D){D=window.event}dragger=window.dhtmlDragAndDrop;if((D.button==0)&&(_isIE)){return dragger.stopDrag()}if(!dragger.dragNode&&dragger.waitDrag){dragger.dragNode=dragger.dragStartObject._createDragNode(dragger.dragStartNode,D);if(!dragger.dragNode){return dragger.stopDrag()}dragger.gldragNode=dragger.dragNode;document.body.appendChild(dragger.dragNode);document.body.onmouseup=dragger.stopDrag;dragger.waitDrag=0;dragger.dragNode.pWindow=window;dragger.initFrameRoute()}if(dragger.dragNode.parentNode!=window.document.body){var A=dragger.gldragNode;if(dragger.gldragNode.old){A=dragger.gldragNode.old}A.parentNode.removeChild(A);var C=dragger.dragNode.pWindow;if(_isIE){var F=document.createElement("Div");F.innerHTML=dragger.dragNode.outerHTML;dragger.dragNode=F.childNodes[0]}else{dragger.dragNode=dragger.dragNode.cloneNode(true)}dragger.dragNode.pWindow=window;dragger.gldragNode.old=dragger.dragNode;document.body.appendChild(dragger.dragNode);C.dhtmlDragAndDrop.dragNode=dragger.dragNode}dragger.dragNode.style.left=D.clientX+15+(dragger.fx?dragger.fx*(-1):0)+(document.body.scrollLeft||document.documentElement.scrollLeft)+"px";dragger.dragNode.style.top=D.clientY+3+(dragger.fy?dragger.fy*(-1):0)+(document.body.scrollTop||document.documentElement.scrollTop)+"px";if(!D.srcElement){var E=D.target}else{E=D.srcElement}dragger.checkLanding(E,D)};dhtmlDragAndDropObject.prototype.calculateFramePosition=function(F){if(window.name){var D=parent.frames[window.name].frameElement.offsetParent;var E=0;var C=0;while(D){E+=D.offsetLeft;C+=D.offsetTop;D=D.offsetParent}if((parent.dhtmlDragAndDrop)){var A=parent.dhtmlDragAndDrop.calculateFramePosition(1);E+=A.split("_")[0]*1;C+=A.split("_")[1]*1}if(F){return E+"_"+C}else{this.fx=E}this.fy=C}return"0_0"};dhtmlDragAndDropObject.prototype.checkLanding=function(C,A){if((C)&&(C.dragLanding)){if(this.lastLanding){this.lastLanding.dragLanding._dragOut(this.lastLanding)}this.lastLanding=C;this.lastLanding=this.lastLanding.dragLanding._dragIn(this.lastLanding,this.dragStartNode,A.clientX,A.clientY,A);this.lastLanding_scr=(_isIE?A.srcElement:A.target)}else{if((C)&&(C.tagName!="BODY")){this.checkLanding(C.parentNode,A)}else{if(this.lastLanding){this.lastLanding.dragLanding._dragOut(this.lastLanding,A.clientX,A.clientY,A)}this.lastLanding=0;if(this._onNotFound){this._onNotFound()}}}};dhtmlDragAndDropObject.prototype.stopDrag=function(C,D){dragger=window.dhtmlDragAndDrop;if(!D){dragger.stopFrameRoute();var A=dragger.lastLanding;dragger.lastLanding=null;if(A){A.dragLanding._drag(dragger.dragStartNode,dragger.dragStartObject,A,(_isIE?event.srcElement:C.target))}}dragger.lastLanding=null;if((dragger.dragNode)&&(dragger.dragNode.parentNode==document.body)){dragger.dragNode.parentNode.removeChild(dragger.dragNode)}dragger.dragNode=0;dragger.gldragNode=0;dragger.fx=0;dragger.fy=0;dragger.dragStartNode=0;dragger.dragStartObject=0;document.body.onmouseup=dragger.tempDOMU;document.body.onmousemove=dragger.tempDOMM;dragger.tempDOMU=null;dragger.tempDOMM=null;dragger.waitDrag=0};dhtmlDragAndDropObject.prototype.stopFrameRoute=function(C){if(C){window.dhtmlDragAndDrop.stopDrag(1,1)}for(var A=0;A<window.frames.length;A++){if((window.frames[A]!=C)&&(window.frames[A].dhtmlDragAndDrop)){window.frames[A].dhtmlDragAndDrop.stopFrameRoute(window)}}if((parent.dhtmlDragAndDrop)&&(parent!=window)&&(parent!=C)){parent.dhtmlDragAndDrop.stopFrameRoute(window)}};dhtmlDragAndDropObject.prototype.initFrameRoute=function(C,D){if(C){window.dhtmlDragAndDrop.preCreateDragCopy();window.dhtmlDragAndDrop.dragStartNode=C.dhtmlDragAndDrop.dragStartNode;window.dhtmlDragAndDrop.dragStartObject=C.dhtmlDragAndDrop.dragStartObject;window.dhtmlDragAndDrop.dragNode=C.dhtmlDragAndDrop.dragNode;window.dhtmlDragAndDrop.gldragNode=C.dhtmlDragAndDrop.dragNode;window.document.body.onmouseup=window.dhtmlDragAndDrop.stopDrag;window.waitDrag=0;if(((!_isIE)&&(D))&&((!_isFF)||(_FFrv<1.8))){window.dhtmlDragAndDrop.calculateFramePosition()}}if((parent.dhtmlDragAndDrop)&&(parent!=window)&&(parent!=C)){parent.dhtmlDragAndDrop.initFrameRoute(window)}for(var A=0;A<window.frames.length;A++){if((window.frames[A]!=C)&&(window.frames[A].dhtmlDragAndDrop)){window.frames[A].dhtmlDragAndDrop.initFrameRoute(window,((!C||D)?1:0))}}};var _isFF=false;var _isIE=false;var _isOpera=false;var _isKHTML=false;var _isMacOS=false;if(navigator.userAgent.indexOf("Macintosh")!=-1){_isMacOS=true}if((navigator.userAgent.indexOf("Safari")!=-1)||(navigator.userAgent.indexOf("Konqueror")!=-1)){var _KHTMLrv=parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf("Safari")+7,5));if(_KHTMLrv>525){_isFF=true;var _FFrv=1.9}else{_isKHTML=true}}else{if(navigator.userAgent.indexOf("Opera")!=-1){_isOpera=true;_OperaRv=parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf("Opera")+6,3))}else{if(navigator.appName.indexOf("Microsoft")!=-1){_isIE=true}else{_isFF=true;var _FFrv=parseFloat(navigator.userAgent.split("rv:")[1])}}}function isIE(){if(navigator.appName.indexOf("Microsoft")!=-1){if(navigator.userAgent.indexOf("Opera")==-1){return true}}return false}dtmlXMLLoaderObject.prototype.doXPath=function(D,F,E,M){if((_isKHTML)){return this.doXPathOpera(D,F)}if(_isIE){if(!F){if(!this.xmlDoc.nodeName){F=this.xmlDoc.responseXML}else{F=this.xmlDoc}}if(!F){dhtmlxError.throwError("LoadXML","Incorrect XML",[(F||this.xmlDoc),this.mainObject])}if(E!=null){F.setProperty("SelectionNamespaces","xmlns:xsl='"+E+"'")}if(M=="single"){return F.selectSingleNode(D)}else{return F.selectNodes(D)||new Array(0)}}else{var A=F;if(!F){if(!this.xmlDoc.nodeName){F=this.xmlDoc.responseXML}else{F=this.xmlDoc}}if(!F){dhtmlxError.throwError("LoadXML","Incorrect XML",[(F||this.xmlDoc),this.mainObject])}if(F.nodeName.indexOf("document")!=-1){A=F}else{A=F;F=F.ownerDocument}var I=XPathResult.ANY_TYPE;if(M=="single"){I=XPathResult.FIRST_ORDERED_NODE_TYPE}var H=new Array();var C=F.evaluate(D,A,function(N){return E},I,null);if(I==XPathResult.FIRST_ORDERED_NODE_TYPE){return C.singleNodeValue}var K=C.iterateNext();while(K){H[H.length]=K;K=C.iterateNext()}return H}};function _dhtmlxError(C,A,D){if(!this.catches){this.catches=new Array()}return this}_dhtmlxError.prototype.catchError=function(C,A){this.catches[C]=A};_dhtmlxError.prototype.throwError=function(C,A,D){if(this.catches[C]){return this.catches[C](C,A,D)}if(this.catches.ALL){return this.catches.ALL(C,A,D)}alert("Error type: "+arguments[0]+"\nDescription: "+arguments[1]);return null};window.dhtmlxError=new _dhtmlxError();dtmlXMLLoaderObject.prototype.doXPathOpera=function(D,A){var F=D.replace(/[\/]+/gi,"/").split("/");var E=null;var C=1;if(!F.length){return[]}if(F[0]=="."){E=[A]}else{if(F[0]==""){E=(this.xmlDoc.responseXML||this.xmlDoc).getElementsByTagName(F[C].replace(/\[[^\]]*\]/g,""));C++}else{return[]}}for(C;C<F.length;C++){E=this._getAllNamedChilds(E,F[C])}if(F[C-1].indexOf("[")!=-1){E=this._filterXPath(E,F[C-1])}return E};dtmlXMLLoaderObject.prototype._filterXPath=function(C,A){var E=new Array();var A=A.replace(/[^\[]*\[\@/g,"").replace(/[\[\]\@]*/g,"");for(var D=0;D<C.length;D++){if(C[D].getAttribute(A)){E[E.length]=C[D]}}return E};dtmlXMLLoaderObject.prototype._getAllNamedChilds=function(C,A){var F=new Array();if(_isKHTML){A=A.toUpperCase()}for(var E=0;E<C.length;E++){for(var D=0;D<C[E].childNodes.length;D++){if(_isKHTML){if(C[E].childNodes[D].tagName&&C[E].childNodes[D].tagName.toUpperCase()==A){F[F.length]=C[E].childNodes[D]}}else{if(C[E].childNodes[D].tagName==A){F[F.length]=C[E].childNodes[D]}}}}return F};function dhtmlXHeir(C,A){for(var D in A){if(typeof (A[D])=="function"){C[D]=A[D]}}return C}function dhtmlxEvent(C,D,A){if(C.addEventListener){C.addEventListener(D,A,false)}else{if(C.attachEvent){C.attachEvent("on"+D,A)}}}dtmlXMLLoaderObject.prototype.xslDoc=null;dtmlXMLLoaderObject.prototype.setXSLParamValue=function(C,D,E){if(!E){E=this.xslDoc}if(E.responseXML){E=E.responseXML}var A=this.doXPath("/xsl:stylesheet/xsl:variable[@name='"+C+"']",E,"http://www.w3.org/1999/XSL/Transform","single");if(A!=null){A.firstChild.nodeValue=D}};dtmlXMLLoaderObject.prototype.doXSLTransToObject=function(D,C){if(!D){D=this.xslDoc}if(D.responseXML){D=D.responseXML}if(!C){C=this.xmlDoc}if(C.responseXML){C=C.responseXML}if(!isIE()){if(!this.XSLProcessor){this.XSLProcessor=new XSLTProcessor();this.XSLProcessor.importStylesheet(D)}var A=this.XSLProcessor.transformToDocument(C)}else{var A=new ActiveXObject("Msxml2.DOMDocument.3.0");C.transformNodeToObject(D,A)}return A};dtmlXMLLoaderObject.prototype.doXSLTransToString=function(C,A){return this.doSerialization(this.doXSLTransToObject(C,A))};dtmlXMLLoaderObject.prototype.doSerialization=function(C){if(!isIE()){var A=new XMLSerializer();return A.serializeToString(C)}else{return C.xml}};var globalActiveDHTMLGridObject;String.prototype._dhx_trim=function(){return this.replace(/&nbsp;/g," ").replace(/(^[ \t]*)|([ \t]*$)/g,"")};function dhtmlxArray(A){return dhtmlXHeir((A||new Array()),new _dhtmlxArray())}function _dhtmlxArray(){return this}_dhtmlxArray.prototype._dhx_find=function(C){for(var A=0;A<this.length;A++){if(C==this[A]){return A}}return -1};_dhtmlxArray.prototype._dhx_delAt=function(C){if(Number(C)<0||this.length==0){return false}for(var A=C;A<this.length;A++){this[A]=this[A+1]}this.length--};_dhtmlxArray.prototype._dhx_insertAt=function(D,C){this[this.length]=null;for(var A=this.length-1;A>=D;A--){this[A]=this[A-1]}this[D]=C};_dhtmlxArray.prototype._dhx_removeAt=function(C){for(var A=C;A<this.length;A++){this[A]=this[A+1]}this.length--};_dhtmlxArray.prototype._dhx_swapItems=function(A,D){var C=this[A];this[A]=this[D];this[D]=C};function dhtmlXGridObject(id){this._isIE7s=((_isIE)&&window.XMLHttpRequest&&(document.compatMode!="BackCompat"));if(_isIE){try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}}if(id){if(typeof (id)=="object"){this.entBox=id;this.entBox.id="cgrid2_"+(new Date()).getTime()}else{this.entBox=document.getElementById(id)}}else{this.entBox=document.createElement("DIV");this.entBox.id="cgrid2_"+(new Date()).getTime()}this.dhx_Event();this._tttag=this._tttag||"rows";this._cttag=this._cttag||"cell";this._rttag=this._rttag||"row";var self=this;this._wcorr=0;this.nm=this.entBox.nm||"grid";this.cell=null;this.row=null;this.editor=null;this._f2kE=true;this._dclE=true;this.combos=new Array(0);this.defVal=new Array(0);this.rowsAr=new Array(0);this.rowsCol=new dhtmlxArray(0);this._maskArr=new Array(0);this.selectedRows=new dhtmlxArray(0);this.rowsBuffer=new Array(new dhtmlxArray(0),new dhtmlxArray(0));this.loadedKidsHash=null;this.UserData=new Array(0);this.styleSheet=document.styleSheets;this.entBox.className+=" gridbox";this.entBox.style.width=this.entBox.getAttribute("width")||(window.getComputedStyle?(this.entBox.style.width||window.getComputedStyle(this.entBox,null)["width"]):(this.entBox.currentStyle?this.entBox.currentStyle.width:0))||"100%";this.entBox.style.height=this.entBox.getAttribute("height")||(window.getComputedStyle?(this.entBox.style.height||window.getComputedStyle(this.entBox,null)["height"]):(this.entBox.currentStyle?this.entBox.currentStyle.height:0))||"100%";this.entBox.style.cursor="default";this.entBox.onselectstart=function(){return false};this.obj=document.createElement("TABLE");this.obj.cellSpacing=0;this.obj.cellPadding=0;this.obj.style.width="100%";this.obj.style.tableLayout="fixed";this.obj.className="c_obj".substr(2);this.obj._rows=function(i){return this.rows[i+1]};this.obj._rowslength=function(){return this.rows.length-1};this.hdr=document.createElement("TABLE");this.hdr.style.border="1px solid gray";this.hdr.cellSpacing=0;this.hdr.cellPadding=0;if((!_isOpera)||(_OperaRv>=8.5)){this.hdr.style.tableLayout="fixed"}this.hdr.className="c_hdr".substr(2);this.hdr.width="100%";this.xHdr=document.createElement("TABLE");this.xHdr.className="xhdr";this.xHdr.cellPadding=0;this.xHdr.cellSpacing=0;this.xHdr.style.width="100%";var r=this.xHdr.insertRow(0);var c=r.insertCell(0);r.insertCell(1).innerHTML="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";r.childNodes[1].style.width="100%";c.appendChild(this.hdr);this.objBuf=document.createElement("DIV");this.objBuf.appendChild(this.obj);this.entCnt=document.createElement("TABLE");this.entCnt.insertRow(0).insertCell(0);this.entCnt.insertRow(1).insertCell(0);this.entCnt.cellPadding=0;this.entCnt.cellSpacing=0;this.entCnt.width="100%";this.entCnt.height="100%";this.entCnt.style.tableLayout="fixed";this.objBox=document.createElement("DIV");this.objBox.style.width="100%";this.objBox.style.height=this.entBox.style.height;this.objBox.style.overflow="auto";this.objBox.style.position="relative";this.objBox.appendChild(this.objBuf);this.objBox.className="objbox";this.hdrBox=document.createElement("DIV");this.hdrBox.style.width="100%";if(((_isOpera)&&(_OperaRv<9))){this.hdrSizeA=25}else{this.hdrSizeA=200}this.hdrBox.style.height=this.hdrSizeA+"px";if(_isIE){this.hdrBox.style.overflowX="hidden"}else{this.hdrBox.style.overflow="hidden"}this.hdrBox.style.position="relative";this.hdrBox.appendChild(this.xHdr);this.preloadImagesAr=new Array(0);this.sortImg=document.createElement("IMG");this.sortImg.style.display="none";this.hdrBox.insertBefore(this.sortImg,this.xHdr);this.entCnt.rows[0].cells[0].vAlign="top";this.entCnt.rows[0].cells[0].appendChild(this.hdrBox);this.entCnt.rows[1].cells[0].appendChild(this.objBox);this.entBox.appendChild(this.entCnt);this.entBox.grid=this;this.objBox.grid=this;this.hdrBox.grid=this;this.obj.grid=this;this.hdr.grid=this;this.cellWidthPX=new Array(0);this.cellWidthPC=new Array(0);this.cellWidthType=this.entBox.cellwidthtype||"px";this.delim=this.entBox.delimiter||",";this._csvDelim=",";this.hdrLabels=(this.entBox.hdrlabels||"").split(",");this.columnIds=(this.entBox.columnids||"").split(",");this.columnColor=(this.entBox.columncolor||"").split(",");this.cellType=dhtmlxArray((this.entBox.cellstype||"").split(","));this.cellAlign=(this.entBox.cellsalign||"").split(",");this.initCellWidth=(this.entBox.cellswidth||"").split(",");this.fldSort=(this.entBox.fieldstosort||"").split(",");this.imgURL=this.entBox.imagesurl||"gridCfx/";this.isActive=false;this.isEditable=true;this.raNoState=this.entBox.ranostate||null;this.chNoState=this.entBox.chnostate||null;this.selBasedOn=(this.entBox.selbasedon||"cell").toLowerCase();this.selMultiRows=this.entBox.selmultirows||false;this.multiLine=this.entBox.multiline||false;this.noHeader=this.entBox.noheader||false;this.xmlFileUrl=this.entBox.xmlfileurl||"";this.recordsNoMore=this.entBox.infinitloading||true;this.useImagesInHeader=false;this.pagingOn=false;this.rowsBufferOutSize=0;dhtmlxEvent(window,"unload",function(){try{self.destructor()}catch(e){}});this.loadXML=function(url,afterCall){if(this._dload){this._dload=url;this._askRealRows(null,afterCall);return true}if(this._xmlaR){this.setXMLAutoLoading(url)}if(url.indexOf("?")!=-1){var s="&"}else{var s="?"}var obj=this;this.callEvent("onXLS",[this]);if(afterCall){this.xmlLoader.waitCall=afterCall}this.xmlLoader.loadXML(url+""+s+"rowsLoaded="+this.getRowsNum()+"&lastid="+this.getRowId(this.getRowsNum()-1))};this.setSkin=function(name){this.entBox.className="gridbox gridbox_"+name;this.enableAlterCss("ev_"+name,"odd_"+name,this.isTreeGrid());this._fixAlterCss();this._sizeFix=this._borderFix=0;switch(name){case"clear":this._topMb=document.createElement("DIV");this._topMb.className="topMumba";this._topMb.innerHTML="<img style='left:0px'   src='"+this.imgURL+"skinC_top_left.gif'><img style='right:0px' src='"+this.imgURL+"skinC_top_right.gif'>";this.entBox.appendChild(this._topMb);this._botMb=document.createElement("DIV");this._botMb.className="bottomMumba";this._botMb.innerHTML="<img style='left:0px'   src='"+this.imgURL+"skinD_bottom_left.gif'><img style='right:0px' src='"+this.imgURL+"skinD_bottom_right.gif'>";this.entBox.appendChild(this._botMb);this.entBox.style.position="relative";this._gcCorr=20;break;case"modern":case"light":this.forceDivInHeader=true;this._sizeFix=1;break;case"xp":this.forceDivInHeader=true;this._srdh=22;this._sizeFix=1;break;case"mt":this._srdh=22;this._sizeFix=1;this._borderFix=(_isIE?1:0);break;break;case"gray":if((_isIE)&&(document.compatMode!="BackCompat")){this._srdh=22}this._sizeFix=1;this._borderFix=(_isIE?1:0);break}if(_isIE&&this.hdr){var d=this.hdr.parentNode;d.removeChild(this.hdr);d.appendChild(this.hdr)}this.setSizes()};this.loadXMLString=function(str,afterCall){if(this._dload){this._dloadStr=str;this._askRealRows(null,afterCall);return true}this.callEvent("onXLS",[this]);if(afterCall){this.xmlLoader.waitCall=afterCall}this.xmlLoader.loadXMLString(str)};this.doLoadDetails=function(obj){var root=self.xmlLoader.getXMLTopNode(self._tttag);if(root.tagName!="DIV"){if(self._refresh_mode){self._refreshFromXML(self.xmlLoader);self._refresh_mode=null}else{if(!self.xmlLoader.xmlDoc.nodeName){self.parseXML(self.xmlLoader.xmlDoc.responseXML)}else{self.parseXML(self.xmlLoader.xmlDoc)}}}if(self.pagingOn){self.createPagingBlock()}};this.xmlLoader=new dtmlXMLLoaderObject(this.doLoadDetails,window,true,this.no_cashe);if(_isIE){this.preventIECashing(true)}this.dragger=new dhtmlDragAndDropObject();this._doOnScroll=function(e,mode){this.callEvent("onScroll",[this.objBox.scrollLeft,this.objBox.scrollTop]);this.doOnScroll(e,mode)};this.doOnScroll=function(e,mode){this.hdrBox.scrollLeft=this.objBox.scrollLeft;if(this.ftr){this.ftr.parentNode.scrollLeft=this.objBox.scrollLeft}this.setSortImgPos(null,true);if(mode){return }if(!this.pagingOn&&this.objBox.scrollTop+this.hdrSizeA+this.objBox.offsetHeight>this.objBox.scrollHeight){if(this._xml_ready&&(this.objBox._oldScrollTop!=this.objBox.scrollTop)&&this.addRowsFromBuffer()){this.objBox.scrollTop=this.objBox.scrollHeight-(this.hdrSizeA+1+this.objBox.offsetHeight);this.objBox._oldScrollTop=this.objBox.scrollTop}}if(this._dload){if(this._dLoadTimer){window.clearTimeout(this._dLoadTimer)}this._dLoadTimer=window.setTimeout(function(){if(self.limit){self._askRealRows()}},500)}};this.attachToObject=function(obj){obj.appendChild(this.entBox);this.objBox.style.height=this.entBox.style.height};this.init=function(fl){if((this.isTreeGrid())&&(!this._h2)){this._aEx=new _dhtmlxArray();this._h2=new dhtmlxHierarchy();if((this._fake)&&(!this._realfake)){this._fake._h2=this._h2}this._tgc={imgURL:null}}if(!this._hstyles){return }this.editStop();this.lastClicked=null;this.resized=null;this.fldSorted=this.r_fldSorted=null;this.gridWidth=0;this.gridHeight=0;this.cellWidthPX=new Array(0);this.cellWidthPC=new Array(0);if(this.hdr.rows.length>0){this.clearAll(true)}if(this.cellType._dhx_find("tree")!=-1){this.loadedKidsHash=new Hashtable();this.loadedKidsHash.put("hashOfParents",new Hashtable())}var hdrRow=this.hdr.insertRow(0);for(var i=0;i<this.hdrLabels.length;i++){hdrRow.appendChild(document.createElement("TH"));hdrRow.childNodes[i]._cellIndex=i;hdrRow.childNodes[i].style.height="0px"}if(_isIE){hdrRow.style.position="absolute"}else{hdrRow.style.height="auto"}var hdrRow=this.hdr.insertRow(_isKHTML?2:1);hdrRow._childIndexes=new Array();var col_ex=0;for(var i=0;i<this.hdrLabels.length;i++){hdrRow._childIndexes[i]=i-col_ex;if((this.hdrLabels[i]==this.splitSign)&&(i!=0)){if(_isKHTML){hdrRow.insertCell(i-col_ex)}hdrRow.cells[i-col_ex-1].colSpan=(hdrRow.cells[i-col_ex-1].colSpan||1)+1;hdrRow.childNodes[i-col_ex-1]._cellIndex++;col_ex++;hdrRow._childIndexes[i]=i-col_ex;continue}hdrRow.insertCell(i-col_ex);hdrRow.childNodes[i-col_ex]._cellIndex=i;hdrRow.childNodes[i-col_ex]._cellIndexS=i;this.setHeaderCol(i,this.hdrLabels[i])}if(col_ex==0){hdrRow._childIndexes=null}this._cCount=this.hdrLabels.length;if(_isIE){window.setTimeout(function(){self.setSizes()},1)}if(!this.obj.firstChild){this.obj.appendChild(document.createElement("TBODY"))}var tar=this.obj.firstChild;if(!tar.firstChild){tar.appendChild(document.createElement("TR"));tar=tar.firstChild;if(_isIE){tar.style.position="absolute"}else{tar.style.height="auto"}for(var i=0;i<this.hdrLabels.length;i++){tar.appendChild(document.createElement("TH"));tar.childNodes[i].style.height="0px"}}this.setColumnIds();this._c_order=null;if(this.multiLine==-1){this.multiLine=true}if(this.multiLine!=true){this.obj.className+=" row20px"}this.sortImg.style.position="absolute";this.sortImg.style.display="none";this.sortImg.src=this.imgURL+"sort_desc.gif";this.sortImg.defLeft=0;this.entCnt.rows[0].style.display="";if(this.noHeader){this.entCnt.rows[0].style.display="none"}else{this.noHeader=false}if(this._ivizcol){this.setColHidden()}this.attachHeader();this.attachHeader(0,0,"_aFoot");this.setSizes();if(fl){this.parseXML()}this.obj.scrollTop=0;if(this.dragAndDropOff){this.dragger.addDragLanding(this.entBox,this)}if(this._initDrF){this._initD()}if(this._init_point){this._init_point()}};this.setSizes=function(fl){if((!this.hdr.rows[0])){return }if(!this.entBox.offsetWidth){if(this._sizeTime){window.clearTimeout(this._sizeTime)}this._sizeTime=window.setTimeout(function(){self.setSizes()},250);return }if(((_isFF)&&(this.entBox.style.height=="100%"))||(this._fixLater)){this.entBox.style.height=this.entBox.parentNode.clientHeight;this._fixLater=true}if(fl&&this.gridWidth==this.entBox.offsetWidth&&this.gridHeight==this.entBox.offsetHeight){return false}else{if(fl){this.gridWidth=this.entBox.offsetWidth;this.gridHeight=this.entBox.offsetHeight}}if((!this.hdrBox.offsetHeight)&&(this.hdrBox.offsetHeight>0)){this.entCnt.rows[0].cells[0].height=this.hdrBox.offsetHeight+"px"}var gridWidth=parseInt(this.entBox.offsetWidth)-(this._gcCorr||0);var gridHeight=parseInt(this.entBox.offsetHeight)-((!_isIE)?(this._sizeFix||0):0);var _isVSroll=(this.objBox.scrollHeight>this.objBox.offsetHeight);if(((!this._ahgr)&&(_isVSroll))||((this._ahgrM)&&(this._ahgrM<this.objBox.scrollHeight))){gridWidth-=(this._scrFix||(_isFF?19:16))}var len=this.hdr.rows[0].cells.length;for(var i=0;i<this._cCount;i++){if(this.cellWidthType=="px"&&this.cellWidthPX.length<len){this.cellWidthPX[i]=this.initCellWidth[i]-this._wcorr}else{if(this.cellWidthType=="%"&&this.cellWidthPC.length<len){this.cellWidthPC[i]=this.initCellWidth[i]}}if(this.cellWidthType=="%"&&this.cellWidthPC.length!=0&&this.cellWidthPC[i]){this.cellWidthPX[i]=parseInt(gridWidth*this.cellWidthPC[i]/100)}}var wcor=this.entBox.clientWidth?(this.entBox.offsetWidth-this.entBox.clientWidth):0;var summ=0;var fcols=new Array();for(var i=0;i<this._cCount;i++){if((this.initCellWidth[i]=="*")&&((!this._hrrar)||(!this._hrrar[i]))){fcols[fcols.length]=i}else{summ+=parseInt(this.cellWidthPX[i])}}if(fcols.length){var ms=Math.floor((gridWidth-summ-1-wcor)/fcols.length);if(ms<0){ms=1}for(var i=0;i<fcols.length;i++){var min=(this._drsclmW?this._drsclmW[fcols[i]]:0);this.cellWidthPX[fcols[i]]=(min?(min>ms?min:ms):ms)-this._wcorr;summ+=ms}}var summ=0;for(var i=0;i<this._cCount;i++){summ+=parseInt(this.cellWidthPX[i])}if(_isOpera){summ-=1}this.chngCellWidth();if((this._awdth)&&(this._awdth[0])){if(this.cellWidthType=="%"){this.cellWidthType="px";this.cellWidthPC=[]}var gs=(summ>this._awdth[1]?this._awdth[1]:(summ<this._awdth[2]?this._awdth[2]:summ));this.entBox.style.width=gs+((_isVSroll&&!this._ahgr)?(_isFF?20:18):0)+"px"}this.objBuf.style.width=summ+"px";if((this.ftr)&&(!this._realfake)){this.ftr.style.width=summ+"px"}this.objBuf.childNodes[0].style.width=summ+"px";this.doOnScroll(0,1);this.hdr.style.border="0px solid gray";var zheight=this.hdr.offsetHeight+(this._borderFix?this._borderFix:0);if(this.ftr){zheight+=this.ftr.offsetHeight}if(this._ahgr){if(this.objBox.scrollHeight){if(_isIE){var z2=this.objBox.scrollHeight}else{var z2=this.objBox.childNodes[0].scrollHeight}var scrfix=this.parentGrid?1:((this.objBox.offsetWidth<this.objBox.scrollWidth)?(_isFF?20:18):1);if(this._ahgrMA){z2=this.entBox.parentNode.offsetHeight-zheight-scrfix-(this._sizeFix?this._sizeFix:0)*2}if(((this._ahgrM)&&((this._ahgrF?(z2+zheight+scrfix):z2)>this._ahgrM))){gridHeight=this._ahgrM*1+(this._ahgrF?0:(zheight+scrfix))}else{gridHeight=z2+zheight+scrfix}this.entBox.style.height=gridHeight+"px"}}if(this.ftr){zheight-=this.ftr.offsetHeight}var aRow=this.entCnt.rows[1].cells[0].childNodes[0];if(!this.noHeader){aRow.style.top=(zheight-this.hdrBox.offsetHeight+((_isIE&&!window.XMLHttpRequest)?(-wcor):0))+"px"}if(this._topMb){this._topMb.style.top=(zheight||0)+"px";this._topMb.style.width=(gridWidth+20)+"px"}if(this._botMb){this._botMb.style.top=(gridHeight-3)+"px";this._botMb.style.width=(gridWidth+20)+"px"}aRow.style.height=(((gridHeight-zheight-1)<0&&_isIE)?20:(gridHeight-zheight-(this._isIE7s?2:1)))-(this.ftr?this.ftr.offsetHeight:0)+"px";if(this.ftr&&this.entBox.offsetHeight>this.ftr.offsetHeight){this.entCnt.style.height=this.entBox.offsetHeight-this.ftr.offsetHeight+"px"}if(this._dload){this._dloadSize=Math.floor(parseInt(this.entBox.offsetHeight)/20)+(_isKHTML?4:2)}};this.chngCellWidth=function(){if((_isOpera)&&(this.ftr)){this.ftr.width=this.objBox.scrollWidth+"px"}var l=this._cCount;for(var i=0;i<l;i++){this.hdr.rows[0].cells[i].style.width=this.cellWidthPX[i]+"px";this.obj.rows[0].childNodes[i].style.width=this.cellWidthPX[i]+"px";if(this.ftr){this.ftr.rows[0].cells[i].style.width=this.cellWidthPX[i]+"px"}}};this.setDelimiter=function(delim){this.delim=delim};this.setInitWidthsP=function(wp){this.cellWidthType="%";this.initCellWidth=wp.split(this.delim.replace(/px/gi,""));this._setAutoResize()};this._setAutoResize=function(){var el=window;var self=this;if(el.addEventListener){if((_isFF)&&(_FFrv<1.8)){el.addEventListener("resize",function(){if(!self.entBox){return }var z=self.entBox.style.width;self.entBox.style.width="1px";window.setTimeout(function(){self.entBox.style.width=z;self.setSizes();if(self._fake){self._fake._correctSplit()}},10)},false)}else{el.addEventListener("resize",function(){if(self.setSizes){self.setSizes()}if(self._fake){self._fake._correctSplit()}},false)}}else{if(el.attachEvent){el.attachEvent("onresize",function(){if(self._resize_timer){window.clearTimeout(self._resize_timer)}if(self.setSizes){self._resize_timer=window.setTimeout(function(){self.setSizes();if(self._fake){self._fake._correctSplit()}},500)}})}}this._setAutoResize=function(){}};this.setInitWidths=function(wp){this.cellWidthType="px";this.initCellWidth=wp.split(this.delim);if(_isFF){for(var i=0;i<this.initCellWidth.length;i++){if(this.initCellWidth[i]!="*"){this.initCellWidth[i]=parseInt(this.initCellWidth[i])-2}}}};this.enableMultiline=function(state){this.multiLine=convertStringToBoolean(state)};this.enableMultiselect=function(state){this.selMultiRows=convertStringToBoolean(state)};this.setImagePath=function(path){this.imgURL=path};this.changeCursorState=function(ev){var el=ev.target||ev.srcElement;if(el.tagName!="TD"){el=this.getFirstParentOfType(el,"TD")}if((el.tagName=="TD")&&(this._drsclmn)&&(!this._drsclmn[el._cellIndex])){return el.style.cursor="default"}var check=ev.layerX+(((!_isIE)&&(ev.target.tagName=="DIV"))?el.offsetLeft:0);if((el.offsetWidth-(ev.offsetX||(parseInt(this.getPosition(el,this.hdrBox))-check)*-1))<10){el.style.cursor="E-resize"}else{el.style.cursor="default"}if(_isOpera){this.hdrBox.scrollLeft=this.objBox.scrollLeft}};this.startColResize=function(ev){this.resized=null;var el=ev.target||ev.srcElement;if(el.tagName!="TD"){el=this.getFirstParentOfType(el,"TD")}var x=ev.clientX;var tabW=this.hdr.offsetWidth;var startW=parseInt(el.offsetWidth);if(el.tagName=="TD"&&el.style.cursor!="default"){if((this._drsclmn)&&(!this._drsclmn[el._cellIndex])){return }this.entBox.onmousemove=function(e){this.grid.doColResize(e||window.event,el,startW,x,tabW)};document.body.onmouseup=new Function("","document.getElementById('"+this.entBox.id+"').grid.stopColResize()")}};this.stopColResize=function(){this.entBox.onmousemove="";document.body.onmouseup="";this.setSizes();this.doOnScroll(0,1);this.callEvent("onResizeEnd",[this])};this.doColResize=function(ev,el,startW,x,tabW){el.style.cursor="E-resize";this.resized=el;var fcolW=startW+(ev.clientX-x);var wtabW=tabW+(ev.clientX-x);if(!(this.callEvent("onResize",[el._cellIndex,fcolW,this]))){return }if(el.colSpan>1){var a_sizes=new Array();for(var i=0;i<el.colSpan;i++){a_sizes[i]=Math.round(fcolW*this.hdr.rows[0].childNodes[el._cellIndexS+i].offsetWidth/el.offsetWidth)}for(var i=0;i<el.colSpan;i++){this._setColumnSizeR(el._cellIndexS+i*1,a_sizes[i])}}else{this._setColumnSizeR(el._cellIndex,fcolW)}this.doOnScroll(0,1);if(_isOpera){this.setSizes()}this.objBuf.childNodes[0].style.width=""};this._setColumnSizeR=function(ind,fcolW){if(fcolW>((this._drsclmW&&!this._notresize)?(this._drsclmW[ind]||10):10)){this.obj.firstChild.firstChild.childNodes[ind].style.width=fcolW+"px";this.hdr.rows[0].childNodes[ind].style.width=fcolW+"px";if(this.ftr){this.ftr.rows[0].childNodes[ind].style.width=fcolW+"px"}if(this.cellWidthType=="px"){this.cellWidthPX[ind]=fcolW}else{var gridWidth=parseInt(this.entBox.offsetWidth);if(this.objBox.scrollHeight>this.objBox.offsetHeight){gridWidth-=(this._scrFix||(_isFF?19:16))}var pcWidth=Math.round(fcolW/gridWidth*100);this.cellWidthPC[ind]=pcWidth}}};this.setSortImgState=function(state,ind,order,row){order=(order||"asc").toLowerCase();if(!convertStringToBoolean(state)){this.sortImg.style.display="none";this.fldSorted=null;return }if(order=="asc"){this.sortImg.src=this.imgURL+"sort_asc.gif"}else{this.sortImg.src=this.imgURL+"sort_desc.gif"}this.sortImg.style.display="";this.fldSorted=this.hdr.rows[0].childNodes[ind];var r=this.hdr.rows[row||1];for(var i=0;i<r.childNodes.length;i++){if(r.childNodes[i]._cellIndex==ind){this.r_fldSorted=r.childNodes[i]}}this.setSortImgPos()};this.setSortImgPos=function(ind,mode,hRowInd,el){if(!el){if(!ind){var el=this.r_fldSorted}else{var el=this.hdr.rows[hRowInd||0].cells[ind]}}if(el!=null){var pos=this.getPosition(el,this.hdrBox);var wdth=el.offsetWidth;this.sortImg.style.left=Number(pos[0]+wdth-13)+"px";this.sortImg.defLeft=parseInt(this.sortImg.style.left);this.sortImg.style.top=Number(pos[1]+5)+"px";if((!this.useImagesInHeader)&&(!mode)){this.sortImg.style.display="inline"}this.sortImg.style.left=this.sortImg.defLeft+"px"}};this.setActive=function(fl){if(arguments.length==0){var fl=true}if(fl==true){if(globalActiveDHTMLGridObject&&(globalActiveDHTMLGridObject!=this)){globalActiveDHTMLGridObject.editStop()}globalActiveDHTMLGridObject=this;this.isActive=true}else{this.isActive=false}};this._doClick=function(ev){var selMethod=0;var el=this.getFirstParentOfType(_isIE?ev.srcElement:ev.target,"TD");var fl=true;if(this.selMultiRows!=false){if(ev.shiftKey&&this.row!=null){selMethod=1}if(ev.ctrlKey||ev.metaKey){selMethod=2}}this.doClick(el,fl,selMethod)};this._doContClick=function(ev){var el=this.getFirstParentOfType(_isIE?ev.srcElement:ev.target,"TD");if((!el)||(typeof (el.parentNode.idd)=="undefined")){return true}if(ev.button==2||(_isKHTML&&ev.ctrlKey)){if(!this.callEvent("onRightClick",[el.parentNode.idd,el._cellIndex,ev])){var z=function(e){document.body.oncontextmenu=Function("return true;");(e||event).cancelBubble=true;return false};if(_isIE){ev.srcElement.oncontextmenu=z}else{if(!_isMacOS){document.body.oncontextmenu=z}}return false}if(this._ctmndx){if(!(this.callEvent("onBeforeContextMenu",[el.parentNode.idd,el._cellIndex,this]))){return true}el.contextMenuId=el.parentNode.idd+"_"+el._cellIndex;el.contextMenu=this._ctmndx;el.a=this._ctmndx._contextStart;if(_isIE){ev.srcElement.oncontextmenu=function(){event.cancelBubble=true;return false}}el.a(el,ev);el.a=null}}else{if(this._ctmndx){this._ctmndx._contextEnd()}}return true};this.doClick=function(el,fl,selMethod,show){var psid=this.row?this.row.idd:0;this.setActive(true);if(!selMethod){selMethod=0}if(this.cell!=null){this.cell.className=this.cell.className.replace(/cellselected/g,"")}if(el.tagName=="TD"&&(this.rowsCol._dhx_find(this.rowsAr[el.parentNode.idd])!=-1||this.rowsBuffer[0]._dhx_find(el.parentNode.idd)!=-1||this.isTreeGrid())){if(this.checkEvent("onSelectStateChanged")){var initial=this.getSelectedId()}var prow=this.row;if(selMethod==0){this.clearSelection()}else{if(selMethod==1){var elRowIndex=this.rowsCol._dhx_find(el.parentNode);var lcRowIndex=this.rowsCol._dhx_find(this.lastClicked);if(elRowIndex>lcRowIndex){var strt=lcRowIndex;var end=elRowIndex}else{var strt=elRowIndex;var end=lcRowIndex}for(var i=0;i<this.rowsCol.length;i++){if((i>=strt&&i<=end)){if(this.rowsCol[i]&&(!this.rowsCol[i]._sRow)){if(this.rowsCol[i].className.indexOf("rowselected")==-1&&this.callEvent("onBeforeSelect",[this.rowsCol[i].idd,psid])){this.rowsCol[i].className+=" rowselected";this.selectedRows[this.selectedRows.length]=this.rowsCol[i]}}else{this.clearSelection();return this.doClick(el,fl,0,show)}}}}else{if(selMethod==2){if(el.parentNode.className.indexOf("rowselected")!=-1){el.parentNode.className=el.parentNode.className.replace(/rowselected/g,"");this.selectedRows._dhx_removeAt(this.selectedRows._dhx_find(el.parentNode));var skipRowSelection=true}}}}this.editStop();this.cell=el;if((prow==el.parentNode)&&(this._chRRS)){fl=false}if(typeof (el.parentNode.idd)=="undefined"){return true}this.row=el.parentNode;if((!skipRowSelection)&&(!this.row._sRow)){if(this.callEvent("onBeforeSelect",[this.row.idd,psid])){this.row.className+=" rowselected";if(this.selectedRows._dhx_find(this.row)==-1){this.selectedRows[this.selectedRows.length]=this.row}}else{this.row=prow}}if(this.selBasedOn=="cell"){if(this.cell.parentNode.className.indexOf("rowselected")!=-1){this.cell.className=this.cell.className.replace(/cellselected/g,"")+" cellselected"}}if(selMethod!=1){if(!this.row){return }}this.lastClicked=el.parentNode;var rid=this.row.idd;var cid=this.cell._cellIndex;if(fl&&typeof (rid)!="undefined"){self.onRowSelectTime=setTimeout(function(){self.callEvent("onRowSelect",[rid,cid])},100)}if(this.checkEvent("onSelectStateChanged")){var afinal=this.getSelectedId();if(initial!=afinal){this.callEvent("onSelectStateChanged",[afinal])}}}this.isActive=true;if(show!==false){this.moveToVisible(this.cell)}};this.selectAll=function(){this.clearSelection();this.selectedRows=dhtmlxArray([].concat(this.rowsCol));if(this.selectedRows.length){this.row=this.selectedRows[0];this.cell=this.row.cells[0]}for(var i=0;i<this.rowsCol.length;i++){this.rowsCol[i].className+=" rowselected"}if((this._fake)&&(!this._realfake)){this._fake.selectAll()}};this.selectCell=function(r,cInd,fl,preserve,edit,show){if(!fl){fl=false}if(typeof (r)!="object"){r=this.rowsCol[r]}if(r._childIndexes){var c=r.childNodes[r._childIndexes[cInd]]}else{var c=r.childNodes[cInd]}if(preserve){this.doClick(c,fl,3,show)}else{this.doClick(c,fl,0,show)}if(edit){this.editCell()}};this.moveToVisible=function(cell_obj,onlyVScroll){try{var distance=cell_obj.offsetLeft+cell_obj.offsetWidth+20;if(distance>(this.objBox.offsetWidth+this.objBox.scrollLeft)){var scrollLeft=distance-this.objBox.offsetWidth}else{if(cell_obj.offsetLeft<this.objBox.scrollLeft){var scrollLeft=cell_obj.offsetLeft-5}}if((scrollLeft)&&(!onlyVScroll)){this.objBox.scrollLeft=scrollLeft}var distance=cell_obj.offsetTop+cell_obj.offsetHeight+20;if(distance>(this.objBox.offsetHeight+this.objBox.scrollTop)){var scrollTop=distance-this.objBox.offsetHeight}else{if(cell_obj.offsetTop<this.objBox.scrollTop){var scrollTop=cell_obj.offsetTop-5}}if(scrollTop){this.objBox.scrollTop=scrollTop}}catch(er){}};this.editCell=function(){this.editStop();if((this.isEditable!=true)||(!this.cell)){return false}var c=this.cell;if(c.parentNode._locked){return false}this.editor=this.cells4(c);if(this.editor!=null){if(this.editor.isDisabled()){this.editor=null;return false}if(this.callEvent("onEditCell",[0,this.row.idd,this.cell._cellIndex])!=false&&this.editor.edit){this._Opera_stop=(new Date).valueOf();c.className+=" editable";this.editor.edit();this.callEvent("onEditCell",[1,this.row.idd,this.cell._cellIndex])}else{this.editor=null}}};this.editStop=function(mode){if(_isOpera){if(this._Opera_stop){if((this._Opera_stop*1+50)>(new Date).valueOf()){return }this._Opera_stop=null}}if(this.editor&&this.editor!=null){this.editor.cell.className=this.editor.cell.className.replace("editable","");if(mode){var t=this.editor.val;this.editor.detach();this.editor.setValue(t);this.editor=null;return }if(this.editor.detach()){this.cell.wasChanged=true}var g=this.editor;this.editor=null;var z=this.callEvent("onEditCell",[2,this.row.idd,this.cell._cellIndex,g.getValue(),g.val]);if((typeof (z)=="string")||(typeof (z)=="number")){g[g.setImage?"setLabel":"setValue"](z)}else{if(!z){g[g.setImage?"setLabel":"setValue"](g.val)}}}};this._nextRowCell=function(row,dir,pos){row=this._nextRow(this.rowsCol._dhx_find(row),dir);if(!row){return null}return row.childNodes[row._childIndexes?row._childIndexes[pos]:pos]};this._getNextCell=function(acell,dir,i){acell=acell||this.cell;var arow=this.cell.parentNode;if(this._tabOrder){i=this._tabOrder[acell._cellIndex];if(typeof i!="undefined"){if(i<0){acell=this._nextRowCell(arow,dir,Math.abs(i)-1)}else{acell=arow.childNodes[i]}}}else{var i=acell._cellIndex+dir;if(i>=0&&i<this._cCount){if(arow._childIndexes){i=arow._childIndexes[acell._cellIndex]+dir}acell=arow.childNodes[i]}else{acell=this._nextRowCell(arow,dir,(dir==1?0:(this._cCount-1)))}}if(!acell){return null}if(acell.style.display!="none"){return acell}return this._getNextCell(acell,dir)};this._nextRow=function(ind,dir){var r=this.rowsCol[ind+dir];if(r&&r.style.display=="none"){return this._nextRow(ind+dir,dir)}return r};this.scrollPage=function(dir){var new_ind=Math.floor((this.getRowIndex(this.row.idd)||0)+(dir)*this.objBox.offsetHeight/(this._srdh||20));if(new_ind<0){new_ind=0}if(this._dload&&(!this.rowsCol[new_ind])){this._askRealRows(new_ind,function(){try{self.selectCell(new_ind,(this.cell?this.cell._cellIndex:0),true)}catch(e){}})}else{if(new_ind>=this.rowsCol.length){new_ind=this.rowsCol.length-1}this.selectCell(new_ind,this.cell._cellIndex,true)}};this.doKey=function(ev){if(!ev){return true}if((ev.target||ev.srcElement).value!==window.undefined){var zx=(ev.target||ev.srcElement);if((!zx.parentNode)||(zx.parentNode.className.indexOf("editable")==-1)){return true}}if((globalActiveDHTMLGridObject)&&(this!=globalActiveDHTMLGridObject)){return globalActiveDHTMLGridObject.doKey(ev)}if(this.isActive==false){return true}if(this._htkebl){return true}if(!this.callEvent("onKeyPress",[ev.keyCode,ev.ctrlKey,ev.shiftKey,ev])){return false}var code="k"+ev.keyCode+"_"+(ev.ctrlKey?1:0)+"_"+(ev.shiftKey?1:0);if(this.cell){if(this._key_events[code]){if(false===this._key_events[code].call(this)){return true}if(ev.preventDefault){ev.preventDefault()}ev.cancelBubble=true;return false}if(this._key_events.k_other){this._key_events.k_other.call(this,ev)}}return true};this.getRow=function(cell){if(!cell){cell=window.event.srcElement}if(cell.tagName!="TD"){cell=cell.parentElement}r=cell.parentElement;if(this.cellType[cell._cellIndex]=="lk"){eval(this.onLink+"('"+this.getRowId(r.rowIndex)+"',"+cell._cellIndex+")")}this.selectCell(r,cell._cellIndex,true)};this.selectRow=function(r,fl,preserve,show){if(typeof (r)!="object"){r=this.rowsCol[r]}this.selectCell(r,0,fl,preserve,false,show)};this.sortRows=function(col,type,order){order=(order||"asc").toLowerCase();type=(type||this.fldSort[col]);while(this.addRowsFromBuffer(true)){}if(this.cellType._dhx_find("tree")!=-1){return this.sortTreeRows(col,type,order)}var self=this;var arrTS=new Array();var atype=this.cellType[col];var amet="getValue";if(atype=="link"){amet="getContent"}if(atype=="dhxCalendar"||atype=="dhxCalendarA"){amet="getDate"}for(var i=0;i<this.rowsCol.length;i++){arrTS[this.rowsCol[i].idd]=this.cells3(this.rowsCol[i],col)[amet]()}this._sortRows(col,type,order,arrTS)};this._sortCore=function(col,type,order,arrTS,s){var sort="sort";if(this._sst){s.stablesort=this.rowsCol.stablesort;sort="stablesort"}if(type.length>4){type=window[type]}if(type=="cus"){s[sort](function(a,b){return self._customSorts[col](arrTS[a.idd],arrTS[b.idd],order,a.idd,b.idd)})}else{if(typeof (type)=="function"){s[sort](function(a,b){return type(arrTS[a.idd],arrTS[b.idd],order,a.idd,b.idd)})}else{if(type=="str"){s[sort](function(a,b){if(order=="asc"){return arrTS[a.idd]>arrTS[b.idd]?1:-1}else{return arrTS[a.idd]<arrTS[b.idd]?1:-1}})}else{if(type=="int"){s[sort](function(a,b){var aVal=parseFloat(arrTS[a.idd]);aVal=isNaN(aVal)?-99999999999999:aVal;var bVal=parseFloat(arrTS[b.idd]);bVal=isNaN(bVal)?-99999999999999:bVal;if(order=="asc"){return aVal-bVal}else{return bVal-aVal}})}else{if(type=="date"){s[sort](function(a,b){var aVal=Date.parse(arrTS[a.idd])||(Date.parse("01/01/1900"));var bVal=Date.parse(arrTS[b.idd])||(Date.parse("01/01/1900"));if(order=="asc"){return aVal-bVal}else{return bVal-aVal}})}}}}}};this._sortRows=function(col,type,order,arrTS){this._sortCore(col,type,order,arrTS,this.rowsCol);if(this.pagingOn){this.changePage(this.currentPage);this.callEvent("onGridReconstructed",[])}else{var tb=(_isKHTML)?this.obj:this.obj.rows[0].parentNode;for(var i=0;i<this.rowsCol.length;i++){if(this.rowsCol[i]!=this.obj._rows(i)){tb.insertBefore(this.rowsCol[i],this.obj._rows(i))}}}this.callEvent("onGridReconstructed",[])};this.setXMLAutoLoading=function(filePath,bufferSize){if(arguments.length==0){return(this._xmlaR=true)}this.recordsNoMore=false;this.xmlFileUrl=filePath;this.rowsBufferOutSize=bufferSize||(this.rowsBufferOutSize==0?40:this.rowsBufferOutSize)};this.enableBuffering=function(bufferSize){this.rowsBufferOutSize=bufferSize||(this.rowsBufferOutSize==0?40:this.rowsBufferOutSize)};this.addRowsFromBuffer=function(stopBeforeServerCall){if(this.rowsBuffer[0].length==0){if(!this.recordsNoMore&&!stopBeforeServerCall){if(this.limit&&this.rowsCol.length>=this.limit){return false}if((this.xmlFileUrl!="")&&(!this._startXMLLoading)){this._startXMLLoading=true;this.loadXML(this.xmlFileUrl)}}else{return false}}var cnt=Math.min(this.rowsBufferOutSize,this.rowsBuffer[0].length);for(var i=0;i<cnt;i++){if(this.rowsBuffer[1][0].tagName=="TR"){this._insertRowAt(this.rowsBuffer[1][0],-1,this.pagingOn)}else{var rowNode=this.rowsBuffer[1][0];var r=this.createRowFromXMLTag(rowNode);this._insertRowAt(r,-1,this.pagingOn);this._postRowProcessing(r,rowNode)}this.rowsBuffer[0]._dhx_removeAt(0);this.rowsBuffer[1]._dhx_removeAt(0)}return this.rowsBuffer[0].length!=0};this.createRowFromXMLTag=function(rowNode){if(rowNode.tagName=="TR"){return rowNode}var tree=this.cellType._dhx_find("tree");var rId=rowNode.getAttribute("id");this.rowsAr[rId]=this._prepareRow(rId);var r=this._fillRowFromXML(this.rowsAr[rId],rowNode,tree,null);return r};this.setMultiselect=function(fl){this.selMultiRows=convertStringToBoolean(fl)};this.wasDblClicked=function(ev){var el=this.getFirstParentOfType(_isIE?ev.srcElement:ev.target,"TD");if(el){var rowId=el.parentNode.idd;return this.callEvent("onRowDblClicked",[rowId,el._cellIndex])}};this._onHeaderClick=function(e,el){var that=this.grid;el=el||that.getFirstParentOfType(_isIE?event.srcElement:e.target,"TD");if(this.grid.resized==null){if(!(this.grid.callEvent("onHeaderClick",[el._cellIndexS,(e||window.event)]))){return false}that.sortField(el._cellIndexS,false,el)}};this.deleteSelectedItem=function(){this.deleteSelectedRows()};this.deleteSelectedRows=function(){var num=this.selectedRows.length;if(num==0){return }var tmpAr=this.selectedRows;this.selectedRows=new dhtmlxArray(0);for(var i=num-1;i>=0;i--){var node=tmpAr[i];if(!this.deleteRow(node.idd,node)){this.selectedRows[this.selectedRows.length]=node}else{if(node==this.row){var ind=i}}}if(ind){try{if(ind+1>this.rowsCol.length){ind--}this.selectCell(ind,0,true)}catch(er){this.row=null;this.cell=null}}};this.getSelectedRowId=function(){return this.getSelectedId()};this.getSelectedId=function(){var selAr=new Array(0);var uni={};for(var i=0;i<this.selectedRows.length;i++){var id=this.selectedRows[i].idd;if(uni[id]){continue}selAr[selAr.length]=id;uni[id]=true}if(selAr.length==0){return null}else{return selAr.join(this.delim)}};this.getSelectedCellIndex=function(){if(this.cell!=null){return this.cell._cellIndex}else{return -1}};this.getColWidth=function(ind){return parseInt(this.cellWidthPX[ind])+((_isFF)?2:0)};this.setColWidth=function(ind,value){if(this.cellWidthType=="px"){this.cellWidthPX[ind]=parseInt(value)}else{this.cellWidthPC[ind]=parseInt(value)}this.setSizes()};this.getRowById=function(id){var row=this.rowsAr[id];if(row){return row}else{if(this._dload){var ind=this.rowsBuffer[0]._dhx_find(id);if(ind>=0){this._askRealRows(ind);return this.getRowById(id)}}else{if(this.pagingOn){var ind=this.rowsBuffer[0]._dhx_find(id);if(ind>=0){var r=this.createRowFromXMLTag(this.rowsBuffer[1][ind]);this._postRowProcessing(r,this.rowsBuffer[1][ind]);this.rowsBuffer[1][ind]=r;return r}else{return null}}else{if(this._slowParse){return this._seekAndDeploy(id)}}}}return null};this.getRowByIndex=function(ind){if(this.rowsCol.length<=ind){if((this.rowsCol.length+this.rowsBuffer[0].length)<=ind){return null}else{var indInBuf=ind-this.rowsCol.length-1;var r=this.createRowFromXMLTag(this.rowsBuffer[1][indInBuf]);return r}}else{return this.rowsCol[ind]}};this.getRowIndex=function(row_id){var ind=this.rowsCol._dhx_find(this.getRowById(row_id));if(ind!=-1){return ind}else{ind=this.rowsBuffer[0]._dhx_find(row_id);if(ind!=-1){return ind+this.rowsCol.length}return -1}};this.getRowId=function(ind){var z=this.rowsCol[parseInt(ind)];if(z){return z.idd}return(this.rowsBuffer[0][this._dload?ind:(ind-this.rowsCol.length)]||null)};this.setRowId=function(ind,row_id){var r=this.rowsCol[ind];this.changeRowId(r.idd,row_id)};this.changeRowId=function(oldRowId,newRowId){if(oldRowId==newRowId){return }var row=this.rowsAr[oldRowId];row.idd=newRowId;if(this.UserData[oldRowId]){this.UserData[newRowId]=this.UserData[oldRowId];this.UserData[oldRowId]=null}if(this._h2&&this._h2.get[oldRowId]){this._h2.get[newRowId]=this._h2.get[oldRowId];this._h2.get[newRowId].id=newRowId;delete this._h2.get[oldRowId]}if(this.rowsBuffer[0]){var ind=this.rowsBuffer[0]._dhx_find(oldRowId);if(ind!=-1){this.rowsBuffer[0][ind]==newRowId}}this.rowsAr[oldRowId]=null;this.rowsAr[newRowId]=row;for(var i=0;i<row.childNodes.length;i++){if(row.childNodes[i]._code){row.childNodes[i]._code=this._compileSCL(row.childNodes[i]._val,row.childNodes[i])}}};this.setColumnIds=function(ids){if(ids){this.columnIds=ids.split(this.delim)}if(this.hdr.rows.length>0){if(this.hdr.rows[0].cells.length>=this.columnIds.length){for(var i=0;i<this.columnIds.length;i++){this.hdr.rows[0].cells[i].column_id=this.columnIds[i]}}}};this.setColumnId=function(ind,id){this.columnIds[ind]=this.hdr.rows[0].cells[ind].column_id=id};this.getColIndexById=function(id){for(var i=0;i<this.hdr.rows[0].cells.length;i++){if(this.hdr.rows[0].cells[i].column_id==id){return i}}};this.getColumnId=function(cin){return this.hdr.rows[0].cells[cin].column_id};this.getColumnLabel=function(cin,rin){return this.getHeaderCol(cin,rin)};this.getHeaderCol=function(cin,ind){var z=this.hdr.rows[(ind||0)+1];var n=z.cells[z._childIndexes?z._childIndexes[parseInt(cin)]:cin];return(_isIE?n.innerText:n.textContent)};this.setRowTextBold=function(row_id){this.getRowById(row_id).style.fontWeight="bold"};this.setRowTextStyle=function(row_id,styleString){var r=this.getRowById(row_id);for(var i=0;i<r.childNodes.length;i++){var pfix="";if((this._hrrar)&&(this._hrrar[i])){pfix="display:none;"}if(_isIE){r.childNodes[i].style.cssText=pfix+"width:"+r.childNodes[i].style.width+";"+styleString}else{r.childNodes[i].style.cssText=pfix+"width:"+r.childNodes[i].style.width+";"+styleString}}};this.setRowColor=function(row_id,color){var r=this.getRowById(row_id);for(var i=0;i<r.childNodes.length;i++){r.childNodes[i].bgColor=color}};this.setCellTextStyle=function(row_id,ind,styleString){var r=this.getRowById(row_id);if(!r){return }if(ind<r.childNodes.length){var pfix="";if((this._hrrar)&&(this._hrrar[ind])){pfix="display:none;"}if(_isIE){r.childNodes[ind].style.cssText=pfix+"width:"+r.childNodes[ind].style.width+";"+styleString}else{r.childNodes[ind].style.cssText=pfix+"width:"+r.childNodes[ind].style.width+";"+styleString}}};this.setRowTextNormal=function(row_id){this.getRowById(row_id).style.fontWeight="normal"};this.doesRowExist=function(row_id){if(this.getRowById(row_id)!=null){return true}else{return false}};this.isItemExists=function(row_id){return this.doesRowExist(row_id)};this.getRowsNum=function(){if(this._dload){return this.limit}return this.rowsCol.length+this.rowsBuffer[0].length};this.getColumnsNum=function(){return this.hdr.rows[0].cells.length};this.getColumnCount=function(){return this.hdr.rows[0].cells.length};this.moveRowUp=function(row_id){var r=this.getRowById(row_id);if(this.isTreeGrid()){return this.moveRowUDTG(row_id,-1)}var rInd=this.rowsCol._dhx_find(r);if((r.previousSibling)&&(rInd!=0)){r.parentNode.insertBefore(r,r.previousSibling);this.rowsCol._dhx_swapItems(rInd,rInd-1);this.setSizes();if(this._cssEven){this._fixAlterCss(rInd-1)}}};this.moveRowDown=function(row_id){var r=this.getRowById(row_id);if(this.isTreeGrid()){return this.moveRowUDTG(row_id,1)}var rInd=this.rowsCol._dhx_find(r);if(r.nextSibling){this.rowsCol._dhx_swapItems(rInd,rInd+1);if(r.nextSibling.nextSibling){r.parentNode.insertBefore(r,r.nextSibling.nextSibling)}else{r.parentNode.appendChild(r)}this.setSizes();if(this._cssEven){this._fixAlterCss(rInd)}}};this.cellById=function(row_id,col){return this.cells(row_id,col)};this.cells=function(row_id,col){if(arguments.length==0){return this.cells4(this.cell)}else{var c=this.getRowById(row_id)}if(!c&&!window.eXcell_math){dhtmlxError.throwError("cell","Row not exists",[row_id,col])}var cell=(c._childIndexes?c.childNodes[c._childIndexes[col]]:c.childNodes[col]);return this.cells4(cell)};this.cellByIndex=function(row_index,col){return this.cells2(row_index,col)};this.cells2=function(row_index,col){var c=this.rowsCol[parseInt(row_index)];if(!c&&!window.eXcell_math){dhtmlxError.throwError("cell","Row not exists",[row_id,col])}var cell=(c._childIndexes?c.childNodes[c._childIndexes[col]]:c.childNodes[col]);return this.cells4(cell)};this.cells3=function(row,col){var cell=(row._childIndexes?row.childNodes[row._childIndexes[col]]:row.childNodes[col]);return this.cells4(cell)};this.cells4=function(cell){var type=window["eXcell_"+(cell._cellType||this.cellType[cell._cellIndex])];if(type){return new type(cell)}};this.cells5=function(cell){var type=cell._cellType||this.cellType[cell._cellIndex];if(!this._ecache[type]){this._ecache[type]=eval("new eXcell_"+type+"(cell)")}this._ecache[type].cell=cell;return this._ecache[type]};this.dma=function(mode){if(!this._ecache){this._ecache={}}if(mode&&!this._dma){this._dma=this.cells4;this.cells4=this.cells5}else{if(!mode&&this._dma){this.cells4=this._dma;this._dma=null}}};this.getCombo=function(col_ind){if(!this.combos[col_ind]){this.combos[col_ind]=new dhtmlXGridComboObject()}return this.combos[col_ind]};this.setUserData=function(row_id,name,value){try{if(row_id==""){row_id="gridglobaluserdata"}if(!this.UserData[row_id]){this.UserData[row_id]=new Hashtable()}this.UserData[row_id].put(name,value)}catch(er){alert("UserData Error:"+er.description)}};this.getUserData=function(row_id,name){this.getRowById(row_id);if(row_id==""){row_id="gridglobaluserdata"}var z=this.UserData[row_id];return(z?z.get(name):"")};this.setEditable=function(fl){this.isEditable=convertStringToBoolean(fl)};this.setSelectedRow=function(row_id,multiFL,show,call){if(!call){call=false}this.selectCell(this.getRowById(row_id),0,call,multiFL,false,show)};this.clearSelection=function(){this.editStop();for(var i=0;i<this.selectedRows.length;i++){var r=this.rowsAr[this.selectedRows[i].idd];if(r){r.className=r.className.replace(/rowselected/g,"")}}this.selectedRows=new dhtmlxArray(0);this.row=null;if(this.cell!=null){this.cell.className=this.cell.className.replace(/cellselected/g,"");this.cell=null}};this.copyRowContent=function(from_row_id,to_row_id){var frRow=this.getRowById(from_row_id);if(!this.isTreeGrid()){for(var i=0;i<frRow.cells.length;i++){this.cells(to_row_id,i).setValue(this.cells(from_row_id,i).getValue())}}else{this._copyTreeGridRowContent(frRow,from_row_id,to_row_id)}if(!isIE()){this.getRowById(from_row_id).cells[0].height=frRow.cells[0].offsetHeight}};this.setColumnLabel=function(c,label,ind){this.setHeaderCol(c,label,ind)};this.setHeaderCol=function(c,label,ind){var z=this.hdr.rows[ind||1];var col=(z._childIndexes?z._childIndexes[c]:c);if(!this.useImagesInHeader){var hdrHTML="<div class='hdrcell'>";if(label.indexOf("img:[")!=-1){var imUrl=label.replace(/.*\[([^>]+)\].*/,"$1");label=label.substr(label.indexOf("]")+1,label.length);hdrHTML+="<img width='18px' height='18px' align='absmiddle' src='"+imUrl+"' hspace='2'>"}hdrHTML+=label;hdrHTML+="</div>";z.cells[col].innerHTML=hdrHTML;if(this._hstyles[col]){z.cells[col].style.cssText=this._hstyles[col]}}else{z.cells[col].style.textAlign="left";z.cells[col].innerHTML="<img src='"+this.imgURL+""+label+"' onerror='this.src = \""+this.imgURL+"imageloaderror.gif\"'>";var a=new Image();a.src=this.imgURL+""+label.replace(/(\.[a-z]+)/,".desc$1");this.preloadImagesAr[this.preloadImagesAr.length]=a;var b=new Image();b.src=this.imgURL+""+label.replace(/(\.[a-z]+)/,".asc$1");this.preloadImagesAr[this.preloadImagesAr.length]=b}if((label||"").indexOf("#")!=-1){var t=label.match(/(^|{)#([^}]+)(}|$)/);if(t){var tn="_in_header_"+t[2];if(this[tn]){this[tn]((this.forceDivInHeader?z.cells[col].firstChild:z.cells[col]),col,label.split(t[0]))}}}};this.clearAll=function(header){if(this._h2){this._h2=new dhtmlxHierarchy();if(this._fake){if(this._realfake){this._h2=this._fake._h2}else{this._fake._h2=this._h2}}}this.limit=this._limitC=0;this.editStop();if(this._dLoadTimer){window.clearTimeout(this._dLoadTimer)}if(this._dload){this.objBox.scrollTop=0;this.limit=this._limitC||0;this._initDrF=true}var len=this.rowsCol.length;if(this.loadedKidsHash!=null){this.loadedKidsHash.clear();this.loadedKidsHash.put("hashOfParents",new Hashtable())}len=this.obj._rowslength();for(var i=len-1;i>=0;i--){var t_r=this.obj._rows(i);t_r.parentNode.removeChild(t_r)}if(header&&this.obj.rows[0]){this.obj.rows[0].parentNode.removeChild(this.obj.rows[0]);for(var i=this.hdr.rows.length-1;i>=0;i--){var t_r=this.hdr.rows[i];t_r.parentNode.removeChild(t_r)}if(this.ftr){this.ftr.parentNode.removeChild(this.ftr);this.ftr=null}this._aHead=this.ftr=this._aFoot=null;this._hrrar=[]}this.row=null;this.cell=null;this.rowsCol=new dhtmlxArray(0);this.rowsAr=new Array(0);this.rowsBuffer=new Array(new dhtmlxArray(0),new dhtmlxArray(0));this.UserData=new Array(0);this.selectedRows=new dhtmlxArray(0);if(this.pagingOn){this.xmlFileUrl="";this.recordsNoMore=null;this.changePage(1)}if(this._contextCallTimer){window.clearTimeout(this._contextCallTimer)}if(this._sst){this.enableStableSorting(true)}this.setSortImgState(false);this.setSizes();this.callEvent("onClearAll",[])};this.sortField=function(ind,repeatFl,r_el){if(this.getRowsNum()==0){return false}var el=this.hdr.rows[0].cells[ind];if(!el){return }if(el.tagName=="TH"&&(this.fldSort.length-1)>=el._cellIndex&&this.fldSort[el._cellIndex]!="na"){if((((this.sortImg.src.indexOf("_desc.gif")==-1)&&(!repeatFl))||((this.sortImg.style.filter!="")&&(repeatFl)))&&(this.fldSorted==el)){var sortType="des"}else{var sortType="asc"}if(!this.callEvent("onBeforeSorting",[ind,this,sortType])){return }this.sortImg.src=this.imgURL+"sort_"+(sortType=="asc"?"asc":"desc")+".gif";if(this.useImagesInHeader){var cel=this.hdr.rows[1].cells[el._cellIndex].firstChild;if(this.fldSorted!=null){var celT=this.hdr.rows[1].cells[this.fldSorted._cellIndex].firstChild;celT.src=celT.src.replace(/\.[ascde]+\./,".")}cel.src=cel.src.replace(/(\.[a-z]+)/,"."+sortType+"$1")}this.sortRows(el._cellIndex,this.fldSort[el._cellIndex],sortType);this.fldSorted=el;this.r_fldSorted=r_el;var c=this.hdr.rows[1];var c=r_el.parentNode;var real_el=c._childIndexes?c._childIndexes[el._cellIndex]:el._cellIndex;this.setSortImgPos(false,false,false,r_el)}this.callEvent("onAfterSorting",[])};this.setCustomSorting=function(func,col){if(!this._customSorts){this._customSorts=new Array()}this._customSorts[col]=(typeof (func)=="string")?eval(func):func;this.fldSort[col]="cus"};this.enableHeaderImages=function(fl){this.useImagesInHeader=fl};this.setHeader=function(hdrStr,splitSign,styles){if(typeof (hdrStr)!="object"){var arLab=this._eSplit(hdrStr)}else{arLab=[].concat(hdrStr)}var arWdth=new Array(0);var arTyp=new dhtmlxArray(0);var arAlg=new Array(0);var arVAlg=new Array(0);var arSrt=new Array(0);for(var i=0;i<arLab.length;i++){arWdth[arWdth.length]=Math.round(100/arLab.length);arTyp[arTyp.length]="ed";arAlg[arAlg.length]="left";arVAlg[arVAlg.length]="";arSrt[arSrt.length]="na"}this.splitSign=splitSign||"#cspan";this.hdrLabels=arLab;this.cellWidth=arWdth;this.cellType=arTyp;this.cellAlign=arAlg;this.cellVAlign=arVAlg;this.fldSort=arSrt;this._hstyles=styles||[]};this._eSplit=function(str){if(![].push){return str.split(this.delim)}var a="r"+(new Date()).valueOf();var z=this.delim.replace(/([\|\+\*\^])/g,"\\$1");return(str||"").replace(RegExp(z,"g"),a).replace(RegExp("\\\\"+a,"g"),this.delim).split(a)};this.getColType=function(cInd){return this.cellType[cInd]};this.getColTypeById=function(cID){return this.cellType[this.getColIndexById(cID)]};this.setColTypes=function(typeStr){this.cellType=dhtmlxArray(typeStr.split(this.delim));this._strangeParams=new Array();for(var i=0;i<this.cellType.length;i++){if((this.cellType[i].indexOf("[")!=-1)){var z=this.cellType[i].split(/[\[\]]+/g);this.cellType[i]=z[0];this.defVal[i]=z[1];if(z[1].indexOf("=")==0){this.cellType[i]="math";this._strangeParams[i]=z[0]}}}};this.setColSorting=function(sortStr){this.fldSort=sortStr.split(this.delim);for(var i=0;i<this.fldSort.length;i++){if(((this.fldSort[i]).length>4)&&(typeof (window[this.fldSort[i]])=="function")){if(!this._customSorts){this._customSorts=new Array()}this._customSorts[i]=window[this.fldSort[i]];this.fldSort[i]="cus"}}};this.setColAlign=function(alStr){this.cellAlign=alStr.split(this.delim)};this.setColVAlign=function(valStr){this.cellVAlign=valStr.split(this.delim)};this.setMultiLine=function(fl){if(fl==true){this.multiLine=-1}};this.setNoHeader=function(fl){if(convertStringToBoolean(fl)==true){this.noHeader=true}};this.showRow=function(rowID){if(this.pagingOn){if(this.rowsAr[rowID]){this.changePage(Math.floor(this.getRowIndex(rowID)/this.rowsBufferOutSize)+1)}else{while((!this.rowsAr[rowID])&&(this.rowsBuffer[0].length>0||!this.recordsNoMore)){this.changePage(this.currentPage+1)}}}var c=this.getRowById(rowID).cells[0];while(c&&c.style.display=="none"){c=c.nextSibling}if(c){this.moveToVisible(c,true)}};this.setStyle=function(ss_header,ss_grid,ss_selCell,ss_selRow){this.ssModifier=[ss_header,ss_grid,ss_selCell,ss_selCell,ss_selRow];var prefs=["#"+this.entBox.id+" table.hdr td","#"+this.entBox.id+" table.obj td","#"+this.entBox.id+" table.obj tr.rowselected td.cellselected","#"+this.entBox.id+" table.obj td.cellselected","#"+this.entBox.id+" table.obj tr.rowselected td"];for(var i=0;i<prefs.length;i++){if(this.ssModifier[i]){if(_isIE){this.styleSheet[0].addRule(prefs[i],this.ssModifier[i])}else{this.styleSheet[0].insertRule(prefs[i]+" { "+this.ssModifier[i]+" } ",0)}}}};this.setColumnColor=function(clr){this.columnColor=clr.split(this.delim)};this.enableAlterCss=function(cssE,cssU,perLevel,levelUnique){if(cssE||cssU){this.setOnGridReconstructedHandler(function(){if(!this._cssSP){this._fixAlterCss()}})}this._cssSP=perLevel;this._cssSU=levelUnique;this._cssEven=cssE;this._cssUnEven=cssU};this._fixAlterCss=function(ind){if(this._cssSP&&this.isTreeGrid()){return this._fixAlterCssTG(ind)}ind=ind||0;var j=ind;for(var i=ind;i<this.rowsCol.length;i++){if(!this.rowsCol[i]){continue}if(this.rowsCol[i].style.display!="none"){if(this.rowsCol[i].className.indexOf("rowselected")!=-1){if(j%2==1){this.rowsCol[i].className=this._cssUnEven+" rowselected"+(this.rowsCol[i]._css||"")}else{this.rowsCol[i].className=this._cssEven+" rowselected"+(this.rowsCol[i]._css||"")}}else{if(j%2==1){this.rowsCol[i].className=this._cssUnEven+(this.rowsCol[i]._css||"")}else{this.rowsCol[i].className=this._cssEven+(this.rowsCol[i]._css||"")}}j++}}};this.clearChangedState=function(){for(var i=0;i<this.rowsCol.length;i++){var row=this.rowsCol[i];var cols=row.childNodes.length;for(var j=0;j<cols;j++){row.childNodes[j].wasChanged=false}}};this.getChangedRows=function(){var res=new Array();this.forEachRow(function(id){var row=this.rowsAr[id];var cols=row.childNodes.length;for(var j=0;j<cols;j++){if(row.childNodes[j].wasChanged){res[res.length]=row.idd;break}}});return res.join(this.delim)};this._sUDa=false;this._sAll=false;this.setSerializationLevel=function(userData,fullXML,config,changedAttr,onlyChanged,asCDATA){this._sUDa=userData;this._sAll=fullXML;this._sConfig=config;this._chAttr=changedAttr;this._onlChAttr=onlyChanged;this._asCDATA=asCDATA};this.setSerializableColumns=function(list){if(!list){this._srClmn=null;return }this._srClmn=(list||"").split(",");for(var i=0;i<this._srClmn.length;i++){this._srClmn[i]=convertStringToBoolean(this._srClmn[i])}};this._serialise=function(rCol,inner,closed){this.editStop();var out=[];var i=0;var j=0;var leni=(this._dload)?this.rowsBuffer[0].length:rCol.length;if(this.isTreeGrid()){var f=function(id,f){var str=[];var z=self._h2.get[id];if(0!=id){str.push(self._serializeRow(self.rowsAr[id],i))}if(z.childs.length==0&&self.rowsAr[id]._xml){var xar=self.rowsAr[id]._xml;for(var i=0;i<xar.length;i++){if(self.xmlSerializer){str.push(self.xmlSerializer.serializeToString(xar[i]))}else{str.push(xar[i].xml)}}}else{for(var i=0;i<z.childs.length;i++){str.push(f(z.childs[i].id,f))}}if(0!=id){str.push("</row>\n")}return str.join("")};out.push(f(0,f))}else{for(i;i<leni;i++){var r=rCol[i];var temp=this._serializeRow(r,i);out.push(temp);if((temp!="")&&r&&(!r._sRow)&&(!r._rLoad)){out.push("</row>")}}}return[out.join(""),j+i]};this._manualXMLSerialize=function(r){var out="<row id='"+r.getAttribute("id")+"'>";var i=0;for(var jj=0;jj<r.childNodes.length;jj++){var z=r.childNodes[jj];if(z.tagName!="cell"){continue}if((!this._srClmn)||(this._srClmn[i])){out+="<cell>"+(z.firstChild?z.firstChild.data:"")+"</cell>"}i++}out+="</row>";return out};this._serializeRow=function(r,i){var out=[];if((!r)||(r._sRow)||(r._rLoad)){if(this._onlChAttr){return""}if(this.rowsBuffer[1][i]){if(this.xmlSerializer){out=this.xmlSerializer.serializeToString(this.rowsBuffer[1][i])}else{out=this.rowsBuffer[1][i].xml}}return out}var selStr="";if(this._sAll&&this.selectedRows._dhx_find(r)!=-1){selStr=" selected='1'"}out.push("<row id='"+r.idd+"'"+selStr+" "+((this._h2&&this._h2.get[r.idd].state=="minus")?"open='1'":"")+">");if(this._sUDa&&this.UserData[r.idd]){keysAr=this.UserData[r.idd].getKeys();for(var ii=0;ii<keysAr.length;ii++){out.push("<userdata name='"+keysAr[ii]+"'>"+this.UserData[r.idd].get(keysAr[ii])+"</userdata>")}}var changeFl=false;for(var jj=0;jj<r.childNodes.length;jj++){if((!this._srClmn)||(this._srClmn[jj])){var cvx=r.childNodes[jj];out.push("<cell");var zx=this.cells(r.idd,cvx._cellIndex);if(zx.cell){zxVal=zx[this._agetm]()}else{zxVal=""}if(zxVal===null){zxVal=""}if(this._asCDATA){zxVal="<![CDATA["+zxVal+"]]>"}if((this._ecspn)&&(cvx.colSpan)&&cvx.colSpan>1){out.push(' colspan="'+cvx.colSpan+'" ')}if(zx.getSerializeAttributes){out.push(" "+zx.getSerializeAttributes())}if(this._chAttr){if(zx.wasChanged()){out.push(' changed="1"');changeFl=true}}else{if((this._onlChAttr)&&(zx.wasChanged())){changeFl=true}}if(this._sAll){out.push((this._h2?(" image='"+this._h2.get[r.idd].image+"'"):"")+">"+zxVal+"</cell>")}else{out.push(">"+zxVal+"</cell>")}if((this._ecspn)&&(cvx.colSpan)){cvx=cvx.colSpan-1;for(var u=0;u<cvx;u++){out.push("<cell/>")}}}}if((this._onlChAttr)&&(!changeFl)&&(!r._added)){return""}return out.join("")};this._serialiseConfig=function(){var out="<head>";for(var i=0;i<this.hdr.rows[0].cells.length;i++){out+="<column width='"+this.cellWidthPX[i]+"' align='"+this.cellAlign[i]+"' type='"+this.cellType[i]+"' sort='"+this.fldSort[i]+"' color='"+this.columnColor[i]+"'"+(this.columnIds[i]?(" id='"+this.columnIds[i]+"'"):"")+">";out+=this.getHeaderCol(i);var z=this.getCombo(i);if(z){for(var j=0;j<z.keys.length;j++){out+="<option value='"+z.keys[j]+"'>"+z.values[j]+"</option>"}}out+="</column>"}return out+="</head>"};this.serialize=function(){if(_isFF){this.xmlSerializer=new XMLSerializer()}var out='<?xml version="1.0"?><rows>';if(this._mathSerialization){this._agetm="getMathValue"}else{this._agetm="getValue"}if(this._sUDa&&this.UserData.gridglobaluserdata){var keysAr=this.UserData.gridglobaluserdata.getKeys();for(var i=0;i<keysAr.length;i++){out+="<userdata name='"+keysAr[i]+"'>"+this.UserData.gridglobaluserdata.get(keysAr[i])+"</userdata>"}}if(this._sConfig){out+=this._serialiseConfig()}out+=this._serialise(this.rowsCol)[0];if(!this._dload){for(var i=0;i<this.rowsBuffer[1].length;i++){if(this.rowsBuffer[1][i].tagName=="TR"){}else{if(!this._onlChAttr){if(this._srClmn){out+=this._manualXMLSerialize(this.rowsBuffer[1][i])}else{if(!this.xmlSerializer){out+=this.rowsBuffer[1][i].xml}else{out+=this.xmlSerializer.serializeToString(this.rowsBuffer[1][i])}}}}}}out+="</rows>";return out};this.setOnRowSelectHandler=function(func,anyClick){this.attachEvent("onRowSelect",func);this._chRRS=(!convertStringToBoolean(anyClick))};this.setOnScrollHandler=function(func){this.attachEvent("onScroll",func)};this.setOnEditCellHandler=function(func){this.attachEvent("onEditCell",func)};this.setOnCheckHandler=function(func){this.attachEvent("onCheckbox",func)};this.setOnEnterPressedHandler=function(func){this.attachEvent("onEnter",func)};this.setOnBeforeRowDeletedHandler=function(func){this.attachEvent("onBeforeRowDeleted",func)};this.setOnRowAddedHandler=function(func){this.attachEvent("onRowAdded",func)};this.setOnGridReconstructedHandler=function(func){this.attachEvent("onGridReconstructed",func)};dhtmlXGridObject.prototype.setOnResize=function(func){this.attachEvent("onResize",func)};dhtmlXGridObject.prototype.setOnBeforeSelect=function(func){this.attachEvent("onBeforeSelect",func)};dhtmlXGridObject.prototype.setOnRowCreated=function(func){this.attachEvent("onRowCreated",func)};dhtmlXGridObject.prototype.setOnLoadingEnd=function(func){this.attachEvent("onXLE",func)};dhtmlXGridObject.prototype.setOnCellChanged=function(func){this.attachEvent("onCellChanged",func)};dhtmlXGridObject.prototype.setOnLoadingStart=function(func){this.attachEvent("onXLS",func)};dhtmlXGridObject.prototype.setOnColumnSort=function(func){this.attachEvent("onBeforeSorting",func)};this.setOnSelectStateChanged=function(func){this.attachEvent("onSelectStateChanged",func)};this.setOnRowDblClickedHandler=function(func){this.attachEvent("onRowDblClicked",func)};this.setOnHeaderClickHandler=function(func){this.attachEvent("onHeaderClick",func)};dhtmlXGridObject.prototype.setOnResizeEnd=function(func){this.attachEvent("onResizeEnd",func)};this.getPosition=function(oNode,pNode){if(!pNode){var pNode=document.body}var oCurrentNode=oNode;var iLeft=0;var iTop=0;while((oCurrentNode)&&(oCurrentNode!=pNode)){iLeft+=oCurrentNode.offsetLeft-oCurrentNode.scrollLeft;iTop+=oCurrentNode.offsetTop-oCurrentNode.scrollTop;oCurrentNode=oCurrentNode.offsetParent}if(pNode==document.body){if(_isIE){if(document.documentElement.scrollTop){iTop+=document.documentElement.scrollTop}if(document.documentElement.scrollLeft){iLeft+=document.documentElement.scrollLeft}}else{if(!_isFF){iLeft+=document.body.offsetLeft;iTop+=document.body.offsetTop}}}return new Array(iLeft,iTop)};this.getFirstParentOfType=function(obj,tag){while(obj&&obj.tagName!=tag&&obj.tagName!="BODY"){obj=obj.parentNode}return obj};this.setColumnCount=function(cnt){alert("setColumnCount method deprecated")};this.showContent=function(){alert("showContent method deprecated")};this.objBox.onscroll=new Function("","this.grid._doOnScroll()");if((!_isOpera)||(_OperaRv>8.5)){this.hdr.onmousemove=new Function("e","this.grid.changeCursorState(e||window.event)");this.hdr.onmousedown=new Function("e","return this.grid.startColResize(e||window.event)")}this.obj.onmousemove=this._drawTooltip;this.obj.onclick=new Function("e","this.grid._doClick(e||window.event); if (this.grid._sclE) this.grid.editCell(e||window.event);  (e||event).cancelBubble=true; ");if(_isMacOS){this.entBox.oncontextmenu=new Function("e","return this.grid._doContClick(e||window.event);")}this.entBox.onmousedown=new Function("e","return this.grid._doContClick(e||window.event);");this.obj.ondblclick=new Function("e","if(!this.grid.wasDblClicked(e||window.event)){return false}; if (this.grid._dclE) this.grid.editCell(e||window.event);  (e||event).cancelBubble=true;");this.hdr.onclick=this._onHeaderClick;this.sortImg.onclick=function(){self._onHeaderClick.apply({grid:self},[null,self.r_fldSorted])};this.hdr.ondblclick=this._onHeaderDblClick;if(!document.body._dhtmlxgrid_onkeydown){dhtmlxEvent(document,"keydown",new Function("e","if (globalActiveDHTMLGridObject) return globalActiveDHTMLGridObject.doKey(e||window.event);  return true;"));document.body._dhtmlxgrid_onkeydown=true}dhtmlxEvent(document.body,"click",function(){if(self.editStop){self.editStop()}});this.entBox.onbeforeactivate=new Function("","this._still_active=null; this.grid.setActive(); event.cancelBubble=true;");this.entBox.onbeforedeactivate=new Function("","if (this.grid._still_active) this.grid._still_active=null; else this.grid.isActive=false; event.cancelBubble=true;");this.doOnRowAdded=function(row){};if(this.entBox.style.height.toString().indexOf("%")!=-1){this._setAutoResize()}return this}dhtmlXGridObject.prototype.isTreeGrid=function(){return(this.cellType._dhx_find("tree")!=-1)};dhtmlXGridObject.prototype.addRow=function(A,E,D){var C=this._addRow(A,E,D);if(!this.dragContext){this.callEvent("onRowAdded",[A])}this.callEvent("onRowCreated",[C.idd,C,null]);if(this.pagingOn){this.changePage(this.currentPage)}this.setSizes();C._added=true;this.callEvent("onGridReconstructed",[]);return C};dhtmlXGridObject.prototype._prepareRow=function(A){var D=document.createElement("TR");D.idd=A;D.grid=this;for(var C=0;C<this.hdr.rows[0].cells.length;C++){var E=document.createElement("TD");if(this._enbCid){E.id="c_"+D.idd+"_"+C}E._cellIndex=C;if(this.dragAndDropOff){this.dragger.addDraggableItem(E,this)}if(this.cellAlign[C]){E.align=this.cellAlign[C]}E.style.verticalAlign=this.cellVAlign[C];E.bgColor=this.columnColor[C]||"";if((this._hrrar)&&(this._hrrar[C])){E.style.display="none"}D.appendChild(E)}return D};dhtmlXGridObject.prototype._fillRow=function(D,F){if(!this._parsing_){this.editStop()}this.math_off=true;this.math_req=false;if(typeof (F)!="object"){F=(F||"").split(this.delim)}for(var C=0;C<D.childNodes.length;C++){if((C<F.length)||(this.defVal[C])){var E=F[C];if((this.defVal[C])&&((E=="")||(typeof (E)=="undefined"))){E=this.defVal[C]}if((this._dload)&&(this.rowsAr[D.idd])){var A=this.cells3(D,D.childNodes[C]._cellIndex)}else{A=this.cells4(D.childNodes[C])}A.setValue(E);A=A.destructor()}else{var E="&nbsp;";D.childNodes[C].innerHTML=E;D.childNodes[C]._clearCell=true}}this.math_off=false;if((this.math_req)&&(!this._parsing_)){for(var C=0;C<this.hdr.rows[0].cells.length;C++){this._checkSCL(D.childNodes[C])}this.math_req=false}return D};dhtmlXGridObject.prototype._insertRowAt=function(D,E,C){if((E<0)||((!E)&&(parseInt(E)!==0))){E=this.rowsCol.length}else{if(E>this.rowsCol.length){E=this.rowsCol.length}}if(this._cssEven){if((this._cssSP?this.getLevel(D.idd):E)%2==1){D.className+=" "+this._cssUnEven+(this._cssSU?(this._cssUnEven+"_"+this.getLevel(D.idd)):"")}else{D.className+=" "+this._cssEven+(this._cssSU?(" "+this._cssEven+"_"+this.getLevel(D.idd)):"")}}if(D._skipInsert){this.rowsAr[D.idd]=D;return D}if(!C){if((E==(this.obj.rows.length-1))||(!this.rowsCol[E])){if(_isKHTML){this.obj.appendChild(D)}else{this.obj.firstChild.appendChild(D)}}else{this.rowsCol[E].parentNode.insertBefore(D,this.rowsCol[E])}}this.rowsAr[D.idd]=D;this.rowsCol._dhx_insertAt(E,D);if(this._cssEven){if(!this._cssSP&&(E!=(this.rowsCol.length-1))){this._fixAlterCss(E+1)}}this.doOnRowAdded(D);if((this.math_req)&&(!this._parsing_)){for(var A=0;A<this.hdr.rows[0].cells.length;A++){this._checkSCL(D.childNodes[A])}this.math_req=false}return D};dhtmlXGridObject.prototype._addRow=function(C,F,D){var E=this._fillRow(this._prepareRow(C),F);if(!this._dload){if((D>this.rowsCol.length&&D<(this.rowsCol.length+this.rowsBuffer[0].length))||(typeof D=="undefined"&&this.rowsBuffer[0].length)){if(typeof D=="undefined"){var A=this.rowsBuffer[0].length}else{var A=D-this.rowsCol.length}this.rowsBuffer[0]._dhx_insertAt(A,C);this.rowsBuffer[1]._dhx_insertAt(A,E);return E}}return this._insertRowAt(E,D)};dhtmlXGridObject.prototype.setRowHidden=function(H,D){var C=convertStringToBoolean(D);var F=this.getRowById(H);if(!F){return }if(F.expand===""){this.collapseKids(F)}if((D)&&(F.style.display!="none")){F.style.display="none";var E=this.selectedRows._dhx_find(F);if(E!=-1){F.className=F.className.replace("rowselected","");for(var A=0;A<F.childNodes.length;A++){F.childNodes[A].className=F.childNodes[A].className.replace(/cellselected/g,"")}this.selectedRows._dhx_removeAt(E)}this.callEvent("onGridReconstructed",[])}if((!D)&&(F.style.display=="none")){F.style.display="";this.callEvent("onGridReconstructed",[])}this.setSizes()};dhtmlXGridObject.prototype.setColumnHidden=function(D,C){if(!this.hdr.rows.length){if(!this._ivizcol){this._ivizcol=[]}return this._ivizcol[D]=C}if((this.fldSorted)&&(this.fldSorted.cellIndex==D)&&(C)){this.sortImg.style.display="none"}var A=convertStringToBoolean(C);if(A){if(!this._hrrar){this._hrrar=new Array()}else{if(this._hrrar[D]){return }}this._hrrar[D]="display:none;";this._hideShowColumn(D,"none")}else{if((!this._hrrar)||(!this._hrrar[D])){return }this._hrrar[D]="";this._hideShowColumn(D,"")}if((this.fldSorted)&&(this.fldSorted.cellIndex==D)&&(!C)){this.sortImg.style.display="inline"}};dhtmlXGridObject.prototype.isColumnHidden=function(A){if((this._hrrar)&&(this._hrrar[A])){return true}return false};dhtmlXGridObject.prototype.setColumnsVisibility=function(A){this.setColHidden(A)};dhtmlXGridObject.prototype.setColHidden=function(C){if(C){this._ivizcol=C.split(",")}if(this.hdr.rows.length&&this._ivizcol){for(var A=0;A<this._ivizcol.length;A++){this.setColumnHidden(A,this._ivizcol[A])}}};dhtmlXGridObject.prototype._fixHiddenRowsAll=function(E,H,K,F){var I=E.rows.length;for(var D=0;D<I;D++){var A=E.rows[D].cells;if(A.length!=this._cCount){for(var C=0;C<A.length;C++){if(A[C]._cellIndex==H){A[C].style[K]=F;break}}}else{A[H].style[K]=F}}};dhtmlXGridObject.prototype._hideShowColumn=function(E,D){var A=E;if((this.hdr.rows[1]._childIndexes)&&(this.hdr.rows[1]._childIndexes[E]!=E)){A=this.hdr.rows[1]._childIndexes[E]}if(D=="none"){this.hdr.rows[0].cells[E]._oldWidth=this.hdr.rows[0].cells[E].style.width;this.hdr.rows[0].cells[E]._oldWidthP=this.cellWidthPC[E];this.obj.rows[0].cells[E].style.width="0px";this._fixHiddenRowsAll(this.obj,E,"display","none");if(this._fixHiddenRowsAllTG){this._fixHiddenRowsAllTG(E,"none")}if((_isOpera&&_OperaRv<9)||_isKHTML||(_isFF)){this._fixHiddenRowsAll(this.hdr,E,"display","none");if(this.ftr){this._fixHiddenRowsAll(this.ftr.childNodes[0],E,"display","none")}}this._fixHiddenRowsAll(this.hdr,E,"whiteSpace","nowrap");if(!this.cellWidthPX.length&&!this.cellWidthPC.length){this.cellWidthPX=[].concat(this.initCellWidth)}if(this.cellWidthPX[E]){this.cellWidthPX[E]=0}if(this.cellWidthPC[E]){this.cellWidthPC[E]=0}}else{if(this.hdr.rows[0].cells[E]._oldWidth){var C=this.hdr.rows[0].cells[E];if(_isOpera||_isKHTML||(_isFF)){this._fixHiddenRowsAll(this.hdr,E,"display","")}if(this.ftr){this._fixHiddenRowsAll(this.ftr.childNodes[0],E,"display","")}this.obj.rows[0].cells[E].style.width=this.hdr.rows[0].cells[E]._oldWidth;this._fixHiddenRowsAll(this.obj,E,"display","");if(this._fixHiddenRowsAllTG){this._fixHiddenRowsAllTG(E,"")}C.style.width=C._oldWidth;this._fixHiddenRowsAll(this.hdr,E,"whiteSpace","normal");if(C._oldWidthP){this.cellWidthPC[E]=C._oldWidthP}if(C._oldWidth){this.cellWidthPX[E]=parseInt(C._oldWidth)}}}this.setSizes();if((!_isIE)&&(!_isFF)){this.obj.border=1;this.obj.border=0}};dhtmlXGridObject.prototype.enableColSpan=function(A){this._ecspn=convertStringToBoolean(A)};dhtmlXGridObject.prototype.enableCollSpan=function(A){this._ecspn=convertStringToBoolean(A)};dhtmlXGridObject.prototype.enableRowsHover=function(C,A){this._hvrCss=A;if(convertStringToBoolean(C)){if(!this._elmnh){this.obj._honmousemove=this.obj.onmousemove;this.obj.onmousemove=this._setRowHover;if(_isIE){this.obj.onmouseleave=this._unsetRowHover}else{this.obj.onmouseout=this._unsetRowHover}this._elmnh=true}}else{if(this._elmnh){this.obj.onmousemove=this.obj._honmousemove;if(_isIE){this.obj.onmouseleave=null}else{this.obj.onmouseout=null}this._elmnh=false}}};dhtmlXGridObject.prototype.enableEditEvents=function(C,D,A){this._sclE=convertStringToBoolean(C);this._dclE=convertStringToBoolean(D);this._f2kE=convertStringToBoolean(A)};dhtmlXGridObject.prototype.enableLightMouseNavigation=function(A){if(convertStringToBoolean(A)){if(!this._elmn){this.entBox._onclick=this.entBox.onclick;this.entBox.onclick=function(){return true};this.obj._onclick=this.obj.onclick;this.obj.onclick=function(C){var D=this.grid.getFirstParentOfType(C?C.target:event.srcElement,"TD");this.grid.editStop();this.grid.doClick(D);this.grid.editCell();(C||event).cancelBubble=true};this.obj._onmousemove=this.obj.onmousemove;this.obj.onmousemove=this._autoMoveSelect;this._elmn=true}}else{if(this._elmn){this.entBox.onclick=this.entBox._onclick;this.obj.onclick=this.obj._onclick;this.obj.onmousemove=this.obj._onmousemove;this._elmn=false}}};dhtmlXGridObject.prototype._unsetRowHover=function(C,D){if(D){that=this}else{that=this.grid}if((that._lahRw)&&(that._lahRw!=D)){for(var A=0;A<that._lahRw.childNodes.length;A++){that._lahRw.childNodes[A].className=that._lahRw.childNodes[A].className.replace(that._hvrCss,"")}that._lahRw=null}};dhtmlXGridObject.prototype._setRowHover=function(C){var D=this.grid.getFirstParentOfType(C?C.target:event.srcElement,"TD");if(D){this.grid._unsetRowHover(0,D);D=D.parentNode;for(var A=0;A<D.childNodes.length;A++){D.childNodes[A].className+=" "+this.grid._hvrCss}this.grid._lahRw=D}this._honmousemove(C)};dhtmlXGridObject.prototype._autoMoveSelect=function(A){if(!this.grid.editor){var C=this.grid.getFirstParentOfType(A?A.target:event.srcElement,"TD");if(C.parentNode.idd){this.grid.doClick(C,true,0)}}this._onmousemove(A)};dhtmlXGridObject.prototype.enableDistributedParsing=function(D,A,C){A=A||10;C=C||250;if(convertStringToBoolean(D)){this._ads_count=A;this._ads_time=C}else{this._ads_count=0}};function _contextCall(F,C,I,H,A,E,D,K){F._contextCallTimer=window.setTimeout(function(){var M=F[C](I,H,A,E,D);if(F._ahgr){F.setSizes()}if(M!=-1){F.callEvent("onXLE",[F,F.rowsCol.length])}},K);return this}dhtmlXGridObject.prototype.destructor=function(){if(this._sizeTime){this._sizeTime=window.clearTimeout(this._sizeTime)}var A;this.xmlLoader=this.xmlLoader.destructor();for(var C=0;C<this.rowsCol.length;C++){if(this.rowsCol[C]){this.rowsCol[C].grid=null}}for(C in this.rowsAr){if(this.rowsAr[C]){this.rowsAr[C]=null}}this.rowsCol=new dhtmlxArray();this.rowsAr=new Array();this.entBox.innerHTML="";this.entBox.onclick=function(){};this.entBox.onmousedown=function(){};this.entBox.onbeforeactivate=function(){};this.entBox.onbeforedeactivate=function(){};this.entBox.onbeforedeactivate=function(){};this.entBox.onselectstart=function(){};this.entBox.grid=null;for(A in this){if((this[A])&&(this[A].m_obj)){this[A].m_obj=null}this[A]=null}if(this==globalActiveDHTMLGridObject){globalActiveDHTMLGridObject=null}return null};dhtmlXGridObject.prototype.getSortingState=function(){var A=new Array();if(this.fldSorted){A[0]=this.fldSorted._cellIndex;A[1]=(this.sortImg.src.indexOf("sort_desc.gif")!=-1)?"des":"asc"}return A};dhtmlXGridObject.prototype.enableAutoHeight=function(D,C,A){this._ahgr=convertStringToBoolean(D);this._ahgrF=convertStringToBoolean(A);this._ahgrM=C||null;if(C=="auto"){this._ahgrM=null;this._ahgrMA=true;this._setAutoResize()}};dhtmlXGridObject.prototype.enableAutoHeigth=dhtmlXGridObject.prototype.enableAutoHeight;dhtmlXGridObject.prototype.enableStableSorting=function(A){this._sst=convertStringToBoolean(A);this.rowsCol.stablesort=function(H){var F=this.length-1;for(var E=0;E<this.length-1;E++){for(var D=0;D<F;D++){if(H(this[D],this[D+1])>0){var C=this[D];this[D]=this[D+1];this[D+1]=C}}F--}}};dhtmlXGridObject.prototype.enableKeyboardSupport=function(A){this._htkebl=!convertStringToBoolean(A)};dhtmlXGridObject.prototype.enableContextMenu=function(A){this._ctmndx=A};dhtmlXGridObject.prototype.setOnBeforeContextMenu=function(A){this.attachEvent("onBeforeContextMenu",A)};dhtmlXGridObject.prototype.setOnRightClick=function(A){this.attachEvent("onRightClick",A)};dhtmlXGridObject.prototype.setScrollbarWidthCorrection=function(A){this._scrFix=parseInt(A)};dhtmlXGridObject.prototype.enableTooltips=function(C){this._enbTts=C.split(",");for(var A=0;A<this._enbTts.length;A++){this._enbTts[A]=convertStringToBoolean(this._enbTts[A])}};dhtmlXGridObject.prototype.enableResizing=function(C){this._drsclmn=C.split(",");for(var A=0;A<this._drsclmn.length;A++){this._drsclmn[A]=convertStringToBoolean(this._drsclmn[A])}};dhtmlXGridObject.prototype.setColumnMinWidth=function(A,C){if(arguments.length==2){if(!this._drsclmW){this._drsclmW=new Array()}this._drsclmW[C]=A}else{this._drsclmW=A.split(",")}};dhtmlXGridObject.prototype.enableCellIds=function(A){this._enbCid=convertStringToBoolean(A)};dhtmlXGridObject.prototype.lockRow=function(A,D){var C=this.getRowById(A);if(C){C._locked=convertStringToBoolean(D);if((this.cell)&&(this.cell.parentNode.idd==A)){this.editStop()}}};dhtmlXGridObject.prototype._getRowArray=function(E){var D=new Array();for(var C=0;C<E.childNodes.length;C++){var A=this.cells3(E,C);if(A.cell._code){D[C]=A.cell._val}else{D[C]=A.getValue()}}return D};dhtmlXGridObject.prototype.setDateFormat=function(A){this._dtmask=A};dhtmlXGridObject.prototype.setNumberFormat=function(K,D,F,I){var E=K.replace(/[^0\,\.]*/g,"");var A=E.indexOf(".");if(A>-1){A=E.length-A-1}var C=E.indexOf(",");if(C>-1){C=E.length-A-2-C}F=F||".";I=I||",";var M=K.split(E)[0];var H=K.split(E)[1];this._maskArr[D]=[A,C,M,H,F,I]};dhtmlXGridObject.prototype._aplNFb=function(E,D){var A=this._maskArr[D];if(!A){return E}var C=parseFloat(E.toString().replace(/[^0-9]*/g,""));if(E.toString().substr(0,1)=="-"){C=C*-1}if(A[0]>0){C=C/Math.pow(10,A[0])}return C};dhtmlXGridObject.prototype._aplNF=function(E,D){var A=this._maskArr[D];if(!A){return E}var F=(parseFloat(E)<0?"-":"")+A[2];E=Math.abs(Math.round(parseFloat(E)*Math.pow(10,A[0]>0?A[0]:0))).toString();E=(E.length<A[0]?Math.pow(10,A[0]+1-E.length).toString().substr(1,A[0]+1)+E.toString():E).split("").reverse();E[A[0]]=(E[A[0]]||"0")+A[4];if(A[1]>0){for(var C=(A[0]>0?0:1)+A[0]+A[1];C<E.length;C+=A[1]){E[C]+=A[5]}}return F+E.reverse().join("")+A[3]};dhtmlXGridObject.prototype._launchCommands=function(A){for(var E=0;E<A.length;E++){var D=new Array();for(var C=0;C<A[E].childNodes.length;C++){if(A[E].childNodes[C].nodeType==1){D[D.length]=A[E].childNodes[C].firstChild.data}}this[A[E].getAttribute("command")].apply(this,D)}};dhtmlXGridObject.prototype._parseHead=function(H){var F=this.xmlLoader.doXPath("//rows/head",H);if(F.length){var K=this.xmlLoader.doXPath("//rows/head/column",F[0]);var M=this.xmlLoader.doXPath("//rows/head/settings",F[0]);var W="setInitWidths";var Q=false;if(M[0]){for(var N=0;N<M[0].childNodes.length;N++){switch(M[0].childNodes[N].tagName){case"colwidth":if(M[0].childNodes[N].firstChild&&M[0].childNodes[N].firstChild.data=="%"){W="setInitWidthsP"}break;case"splitat":Q=(M[0].childNodes[N].firstChild?M[0].childNodes[N].firstChild.data:false);break}}}this._launchCommands(this.xmlLoader.doXPath("//rows/head/beforeInit/call",F[0]));if(K.length>0){var E="";var I="";var O="";var S="";var X="";var Z="";var A="";var C=[];for(var V=0;V<K.length;V++){E+=K[V].getAttribute("width")+this.delim;I+=K[V].getAttribute("type")+this.delim;O+=(K[V].getAttribute("align")||"left")+this.delim;S+=K[V].getAttribute("sort")+this.delim;X+=(K[V].getAttribute("color")!=null?K[V].getAttribute("color"):"")+this.delim;Z+=(K[V].firstChild?K[V].firstChild.data:"").replace(/^\s*((.|\n)*.+)\s*$/gi,"$1")+this.delim;C[V]=K[V].getAttribute("format");A+=K[V].getAttribute("id")+this.delim}this.setHeader(Z.substr(0,Z.length-1));this[W](E.substr(0,E.length-1));this.setColAlign(O.substr(0,O.length-1));this.setColTypes(I.substr(0,I.length-1));this.setColSorting(S.substr(0,S.length-1));this.setColumnColor(X.substr(0,X.length-1));this.setColumnIds(A.substr(0,A.length-1));for(var V=0;V<K.length;V++){if((this.cellType[V].indexOf("co")==0)||(this.cellType[V]=="clist")){var P=this.xmlLoader.doXPath("./option",K[V]);if(P.length){var T=new Array();if(this.cellType[V]=="clist"){for(var U=0;U<P.length;U++){T[T.length]=P[U].firstChild?P[U].firstChild.data:""}this.registerCList(V,T)}else{var Y=this.getCombo(V);for(var U=0;U<P.length;U++){Y.put(P[U].getAttribute("value"),P[U].firstChild?P[U].firstChild.data:"")}}}}else{if(C[V]){if((this.cellType[V]=="calendar")||(this.fldSort[V]=="date")){this.setDateFormat(C[V],V)}else{this.setNumberFormat(C[V],V)}}}}this.init();if((Q)&&(this.splitAt)){this.splitAt(Q)}}this._launchCommands(this.xmlLoader.doXPath("//rows/head/afterInit/call",F[0]))}var D=this.xmlLoader.doXPath("//rows/userdata",H);if(D.length>0){if(!this.UserData.gridglobaluserdata){this.UserData.gridglobaluserdata=new Hashtable()}for(var U=0;U<D.length;U++){this.UserData.gridglobaluserdata.put(D[U].getAttribute("name"),D[U].firstChild?D[U].firstChild.data:"")}}};dhtmlXGridObject.prototype.parseXML=function(xml,startIndex){this._xml_ready=true;var pid=null;var zpid=null;if(!xml){try{var xmlDoc=eval(this.entBox.id+"_xml").XMLDocument}catch(er){var xmlDoc=this.loadXML(this.xmlFileUrl)}}else{if(typeof (xml)=="object"){var xmlDoc=xml}else{if(xml.indexOf(".")!=-1){if(this.xmlFileUrl==""){this.xmlFileUrl=xml}var xmlDoc=this.loadXML(xml);return }else{var xmlDoc=(_isIE?eval(xml).XMLDocument:document.getElementById(xml))}}}var ar=new Array();var idAr=new Array();var a_top=this.xmlLoader.doXPath("//rows",xmlDoc);if(a_top[0]&&a_top[0].getAttribute("total_count")){this.limit=a_top[0].getAttribute("total_count")}this._parseHead(xmlDoc);var tree=this.cellType._dhx_find("tree");var rowsCol=this.xmlLoader.doXPath("//rows/row",xmlDoc);if(rowsCol.length==0){this.recordsNoMore=true;var top=this.xmlLoader.doXPath("//rows",xmlDoc);if(!top){return }var pid=(top[0].getAttribute("parent")||0);if((tree!=-1)&&(this.rowsAr[pid])){var tree_r=this.rowsAr[pid].childNodes[tree]}}else{pid=(rowsCol[0].parentNode.getAttribute("parent")||null);zpid=this.getRowById(pid);if(zpid){zpid._xml_await=false}else{pid=null}startIndex=this.getRowIndex(pid)+1}if(tree==-1){tree=this.cellType._dhx_find("3d")}if(this._innerParse(rowsCol,startIndex,tree,pid)==-1){return(this._ahgr?this.setSizes():"")}if(zpid){this.expandKids(zpid)}if(tree!=-1){var oCol=this.xmlLoader.doXPath("//row[@open]",xmlDoc);for(var i=0;i<oCol.length;i++){this.openItem(oCol[i].getAttribute("id"))}}this.setSizes();if(_isOpera){this.obj.style.border=1;this.obj.style.border=0}this._startXMLLoading=false;this.callEvent("onXLE",[this,rowsCol.length,pid,xmlDoc])};dhtmlXGridObject.prototype._postRowProcessing=function(H,C){var I=C.getAttribute("id");var K=C.getAttribute("style");var E=this.xmlLoader.doXPath("./userdata",C);if(E.length>0){if(!this.UserData[I]){this.UserData[I]=new Hashtable()}for(var A=0;A<E.length;A++){this.UserData[I].put(E[A].getAttribute("name"),E[A].firstChild?E[A].firstChild.data:"")}}var F=C.getAttribute("class");if(F){H.className+=(H._css=" "+F)}var F=C.getAttribute("bgColor");if(F){for(var D=0;D<H.childNodes.length;D++){H.childNodes[D].bgColor=F}}if(C.getAttribute("locked")){H._locked=true}if(C.getAttribute("selected")==true){this.setSelectedRow(I,this.selMultiRows,false,C.getAttribute("call")==true)}if(K){this.setRowTextStyle(I,K)}this.callEvent("onRowCreated",[H.idd,H,C])};dhtmlXGridObject.prototype._fillRowFromXML=function(C,I,S,K){var Q=this.xmlLoader.doXPath("./cell",I);var P=new Array(0);for(var F=0;F<Q.length;F++){var H=Q[F];var O=H.getAttribute("type");if(H.getAttribute("xmlcontent")){H=Q[F]}else{if(H.firstChild){H=H.firstChild.data}else{H=""}}if(F!=S){P[P.length]=H}else{P[P.length]=[K,H,((I.getAttribute("xmlkids")||C._xml)?"1":"0"),(Q[F].getAttribute("image")||"leaf.gif")]}if(O){C.childNodes[F]._cellType=O}}if(this._c_order){P=this._swapColumns(P)}for(var F=0;F<Q.length;F++){var A=Q[F].getAttribute("class");if(A){C.childNodes[F].className+=" "+A}A=Q[F].getAttribute("style");if(A){C.childNodes[F].style.cssText+=";"+A}A=Q[F].getAttribute("title");if(A){C.childNodes[F].title=A}}this._fillRow(C,P);if(this._ecspn){C._childIndexes=new Array();var N=0;var E=this.obj.rows[0].childNodes.length;for(var F=0;F<E;F++){C._childIndexes[F]=F-N;if(!Q[F]){continue}var D=Q[F].getAttribute("colspan");if(D){C.childNodes[F-N].colSpan=D;for(var M=1;M<D;M++){C.removeChild(C.childNodes[F-N+1]);C._childIndexes[F+M]=F-N}N+=(D-1);F+=(D-1)}}if(!N){C._childIndexes=null}}if((C.parentNode)&&(C.parentNode.tagName)){this._postRowProcessing(C,I)}return C};dhtmlXGridObject.prototype._innerParse=function(K,M,N,I,F){F=F||0;var E=F+this._ads_count*1;var C=null;var D;for(var F;F<K.length;F++){if(this._ads_count&&F==E){new _contextCall(this,"_innerParse",K,M,N,I,F,this._ads_time);return -1}if((I)||(F<this.rowsBufferOutSize||this.rowsBufferOutSize==0)){this._parsing_=true;var A=(K[F].getAttribute("id")||(this.rowsCol.length+2));C=this._prepareRow(A);if(N!=-1){D=this.xmlLoader.doXPath("./row",K[F]);if((D.length!=0)&&(this._slowParse)){C._xml=D}}C=this._fillRowFromXML(C,K[F],N,I);if(M){C=this._insertRowAt(C,M);M++}else{C=this._insertRowAt(C)}this._postRowProcessing(C,K[F]);this._parsing_=false}else{var H=this.rowsBuffer[0].length;this.rowsBuffer[1][H]=K[F];this.rowsBuffer[0][H]=K[F].getAttribute("id");if(!this.rowsBuffer[0][H]){this.rowsBuffer[0][H]=this.rowsCol.length+2+H;K[F].setAttribute("id",this.rowsBuffer[0][H])}}if((N!=-1)&&(D.length!=0)&&(!this._slowParse)){M=this._innerParse(D,M,N,A)}}if(this.pagingOn&&this.rowsBuffer[0].length>0){this.changePage(this.currentPage)}if((C)&&(this._checkSCL)){for(var F=0;F<this.hdr.rows[0].cells.length;F++){this._checkSCL(C.childNodes[F])}}return M};dhtmlXGridObject.prototype.getCheckedRows=function(A){var C=new Array();mygrid.forEachRow(function(D){if(this.cells(D,A).getValue()!=0){C.push(D)}});return C.join(",")};dhtmlXGridObject.prototype._drawTooltip=function(E){var F=this.grid.getFirstParentOfType(E?E.target:event.srcElement,"TD");if((this.grid.editor)&&(this.grid.editor.cell==F)){return true}var D=F.parentNode;if(!D.idd){return }var C=(E?E.target:event.srcElement);if(D.idd==window.unknown){return true}if(!this.grid.callEvent("onMouseOver",[D.idd,F._cellIndex])){return true}if((this.grid._enbTts)&&(!this.grid._enbTts[F._cellIndex])){if(C.title){C.title=""}return true}var A=this.grid.cells(D.idd,F._cellIndex);if(C._title){A.cell.title=""}if(!A.cell.title){C._title=true}if(A){C.title=A.cell.title||(A.getTitle?A.getTitle():(A.getValue()||"").toString().replace(/<[^>]*>/gi,""))}return true};dhtmlXGridObject.prototype.enableCellWidthCorrection=function(A){if(_isFF){this._wcorr=parseInt(A)}};dhtmlXGridObject.prototype.getAllRowIds=function(C){var A=new Array(0);var D=this.getRowsNum();for(i=0;i<D;i++){if((this.rowsCol[i])&&(!this.rowsCol[i]._sRow)&&(!this.rowsCol[i]._rLoad)){A[A.length]=this.rowsCol[i].idd}else{if(this.rowsBuffer[1][i]){A[A.length]=this.rowsBuffer[0][i]}}}return A.join(C||",")};dhtmlXGridObject.prototype.getAllItemIds=function(){return this.getAllRowIds()};dhtmlXGridObject.prototype.deleteRow=function(A,D){if(!D){D=this.getRowById(A)}if(!D){return }this.editStop();if(this.callEvent("onBeforeRowDeleted",[A])==false){return false}if(this.cellType._dhx_find("tree")!=-1){this._removeTrGrRow(D)}else{if(D.parentNode){D.parentNode.removeChild(D)}var E=this.rowsCol._dhx_find(D);if(E!=-1){this.rowsCol._dhx_removeAt(E)}else{E=this.rowsBuffer[0]._dhx_find(A);if(E>=0){this.rowsBuffer[0]._dhx_removeAt(E);this.rowsBuffer[1]._dhx_removeAt(E)}}this.rowsAr[A]=null}for(var C=0;C<this.selectedRows.length;C++){if(this.selectedRows[C].idd==A){this.selectedRows._dhx_removeAt(C)}}if(this.pagingOn){this.changePage()}this.setSizes();this.callEvent("onGridReconstructed",[]);if(this._dload){this._askRealRows()}return true};dhtmlXGridObject.prototype.setColspan=function(C,O,D){if(!this._ecspn){return }var A=this.getRowById(C);if((A._childIndexes)&&(A.childNodes[A._childIndexes[O]])){var H=A._childIndexes[O];var E=A.childNodes[H];var F=E.colSpan;E.colSpan=1;if((F)&&(F!=1)){for(var K=1;K<F;K++){var N=document.createElement("TD");if(E.nextSibling){A.insertBefore(N,E.nextSibling)}else{A.appendChild(N)}A._childIndexes[O+K]=H+K;N._cellIndex=O+K;N.align=this.cellAlign[K];N.style.verticalAlign=this.cellVAlign[K];E=N;this.cells3(A,H+K).setValue("")}}for(var M=O*1+1*F;M<A._childIndexes.length;M++){A._childIndexes[M]+=(F-1)*1}}if((D)&&(D>1)){if(A._childIndexes){var H=A._childIndexes[O]}else{var H=O;A._childIndexes=new Array();for(var M=0;M<A.childNodes.length;M++){A._childIndexes[M]=M}}A.childNodes[H].colSpan=D;for(var M=1;M<D;M++){A._childIndexes[A.childNodes[H+1]._cellIndex]=H;A.removeChild(A.childNodes[H+1])}var I=A.childNodes[A._childIndexes[O]]._cellIndex;for(var M=I*1+1*D;M<A._childIndexes.length;M++){A._childIndexes[M]-=(D-1)}}};dhtmlXGridObject.prototype.preventIECaching=function(A){this.no_cashe=convertStringToBoolean(A);this.xmlLoader.rSeed=this.no_cashe};dhtmlXGridObject.prototype.preventIECashing=dhtmlXGridObject.prototype.preventIECaching;dhtmlXGridObject.prototype.enableColumnAutoSize=function(A){this._eCAS=convertStringToBoolean(A)};dhtmlXGridObject.prototype._onHeaderDblClick=function(D){var C=this.grid;var A=C.getFirstParentOfType(_isIE?event.srcElement:D.target,"TD");if(!C._eCAS){return false}C.adjustColumnSize(A._cellIndexS)};dhtmlXGridObject.prototype.adjustColumnSize=function(F){this._notresize=true;var A=0;this._setColumnSizeR(F,20);for(var E=1;E<this.hdr.rows.length;E++){var D=this.hdr.rows[E];D=D.childNodes[(D._childIndexes)?D._childIndexes[F]:F];if((D)&&((!D.colSpan)||(D.colSpan<2))){if((D.childNodes[0])&&(D.childNodes[0].className=="hdrcell")){D=D.childNodes[0]}A=Math.max(A,((_isFF||_isOpera)?(D.textContent.length*7):D.scrollWidth))}}var C=this.obj._rowslength();for(var H=0;H<C;H++){var I=this.obj._rows(H);if(I._childIndexes&&I._childIndexes[F]!=F){continue}if(_isFF||_isOpera){I=I.childNodes[F].textContent.length*7}else{I=I.childNodes[F].scrollWidth}if(I>A){A=I}}A+=20;this._setColumnSizeR(F,A);this._notresize=false;this.setSizes()};dhtmlXGridObject.prototype.detachHeader=function(A,D){D=D||this.hdr;var C=D.rows[A+1];if(C){C.parentNode.removeChild(C)}this.setSizes()};dhtmlXGridObject.prototype.detachFooter=function(A){this.detachHeader(A,this.ftr)};dhtmlXGridObject.prototype.attachHeader=function(A,E,C){if(typeof (A)=="string"){A=this._eSplit(A)}if(typeof (E)=="string"){E=E.split(this.delim)}C=C||"_aHead";if(this.hdr.rows.length){if(A){this._createHRow([A,E],this[(C=="_aHead")?"hdr":"ftr"])}else{if(this[C]){for(var D=0;D<this[C].length;D++){this.attachHeader.apply(this,this[C][D])}}}}else{if(!this[C]){this[C]=new Array()}this[C][this[C].length]=[A,E,C]}};dhtmlXGridObject.prototype._createHRow=function(D,N){if(!N){this.entBox.style.position="relative";var I=document.createElement("DIV");I.className="c_ftr".substr(2);this.entBox.appendChild(I);var Q=document.createElement("TABLE");Q.cellPadding=Q.cellSpacing=0;if(!_isIE){Q.width="100%";Q.style.paddingRight="20px"}Q.style.tableLayout="fixed";I.appendChild(Q);Q.appendChild(document.createElement("TBODY"));this.ftr=N=Q;var H=Q.insertRow(0);var A=((this.hdrLabels.length<=1)?D[0].length:this.hdrLabels.length);for(var E=0;E<A;E++){H.appendChild(document.createElement("TH"));H.childNodes[E]._cellIndex=E}if(_isIE){H.style.position="absolute"}else{H.style.height="auto"}}var F=D[1];var I=document.createElement("TR");N.rows[0].parentNode.appendChild(I);for(var E=0;E<D[0].length;E++){if(D[0][E]=="#cspan"){var K=I.cells[I.cells.length-1];K.colSpan=(K.colSpan||1)+1;continue}if((D[0][E]=="#rspan")&&(N.rows.length>1)){var T=N.rows.length-2;var S=false;var K=null;while(!S){var K=N.rows[T];for(var C=0;C<K.cells.length;C++){if(K.cells[C]._cellIndex==E){S=C+1;break}}T--}K=K.cells[S-1];K.rowSpan=(K.rowSpan||1)+1;continue}var M=document.createElement("TD");M._cellIndex=M._cellIndexS=E;if(this.forceDivInHeader){M.innerHTML="<div class='hdrcell'>"+D[0][E]+"</div>"}else{M.innerHTML=D[0][E]}if((D[0][E]||"").indexOf("#")!=-1){var Q=D[0][E].match(/(^|{)#([^}]+)(}|$)/);if(Q){var O="_in_header_"+Q[2];if(this[O]){this[O]((this.forceDivInHeader?M.firstChild:M),E,D[0][E].split(Q[0]))}}}if(F){M.style.cssText=F[E]}I.appendChild(M)}var P=N;if(_isKHTML){if(N._kTimer){window.clearTimeout(N._kTimer)}N._kTimer=window.setTimeout(function(){N.rows[1].style.display="none";window.setTimeout(function(){N.rows[1].style.display=""},1)},500)}};dhtmlXGridObject.prototype.attachFooter=function(A,C){this.attachHeader(A,C,"_aFoot")};dhtmlXGridObject.prototype.setCellExcellType=function(D,A,C){this.changeCellType(this.rowsAr[D],A,C)};dhtmlXGridObject.prototype.changeCellType=function(D,E,C){C=C||this.cellType[E];var F=this.cells3(D,E);var A=F.getValue();F.cell._cellType=C;var F=this.cells3(D,E);F.setValue(A)};dhtmlXGridObject.prototype.setRowExcellType=function(D,C){var E=this.rowsAr[D];for(var A=0;A<E.childNodes.length;A++){this.changeCellType(E,A,C)}};dhtmlXGridObject.prototype.setColumnExcellType=function(A,D){for(var C=0;C<this.rowsCol.length;C++){this.changeCellType(this.rowsCol[C],A,D)}};dhtmlXGridObject.prototype.findCell=function(F,H,A){var E=new Array();F=F.toString().toLowerCase();if(!this.rowsCol.length){return E}for(var D=(H||0);D<this.cellType.length;D++){var K=this.cells4(this.rowsCol[0].childNodes[D]);for(var C=0;C<this.rowsCol.length;C++){K.cell=this.rowsCol[C].childNodes[D];var I=K.getValue();if((I||"").toString().toLowerCase().indexOf(F)!=-1){E[E.length]=[C,D]}if(A&&this.rowsCol.length==C+1){this.addRowsFromBuffer()}}if(typeof (H)!="undefined"){return E}}return E};dhtmlXGridObject.prototype.dhx_Event=function(){this.dhx_SeverCatcherPath="";this.attachEvent=function(original,catcher,CallObj){CallObj=CallObj||this;original="ev_"+original;if((!this[original])||(!this[original].addEvent)){var z=new this.eventCatcher(CallObj);z.addEvent(this[original]);this[original]=z}return(original+":"+this[original].addEvent(catcher))};this.callEvent=function(name,arg0){if(this["ev_"+name]){return this["ev_"+name].apply(this,arg0)}return true};this.checkEvent=function(name){if(this["ev_"+name]){return true}return false};this.eventCatcher=function(obj){var dhx_catch=new Array();var m_obj=obj;var func_server=function(catcher,rpc){catcher=catcher.split(":");var postVar="";var postVar2="";var target=catcher[1];if(catcher[1]=="rpc"){postVar='<?xml version="1.0"?><methodCall><methodName>'+catcher[2]+"</methodName><params>";postVar2="</params></methodCall>";target=rpc}var z=function(){};return z};var z=function(){if(dhx_catch){var res=true}for(var i=0;i<dhx_catch.length;i++){if(dhx_catch[i]!=null){var zr=dhx_catch[i].apply(m_obj,arguments);res=res&&zr}}return res};z.addEvent=function(ev){if(typeof (ev)!="function"){if(ev&&ev.indexOf&&ev.indexOf("server:")==0){ev=new func_server(ev,m_obj.rpcServer)}else{ev=eval(ev)}}if(ev){return dhx_catch.push(ev)-1}return false};z.removeEvent=function(id){dhx_catch[id]=null};return z};this.detachEvent=function(id){if(id!=false){var list=id.split(":");this[list[0]].removeEvent(list[1])}}};dhtmlXGridObject.prototype.forEachRow=function(A){for(a in this.rowsAr){if(this.rowsAr[a]&&this.rowsAr[a].tagName){A.apply(this,[this.rowsAr[a].idd])}}};dhtmlXGridObject.prototype.forEachCell=function(D,C){var E=this.rowsAr[D];if(!E){return }for(var A=0;A<this._cCount;A++){C(this.cells3(E,A))}};dhtmlXGridObject.prototype.enableAutoWidth=function(D,A,C){this._awdth=[convertStringToBoolean(D),(A||99999),(C||0)]};dhtmlXGridObject.prototype.getUID=function(){var A=this.getRowsNum()+1;while(this.rowsAr[A]){A++}return A};dhtmlXGridObject.prototype.setOnKeyPressed=function(A){this.attachEvent("onKeyPress",A)};dhtmlXGridObject.prototype.updateFromXML=function(A,E,C,D){if(typeof E=="undefined"){E=true}this._refresh_mode=[true,E,C];if(D){this.xmlLoader.waitCall=D}this.callEvent("onXLS",[this]);this.xmlLoader.loadXML(A)};dhtmlXGridObject.prototype.updateFromXMl=dhtmlXGridObject.prototype.updateFromXML;dhtmlXGridObject.prototype._refreshFromXML=function(E){if(window.eXcell_tree){eXcell_tree.prototype.setValueX=eXcell_tree.prototype.setValue;eXcell_tree.prototype.setValue=function(O){if(this.grid._h2.get[this.cell.parentNode.idd]){this.setLabel(O[1]);if(O[3]){this.setImage(O[3])}}else{this.setValueX(O)}}}var N=this.cellType._dhx_find("tree");var F=E.doXPath("//rows")[0].getAttribute("parent")||0;var I={};if(this._refresh_mode[2]){this.forEachRow(function(O){I[O]=true})}var M=E.doXPath("//row");for(var D=0;D<M.length;D++){var K=M[D];var C=K.getAttribute("id");I[C]=false;if(this._dload||this.rowsBuffer[0].length){if(this.rowsAr[C]){this._fillRowFromXML(this.rowsAr[C],K,-1)}else{var H=this.rowsBuffer[0]._dhx_find(C);if(H!=-1){this.rowsBuffer[1][H]=K}}}else{if(this.rowsAr[C]){this._fillRowFromXML(this.rowsAr[C],K,N,F)}else{var A=this._prepareRow(C);A=this._fillRowFromXML(A,K,N,F);if(N!=-1&&this._h2.get[F].state=="minus"){A=this._insertRowAt(A,this.getRowIndex(F)+this._getOpenLenght(F,0))}else{A=this._insertRowAt(A)}this._postRowProcessing(A,K)}}}if(this._refresh_mode[2]){for(C in I){if(I[C]&&this.rowsAr[C]){this.deleteRow(C)}}}if(window.eXcell_tree){eXcell_tree.prototype.setValue=eXcell_tree.prototype.setValueX}this.callEvent("onXLE",[this,M.length])};dhtmlXGridObject.prototype.getCustomCombo=function(D,C){var A=this.cells(D,C).cell;if(!A._combo){A._combo=new dhtmlXGridComboObject()}return A._combo};dhtmlXGridObject.prototype.setTabOrder=function(A){var D=A.split(this.delim);this._tabOrder=[];for(var C=0;C<this._cCount;C++){D[C]={c:parseInt(D[C]),ind:C}}D.sort(function(F,E){return(F.c>E.c?1:-1)});for(var C=0;C<this._cCount;C++){if(!D[C+1]||(typeof D[C].c=="undefined")){this._tabOrder[D[C].ind]=(D[0].ind+1)*-1}else{this._tabOrder[D[C].ind]=D[C+1].ind}}};dhtmlXGridObject.prototype.i18n={loading:"Loading"};dhtmlXGridObject.prototype._key_events={k13_1_0:function(){var A=this.rowsCol._dhx_find(this.row);this.selectCell(this.rowsCol[A+1],this.cell._cellIndex,true)},k13_0_1:function(){var A=this.rowsCol._dhx_find(this.row);this.selectCell(this.rowsCol[A-1],this.cell._cellIndex,true)},k13_0_0:function(){this.editStop();this.callEvent("onEnter",[(this.row?this.row.idd:null),(this.cell?this.cell._cellIndex:null)])},k9_0_0:function(){this.editStop();var A=this._getNextCell(null,1);if(A){this.selectCell(A.parentNode,A._cellIndex,(this.row!=A.parentNode),false,true);this._still_active=true}},k9_0_1:function(){this.editStop();var A=this._getNextCell(null,-1);if(A){this.selectCell(A.parentNode,A._cellIndex,(this.row!=A.parentNode),false,true);this._still_active=true}},k113_0_0:function(){if(this._f2kE){this.editCell()}},k32_0_0:function(){var A=this.cells4(this.cell);if(!A.changeState||(A.changeState()===false)){return false}},k27_0_0:function(){this.editStop(true)},k33_0_0:function(){if(this.pagingOn){this.changePage(this.currentPage-1)}else{this.scrollPage(-1)}},k34_0_0:function(){if(this.pagingOn){this.changePage(this.currentPage+1)}else{this.scrollPage(1)}},k37_0_0:function(){if(!this.editor&&this.isTreeGrid()){this.collapseKids(this.row)}else{return false}},k39_0_0:function(){if(!this.editor&&this.isTreeGrid()){this.expandKids(this.row)}else{return false}},k40_0_0:function(){if(this.editor&&this.editor.combo){this.editor.shiftNext()}else{var A=this.rowsCol._dhx_find(this.row)+1;if(A!=this.rowsCol.length&&A!=this.obj.rows.length-1){var C=this._nextRow(A-1,1);if(C._sRow||C._rLoad){return false}this.selectCell(C,this.cell._cellIndex,true)}else{this._key_events.k34_0_0.apply(this,[]);if(this.pagingOn&&this.rowsCol[(this.currentPage-1)*this.rowsBufferOutSize]){this.selectCell((this.currentPage-1)*this.rowsBufferOutSize,0,true)}}}},k38_0_0:function(){if(this.editor&&this.editor.combo){this.editor.shiftPrev()}else{var A=this.rowsCol._dhx_find(this.row)+1;if(A!=-1&&(!this.pagingOn||(this.currentPage-1)*this.rowsBufferOutSize+1<A)){var C=this._nextRow(A-1,-1);if(!C||C._sRow||C._rLoad){return false}this.selectCell(C,this.cell._cellIndex,true)}else{this._key_events.k33_0_0.apply(this,[]);if(this.pagingOn&&this.rowsCol[this.currentPage*this.rowsBufferOutSize-1]){this.selectCell(this.currentPage*this.rowsBufferOutSize-1,0,true)}}}}};function dhtmlXGridCellObject(A){this.destructor=function(){this.cell.obj=null;this.cell=null;this.grid=null;this.base=null;return null};this.cell=A;this.getValue=function(){if((this.cell.firstChild)&&(this.cell.firstChild.tagName=="TEXTAREA")){return this.cell.firstChild.value}else{return this.cell.innerHTML._dhx_trim()}};this.getMathValue=function(){if(this.cell._val){return this.cell._val}else{return this.getValue()}};this.getFont=function(){arOut=new Array(3);if(this.cell.style.fontFamily){arOut[0]=this.cell.style.fontFamily}if(this.cell.style.fontWeight=="bold"||this.cell.parentNode.style.fontWeight=="bold"){arOut[1]="bold"}if(this.cell.style.fontStyle=="italic"||this.cell.parentNode.style.fontWeight=="italic"){arOut[1]+="italic"}if(this.cell.style.fontSize){arOut[2]=this.cell.style.fontSize}else{arOut[2]=""}return arOut.join("-")};this.getTextColor=function(){if(this.cell.style.color){return this.cell.style.color}else{return"#000000"}};this.getBgColor=function(){if(this.cell.bgColor){return this.cell.bgColor}else{return"#FFFFFF"}};this.getHorAlign=function(){if(this.cell.style.textAlign){return this.cell.style.textAlign}else{if(this.cell.align){return this.cell.align}else{return"left"}}};this.getWidth=function(){return this.cell.scrollWidth};this.setFont=function(C){fntAr=C.split("-");this.cell.style.fontFamily=fntAr[0];this.cell.style.fontSize=fntAr[fntAr.length-1];if(fntAr.length==3){if(/bold/.test(fntAr[1])){this.cell.style.fontWeight="bold"}if(/italic/.test(fntAr[1])){this.cell.style.fontStyle="italic"}if(/underline/.test(fntAr[1])){this.cell.style.textDecoration="underline"}}};this.setTextColor=function(C){this.cell.style.color=C};this.setBgColor=function(C){if(C==""){C=null}this.cell.bgColor=C};this.setHorAlign=function(C){if(C.length==1){if(C=="c"){this.cell.style.textAlign="center"}else{if(C=="l"){this.cell.style.textAlign="left"}else{this.cell.style.textAlign="right"}}}else{this.cell.style.textAlign=C}};this.wasChanged=function(){if(this.cell.wasChanged){return true}else{return false}};this.isCheckbox=function(){var C=this.cell.firstChild;if(C&&C.tagName=="INPUT"){type=C.type;if(type=="radio"||type=="checkbox"){return true}else{return false}}else{return false}};this.isChecked=function(){if(this.isCheckbox()){return this.cell.firstChild.checked}};this.isDisabled=function(){return this.cell._disabled};this.setChecked=function(C){if(this.isCheckbox()){if(C!="true"&&C!=1){C=false}this.cell.firstChild.checked=C}};this.setDisabled=function(C){if(C!="true"&&C!=1){C=false}if(this.isCheckbox()){this.cell.firstChild.disabled=C;if(this.disabledF){this.disabledF(C)}}this.cell._disabled=C}}dhtmlXGridCellObject.prototype.setValue=function(A){if((typeof (A)!="number")&&(!A||A.toString()._dhx_trim()=="")){A="&nbsp;";this.cell._clearCell=true}else{this.cell._clearCell=false}this.setCValue(A)};dhtmlXGridCellObject.prototype.getTitle=function(){return(_isIE?this.cell.innerText:this.cell.textContent)};dhtmlXGridCellObject.prototype.setCValue=function(C,A){this.cell.innerHTML=C;this.grid.callEvent("onCellChanged",[this.cell.parentNode.idd,this.cell._cellIndex,A||C])};dhtmlXGridCellObject.prototype.setCTxtValue=function(A){this.cell.innerHTML="";this.cell.appendChild(document.createTextNode(A));this.grid.callEvent("onCellChanged",[this.cell.parentNode.idd,this.cell._cellIndex,A])};dhtmlXGridCellObject.prototype.setLabel=function(A){this.cell.innerHTML=A};dhtmlXGridCellObject.prototype.getMath=function(){if(this._val){return this.val}else{return this.getValue()}};function eXcell(){this.obj=null;this.val=null;this.changeState=function(){return false};this.edit=function(){this.val=this.getValue()};this.detach=function(){return false};this.getPosition=function(E){var A=E;var D=0;var C=0;while(A.tagName!="BODY"){D+=A.offsetLeft;C+=A.offsetTop;A=A.offsetParent}return new Array(D,C)}}eXcell.prototype=new dhtmlXGridCellObject;function eXcell_ed(A){if(A){this.cell=A;this.grid=this.cell.parentNode.grid}this.edit=function(){this.cell.atag=((!this.grid.multiLine)&&(_isKHTML||_isMacOS||_isFF))?"INPUT":"TEXTAREA";this.val=this.getValue();this.obj=document.createElement(this.cell.atag);this.obj.setAttribute("autocomplete","off");this.obj.style.height=(this.cell.offsetHeight-(_isIE?4:2))+"px";this.obj.className="dhx_combo_edit";this.obj.wrap="soft";this.obj.style.textAlign=this.cell.align;this.obj.onclick=function(C){(C||event).cancelBubble=true};this.obj.onmousedown=function(C){(C||event).cancelBubble=true};this.obj.value=this.val;this.cell.innerHTML="";this.cell.appendChild(this.obj);if(_isFF){this.obj.style.overflow="visible";if((this.grid.multiLine)&&(this.obj.offsetHeight>=18)&&(this.obj.offsetHeight<40)){this.obj.style.height="36px";this.obj.style.overflow="scroll"}}this.obj.onselectstart=function(C){if(!C){C=event}C.cancelBubble=true;return true};this.obj.focus();this.obj.focus()};this.getValue=function(){if((this.cell.firstChild)&&((this.cell.atag)&&(this.cell.firstChild.tagName==this.cell.atag))){return this.cell.firstChild.value}if(this.cell._clearCell){return""}return this.cell.innerHTML.toString()._dhx_trim()};this.detach=function(){this.setValue(this.obj.value);return this.val!=this.getValue()}}eXcell_ed.prototype=new eXcell;function eXcell_edtxt(A){if(A){this.cell=A;this.grid=this.cell.parentNode.grid}this.getValue=function(){if((this.cell.firstChild)&&((this.cell.atag)&&(this.cell.firstChild.tagName==this.cell.atag))){return this.cell.firstChild.value}if(this.cell._clearCell){return""}return(_isIE?this.cell.innerText:this.cell.textContent)};this.setValue=function(C){if(!C||C.toString()._dhx_trim()==""){C=" ";this.cell._clearCell=true}else{this.cell._clearCell=false}this.setCTxtValue(C)}}eXcell_edtxt.prototype=new eXcell_ed;function eXcell_edn(A){if(A){this.cell=A;this.grid=this.cell.parentNode.grid}this.getValue=function(){if((this.cell.firstChild)&&(this.cell.firstChild.tagName=="TEXTAREA")){return this.cell.firstChild.value}if(this.cell._clearCell){return""}return this.grid._aplNFb(this.cell.innerHTML.toString()._dhx_trim(),this.cell._cellIndex)};this.detach=function(){var C=this.obj.value;this.setValue(C);return this.val!=this.getValue()}}eXcell_edn.prototype=new eXcell_ed;eXcell_edn.prototype.setValue=function(A){if(!A||A.toString()._dhx_trim()==""){A="0";this.cell._clearCell=true}else{this.cell._clearCell=false}this.setCValue(this.grid._aplNF(A,this.cell._cellIndex))};function eXcell_ch(A){if(A){this.cell=A;this.grid=this.cell.parentNode.grid;this.cell.obj=this}this.disabledF=function(C){if((C==true)||(C==1)){this.cell.innerHTML=this.cell.innerHTML.replace("item_chk0.","item_chk0_dis.").replace("item_chk1.","item_chk1_dis.")}else{this.cell.innerHTML=this.cell.innerHTML.replace("item_chk0_dis.","item_chk0.").replace("item_chk1_dis.","item_chk1.")}};this.changeState=function(){if((!this.grid.isEditable)||(this.cell.parentNode._locked)||(this.isDisabled())){return }if(this.grid.callEvent("onEditCell",[0,this.cell.parentNode.idd,this.cell._cellIndex])){this.val=this.getValue();if(this.val=="1"){this.setValue("0")}else{this.setValue("1")}this.cell.wasChanged=true;this.grid.callEvent("onEditCell",[1,this.cell.parentNode.idd,this.cell._cellIndex]);this.grid.callEvent("onCheckbox",[this.cell.parentNode.idd,this.cell._cellIndex,(this.val!="1")])}else{this.editor=null}};this.getValue=function(){return this.cell.chstate?this.cell.chstate.toString():"0"};this.isCheckbox=function(){return true};this.isChecked=function(){if(this.getValue()=="1"){return true}else{return false}};this.setChecked=function(C){this.setValue(C.toString())};this.detach=function(){return this.val!=this.getValue()};this.edit=null}eXcell_ch.prototype=new eXcell;eXcell_ch.prototype.setValue=function(C){this.cell.style.verticalAlign="middle";if(C){C=C.toString()._dhx_trim();if((C=="false")||(C=="0")){C=""}}if(C){C="1";this.cell.chstate="1"}else{C="0";this.cell.chstate="0"}var A=this;this.setCValue("<img src='"+this.grid.imgURL+"item_chk"+C+".gif' onclick='new eXcell_ch(this.parentNode).changeState(); (arguments[0]||event).cancelBubble=true; '>",this.cell.chstate)};function eXcell_ra(A){this.base=eXcell_ch;this.base(A);this.grid=A.parentNode.grid;this.disabledF=function(C){if((C==true)||(C==1)){this.cell.innerHTML=this.cell.innerHTML.replace("radio_chk0.","radio_chk0_dis.").replace("radio_chk1.","radio_chk1_dis.")}else{this.cell.innerHTML=this.cell.innerHTML.replace("radio_chk0_dis.","radio_chk0.").replace("radio_chk1_dis.","radio_chk1.")}};this.changeState=function(){if((!this.grid.isEditable)||(this.cell.parentNode._locked)){return }if(this.grid.callEvent("onEditCell",[0,this.cell.parentNode.idd,this.cell._cellIndex])!=false){this.val=this.getValue();if(this.val=="1"){this.setValue("0")}else{this.setValue("1")}this.cell.wasChanged=true;this.grid.callEvent("onEditCell",[1,this.cell.parentNode.idd,this.cell._cellIndex]);this.grid.callEvent("onCheckbox",[this.cell.parentNode.idd,this.cell._cellIndex,(this.val!="1")])}else{this.editor=null}};this.edit=null}eXcell_ra.prototype=new eXcell_ch;eXcell_ra.prototype.setValue=function(D){this.cell.style.verticalAlign="middle";if(D){D=D.toString()._dhx_trim();if((D=="false")||(D=="0")){D=""}}if(D){if(!this.grid._RaSeCol){this.grid._RaSeCol=[]}if(this.grid._RaSeCol[this.cell._cellIndex]){var C=this.grid.cells4(this.grid._RaSeCol[this.cell._cellIndex]);C.setValue("0");this.grid.callEvent("onEditCell",[1,C.cell.parentNode.idd,C.cell._cellIndex])}this.grid._RaSeCol[this.cell._cellIndex]=this.cell;D="1";this.cell.chstate="1"}else{D="0";this.cell.chstate="0"}var A=this;this.setCValue("<img src='"+this.grid.imgURL+"radio_chk"+D+".gif' onclick='this.parentNode.obj.changeState()'>",this.cell.chstate)};function eXcell_txt(A){if(A){this.cell=A;this.grid=this.cell.parentNode.grid}this.edit=function(){this.val=this.getValue();this.obj=document.createElement("TEXTAREA");this.obj.className="dhx_textarea";this.obj.onclick=function(F){(F||event).cancelBubble=true};var D=this.grid.getPosition(this.cell);if(!this.cell._clearCell){this.obj.value=this.val}this.obj.style.display="";this.obj.style.textAlign=this.cell.align;if(_isFF){var C=document.createElement("DIV");C.appendChild(this.obj);C.style.overflow="auto";C.className="dhx_textarea";this.obj.style.margin="0px 0px 0px 0px";this.obj.style.border="0px";this.obj=C}document.body.appendChild(this.obj);this.obj.onkeydown=function(H){var F=(H||event);if(F.keyCode==9){globalActiveDHTMLGridObject.entBox.focus();globalActiveDHTMLGridObject.doKey({keyCode:F.keyCode,shiftKey:F.shiftKey,srcElement:"0"});return false}};this.obj.style.left=D[0]+"px";this.obj.style.top=D[1]+this.cell.offsetHeight+"px";if(this.cell.scrollWidth<200){var E=200}else{var E=this.cell.scrollWidth}this.obj.style.width=E+(_isFF?18:16)+"px";if(_isFF){this.obj.firstChild.style.width=parseInt(this.obj.style.width)+"px";this.obj.firstChild.style.height=this.obj.offsetHeight-3+"px"}if(_isFF){this.obj.firstChild.focus()}else{this.obj.focus();this.obj.focus()}};this.detach=function(){var C="";if(_isFF){C=this.obj.firstChild.value}else{C=this.obj.value}if(C==""){this.cell._clearCell=true}else{this.cell._clearCell=false}this.setValue(C);document.body.removeChild(this.obj);return this.val!=this.getValue()};this.getValue=function(){if(this.cell.firstChild){if(this.cell.firstChild.tagName=="TEXTAREA"){return this.obj.firstChild.value}else{if(this.cell.firstChild.tagName=="DIV"){return this.obj.firstChild.firstChild.value}}}if(this.cell._clearCell){return""}if((!this.grid.multiLine)){return this.cell._brval||this.cell.innerHTML}else{return this.cell.innerHTML.replace(/<br[^>]*>/gi,"\n")._dhx_trim()}}}eXcell_txt.prototype=new eXcell;function eXcell_txttxt(A){if(A){this.cell=A;this.grid=this.cell.parentNode.grid}this.getValue=function(){if((this.cell.firstChild)&&(this.cell.firstChild.tagName=="TEXTAREA")){return this.cell.firstChild.value}if(this.cell._clearCell){return""}if((!this.grid.multiLine)&&this.cell._brval){return this.cell._brval}return(_isIE?this.cell.innerText:this.cell.textContent)};this.setValue=function(C){this.cell._brval=C;if(!C||C.toString()._dhx_trim()==""){C=" "}this.setCTxtValue(C)}}eXcell_txttxt.prototype=new eXcell_txt;eXcell_txt.prototype.setValue=function(A){if(!A||A.toString()._dhx_trim()==""){A="&nbsp;";this.cell._clearCell=true}else{this.cell._clearCell=false}this.cell._brval=A;if((!this.grid.multiLine)){this.setCValue(A,A)}else{this.setCValue(A.replace(/\n/g,"<br/>"),A)}};function eXcell_co(A){if(A){this.cell=A;this.grid=this.cell.parentNode.grid;this.combo=(this.cell._combo||this.grid.getCombo(this.cell._cellIndex));this.editable=true}this.shiftNext=function(){var C=this.list.options[this.list.selectedIndex+1];if(C){C.selected=true}this.obj.value=this.list.options[this.list.selectedIndex].text;return true};this.shiftPrev=function(){if(this.list.selectedIndex!=0){var C=this.list.options[this.list.selectedIndex-1];if(C){C.selected=true}this.obj.value=this.list.options[this.list.selectedIndex].text}return true};this.edit=function(){this.val=this.getValue();this.text=this.getText()._dhx_trim();var E=this.grid.getPosition(this.cell);this.obj=document.createElement("TEXTAREA");this.obj.className="dhx_combo_edit";this.obj.style.height=(this.cell.offsetHeight-4)+"px";this.obj.wrap="soft";this.obj.style.textAlign=this.cell.align;this.obj.onclick=function(M){(M||event).cancelBubble=true};this.obj.value=this.text;this.obj.onselectstart=function(M){if(!M){M=event}M.cancelBubble=true;return true};var H=this;this.obj.onkeyup=function(N){var O=this.readonly?String.fromCharCode((N||event).keyCode):this.value;var P=H.list.options;for(var M=0;M<P.length;M++){if(P[M].text.indexOf(O)==0){return P[M].selected=true}}};this.list=document.createElement("SELECT");this.list.className="dhx_combo_select";this.list.style.width=this.cell.offsetWidth+"px";this.list.style.left=E[0]+"px";this.list.style.top=E[1]+this.cell.offsetHeight+"px";this.list.onclick=function(O){var N=O||window.event;var M=N.target||N.srcElement;if(M.tagName=="OPTION"){M=M.parentNode}H.setValue(M.value);H.editable=false;H.grid.editStop()};var C=this.combo.getKeys();var F=false;var K=0;for(var D=0;D<C.length;D++){var I=this.combo.get(C[D]);this.list.options[this.list.options.length]=new Option(I,C[D]);if(C[D]==this.val){K=this.list.options.length-1;F=true}}if(F==false){this.list.options[this.list.options.length]=new Option(this.text,this.val===null?"":this.val);K=this.list.options.length-1}document.body.appendChild(this.list);this.list.size="6";this.cstate=1;if(this.editable){this.cell.innerHTML=""}else{this.obj.style.width="1px";this.obj.style.height="1px"}this.cell.appendChild(this.obj);this.list.options[K].selected=true;if((!_isFF)||(this.editable)){this.obj.focus();this.obj.focus()}if(!this.editable){this.obj.style.visibility="hidden";this.list.focus();this.list.onkeydown=function(M){H.grid.setActive(true);if((M||window.event).keyCode<30){return H.grid.doKey({target:H.cell,keyCode:(M||window.event).keyCode})}}}};this.getValue=function(){return((this.cell.combo_value==window.undefined)?"":this.cell.combo_value)};this.detach=function(){if(this.val!=this.getValue()){this.cell.wasChanged=true}if(this.list.parentNode!=null){if(this.editable){if(this.obj.value._dhx_trim()!=this.text){if(this.list.selectedIndex&&this.list.options[this.list.selectedIndex].text==this.obj.value){this.setValue(this.list.value)}else{this.setValue(this.obj.value)}}else{this.setValue(this.val)}}else{this.setValue(this.list.value)}}if(this.list.parentNode){this.list.parentNode.removeChild(this.list)}if(this.obj.parentNode){this.obj.parentNode.removeChild(this.obj)}return this.val!=this.getValue()}}eXcell_co.prototype=new eXcell;eXcell_co.prototype.getText=function(){return this.cell.innerHTML};eXcell_co.prototype.setValue=function(D){if(typeof (D)=="object"){var C=this.grid.xmlLoader.doXPath("./option",D);if(C.length){this.cell._combo=new dhtmlXGridComboObject()}for(var A=0;A<C.length;A++){this.cell._combo.put(C[A].getAttribute("value"),C[A].firstChild?C[A].firstChild.data:"")}D=D.firstChild.data}if((D||"").toString()._dhx_trim()==""){D=null}if(D!==null){this.setCValue((this.cell._combo||this.grid.getCombo(this.cell._cellIndex)).get(D)||D,D)}else{this.setCValue("&nbsp;",D)}this.cell.combo_value=D};function eXcell_coro(A){this.base=eXcell_co;this.base(A);this.editable=false}eXcell_coro.prototype=new eXcell_co;function eXcell_cotxt(A){this.base=eXcell_co;this.base(A)}eXcell_cotxt.prototype=new eXcell_co;eXcell_cotxt.prototype.getText=function(){return(_isIE?this.cell.innerText:this.cell.textContent)};eXcell_cotxt.prototype.setValue=function(D){if(typeof (D)=="object"){var C=this.grid.xmlLoader.doXPath("./option",D);if(C.length){this.cell._combo=new dhtmlXGridComboObject()}for(var A=0;A<C.length;A++){this.cell._combo.put(C[A].getAttribute("value"),C[A].firstChild?C[A].firstChild.data:"")}D=D.firstChild.data}if((D||"").toString()._dhx_trim()==""){D=null}if(D!==null){this.setCTxtValue((this.cell._combo||this.grid.getCombo(this.cell._cellIndex)).get(D)||D,D)}else{this.setCTxtValue(" ",D)}this.cell.combo_value=D};function eXcell_corotxt(A){this.base=eXcell_co;this.base(A);this.editable=false}eXcell_corotxt.prototype=new eXcell_cotxt;function eXcell_cp(A){try{this.cell=A;this.grid=this.cell.parentNode.grid}catch(C){}this.edit=function(){this.val=this.getValue();this.obj=document.createElement("SPAN");this.obj.style.border="1px solid black";this.obj.style.position="absolute";var D=this.grid.getPosition(this.cell);this.colorPanel(4,this.obj);document.body.appendChild(this.obj);this.obj.style.left=D[0]+"px";this.obj.style.top=D[1]+this.cell.offsetHeight+"px"};this.toolDNum=function(D){if(D.length==1){D="0"+D}return D};this.colorPanel=function(M,P){var I=document.createElement("TABLE");P.appendChild(I);I.cellSpacing=0;I.editor_obj=this;I.style.cursor="default";I.style.cursor="table-layout:fixed";I.onclick=function(U){var T=U||window.event;var Q=T.target||T.srcElement;var S=Q.parentNode.parentNode.parentNode.editor_obj;S.setValue(Q.style.backgroundColor);S.grid.editStop()};var F=256/M;for(var H=0;H<=(256/F);H++){var D=I.insertRow(H);for(var K=0;K<=(256/F);K++){for(var E=0;E<=(256/F);E++){R=new Number(F*H)-(H==0?0:1);G=new Number(F*K)-(K==0?0:1);B=new Number(F*E)-(E==0?0:1);var O=this.toolDNum(R.toString(16))+""+this.toolDNum(G.toString(16))+""+this.toolDNum(B.toString(16));var N=D.insertCell(K);N.width="10px";N.innerHTML="&nbsp;";N.title=O.toUpperCase();N.style.backgroundColor="#"+O;if(this.val!=null&&"#"+O.toUpperCase()==this.val.toUpperCase()){N.style.border="2px solid white"}}}}};this.getValue=function(){return this.cell.firstChild.style?this.cell.firstChild.style.backgroundColor:""};this.getRed=function(){return Number(parseInt(this.getValue().substr(1,2),16))};this.getGreen=function(){return Number(parseInt(this.getValue().substr(3,2),16))};this.getBlue=function(){return Number(parseInt(this.getValue().substr(5,2),16))};this.detach=function(){if(this.obj.offsetParent!=null){document.body.removeChild(this.obj)}return this.val!=this.getValue()}}eXcell_cp.prototype=new eXcell;eXcell_cp.prototype.setValue=function(A){this.setCValue("<div style='width:100%;height:"+(this.cell.offsetHeight-2)+";background-color:"+(A||"")+";border:0px;'>&nbsp;</div>",A)};function eXcell_img(A){try{this.cell=A;this.grid=this.cell.parentNode.grid}catch(C){}this.getValue=function(){if(this.cell.firstChild.tagName=="IMG"){return this.cell.firstChild.src+(this.cell.titFl!=null?"^"+this.cell.tit:"")}else{if(this.cell.firstChild.tagName=="A"){var D=this.cell.firstChild.firstChild.src+(this.cell.titFl!=null?"^"+this.cell.tit:"");D+="^"+this.cell.lnk;if(this.cell.trg){D+="^"+this.cell.trg}return D}}}}eXcell_img.prototype=new eXcell;eXcell_img.prototype.getTitle=function(){return this.cell.tit};eXcell_img.prototype.setValue=function(D){var C=D;if(D.indexOf("^")!=-1){var A=D.split("^");D=A[0];C=A[1];if(A.length>2){this.cell.lnk=A[2];if(A[3]){this.cell.trg=A[3]}}this.cell.titFl="1"}this.setCValue("<img src='"+(D||"")._dhx_trim()+"' border='0'>",D);if(this.cell.lnk){this.cell.innerHTML="<a href='"+this.cell.lnk+"' target='"+this.cell.trg+"'>"+this.cell.innerHTML+"</a>"}this.cell.tit=C};function eXcell_price(A){this.base=eXcell_ed;this.base(A);this.getValue=function(){if(this.cell.childNodes.length>1){return this.cell.childNodes[1].innerHTML.toString()._dhx_trim()}else{return"0"}}}eXcell_price.prototype=new eXcell_ed;eXcell_price.prototype.setValue=function(C){if(isNaN(Number(C))){if(!(C||"")||(C||"")._dhx_trim()!=""){C=0}C=this.val||0}var A="green";if(C<0){A="red"}this.setCValue("<span>$</span><span style='padding-right:2px;color:"+A+";'>"+C+"</span>",C)};function eXcell_dyn(A){this.base=eXcell_ed;this.base(A);this.getValue=function(){return this.cell.firstChild.childNodes[1].innerHTML.toString()._dhx_trim()}}eXcell_dyn.prototype=new eXcell_ed;eXcell_dyn.prototype.setValue=function(D){if(!D||isNaN(Number(D))){D=0}if(D>0){var C="green";var A="dyn_up.gif"}else{if(D==0){var C="black";var A="dyn_.gif"}else{var C="red";var A="dyn_down.gif"}}this.setCValue("<div style='position:relative;padding-right:2px; width:100%;'><img src='"+this.grid.imgURL+""+A+"' height='15' style='position:absolute;top:0px;left:0px;'><span style='width:100%;color:"+C+";'>"+D+"</span></div>",D)};function eXcell_ro(A){if(A){this.cell=A;this.grid=this.cell.parentNode.grid}this.edit=function(){};this.isDisabled=function(){return true}}eXcell_ro.prototype=new eXcell;function eXcell_ron(A){this.cell=A;this.grid=this.cell.parentNode.grid;this.edit=function(){};this.isDisabled=function(){return true};this.getValue=function(){return this.grid._aplNFb(this.cell.innerHTML.toString()._dhx_trim(),this.cell._cellIndex)}}eXcell_ron.prototype=new eXcell;eXcell_ron.prototype.setValue=function(A){if(A===0){A="0"}else{if(!A||A.toString()._dhx_trim()==""){return this.setCValue("&nbsp;")}}this.setCValue(this.grid._aplNF(A,this.cell._cellIndex))};function eXcell_rotxt(A){this.cell=A;this.grid=this.cell.parentNode.grid;this.edit=function(){};this.isDisabled=function(){return true};this.setValue=function(C){if(!C||C.toString()._dhx_trim()==""){C=" "}this.setCTxtValue(C)}}eXcell_rotxt.prototype=new eXcell;function dhtmlXGridComboObject(){this.keys=new dhtmlxArray();this.values=new dhtmlxArray();this.put=function(C,D){for(var A=0;A<this.keys.length;A++){if(this.keys[A]==C){this.values[A]=D;return true}}this.values[this.values.length]=D;this.keys[this.keys.length]=C};this.get=function(C){for(var A=0;A<this.keys.length;A++){if(this.keys[A]==C){return this.values[A]}}return null};this.clear=function(){this.keys=new dhtmlxArray();this.values=new dhtmlxArray()};this.remove=function(C){for(var A=0;A<this.keys.length;A++){if(this.keys[A]==C){this.keys._dhx_removeAt(A);this.values._dhx_removeAt(A);return true}}};this.size=function(){var A=0;for(var C=0;C<this.keys.length;C++){if(this.keys[C]!=null){A++}}return A};this.getKeys=function(){var A=new Array(0);for(var C=0;C<this.keys.length;C++){if(this.keys[C]!=null){A[A.length]=this.keys[C]}}return A};this.save=function(){this._save=new Array();for(var A=0;A<this.keys.length;A++){this._save[A]=[this.keys[A],this.values[A]]}};this.restore=function(){if(this._save){this.keys[A]=new Array();this.values[A]=new Array();for(var A=0;A<this._save.length;A++){this.keys[A]=this._save[A][0];this.values[A]=this._save[A][1]}}};return this}function Hashtable(){this.keys=new dhtmlxArray();this.values=new dhtmlxArray();return this}Hashtable.prototype=new dhtmlXGridComboObject;function eXcell_ednro(A){this.base=eXcell_edn;this.base(A);this.edit=function(){return false};this.detach=function(){return false}}eXcell_ednro.prototype=new eXcell_edn;dhtmlXGridObject.prototype.enableSmartRenderingSorting=function(A){this._srndsort=convertStringToBoolean(A)};dhtmlXGridObject.prototype.enableSmartRendering=function(D,C,E,A){this._dload=convertStringToBoolean(D);this.attachEvent("onBeforeSorting",function(){return this._srndsort});if(!this._dload){this.xmlLoader=new dtmlXMLLoaderObject(this.doLoadDetails,window,true,this.no_cashe);window.clearTimeout(this._dLoadTimer);if(this.deleteRow_WSRD){this.deleteRow=this.deleteRow_WSRD;this._insertRowAt=this._insertRowAt_WSRD;this.sortRows=this.sortRows_WSRD;this._initDrF=false}return }if(!this._srdh){this._srdh=20}if(!this.deleteRow_WSRD){this.deleteRow_WSRD=this.deleteRow;this.deleteRow=this.deleteRow_WSRDA;this._insertRowAt_WSRD=this._insertRowAt;this._insertRowAt=this._insertRowAt_WSRDA;this.sortRows_WSRD=this.sortRows;this.sortRows=function(H,O,I){I=(I||"asc").toLowerCase();var T=this;var Q=new Array();var S=this.rowsCol;for(var M=0;M<this.rowsCol.length;M++){if(this.rowsCol[M]&&!this.rowsBuffer[1][M]){this.rowsBuffer[1][M]=this.rowsCol[M];this.rowsBuffer[0][M]=this.rowsCol[M].idd}}var P=this.rowsBuffer[1];function F(V,U){var W=V.firstChild;while(true){while(W&&W.tagName!="cell"&&W.tagName!="TD"){W=W.nextSibling}U--;if(U<0){return(W.firstChild?W.firstChild.data:"")}W=W.nextSibling}return""}for(var M=0;M<P.length;M++){P[M]={obj:P[M],idd:(P[M].idd||P[M].getAttribute("id"))};Q[P[M].idd]=F(P[M].obj,H)}var N=(new Date()).valueOf();if(O=="cus"){P.sort(function(V,U){return T._customSorts[H](Q[V.idd],Q[U.idd],I,V.idd,U.idd)})}else{if(O=="str"){P.sort(function(V,U){if(I=="asc"){return Q[V.idd]>Q[U.idd]?1:-1}else{return Q[V.idd]<Q[U.idd]?1:-1}})}else{if(O=="int"){P.sort(function(W,V){var U=parseFloat(Q[W.idd]);U=isNaN(U)?-99999999999999:U;var X=parseFloat(Q[V.idd]);X=isNaN(X)?-99999999999999:X;if(I=="asc"){return U-X}else{return X-U}})}else{if(O=="date"){P.sort(function(W,V){var U=Date.parse(Q[W.idd])||(Date.parse("01/01/1900"));var X=Date.parse(Q[V.idd])||(Date.parse("01/01/1900"));if(I=="asc"){return U-X}else{return X-U}})}}}}var K=(new Date()).valueOf();for(var M=0;M<P.length;M++){P[M]=P[M].obj}for(var M=1;M<this.obj.rows.length;M){this.obj.rows[1].parentNode.removeChild(this.obj.rows[1])}this.rowsCol=new dhtmlxArray();for(var M=0;M<P.length;M++){this.rowsBuffer[0][M]=(P[M].idd||P[M].getAttribute("id"))}this._fastAddRowSpacer(0,this.limit*this._srdh);this._askRealRows(0)}}this._dInc=12;this._dl_start=new Array();this._limitC=this.limit=C;this.multiLine=false;this._dloadSize=Math.floor(parseInt(this.entBox.offsetHeight)/this._srdh)+2;this.renderSize=A;this.obj.className+=" row20px";this._dpref=E||this._dloadSize;if(this.hdr.childNodes[1]){this._initD()}else{this._initDrF=true}};dhtmlXGridObject.prototype.getStateOfView=function(){if(!this._srdh){this._srdh=20}return[Math.floor(this.objBox.scrollTop/this._srdh),Math.ceil(parseInt(this.objBox.offsetHeight)/this._srdh),this.limit]};dhtmlXGridObject.prototype.setAwaitedRowHeight=function(A){this._srdh=parseInt(A)};dhtmlXGridObject.prototype._initD=function(){if(this.limit){this._fastAddRowSpacer(0,this.limit*this._srdh)}this._initDrF=false};dhtmlXGridObject.prototype.enableDOMLimit=function(C,A){if(!convertStringToBoolean(C)){return }this._dom_limit=A||1000};dhtmlXGridObject.prototype._checkPref=function(D,C){if(_isKHTML){return D}var A=1;for(A;A<=this._dpref;A++){if(((A*C+D)<0)||((A*C+D)>this.limit)||(this.rowsCol[A*C+D])||(this.rowsBuffer[A*C+D])){break}}return D+(A-1)*C};dhtmlXGridObject.prototype._simplifyDom=function(N,K,F){var E=0;for(var D=0;D<this.obj._rowslength();D++){if((D<N)||(D>K)){var H=this.obj._rows(D);if((!H._rLoad)&&(!H._sRow)){if((H.previousSibling)&&((H.previousSibling._sRow)||(H.previousSibling._rLoad))){var C=this.rowsCol._dhx_find(H);var I=H.previousSibling;this.rowsBuffer[1][C]=H;I._sRow=true;H.parentNode.removeChild(H);this.rowsAr[this.rowsCol[C].idd]=null;this.rowsCol[C]=null;this._fixHeight(I,-this._srdh);D--}else{if((H.nextSibling)&&((H.nextSibling._sRow)||(H.nextSibling._rLoad))){var C=this.rowsCol._dhx_find(H);var I=H.nextSibling;this.rowsBuffer[1][C]=H;I._sRow=true;H.parentNode.removeChild(H);this.rowsAr[this.rowsCol[C].idd]=null;this.rowsCol[C]=null;this._fixHeight(I,-this._srdh);D--}else{var C=this.rowsCol._dhx_find(H);this.rowsBuffer[1][C]=H;var A="temp_dLoad_"+this._dInc;this._dInc++;var M=this._fastAddRow(A,C,true,C);H.parentNode.removeChild(H);M._sRow=true;this._fixHeight(M,0)}}if(this.obj._rowslength()<=this._dom_limit){return }}}}};dhtmlXGridObject.prototype._addFromBufferSR=function(A){if((!this.rowsCol[A])||(this.rowsCol[A]._sRow)){this._splitRowAt(A)}else{if((this.rowsBuffer[1][A])&&(this.rowsBuffer[1][A].tagName=="TR")){this.rowsCol[A].parentNode.insertBefore(this.rowsBuffer[1][A],this.rowsCol[A]);this.rowsCol[A].parentNode.removeChild(this.rowsCol[A]);this.rowsCol[A].grid=null;this.rowsCol[A]=this.rowsBuffer[1][A]}}if(this._cssEven){if(A%2==1){this.rowsCol[A].className=this._cssUnEven}else{this.rowsCol[A].className=this._cssEven}}if(this.rowsBuffer[1][A].tagName=="row"){this.changeRowId(this.rowsCol[A].idd,this.rowsBuffer[1][A].getAttribute("id"));this._fillRowFromXML(this.rowsCol[A],this.rowsBuffer[1][A],-1)}else{this.rowsAr[this.rowsBuffer[1][A].idd]=this.rowsBuffer[1][A];this.rowsBuffer[1][A]._sRow=this.rowsBuffer[1][A]._rLoad=false}this.rowsCol[A]._rLoad=false;this.rowsBuffer[1][A]=null};dhtmlXGridObject.prototype._askRealRows=function(H,F){if((this.renderSize)&&(this.renderSize>this._dloadSize)){var E=this.renderSize}else{var E=this._dloadSize}if(!this.limit){this._dl_start[0]=[0,E];this.xmlLoader=new dtmlXMLLoaderObject(this._askRealRows2,this);this.xmlLoader.waitCall=F;this.callEvent("onXLS",[this]);if(this._dloadStr){this.xmlLoader.loadXMLString(this._dloadStr)}else{this.xmlLoader.loadXML(this._dload+((this._dload.indexOf("?")!=-1)?"&":"?")+"posStart="+0+"&sn="+(new Date()).valueOf())}return true}var A=H||Math.floor(this.objBox.scrollTop/this._srdh);if((this._dom_limit)&&(this.obj._rowslength()>this._dom_limit)){this._simplifyDom(A,A+E)}if(A>(this.limit-E)){A=this.limit-E}if(A<0){A=0}var D=A+E;if(D>this.limit){D=this.limit}for(var C=A;C<D;C++){if((!this.rowsCol[C])||(this.rowsCol[C]._rLoad)||(this.rowsCol[C]._sRow)){if(this.rowsBuffer[1][C]){this._addFromBufferSR(C)}else{if(this._dpref){start=this._checkPref(C,-1);count=this._checkPref(D,1)-start}else{count=D-C;start=C}this._dl_start[start]=[A-start,D-A];this.xmlLoader=new dtmlXMLLoaderObject(this._askRealRows2,this);this.xmlLoader.waitCall=F;this.callEvent("onXLS",[this]);this.xmlLoader.loadXML(this._dload+((this._dload.indexOf("?")!=-1)?"&":"?")+"posStart="+start+"&count="+count+"&sn="+(new Date()).valueOf());return }}}if(F){F()}};dhtmlXGridObject.prototype._askRealRows2=function(H,I,N,M,K){if(H._refresh_mode){return H._refreshFromXML(K)}var O=K.getXMLTopNode("rows");var C=H._initDrF;if(C){H._parseHead(O);if(H.limit&&H.rowsCol.length){C=false}}var Q=K.doXPath("//rows/row",O);var F=O.getAttribute("total_count");if((F)&&(!H._limitC)){H._limitC=H.limit=parseInt(F)}if(C){H._initD()}var D=parseInt(O.getAttribute("pos"))||0;var A=(H._dl_start[D]||[0])[0];var P=A+(H._dl_start[D]||[0,Q.length])[1];if(!H.limit){H.limit=Q.length;H._fastAddRowSpacer(0,H.limit*H._srdh);if(H._ahgr){window.setTimeout(function(){H._askRealRows()},1)}}for(var E=0;E<Q.length;E++){if((E<A)||(E>P)){H.rowsBuffer[1][D+E]=Q[E];H.rowsBuffer[0][D+E]=Q[E].getAttribute("id")}else{H.rowsBuffer[0][D+E]=null;if((!H.rowsCol[E+D])||(H.rowsCol[E+D]._sRow)){H._splitRowAt(E+D)}if(H.rowsCol[E+D]._rLoad){if(H._cssEven){if((D+E)%2==1){H.rowsCol[E+D].className=H._cssUnEven}else{H.rowsCol[E+D].className=H._cssEven}if(H._fake){H._fake.rowsCol[E+D].className=H.rowsCol[E+D].className}}H.changeRowId(H.rowsCol[E+D].idd,Q[E].getAttribute("id"));H._fillRowFromXML(H.rowsCol[E+D],Q[E],-1);H.rowsCol[E+D]._rLoad=false;if(H._fake){H._fake.rowsCol[E+D]._rLoad=false}}}}H.callEvent("onXLE",[this,P-A])};dhtmlXGridObject.prototype._splitRowAt=function(C){var H="temp_dLoad_"+this._dInc;this._dInc++;var D=this.rowsCol[C];if(!D){var F=this._findSParent(C);var E=F[1]-(C-F[0])*this._srdh;this._fixHeight(this.rowsCol[F[0]],E);var A=this._fastAddRow(H,C,true,F[0]);A._sRow=true;this._fixHeight(A,-1*((F[1]-(C-F[0])*this._srdh)-this._srdh));return this._splitRowAt(C)}else{if(D._sRow){if((this.rowsBuffer[1][C])&&(this.rowsBuffer[1][C].tagName=="TR")){(this._fastAddRow(H,C,true,null,this.rowsBuffer[1][C]))._rLoad=false}else{(this._fastAddRow(H,C,true))._rLoad=true}if((!D.style.height)||(parseInt(D.style.height)==this._srdh)){D.parentNode.removeChild(D)}else{this.rowsCol[C+1]=D;this._fixHeight(D,this._srdh)}if(C==0){this.setSizes()}}}};dhtmlXGridObject.prototype._findSParent=function(C){for(var A=C-1;A>=0;A--){if(this.rowsCol[A]){return[A,(parseFloat(this.rowsCol[A].style.height))]}}};dhtmlXGridObject.prototype._fixHeight=function(D,F){var A=parseFloat(D.style.height||this._srdh)-F;if(A==this._srdh){D._sRow=false;D._rLoad=true}D.style.height=A+"px";var E=D.childNodes.length;for(var C=0;C<E;C++){D.childNodes[C].style.height=A+"px"}};dhtmlXGridObject.prototype._fastAddRowSpacer=function(D,A){var H="temp_dLoad_"+this._dInc;this._dInc++;var E=this._fastAddRow(H,D);E.style.height=A+"px";var F=E.childNodes.length;for(var C=0;C<F;C++){E.childNodes[C].style.height=A+"px"}E._sRow=true};dhtmlXGridObject.prototype._fastAddRow=function(F,C,A,E,D){var D=D||this._prepareRow(F);if(((E)||(E=="0"))&&(this.rowsCol[E].nextSibling)){this.rowsCol[E].parentNode.insertBefore(D,this.rowsCol[E].nextSibling)}else{if((C==this.limit)||(this.obj._rowslength()==0)||(!this.rowsCol[C])){if(_isKHTML){this.obj.appendChild(D)}else{if(!this.obj.firstChild){this.obj.appendChild(document.createElement("TBODY"))}this.obj.childNodes[0].appendChild(D)}}else{this.rowsCol[E||C].parentNode.insertBefore(D,this.rowsCol[C])}}this.rowsAr[F]=D;if(!A){this.rowsCol._dhx_insertAt(C,D)}else{this.rowsCol[C]=D}return D};dhtmlXGridObject.prototype._insertRowAt_WSRDA=function(D,E,C){if(E<0||typeof E==undefined){E=this.rowsBuffer[0].length}if((arguments.length<2)||(E===window.undefined)){E=this.rowsBuffer[0].length}else{if(E>this.rowsBuffer[0].length){E=this.rowsBuffer[0].length}}var F=this.rowsBuffer[0][E]||(this.rowsCol[E]?this.rowsCol[E].idd:null);if(F){this.getRowById(F)}if(!C){if(E==this.rowsBuffer[0].length){if(_isKHTML){this.obj.appendChild(D)}else{this.obj.firstChild.appendChild(D)}this.rowsBuffer[0][E]=D.idd;this.rowsBuffer[1][E]=null;F=E}else{if(!this.rowsCol[E]){F=(this._findSParent(E)[0])}else{F=E}this.rowsCol[F].parentNode.insertBefore(D,this.rowsCol[F]);this.rowsBuffer[0]._dhx_insertAt(E,D.idd);this.rowsBuffer[1]._dhx_insertAt(E,null)}}this.limit+=1;this.rowsAr[D.idd]=D;this.rowsCol._dhx_insertAt(F,D);if(this._cssEven){if(E%2==1){D.className+=" "+this._cssUnEven}else{D.className+=" "+this._cssEven}if(E!=(this.rowsCol.length-1)){this._fixAlterCss(E+1)}}this.doOnRowAdded(D);if((this.math_req)&&(!this._parsing_)){for(var A=0;A<this.hdr.rows[0].cells.length;A++){this._checkSCL(D.childNodes[A])}this.math_req=false}return D};dhtmlXGridObject.prototype.deleteRow_WSRDA=function(C,D){var E=-1;var A=null;if(this.rowsAr[C]){E=this.rowsCol._dhx_find(this.rowsAr[C]);if(this.deleteRow_WSRD(C,D)==false){return false}}if(E<0){var E=this.rowsBuffer[0]._dhx_find(C);if(E>-1){A=this.rowsCol[this._findSParent(E)[0]]}}if(E>-1){this.rowsBuffer[0]._dhx_delAt(E);this.rowsBuffer[1]._dhx_delAt(E);this.limit-=1;if(A){this._fixHeight(A,this._srdh)}}return true};function dhtmlxDblCalendarObject(F,E,D){this.scriptName="dhtmlxcalendar.js";this.entObj=document.createElement("DIV");this.winHeader=null;this.style="dhtmlxdblcalendar";this.winTitle="dhtmlxDblCalendarObject";this.uid="sc&dblCal"+Math.round(1000000*Math.random());this.numLoaded=2;this.options={isWinHeader:false,headerButtons:"",isWinDrag:false,msgClose:"Close",msgMinimize:"Minimize",msgToday:"Today",msgClear:"Clear"};if(D){for(x in D){this.options[x]=D[x]}}this.entBox=document.createElement("TABLE");this.entBox.cellPadding="0px";this.entBox.cellSpacing="0px";this.entBox.className=this.style;this.entObj.appendChild(this.entBox);var I=this.entBox.insertRow(0);var C=I.insertCell(0);C.style.paddingRight="2px";var H=I.insertCell(1);this.leftCalendar=new dhtmlxCalendarObject(C,E,this.options);this.leftCalendar._dblC=this;this.leftCalendar.setOnClickHandler(this.doOnCLeftClick);this.rightCalendar=new dhtmlxCalendarObject(H,E,this.options);this.rightCalendar._dblC=this;this.rightCalendar.setOnClickHandler(this.doOnCRightClick);this.doOnClick=null;this.onLanguageLoaded=null;this.getPosition=this.leftCalendar.getPosition;this.startDrag=this.leftCalendar.startDrag;this.stopDrag=this.leftCalendar.stopDrag;this.onDrag=this.leftCalendar.onDrag;this.drawHeader=this.leftCalendar.drawHeader;if(typeof (F)!="string"){this.con=F}else{this.con=document.getElementById(F)}var A=this}dhtmlxDblCalendarObject.prototype.setHeader=function(A,D,C){this.leftCalendar.options.isWinHeader=this.options.isWinHeader=A;this.leftCalendar.options.isWinDrag=this.options.isWinDrag=D;if(C){this.options.headerButtons=this.leftCalendar.options.headerButtons=C}if(this.isAutoDraw){this.drawHeader()}};dhtmlxDblCalendarObject.prototype.setYearsRange=function(E,A){var D=[this.leftCalendar,this.rightCalendar];for(ind in D){D[ind].options.yearsRange=[parseInt(E),parseInt(A)];D[ind].allYears=[];for(var C=E;C<=A;C++){D[ind].allYears.push(C)}}};dhtmlxDblCalendarObject.prototype.show=function(){this.parent.style.display="block"};dhtmlxDblCalendarObject.prototype.hide=function(){this.parent.style.display="none"};dhtmlxDblCalendarObject.prototype.createStructure=function(){if(this.options.isWinHeader){var A=this.entBox.insertRow(0).insertCell(0);A.colSpan=2;A.align="right";this.winHeader=document.createElement("DIV");A.appendChild(this.winHeader)}this.setParent(this.con)};dhtmlxDblCalendarObject.prototype.draw=function(A){if(!this.parent){this.createStructure()}this.drawHeader();this.leftCalendar.draw(A);this.rightCalendar.draw(A);this.isAutoDraw=true};dhtmlxDblCalendarObject.prototype.loadUserLanguage=function(C,A){this.numLoaded=0;if(A){this.onLanguageLoaded=A}this.leftCalendar.loadUserLanguage(C,this.languageLoaded);this.rightCalendar.loadUserLanguage(C,this.languageLoaded)};dhtmlxDblCalendarObject.prototype.languageLoaded=function(A){var C=this._dblC;C.numLoaded++;if(C.numLoaded==2){for(param in this.options){C.options[param]=this.options[param]}if(this.isAutoDraw){C.drawHeader()}if(C.onLanguageLoaded){C.onLanguageLoaded(A)}}};dhtmlxDblCalendarObject.prototype.setParent=function(A){if(A){this.parent=A;this.parent.style.display="block";this.parent.appendChild(this.entObj)}};dhtmlxDblCalendarObject.prototype.setOnClickHandler=function(A){this.doOnClick=A};dhtmlxDblCalendarObject.prototype.doOnCLeftClick=function(A){this._dblC.rightCalendar.setSensitive(A,null);if(this._dblC.doOnClick){this._dblC.doOnClick(A,this,"left")}return true};dhtmlxDblCalendarObject.prototype.doOnCRightClick=function(A){this._dblC.leftCalendar.setSensitive(null,A);if(this._dblC.doOnClick){this._dblC.doOnClick(A,this,"right")}return true};dhtmlxDblCalendarObject.prototype.setSensitive=function(){this.leftCalendar.setSensitive(null,this.leftCalendar.date);this.rightCalendar.setSensitive(this.rightCalendar.date,null)};dhtmlxDblCalendarObject.prototype.minimize=function(){if(!this.winHeader){return }var A=this.winHeader.parentNode.parentNode.nextSibling;A.parentNode.parentNode.style.width=parseInt(A.parentNode.parentNode.offsetWidth)+"px";if(A){A.style.display=(A.style.display=="none")?"block":"none"}};dhtmlxDblCalendarObject.prototype.setDate=function(C,A){this.leftCalendar.setDate(C);this.rightCalendar.setDate(A);this.leftCalendar.setSensitive(null,this.rightCalendar.date);this.rightCalendar.setSensitive(this.leftCalendar.date,null)};dhtmlxDblCalendarObject.prototype.setDateFormat=function(A){this.leftCalendar.setDateFormat(A);this.rightCalendar.setDateFormat(A)};dhtmlxDblCalendarObject.prototype.isVisible=function(){return(this.parent.style.display=="block"?true:false)};dhtmlxDblCalendarObject.prototype.setHolidays=function(A){this.leftCalendar.setHolidays(A);this.rightCalendar.setHolidays(A)};function dhtmlxCalendarObject(contId,isAutoDraw,options){this.isAutoDraw=isAutoDraw;this.contId=contId;this.scriptName="dhtmlxcalendar.js";this.date=this.cutTime(new Date());this.selDate=this.cutTime(new Date());this.curDate=this.cutTime(new Date());this.entObj=document.createElement("DIV");this.monthPan=document.createElement("TABLE");this.dlabelPan=document.createElement("TABLE");this.daysPan=document.createElement("TABLE");this.parent=null;this.style="dhtmlxcalendar";this.skinName="";this.doOnClick=null;this.sensitiveFrom=null;this.sensitiveTo=null;this.activeCell=null;this.hotCell=null;this.winHeader=null;this.onLanguageLoaded=null;this.dragging=false;this.minimized=false;this.winTitle="Calendar header";this.uid="sc&Cal"+Math.round(1000000*Math.random());this.holidays=new Array();this.dhx_Event();this.options={btnPrev:"&laquo;",btnBgPrev:null,btnNext:"&raquo;",btnBgNext:null,yearsRange:[1900,2100],isMonthEditable:false,isYearEditable:false,isWinHeader:false,headerButtons:"TMX",isWinDrag:true};defLeng={langname:"en-us",dateformat:"%Y-%m-%d",monthesFNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthesSNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],daysFNames:["Sunday","Monday","Tuesday","Wednday","Thursday","Friday","Saturday"],daysSNames:["Su","Mo","Tu","We","Th","Fr","Sa"],weekend:[0,6],weekstart:0,msgClose:"Close",msgMinimize:"Minimize",msgToday:"Today",msgClear:"Clear"};if(!window.dhtmlxCalendarLangModules){window.dhtmlxCalendarLangModules={}}window.dhtmlxCalendarLangModules["en-us"]=defLeng;if(window.dhtmlxCalendarObjects){window.dhtmlxCalendarObjects[window.dhtmlxCalendarObjects.length]=this}else{window.dhtmlxCalendarObjects=[this]}for(lg in defLeng){this.options[lg]=defLeng[lg]}if(options){for(param in options){this.options[param]=options[param]}}this.loadUserLanguage();if(options){for(param in options){this.options[param]=options[param]}}this.allYears=Array();with(this.options){for(var i=yearsRange[0];i<=yearsRange[1];i++){this.allYears.push(i)}}if(isAutoDraw!==false){this.draw(options)}return this}dhtmlxCalendarObject.prototype.setHeader=function(isVisible,isDrag,btnsOpt){with(this.options){isWinHeader=isVisible;isWinDrag=isDrag;if(btnsOpt){headerButtons=btnsOpt}}};dhtmlxCalendarObject.prototype.setYearsRange=function(D,A){this.options.yearsRange=[parseInt(D),parseInt(A)];this.allYears=[];for(var C=D;C<=A;C++){this.allYears.push(C)}};dhtmlxCalendarObject.prototype.createStructure=function(){var self=this;this.entObj.className=this.style;if(this.options.isWinHeader){this.winHeader=document.createElement("DIV");this.entObj.appendChild(this.winHeader)}this.entBox=document.createElement("TABLE");this.entBox.className="entbox";with(this.entBox){cellPadding="0px";cellSpacing="0px";width="100%"}this.entObj.appendChild(this.entBox);var monthBox=this.entBox.insertRow(0).insertCell(0);with(this.monthPan){cellPadding="1px";cellSpacing="0px";width="100%";align="center"}this.monthPan.className="dxcalmonth";monthBox.appendChild(this.monthPan);var dlabelBox=this.entBox.insertRow(1).insertCell(0);dlabelBox.appendChild(this.dlabelPan);with(this.dlabelPan){cellPadding="0px";cellSpacing="0px";width="100%";align="center"}this.dlabelPan.className="dxcaldlabel";var daysBox=this.entBox.insertRow(2).insertCell(0);daysBox.appendChild(this.daysPan);with(this.daysPan){cellPadding="1px";cellSpacing="0px";width="100%";align="center"}if(_isIE||_isKHTML){this.daysPan.className="dxcaldays_ie"}else{this.daysPan.className="dxcaldays"}this.daysPan.onmousemove=function(e){self.doHotKeys(e)};this.daysPan.onmouseout=function(){self.endHotKeys()};if(typeof (this.contId)!="string"){this.con=this.contId}else{this.con=document.getElementById(this.contId)}if(this.con.nodeName=="INPUT"){var div=document.createElement("DIV");var aleft=getAbsoluteLeft(this.con);var atop=getAbsoluteTop(this.con);with(div.style){position="absolute";display="none";marginLeft=this.con.offsetWidth+"px";top=atop;left=aleft;zIndex="99"}this.setParent(div);document.body.appendChild(div);this.con.onclick=function(){if(self.isVisible()){self.hide()}else{self.show()}};this.con._c=this.parent;this.doOnClick=function(date){self.con.value=self.getFormatedDate(self.options.dateformat,date);self.hide();self.con.focus();return true};this.con.onkeydown=function(e){if((e||window.event).keyCode==27){self.hide()}else{if((e||window.event).keyCode==13){self.show()}}}}else{this.setParent(this.con)}};dhtmlxCalendarObject.prototype.drawHeader=function(){if(this._dblC){return }if(!this.options.isWinHeader){return }var C=this;if(!this.winHeader){return false}while(this.winHeader.hasChildNodes()){this.winHeader.removeChild(this.winHeader.firstChild)}this.winHeader.className="dhtmlxcalendarHeader";this.winHeader.onselectstart=function(){return false};var E=document.createElement("SPAN");E.className="winTitle";E.appendChild(document.createTextNode(this.winTitle));E.setAttribute("title",this.winTitle);this.winHeader.appendChild(E);if(this.options.isWinDrag){this.winHeader.onmousedown=function(I){C.startDrag(I)}}if(this.con.nodeName!="INPUT"){if(this.options.headerButtons.indexOf("M")>=0){this.options.headerButtons="M"}else{this.options.headerButtons=""}}if(this.options.headerButtons.indexOf("X")>=0){var H=document.createElement("DIV");H.className="btn_close";H.setAttribute("title",this.options.msgClose);H.onmousedown=function(I){I=I||event;C.hide();if(I.stopPropagation){I.stopPropagation()}else{I.cancelBubble=true}};this.winHeader.appendChild(H)}if(this.options.headerButtons.indexOf("M")>=0){var F=document.createElement("DIV");F.className="btn_mini";F.setAttribute("title",this.options.msgMinimize);F.onmousedown=function(I){I=I||event;C.minimize();if(I.stopPropagation){I.stopPropagation()}else{I.cancelBubble=true}};this.winHeader.appendChild(F)}if(this.options.headerButtons.indexOf("C")>=0){var A=document.createElement("DIV");A.className="btn_clr";A.setAttribute("title",this.options.msgClear);A.onmousedown=function(I){I=I||event;if(I.stopPropagation){I.stopPropagation()}else{I.cancelBubble=true}C.con.value="";C.hide()};this.winHeader.appendChild(A)}if(this.options.headerButtons.indexOf("T")>=0){var D=document.createElement("DIV");D.className="btn_today";D.setAttribute("title",this.options.msgToday);D.onmousedown=function(I){I=I||event;if(I.stopPropagation){I.stopPropagation()}else{I.cancelBubble=true}C.setDate(new Date());if(C.doOnClick){C.doOnClick(new Date())}};this.winHeader.appendChild(D)}};dhtmlxCalendarObject.prototype.drawMonth=function(){var self=this;if(this.monthPan.childNodes.length>0){this.monthPan.removeChild(this.monthPan.childNodes[0])}var row=this.monthPan.insertRow(0);var cArLeft=row.insertCell(0);var cContent=row.insertCell(1);var cArRight=row.insertCell(2);cArLeft.align="left";cArLeft.className="month_btn_left";var btnLabel=document.createElement("SPAN");btnLabel.innerHTML=this.options.btnPrev;cArLeft.appendChild(btnLabel);cArLeft.onclick=function(){self.prevMonth()};cArRight.align="right";cArRight.className="month_btn_right";var btnLabel=document.createElement("SPAN");btnLabel.innerHTML=this.options.btnNext;cArRight.appendChild(btnLabel);cArRight.onclick=function(){self.nextMonth()};cContent.align="center";var mHeader=document.createElement("TABLE");with(mHeader){cellPadding="0px";cellSpacing="0px";align="center"}var mRow=mHeader.insertRow(0);var cMonth=mRow.insertCell(0);var cComma=mRow.insertCell(1);var cYear=mRow.insertCell(2);cContent.appendChild(mHeader);this.planeMonth=document.createElement("DIV");this.planeMonth._c=this;this.planeMonth.appendChild(document.createTextNode(this.options.monthesFNames[this.date.getMonth()]));this.planeMonth.className="planeMonth";cMonth.appendChild(this.planeMonth);if(this.options.isMonthEditable){this.planeMonth.style.cursor="pointer";this.editorMonth=new dhtmlxRichSelector({nodeBefore:this.planeMonth,valueList:[0,1,2,3,4,5,6,7,8,9,10,11],titleList:this.options.monthesFNames,activeValue:this.options.monthesFNames[this.date.getMonth()],onSelect:this.onMonthSelect});this.editorMonth._c=this}cComma.appendChild(document.createTextNode(","));cComma.className="comma";this.planeYear=document.createElement("DIV");this.planeYear._c=this;this.planeYear.appendChild(document.createTextNode(this.date.getFullYear()));this.planeYear.className="planeYear";cYear.appendChild(this.planeYear);if(this.options.isYearEditable){this.planeYear.style.cursor="pointer";this.editorYear=new dhtmlxRichSelector({nodeBefore:this.planeYear,valueList:this.allYears,titleList:this.allYears,activeValue:this.date.getFullYear(),onSelect:this.onYearSelect,isOrderedList:true,isNumbersList:true,isAllowUserValue:true});this.editorYear._c=this}};dhtmlxCalendarObject.prototype.drawDayLabels=function(){var A=this;if(this.dlabelPan.childNodes.length>0){this.dlabelPan.removeChild(this.dlabelPan.childNodes[0])}var E=this.dlabelPan.insertRow(-1);E.className="daynames";for(var C=0;C<7;C++){var D=E.insertCell(C);D.appendChild(document.createTextNode(this.getDayName(C)))}};dhtmlxCalendarObject.prototype.drawDays=function(){var K=this;if(this.daysPan.childNodes.length>0){this.daysPan.removeChild(this.daysPan.childNodes[0])}var M={},I={};var C=new Date(this.date);C.setDate(1);var H=(C.getDay()-this.options.weekstart)%7;if(H<0){H+=7}C.setDate(-H);C.setDate(C.getDate()+1);if(C.getDate()<C.getDay()){C.setMonth(C.getMonth()-1)}for(var A=0;A<6;A++){M=this.daysPan.insertRow(-1);for(var E=0;E<7;E++){I=M.insertCell(-1);I.setAttribute("id",this.uid+C.getFullYear()+C.getMonth()+C.getDate());I.appendChild(document.createTextNode(C.getDate()));I.thisdate=C.toString();I.className="thismonth";if(C.getMonth()!=this.date.getMonth()){I.className="othermonth"}if(this.sensitiveFrom&&(C.valueOf()<this.sensitiveFrom.valueOf())){I.className=I.className+" insensitive";C.setDate(C.getDate()+1);continue}if(this.sensitiveTo&&(C.valueOf()>this.sensitiveTo.valueOf())){I.className=I.className+" insensitive";C.setDate(C.getDate()+1);continue}if(this.isWeekend(E)&&C.getMonth()==this.date.getMonth()){I.className="weekend"}if(C.toDateString()==this.curDate.toDateString()){I.className="current"}if(C.toDateString()==this.selDate.toDateString()){this.activeCell=I;this.addClass(I,"selected")}if(this.holidays.length>0){for(var F=0;F<this.holidays.length;F++){var D=(this.holidays[F].indexOf(".")!=-1?this.holidays[F].toString().split("."):this.holidays[F].toString().split("-"));if(D.length==2){if(D[0].substr(0,1)=="0"){D[0]=D[0].substr(1,1)}if(D[1].substr(0,1)=="0"){D[1]=D[1].substr(1,1)}if(D[1]==C.getDate()&&D[0]==(C.getMonth()+1)){I.className=I.className+" holiday"}}else{if(D.length==3){if(D[2].substr(0,1)=="0"){D[2]=D[2].substr(1,1)}if(D[1].substr(0,1)=="0"){D[1]=D[1].substr(1,1)}if(D[2]==C.getDate()&&D[1]==(C.getMonth()+1)&&D[0]==C.getFullYear()){I.className=I.className+" holiday"}}}}}I.onclick=function(){if(!K.doOnClick||K.doOnClick(this.thisdate)){K.setDate(this.thisdate);K.callEvent("onClick",[this.thisdate])}};C.setDate(C.getDate()+1)}}};dhtmlxCalendarObject.prototype.draw=function(C){var A=this;if(this.loadingLanguage){setTimeout(function(){A.draw(C);return },20);return }else{if(!this.parent){this.createStructure(C)}}this.drawHeader();this.drawMonth();this.drawDayLabels();this.drawDays();this.isAutoDraw=true};dhtmlxCalendarObject.prototype.startDrag=function(e){e=e||event;if((e.button===0)||(e.button===1)){if(this.dragging){this.stopDrag(e)}this.drag_mx=e.clientX;this.drag_my=e.clientY;this.drag_spos=this.getPosition(this.parent);document.body.appendChild(this.parent);with(this.parent.style){left=this.drag_spos[0]+"px";top=this.drag_spos[1]+"px";margin="0px";position="absolute"}this.bu_onmousemove=document.body.onmousemove;var self=this;document.body.onmousemove=function(e){self.onDrag(e)};this.bu_onmouseup=document.body.onmouseup;document.body.onmouseup=function(e){self.stopDrag(e)};this.dragging=true}};dhtmlxCalendarObject.prototype.onDrag=function(A){A=A||event;if((A.button===0)||(A.button===1)){var D=this.drag_mx-A.clientX;var C=this.drag_my-A.clientY;this.parent.style.left=this.drag_spos[0]-D+"px";this.parent.style.top=this.drag_spos[1]-C+"px";if(_isIE){this.ifr.style.left=this.parent.style.left;this.ifr.style.top=this.parent.style.top}}else{this.stopDrag(A)}};dhtmlxCalendarObject.prototype.stopDrag=function(A){A=A||event;document.body.onmouseup=(this.bu_onmouseup===window.undefined)?null:this.bu_onmouseup;document.body.onmousemove=(this.bu_onmousemove===window.undefined)?null:this.bu_onmousemove;this.dragging=false};dhtmlxCalendarObject.prototype.doHotKeys=function(C){C=C||event;var A=((C.target)?C.target:C.srcElement);if(A.className.toString().indexOf("insensitive")>=0){this.endHotKeys()}else{if(this.hotCell){this.resetHotClass(this.hotCell)}this.addClass(A,"hover");this.hotCell=A}};dhtmlxCalendarObject.prototype.endHotKeys=function(){if(this.hotCell){this.resetHotClass(this.hotCell);this.hotCell=null}};dhtmlxCalendarObject.prototype.minimize=function(){if(!this.winHeader){return }this.entBox.style.display=(this.entBox.style.display=="none")?"block":"none";if(!this.minimized){this.entObj.className=(this.skinName!=""?this.style+"_"+this.skinName+" "+this.style+"_"+this.skinName:this.style+" "+this.style)+"_minimized"}else{this.entObj.className=(this.skinName!=""?this.style+"_"+this.skinName:this.style)}if(_isIE){this.ifr.style.width=this.entObj.offsetWidth;this.ifr.style.height=this.entObj.offsetHeight}this.minimized=!this.minimized};dhtmlxCalendarObject.prototype.loadUserLanguage=function(D,E){if(E){this.onLanguageLoaded=E}if(!D){D="en-us"}this.loadingLanguage=D;if(!D){this.loadUserLanguageCallback(false);return }if(D==this.options.langname){this.loadUserLanguageCallback(true);return }var I=window.dhtmlxCalendarLangModules;if(I[D]){for(lg in I[D]){this.options[lg]=I[D][lg]}this.loadUserLanguageCallback(true);return }var A,M=null;var C=document.getElementsByTagName("SCRIPT");for(var F=0;F<C.length;F++){if(A=C[F].getAttribute("src")){if(A.indexOf(this.scriptName)>=0){M=A.substr(0,A.indexOf(this.scriptName));break}}}if(M===null){this.loadUserLanguageCallback(false);return }this.options.langname=D;var H=M+"lang/"+D+".js";for(var F=0;F<C.length;F++){if(A=C[F].getAttribute("src")){if(A==H){return }}}var K=document.createElement("SCRIPT");K.setAttribute("language","Java-Script");K.setAttribute("type","text/javascript");K.setAttribute("src",H);document.body.appendChild(K)};dhtmlxCalendarObject.prototype.loadUserLanguageCallback=function(A){this.loadingLanguage=null;if(this.isAutoDraw!==false){this.draw()}if(this.onLanguageLoaded&&(typeof (this.onLanguageLoaded)=="function")){this.onLanguageLoaded(A)}};function loadLanguageModule(D){var C=window.dhtmlxCalendarObjects;for(var A=0;A<C.length;A++){if(C[A].loadingLanguage==D.langname){for(lg in D){C[A].options[lg]=D[lg]}C[A].loadUserLanguageCallback(true)}}window.dhtmlxCalendarLangModules[D.langname]=D}dhtmlxCalendarObject.prototype.show=function(){this.parent.style.display="";if(_isIE){this.parent.style.width="0px";this.parent.style.height="0px";if(this.parent.style.zIndex==0){this.parent.style.zIndex=10}if(this.parent.style.position=="absolute"&&this.ifr==undefined){this.ifr=document.createElement("IFRAME");this.ifr.style.position="absolute";this.ifr.style.zIndex="0";this.ifr.frameBorder="no";this.ifr.src=window.dhx_globalImgPath+"/blank.html";this.ifr.style.top=this.parent.offsetTop;this.ifr.style.left=this.parent.offsetLeft;this.ifr.style.width=this.parent.offsetWidth;this.ifr.style.height=this.parent.offsetHeight;this.parent.parentNode.appendChild(this.ifr)}}};dhtmlxCalendarObject.prototype.hide=function(){this.parent.style.display="none";if(this.ifr!=undefined){this.ifr.parentNode.removeChild(this.ifr);this.ifr=undefined}};dhtmlxCalendarObject.prototype.setDateFormat=function(A){this.options.dateformat=A};dhtmlxCalendarObject.prototype.isWeekend=function(A){var D=A+this.options.weekstart;if(D>6){D-=7}for(var C=0;C<this.options.weekend.length;C++){if(this.options.weekend[C]==D){return true}}return false};dhtmlxCalendarObject.prototype.getDayName=function(A){var C=A+this.options.weekstart;if(C>6){C=C-7}return this.options.daysSNames[C]};dhtmlxCalendarObject.prototype.cutTime=function(C){C=new Date(C);var A=new Date(C.getFullYear(),C.getMonth(),C.getDate());return A};dhtmlxCalendarObject.prototype.onYearSelect=function(A){this._c.date=new Date(this._c.date);if(!isNaN(A)){this._c.date=new Date(this._c.date.setFullYear(A))}this._c.draw();return(!isNaN(A))};dhtmlxCalendarObject.prototype.onMonthSelect=function(A){this._c.date=new Date(this._c.date.setMonth(A));this._c.draw();return true};dhtmlxCalendarObject.prototype.setParent=function(A){if(A){this.parent=A;this.parent.appendChild(this.entObj)}};dhtmlxCalendarObject.prototype.setDate=function(C){dateTmp=this.setFormatedDate(this.options.dateformat,C);this.draw();if(isNaN(dateTmp)||dateTmp==null){C=new Date(C)}else{C=dateTmp}if((C.getFullYear()==this.date.getFullYear())&&(C.getMonth()==this.date.getMonth())){this.date=new Date(this.cutTime(C));this.selDate=new Date(this.cutTime(C));var A=document.getElementById(this.uid+C.getFullYear()+C.getMonth()+C.getDate());if(A){this.resetClass(this.activeCell);this.addClass(A,"selected");this.activeCell=A}}else{this.date=new Date(this.cutTime(C));this.selDate=new Date(this.cutTime(C));if(this.isAutoDraw){this.draw()}}};dhtmlxCalendarObject.prototype.addClass=function(C,A){C.className+=" "+A};dhtmlxCalendarObject.prototype.resetClass=function(A){A.className=A.className.toString().split(" ")[0]};dhtmlxCalendarObject.prototype.resetHotClass=function(A){A.className=A.className.toString().replace(/hover/,"")};dhtmlxCalendarObject.prototype.setSkin=function(A){this.entObj.className=this.style;this.skinName=A;this.addClass(this.entObj,this.style+(A?"_":"")+A+(this.minimized?" "+this.style+(A?"_"+A:"")+"_minimized":""))};dhtmlxCalendarObject.prototype.getDate=function(){return this.selDate.toString()};dhtmlxCalendarObject.prototype.nextMonth=function(){this.date=new Date(this.date);this.date=new Date(this.date.setMonth(this.date.getMonth()+1));if(this.isAutoDraw){this.draw()}};dhtmlxCalendarObject.prototype.prevMonth=function(){this.date=new Date(this.date);this.date=new Date(this.date.setMonth(this.date.getMonth()-1));if(this.isAutoDraw){this.draw()}};dhtmlxCalendarObject.prototype.setOnClickHandler=function(A){this.doOnClick=A};dhtmlxCalendarObject.prototype.setPosition=function(H,F,C){if(typeof (H)=="object"){var A=this.getPosition(H);var E=A[0]+H.offsetWidth+(C||0);var D=A[1]+(F||0)}this.entObj.style.position="absolute";this.entObj.style.top=(D||H)+"px";this.entObj.style.left=(E||F)+"px"};dhtmlxCalendarObject.prototype.close=function(A){this.entObj.parentNode.removeChild(true)};dhtmlxCalendarObject.prototype.getPosition=function(F,C){if(!C){var C=document.body}var A=F;var E=0;var D=0;while((A)&&(A!=C)){E+=A.offsetLeft-A.scrollLeft;D+=A.offsetTop-A.scrollTop;A=A.offsetParent}if(C==document.body){if(_isIE){if(document.documentElement.scrollTop){D+=document.documentElement.scrollTop}if(document.documentElement.scrollLeft){E+=document.documentElement.scrollLeft}}else{if(!_isFF){E+=document.body.offsetLeft;D+=document.body.offsetTop}}}return new Array(E,D)};dhtmlxCalendarObject.prototype.getFormatedDate=function(C,E){if(!C){C=this.options.dateformat}if(!E){E=this.selDate}E=new Date(E);var D="";var I=true;for(var H=0;H<C.length;H++){var F=C.substr(H,1);if(I){if(F=="%"){I=false;continue}D+=F}else{switch(F){case"e":F=E.getDate();break;case"d":F=E.getDate();if(F.toString().length==1){F="0"+F}break;case"j":var A=new Date(E.getFullYear(),0,0,0,0,0,0);F=Math.ceil((E.valueOf()-A.valueOf())/1000/60/60/24-1);while(F.toString().length<3){F="0"+F}break;case"a":F=this.options.daysSNames[E.getDay()];break;case"W":F=this.options.daysFNames[E.getDay()];break;case"c":F=1+E.getMonth();break;case"m":F=1+E.getMonth();if(F.toString().length==1){F="0"+F}break;case"b":F=this.options.monthesSNames[E.getMonth()];break;case"M":F=this.options.monthesFNames[E.getMonth()];break;case"y":F=E.getFullYear();F=F.toString().substr(2);break;case"Y":F=E.getFullYear()}D+=F;I=true}}return D};dhtmlxCalendarObject.prototype.setFormatedDate=function(Q,F){if(!F){return false}if(!Q){Q=this.options.dateformat}F=F.toString();function H(V){var S=new Array(this.options.monthesSNames,this.options.monthesFNames);for(var T=0;T<S.length;T++){for(var U=0;U<S[T].length;U++){if(S[T][U].indexOf(V)==0){return U}}}return -1}var M=new Date(2008,0,0);var I=0;for(var K=0;K<Q.length;K++){var O=Q.substr(K,1);if(O=="%"){var P=Q.substr(K+1,1);var C=Q.indexOf("%",K+1);var A=Q.substr(K+2,C-K-1-1);var D=F.indexOf(A,I);if(A==""){D=F.length}if(D==-1){return null}var N=F.substr(I,D-I);I=D+A.length;switch(P){case"d":M.setDate(parseInt(N));break;case"c":M.setMonth(N-1);break;case"m":M.setMonth(N-1);break;case"M":var E=H(N);if(E!=-1){M.setMonth(parseInt(E))}else{return null}break;case"b":var E=H(N);if(E!=-1){M.setMonth(parseInt(E))}else{return null}break;case"Y":M.setFullYear(parseInt(N))}}}this.date=M;this.selDate=M;return this.selDate};dhtmlxCalendarObject.prototype.setSensitive=function(C,A){if(C){this.sensitiveFrom=this.cutTime(C)}if(A){this.sensitiveTo=this.cutTime(A)}if(this.isAutoDraw){this.draw()}};function dhtmlxRichSelector(parametres){for(x in parametres){this[x]=parametres[x]}this.initValue=this.activeValue;if(!this.selectorSize){this.selectorSize=7}var self=this;this.blurTimer=null;this.nodeBefore.onclick=function(){self.show()};this.editor=document.createElement("TEXTAREA");this.editor.value=this.activeValue;this.editor._s=this;this.editor.className="dhtmlxRichSelector";this.editor.onfocus=this.onFocus;this.editor.onblur=this.onBlur;this.editor.onkeydown=this.onKeyDown;this.editor.onkeyup=this.onKeyUp;this.selector=document.createElement("SELECT");this.selector.size=this.selectorSize;this.selector.className="dhtmlxRichSelector";if(this.valueList){for(var i=0;i<this.valueList.length;i++){this.selector.options[i]=new Option(this.titleList[i],this.valueList[i],false,false)}}this.selector._s=this;this.selector.onfocus=this.onFocus;this.selector.onblur=this.onBlur;this.selector.onclick=function(){self.onSelect(self.selector.value)};this.selector.getIndexByValue=function(Value,isFull){var Select=this;Value=Value.toString().toUpperCase();if(!isFull){isFull=false}for(var i=0;i<Select.length;i++){var i_value=Select[i].text.toUpperCase();if(isFull){if(i_value==Value){return i}}else{if(i_value.indexOf(Value)==0){return i}}}if(Select._s.isOrderedList){if(Select._s.isNumbersList){if(isNaN(Value)){return -1}}i_value=Select[0].text.substring(0,Value.length).toUpperCase();if(i_value>Value){return 0}i_value=Select[Select.length-1].text.substring(0,Value.length);if(i_value<Value){return Select.length-1}}return -1};this.con=document.createElement("DIV");this.con.className="dhtmlxRichSelector";with(this.con.style){width="auto";display="none"}this.con.appendChild(this.editor);this.con.appendChild(this.selector);this.nodeBefore.parentNode.insertBefore(this.con,this.nodeBefore);return this}dhtmlxRichSelector.prototype.show=function(){this.con.style.display="block";with(this.selector.style){marginTop=parseInt(this.nodeBefore.offsetHeight)+"px";width="auto"}with(this.editor.style){width=parseInt(this.nodeBefore.offsetWidth)+15+"px";height=parseInt(this.nodeBefore.offsetHeight)+"px"}this.selector.selectedIndex=this.selector.getIndexByValue(this.activeValue);this.editor.focus()};dhtmlxRichSelector.prototype.hide=function(){this.con.style.display="none"};dhtmlxRichSelector.prototype.onBlur=function(){var A=this._s;A.blurTimer=setTimeout(function(){if(A.isAllowUserValue){if(A.onSelect(A.editor.value)){A.activeValue=A.editor.value}}else{if(A.onSelect(A.selector.value)){A.activeValue=A.selector.value}}},10)};dhtmlxRichSelector.prototype.onFocus=function(){var A=this._s;if(A.blurTimer){clearTimeout(A.blurTimer);A.blurTimer=null}if(this===this._s.selector){A.editor.focus()}};dhtmlxRichSelector.prototype.onKeyDown=function(D){var A=this._s;var D=D||event;var C=true;switch(D.keyCode){case 33:if(A.selector.selectedIndex<A.selector.size){A.selector.selectedIndex=0}else{A.selector.selectedIndex-=parseInt(A.selector.size)-1}break;case 34:if(A.selector.length-A.selector.selectedIndex<A.selector.size){A.selector.selectedIndex=A.selector.length-1}else{A.selector.selectedIndex+=parseInt(A.selector.size)-1}break;case 35:if(D.ctrlKey){A.selector.selectedIndex=A.selector.length-1}break;case 36:if(D.ctrlKey){A.selector.selectedIndex=0}break;case 38:if(A.selector.selectedIndex==0){}else{A.selector.selectedIndex-=1}break;case 40:if(A.selector.selectedIndex==A.selector.length-1){}else{A.selector.selectedIndex+=1}break;default:C=false}if(C){A.editor.value=A.selector.options[A.selector.selectedIndex].text;A.editor.focus()}};dhtmlxRichSelector.prototype.onKeyUp=function(D){var C=this._s;var D=D||event;switch(D.keyCode){case 13:C.editor.blur();break;case 27:C.editor.value=C.initValue;C.selector.selectedIndex=C.selector.getIndexByValue(C.initValue,true);C.editor.blur();break;default:var A=C.selector.getIndexByValue(C.editor.value);if(A>=0){C.selector.selectedIndex=A}}};dhtmlxCalendarObject.prototype.dhx_Event=function(){this.dhx_SeverCatcherPath="";this.attachEvent=function(original,catcher,CallObj){CallObj=CallObj||this;original="ev_"+original;if((!this[original])||(!this[original].addEvent)){var z=new this.eventCatcher(CallObj);z.addEvent(this[original]);this[original]=z}return(original+":"+this[original].addEvent(catcher))};this.callEvent=function(name,arg0){if(this["ev_"+name]){return this["ev_"+name].apply(this,arg0)}return true};this.checkEvent=function(name){if(this["ev_"+name]){return true}return false};this.eventCatcher=function(obj){var dhx_catch=new Array();var m_obj=obj;var func_server=function(catcher,rpc){catcher=catcher.split(":");var postVar="";var postVar2="";var target=catcher[1];if(catcher[1]=="rpc"){postVar='<?xml version="1.0"?><methodCall><methodName>'+catcher[2]+"</methodName><params>";postVar2="</params></methodCall>";target=rpc}var z=function(){};return z};var z=function(){if(dhx_catch){var res=true}for(var i=0;i<dhx_catch.length;i++){if(dhx_catch[i]!=null){var zr=dhx_catch[i].apply(m_obj,arguments);res=res&&zr}}return res};z.addEvent=function(ev){if(typeof (ev)!="function"){if(ev&&ev.indexOf&&ev.indexOf("server:")==0){ev=new func_server(ev,m_obj.rpcServer)}else{ev=eval(ev)}}if(ev){return dhx_catch.push(ev)-1}return false};z.removeEvent=function(id){dhx_catch[id]=null};return z};this.detachEvent=function(id){if(id!=false){var list=id.split(":");this[list[0]].removeEvent(list[1])}}};dhtmlxCalendarObject.prototype.isVisible=function(){return(this.parent.style.display==""?true:false)};dhtmlxCalendarObject.prototype.setHolidays=function(A){this.holidays=A.toString().split(",")};function dhtmlXWindowsSngl(){}function dhtmlXWindowsBtn(){}function dhtmlXWindows(){var that=this;this.imagePath="codebase/imgs/";this.setImagePath=function(path){this.imagePath=path};this.skin="standard";this.skinParams={standard:{header_height:32,border_left_width:6,border_right_width:7,border_bottom_height:6},web:{header_height:21,border_left_width:2,border_right_width:2,border_bottom_height:2},modern_black:{header_height:39,border_left_width:2,border_right_width:2,border_bottom_height:2},modern_blue:{header_height:39,border_left_width:2,border_right_width:2,border_bottom_height:2},modern_red:{header_height:39,border_left_width:2,border_right_width:2,border_bottom_height:2},clear_blue:{header_height:32,border_left_width:6,border_right_width:6,border_bottom_height:6},clear_green:{header_height:32,border_left_width:6,border_right_width:6,border_bottom_height:6},clear_silver:{header_height:32,border_left_width:6,border_right_width:6,border_bottom_height:6},aqua_dark:{header_height:31,border_left_width:3,border_right_width:3,border_bottom_height:3},aqua_orange:{header_height:31,border_left_width:3,border_right_width:3,border_bottom_height:3},aqua_sky:{header_height:31,border_left_width:3,border_right_width:3,border_bottom_height:3}};this.setSkin=function(skin){this.skin=skin;this._redrawSkin()};this._redrawSkin=function(){for(var a in this.wins){var win=this.wins[a];var skinParams=(win._skinParams!=null?win._skinParams:this.skinParams[this.skin]);win.childNodes[0].className="dhtmlx_wins_"+this.skin;win.childNodes[1].className="dhtmlx_wins_icon_"+this.skin;this._restoreWindowIcons(win);win.childNodes[2].className="dhtmlx_wins_title_"+this.skin;win.childNodes[3].className="dhtmlx_wins_buttons_"+this.skin;this._redrawWindow(win)}};this.isWindow=function(id){var t=(this.wins[id]!=null);return t};this.findByText=function(text){var wins=new Array();for(var a in this.wins){if(this.wins[a].getText().search(text,"gi")>=0){wins[wins.lentgh]=this.wins[a]}}return wins};this.window=function(id){var win=null;if(this.wins[id]!=null){win=this.wins[id]}return win};this.forEachWindow=function(handler){for(var a in this.wins){handler(this.wins[a])}};this.getBottommostWindow=function(){var bottommost=this.getTopmostWindow();for(var a in this.wins){if(this.wins[a].zi<bottommost.zi){bottommost=this.wins[a]}}return(bottommost.zi!=0?bottommost:null)};this.getTopmostWindow=function(visibleOnly){var topmost={zi:0};for(var a in this.wins){if(this.wins[a].zi>topmost.zi){if(visibleOnly==true&&!this._isWindowHidden(this.wins[a])){topmost=this.wins[a]}if(visibleOnly!=true){topmost=this.wins[a]}}}return(topmost.zi!=0?topmost:null)};this.wins={};this.autoViewport=true;this._createViewport=function(){this.vp=document.body;this.modalCoverI=document.createElement("IFRAME");this.modalCoverI.frameBorder="0";this.modalCoverI.className="dhx_modal_cover_ifr";this.modalCoverI.style.display="none";this.modalCoverI.style.zIndex=0;this.vp.appendChild(this.modalCoverI);this.modalCoverD=document.createElement("DIV");this.modalCoverD.className="dhx_modal_cover_dv";this.modalCoverD.style.display="none";this.modalCoverD.style.zIndex=0;this.vp.appendChild(this.modalCoverD)};this._autoResizeViewport=function(){for(var a in this.wins){if(this.wins[a]._isFullScreened){this.wins[a]._content.style.width=document.body.offsetWidth-(_isIE?4:0)+"px";this.wins[a]._content.style.height=document.body.offsetHeight-(_isIE?4:0)+"px";if(this.wins[a].layout!=null){this.wins[a].layout.setSizes(this.wins[a])}}if(this.wins[a]._isMaximized&&this.wins[a].style.display!="none"){this._restoreWindow(this.wins[a]);this._maximizeWindow(this.wins[a])}}if(this.vp==document.body){return }if(this.autoViewport==false){return }this.vp.style.width=(_isIE?document.body.offsetWidth-4:window.innerWidth)+"px";this.vp.style.height=(_isIE?document.body.offsetHeight-4:window.innerHeight)+"px";for(var a in this.wins){var win=this.wins[a];var overX=false;var overY=false;if(win.x>this.vp.offsetWidth-10){win.x=this.vp.offsetWidth-10;overX=true}var skinParams=(win._skinParams!=null?win._skinParams:this.skinParams[this.skin]);if(win.y+skinParams.header_height>this.vp.offsetHeight){win.y=this.vp.offsetHeight-skinParams.header_height;overY=true}if(overX||overY){this._redrawWindow(win)}}};this.enableAutoViewport=function(state){if(this.vp!=document.body){return }this.autoViewport=state;if(state==false){this.vp=document.createElement("DIV");this.vp.className="dhtmlx_winviewport";this.vp.style.left="0px";this.vp.style.top="0px";document.body.appendChild(this.vp);this.vp.ax=0;this.vp.ay=0;this._autoResizeViewport();this.vp.appendChild(this.modalCoverI);this.vp.appendChild(this.modalCoverD)}};this.attachViewportTo=function(objId){if(this.autoViewport==false){if(this.vp!=document.body){this.vp.parentNode.removeChild(this.vp)}this.vp=document.getElementById(objId);this.vp.style.position="relative";this.vp.style.overflow="hidden";this.vp.ax=0;this.vp.ay=0;this.vp.appendChild(this.modalCoverI);this.vp.appendChild(this.modalCoverD)}};this.setViewport=function(x,y,width,height,parentObj){if(this.autoViewport==false){this.vp.style.left=x+"px";this.vp.style.top=y+"px";this.vp.style.width=width+"px";this.vp.style.height=height+"px";if(parentObj!=null){parentObj.appendChild(this.vp)}this.vp.ax=getAbsoluteLeft(this.vp);this.vp.ay=getAbsoluteTop(this.vp)}};this.createWindow=function(id,x,y,width,height){var win=document.createElement("DIV");win.className="dhtmlx_window_inactive";for(var a in this.wins){this.wins[a].zi+=this.zIndexStep;this.wins[a].style.zIndex=this.wins[a].zi}win.zi=this.zIndexStep;win.style.zIndex=win.zi;win.active=false;win._isWindow=true;win.w=width;win.h=height;win.x=x;win.y=y;this._fixWindowPositionInViewport(win);win.style.width=win.w+"px";win.style.height=win.h+"px";win.style.left=win.x+"px";win.style.top=win.y+"px";win._isModal=false;win._allowResize=true;win.maxW="auto";win.maxH="auto";win.minW=200;win.minH=140;win.iconsPresent=true;win.icons=new Array(this.imagePath+this.skin+"/active/icon_normal.gif",this.imagePath+this.skin+"/inactive/icon_normal.gif");win._allowMove=true;win._allowMoveGlobal=true;win._allowResizeGlobal=true;win._keepInViewport=false;var skin=this.skinParams[this.skin];win.idd=id;win._midd="dhxWMNObj_"+this._genStr(12);win._tidd="dhxWTBObj_"+this._genStr(12);win._sidd="dhxSTBObj_"+this._genStr(12);win.innerHTML="<table border='0' cellspacing='0' cellpadding='0' width='100%' height='"+win.h+"' class='dhtmlx_wins_"+this.skin+"'><tr><td class='dhtmlx_wins_td_header_full' clearonselect='yes'><table border='0' cellspacing='0' cellpadding='0' width='100%' class='dhtmlx_wins_header' clearonselect='yes'><tr><td class='dhtmlx_wins_td_header_left' clearonselect='yes'>&nbsp;</td><td class='dhtmlx_wins_td_header_middle' clearonselect='yes'>&nbsp;</td><td class='dhtmlx_wins_td_header_right' clearonselect='yes'>&nbsp;</td></tr></table></td></tr><tr><td class='dhtmlx_wins_td_body_full' height='"+(win.h-skin.header_height)+"'><table border='0' cellspacing='0' cellpadding='0' width='100%' height='"+(win.h-skin.header_height)+"' class='dhtmlx_wins_body'><tr><td class='dhtmlx_wins_body_border_middle_left' clearonselect='yes'>&nbsp;</td><td class='dhtmlx_wins_body_content' align='left' valign='top'><div class='dhtmlx_wins_body_content' style='width: "+(win.w-skin.border_left_width-skin.border_right_width)+"px; height:"+(win.h-skin.header_height-skin.border_bottom_height)+"px;'><div id='"+win._midd+"' class='dhtmlxWebMenuInWin' style='height: 0px; display: none;'></div><div id='"+win._tidd+"' class='dhtmlxWebToolbarInWin' style='height: 0px; display: none;'></div><div class='dhtmlxWindowMainContent' style='position: absolute; overflow: hidden; top: 0px; bottom: 0px; height=100%; left: 0px; right: 0px;'></div><div id='"+win._sidd+"' class='dhtmlxWebStatusBarInWin' style='height: 0px; display: none;'></div></div></td><td class='dhtmlx_wins_body_border_middle_right' clearonselect='yes'>&nbsp;</td></tr><tr clearonselect='yes'><td class='dhtmlx_wins_body_border_bottom_left' clearonselect='yes'>&nbsp;</td><td class='dhtmlx_wins_body_border_bottom_middle' clearonselect='yes'>&nbsp;</td><td class='dhtmlx_wins_body_border_bottom_right' clearonselect='yes'>&nbsp;</td></tr></table></td></tr></table><img clearonselect='yes' class='dhtmlx_wins_icon_"+this.skin+"' src='"+win.icons[0]+"'><div clearonselect='yes' class='dhtmlx_wins_title_"+this.skin+"'>Untitled dhtmlxWindow</div><div class='dhtmlx_wins_buttons_"+this.skin+"'><table border='0' cellspacing='0' cellpadding='0'><tr></tr></table></div><div clearonselect='yes' class='dhtmlx_wins_progress_"+this.skin+"'></div>";this.vp.appendChild(win);win._content=win.childNodes[0].childNodes[0].childNodes[1].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[1].childNodes[0];this._diableOnSelectInWin(win,true);this.wins[id]=win;win.dhx_Event=this.dhx_Event;win.dhx_Event();this._makeActive(win);var hdr=win.childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0];hdr.onmousedown=function(e){if(!win._allowMove||!win._allowMoveGlobal){return }e=e||event;win.oldMoveX=win.x;win.oldMoveY=win.y;win.moveOffsetX=win.x-e.clientX;win.moveOffsetY=win.y-e.clientY;that.movingWin=win;that._blockSwitcher("none");that.movingWin.childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[1].style.cursor="move";that.movingWin.childNodes[2].style.cursor="move"};hdr.ondblclick=function(){if(win._allowResizeGlobal&&!win._isParked){if(win._isMaximized==true){that._restoreWindow(win)}else{that._maximizeWindow(win)}}};var h_title=win.childNodes[2];h_title.onmousedown=hdr.onmousedown;h_title.ondblclick=hdr.ondblclick;win.isWindow=true;win.setText=function(text){this.childNodes[2].innerHTML=text;that.callEvent("onTextChange",[this._dockCell,text])};win.getText=function(){return this.childNodes[2].innerHTML};win.getId=function(){return this.idd};win.show=function(){that._showWindow(this)};win.hide=function(){that._hideWindow(this)};win.minimize=function(){that._restoreWindow(this)};win.maximize=function(){that._maximizeWindow(this)};win.close=function(){that._closeWindow(this)};win.park=function(){if(this._isParkedAllowed){that._parkWindow(this)}};win.stick=function(){that._stickWindow(this)};win.unstick=function(){that._unstickWindow(this)};win.isSticked=function(){return this._isSticked};win.setIcon=function(iconEnabled,iconDisabled){that._setWindowIcon(win,iconEnabled,iconDisabled)};win.getIcon=function(){return that._getWindowIcon(this)};win.clearIcon=function(){that._clearWindowIcons(this)};win.restoreIcon=function(){that._restoreWindowIcons(this)};win.keepInViewport=function(state){this._keepInViewport=state};win.setModal=function(state){if(state==true){if(that.modalWin!=null||that.modalWin==this){return }that._setWindowModal(this,true)}else{if(that.modalWin!=this){return }that._setWindowModal(this,false)}};win.isModal=function(){return this._isModal};win.isHidden=function(){return that._isWindowHidden(this)};win.isMaximized=function(){return this._isMaximized};win.isParked=function(){return this._isParked};win.allowPark=function(){that._allowParking(this)};win.denyPark=function(){that._denyParking(this)};win.isParkable=function(){return this._isParkedAllowed};win.allowResize=function(){that._allowReszieGlob(this)};win.denyResize=function(){that._denyResize(this)};win.isResizable=function(){return this._allowResizeGlobal};win.allowMove=function(){if(!this._isMaximized){this._allowMove=true}this._allowMoveGlobal=true};win.denyMove=function(){this._allowMoveGlobal=false};win.isMovable=function(){return this._allowMoveGlobal};win.bringToTop=function(){that._bringOnTop(this);that._makeActive(this)};win.bringToBottom=function(){that._bringOnBottom(this)};win.isOnTop=function(){return that._isWindowOnTop(this)};win.isOnBottom=function(){return that._isWindowOnBottom(this)};win.setPosition=function(x,y){this.x=x;this.y=y;that._fixWindowPositionInViewport(this);if(_isFF){this.h++;that._redrawWindow(this);this.h--}that._redrawWindow(this)};win.getPosition=function(){return new Array(this.x,this.y)};win.setDimension=function(width,height){this.w=width;this.h=height;that._fixWindowDimensionInViewport(this);that._fixWindowPositionInViewport(this);that._redrawWindow(this)};win.getDimension=function(){return new Array(this.w,this.h)};win.setMaxDimension=function(maxWidth,maxHeight){this.minW="auto";this.minH="auto";that._redrawWindow(this)};win.getMaxDimension=function(){return new Array(this.maxW,this.maxH)};win.setMinDimension=function(minWidth,minHeight){this.minW=minWidth;this.minH=minHeight;that._fixWindowDimensionInViewport(this);that._redrawWindow(this)};win.getMinDimension=function(){return new Array(this.minW,this.minH)};win.addUserButton=function(id,pos,title,label){var userBtn=that._addUserButton(this,id,pos,title,label);return userBtn};win.removeUserButton=function(id){if(!((id=="minmax1")||(id=="minmax2")||(id=="park")||(id=="close")||(id=="stick")||(id=="unstick")||(id=="help"))){var btn=this.button(id);if(btn!=null){that._removeUserButton(this,id,btn)}}};win.progressOn=function(){that._switchProgress(this,true)};win.progressOff=function(){that._switchProgress(this,false)};win.attachStatusBar=function(){return that._attachStatusBar(this)};win.attachWebMenu=function(){return that._attachWebMenu(this)};win.attachWebToolbar=function(){return that._attachWebToolbar(this)};win.attachGrid=function(){var obj=document.createElement("DIV");obj.id="dhxGridObj_"+that._genStr(12);obj.style.width="100%";obj.style.height="100%";document.body.appendChild(obj);this.attachObject(obj.id,true);this.grid=new dhtmlXGridObject(obj.id);return this.grid};win.attachTree=function(rootId){var obj=document.createElement("DIV");obj.id="dhxTreeObj_"+that._genStr(12);obj.style.width="100%";obj.style.height="100%";document.body.appendChild(obj);this.attachObject(obj.id,true);this.tree=new dhtmlXTreeObject(obj.id,"100%","100%",(rootId||0));this.tree.allTree.childNodes[0].style.marginTop="2px";this.tree.allTree.childNodes[0].style.marginBottom="2px";return this.tree};win.attachTabbar=function(){var obj=document.createElement("DIV");obj.id="dhxFoldersObj_"+that._genStr(12);obj.style.width="100%";obj.style.height="100%";obj.style.overflow="hidden";document.body.appendChild(obj);this.attachObject(obj.id,true);if(this._dockCell!=null&&that.dhxLayout!=null){var dockCell=that.dhxLayout.polyObj[this._dockCell];if(dockCell!=null){dockCell.childNodes[0]._tabbarMode=true;that.dhxLayout.hidePanel(this._dockCell);dockCell.className="dhtmlxLayoutSinglePolyTabbar"}}this.tabbar=new dhtmlXTabBar(obj.id,"top");this.tabbar._EARS=true;this.tabbar.adjustOuterSize();return this.tabbar};win.attachFolders=function(){var obj=document.createElement("DIV");obj.id="dhxFoldersObj_"+that._genStr(12);obj.style.width="100%";obj.style.height="100%";obj.style.overflow="hidden";document.body.appendChild(obj);this.attachObject(obj.id,true);this.folders=new dhtmlxFolders(obj.id);return this.folders};win.attachAccordion=function(){var obj=document.createElement("DIV");obj.id="dhxAccordionObj_"+that._genStr(12);obj.style.width="100%";obj.style.height="100%";obj.style.position="relative";document.body.appendChild(obj);this.attachObject(obj.id,true);this.accordion=new dhtmlXAccordion(obj.id);if(this._dockCell!=null&&that.dhxLayout!=null){var dockCell=that.dhxLayout.polyObj[this._dockCell];if(dockCell!=null){that.dhxLayout.hidePanel(this._dockCell)}}this.accordion.setSizes();return this.accordion};win.attachLayout=function(view){var obj=document.createElement("DIV");obj.id="dhxLayoutObj_"+that._genStr(12);obj.style.position="relative";document.body.appendChild(obj);this.attachObject(obj.id,true);var w=this._content.childNodes[2].offsetWidth;var h=this._content.childNodes[2].offsetHeight;if(w==0){w=parseInt(this._content.style.width)}obj.style.left="0px";obj.style.top="0px";obj.style.width=w+"px";obj.style.height=h+"px";obj._skipChecksOnStartUp=true;this.layout=new dhtmlXLayoutObject(obj,view);this.layout._parentWindow=this;this.attachEvent("_onBeforeTryResize",this.layout._defineWindowMinDimension);return this.layout};win.attachEditor=function(){var obj=document.createElement("DIV");obj.id="dhxEditorObj_"+that._genStr(12);obj.style.position="relative";obj.style.display="none";obj.style.width="100%";obj.style.height="100%";document.body.appendChild(obj);this.attachObject(obj.id,true);this.editor=new dhtmlXEditor(obj.id);return this.editor};win.setToFullScreen=function(state){that._setWindowToFullScreen(this,state)};win.showHeader=function(){that._showWindowHeader(this)};win.hideHeader=function(){that._hideWindowHeader(this)};win.progressOff();win.canStartResize=false;win.onmousemove=function(e){if((!this._allowResize)||(this._allowResizeGlobal==false)){this.canStartResize=false;this.style.cursor="";return }if(that.resizingWin!=null){return }if(this._isParked){return }e=e||event;var targetObj=e.target||e.srcElement;var useDefaultCursor=true;this.canStartResize=true;var skin=(this._skinParams!=null?this._skinParams:that.skinParams[that.skin]);var hh=skin.header_height;var bwl=skin.border_left_width+2;var bwr=skin.border_right_width+2;var bhb=skin.border_bottom_height+2;if(targetObj.className=="dhtmlx_wins_body_border_middle_left"){that.resizingDirs="border_left";this.style.cursor="w-resize";this.resizeOffsetX=this.x-e.clientX;useDefaultCursor=false}if(targetObj.className=="dhtmlx_wins_body_border_middle_right"){that.resizingDirs="border_right";this.style.cursor="e-resize";this.resizeOffsetXW=this.x+this.w-e.clientX;useDefaultCursor=false}if(targetObj.className=="dhtmlx_wins_body_border_bottom_middle"){that.resizingDirs="border_bottom";this.style.cursor="n-resize";this.resizeOffsetYH=this.y+this.h-e.clientY;useDefaultCursor=false}if(targetObj.className=="dhtmlx_wins_body_border_bottom_left"){that.resizingDirs="corner_left";this.style.cursor="sw-resize";this.resizeOffsetX=this.x-e.clientX;this.resizeOffsetYH=this.y+this.h-e.clientY;useDefaultCursor=false}if(targetObj.className=="dhtmlx_wins_body_border_bottom_right"){that.resizingDirs="corner_right";this.style.cursor="nw-resize";this.resizeOffsetXW=this.x+this.w-e.clientX;this.resizeOffsetYH=this.y+this.h-e.clientY;useDefaultCursor=false}if(useDefaultCursor){this.canStartResize=false;this.style.cursor=""}};win.onmousedown=function(){that._makeActive(this);that._bringOnTop(this);if(this.canStartResize){that._blockSwitcher("none");that.resizingWin=this;if(this.layout){this.callEvent("_onBeforeTryResize",[this])}}};this._addDefaultButtons(win);win.button=function(id){var b=null;if(this.btns[id]!=null){b=this.btns[id]}return b};win.attachObject=function(obj,changeDisp){if(typeof (obj)=="string"){obj=document.getElementById(obj)}that._attachContent(this,"obj",obj,changeDisp)};win.attachURL=function(url){that._attachContent(this,"url",url,false)};win.center=function(){that._centerWindow(this,false)};win.centerOnScreen=function(){that._centerWindow(this,true)};this._attachContent(win,"empty",null,false);win.bringToTop();return this.wins[id]};this._diableOnSelectInWin=function(obj,state){for(var q=0;q<obj.childNodes.length;q++){var child=obj.childNodes[q];if((child.tagName=="TD")||(child.tagName=="TR")||(child.tagName=="TABLE")||(child.tagName=="DIV")){if(child.getAttribute("clearonselect")!=null){if(state){child.onselectstart=function(e){e=e||event;e.returnValue=false}}else{child.onselectstart=null}}}if(child.childNodes.length>0){this._diableOnSelectInWin(child,state)}child=null}};this._redrawWindow=function(win){if(win._isFullScreened){return }win.style.left=win.x+"px";win.style.top=win.y+"px";win.style.width=(win.w=="100%"?win.w:win.w+"px");win.style.height=(win.h=="100%"?win.h:win.h+"px");if(win.w=="100%"){var winW="100%";win.w=win.offsetWidth}if(win.h=="100%"){var winH="100%";win.h=win.offsetHeight}win.childNodes[0].style.height=win.h+"px";var p=win.childNodes[0].childNodes[0].childNodes[1].childNodes[0];var s=(win._skinParams!=null?win._skinParams:this.skinParams[this.skin]);p.style.height=win.h-s.header_height+"px";p.childNodes[0].style.height=win.h-s.header_height+"px";var wdth=win.childNodes[3].offsetLeft-win.childNodes[2].offsetLeft-5;if(wdth<0){wdth=0}win.childNodes[2].style.width=wdth+"px";var w=win.w-s.border_left_width-s.border_right_width;var h=win.h-s.header_height-s.border_bottom_height;if(w<0){w=0}if(h<0){h=0}var bd=p.childNodes[0].childNodes[0].childNodes[0].childNodes[1].childNodes[0];if(bd==null){bd=win._content}bd.style.width=w+"px";bd.style.height=h+"px";if(winW!=null){win.w=winW}if(winH!=null){win.h=winH}};this.zIndexStep=50;this._getTopZIndex=function(ignoreSticked){var topZIndex=0;for(var a in this.wins){if(ignoreSticked==true){if(this.wins[a].zi>topZIndex){topZIndex=this.wins[a].zi}}else{if(this.wins[a].zi>topZIndex&&!this.wins[a]._isSticked){topZIndex=this.wins[a].zi}}}return topZIndex};this.movingWin=null;this._moveWindow=function(e){if(this.movingWin!=null){if(!this.movingWin._allowMove||!this.movingWin._allowMoveGlobal){return }this.movingWin.oldMoveX=this.movingWin.x;this.movingWin.oldMoveY=this.movingWin.y;this.movingWin.x=e.clientX+this.movingWin.moveOffsetX;this.movingWin.y=e.clientY+this.movingWin.moveOffsetY;this._fixWindowPositionInViewport(this.movingWin);this._redrawWindow(this.movingWin);if(this._compoEnabled){this._compoFixMove(this.movingWin)}}if(this.resizingWin!=null){if(!this.resizingWin._allowResize){return }if(this.resizingDirs=="border_left"||this.resizingDirs=="corner_left"){var ofs=e.clientX+this.resizingWin.resizeOffsetX;var sign=(ofs>this.resizingWin.x?-1:1);newW=this.resizingWin.w+Math.abs(ofs-this.resizingWin.x)*sign;if((newW<this.resizingWin.minW)&&(sign<0)){this.resizingWin.x=this.resizingWin.x+this.resizingWin.w-this.resizingWin.minW;this.resizingWin.w=this.resizingWin.minW}else{this.resizingWin.w=newW;this.resizingWin.x=ofs}this._redrawWindow(this.resizingWin)}if(this.resizingDirs=="border_right"||this.resizingDirs=="corner_right"){var ofs=e.clientX-(this.resizingWin.x+this.resizingWin.w)+this.resizingWin.resizeOffsetXW;newW=this.resizingWin.w+ofs;if(newW<this.resizingWin.minW){newW=this.resizingWin.minW}this.resizingWin.w=newW;this._redrawWindow(this.resizingWin)}if(this.resizingDirs=="border_bottom"||this.resizingDirs=="corner_left"||this.resizingDirs=="corner_right"){var ofs=e.clientY-(this.resizingWin.y+this.resizingWin.h)+this.resizingWin.resizeOffsetYH;newH=this.resizingWin.h+ofs;if(newH<this.resizingWin.minH){newH=this.resizingWin.minH}this.resizingWin.h=newH;if(this._compoEnabled){this._compoFixResize(this.resizingWin,this.resizingDirs)}else{this._redrawWindow(this.resizingWin)}}}};this._stopMove=function(){if(this.movingWin!=null){var win=this.movingWin;this.movingWin=null;this._blockSwitcher("");win.childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[1].style.cursor="";win.childNodes[2].style.cursor="";if(_isFF){win.h++;this._redrawWindow(win);win.h--;this._redrawWindow(win)}if(!(win.oldMoveX==win.x&&win.oldMoveY==win.y)){if(win.checkEvent("onMoveFinish")){win.callEvent("onMoveFinish",[win])}else{this.callEvent("onMoveFinish",[win])}}}if(this.resizingWin!=null){var win=this.resizingWin;this.resizingWin=null;this._blockSwitcher("");if(win.grid){win.grid.setSizes()}if(win.tabbar){win.tabbar.adjustOuterSize()}if(win.accordion){win.accordion.setSizes()}if(win.layout){win.layout.setSizes(win);win.layout.callEvent("onResize",[])}if(win.checkEvent("onResizeFinish")){win.callEvent("onResizeFinish",[win])}else{this.callEvent("onResizeFinish",[win])}}};this._fixWindowPositionInViewport=function(win){var skin=(win._skinParams!=null?win._skinParams:this.skinParams[this.skin]);if(win._keepInViewport){if(win.x<0){win.x=0}if(win.x+win.w>this.vp.offsetWidth){win.x=this.vp.offsetWidth-win.w}if(win.y<0){win.y=0}if(win.y+win.h>this.vp.offsetHeight){win.y=this.vp.offsetHeight-win.h}}else{if(win.y<0){win.y=0}if(win.y+skin.header_height>this.vp.offsetHeight){win.y=this.vp.offsetHeight-skin.header_height}if(win.x+win.w-10<0){win.x=10-win.w}if(win.x>this.vp.offsetWidth-10){win.x=this.vp.offsetWidth-10}}};this._fixWindowDimensionInViewport=function(win){if(win.w<win.minW){win.w=win.minW}if(win.h<win.minH){win.h=win.minH}};this._bringOnTop=function(win){var cZIndex=win.zi;var topZIndex=this._getTopZIndex(win._isSticked);for(var a in this.wins){if(this.wins[a]!=win){if(win._isSticked||(!win._isSticked&&!this.wins[a]._isSticked)){if(this.wins[a].zi>cZIndex){this.wins[a].zi=this.wins[a].zi-this.zIndexStep;this.wins[a].style.zIndex=this.wins[a].zi}}}}win.zi=topZIndex;win.style.zIndex=win.zi};this._makeActive=function(win){for(var a in this.wins){if(this.wins[a]==win){var needEvent=false;if(this.wins[a].className!="dhtmlx_window_active"){needEvent=true}this.wins[a].className="dhtmlx_window_active";this.wins[a].childNodes[1].src=this.wins[a].icons[0];if(needEvent==true){if(win.checkEvent("onFocus")){win.callEvent("onFocus",[win])}else{this.callEvent("onFocus",[win])}}}else{this.wins[a].className="dhtmlx_window_inactive";this.wins[a].childNodes[1].src=this.wins[a].icons[1]}}};this._getActive=function(){var win=null;for(var a in this.wins){if(this.wins[a].className=="dhtmlx_window_active"){win=this.wins[a]}}return win};this._centerWindow=function(win,onScreen){if(win._isMaximized==true){return }if(win._isParked==true){return }if(onScreen==true){var vpw=(_isIE?document.body.offsetWidth:window.innerWidth);var vph=(_isIE?document.body.offsetHeight:window.innerHeight)}else{var vpw=(this.vp==document.body?document.body.offsetWidth:(Number(parseInt(this.vp.style.width))&&String(this.vp.style.width).search("%")==-1?parseInt(this.vp.style.width):this.vp.offsetWidth));var vph=(this.vp==document.body?document.body.offsetHeight:(Number(parseInt(this.vp.style.height))&&String(this.vp.style.height).search("%")==-1?parseInt(this.vp.style.height):this.vp.offsetHeight))}var newX=Math.round((vpw/2)-(win.w/2));var newY=Math.round((vph/2)-(win.h/2));win.x=newX;win.y=newY;this._fixWindowPositionInViewport(win);this._redrawWindow(win)};this._switchProgress=function(win,state){if(state==true){win.childNodes[1].style.display="none";win.childNodes[4].style.display=""}else{win.childNodes[4].style.display="none";win.childNodes[1].style.display=""}};this._addDefaultButtons=function(win){var btnStick=document.createElement("DIV");btnStick.className="button_stick_default";btnStick.title="Stick";btnStick.isVisible=false;btnStick._isEnabled=true;btnStick.isPressed=false;win._isSticked=false;btnStick.label="stick";btnStick._doOnClick=function(){this.isPressed=true;that._stickWindow(win)};var btnSticked=document.createElement("DIV");btnSticked.className="button_sticked_default";btnSticked.title="Unstick";btnSticked.isVisible=false;btnSticked._isEnabled=true;btnSticked.isPressed=false;btnSticked.label="sticked";btnSticked._doOnClick=function(){this.isPressed=false;that._unstickWindow(win)};var btnHelp=document.createElement("DIV");btnHelp.className="button_help_default";btnHelp.title="Help";btnHelp.isVisible=false;btnHelp._isEnabled=true;btnHelp.isPressed=false;btnHelp.label="help";btnHelp.that=this;btnHelp._doOnClick=function(){that._needHelp(win)};var btnPark=document.createElement("DIV");btnPark.className="button_park_default";btnPark.titleIfParked="Park Down";btnPark.titleIfNotParked="Park Up";btnPark.title=btnPark.titleIfNotParked;btnPark.isVisible=true;btnPark._isEnabled=true;btnPark.isPressed=false;btnPark.label="park";win._isParked=false;win._isParkedAllowed=true;btnPark._doOnClick=function(){that._parkWindow(win)};var btnMinMax1=document.createElement("DIV");btnMinMax1.className="button_minmax1_default";btnMinMax1.title="Maximize";btnMinMax1.isVisible=true;btnMinMax1._isEnabled=true;btnMinMax1.isPressed=false;btnMinMax1.label="minmax1";win._isMaximized=false;btnMinMax1._doOnClick=function(){that._maximizeWindow(win)};var btnMinMax2=document.createElement("DIV");btnMinMax2.className="button_minmax2_default";btnMinMax2.title="Restore";btnMinMax2.isVisible=false;btnMinMax2._isEnabled=true;btnMinMax2.isPressed=false;btnMinMax2.label="minmax2";btnMinMax2._doOnClick=function(){that._restoreWindow(win)};var btnClose=document.createElement("DIV");btnClose.className="button_close_default";btnClose.title="Close";btnClose.isVisible=true;btnClose._isEnabled=true;btnClose.isPressed=false;btnClose.label="close";btnClose._doOnClick=function(){that._closeWindow(win)};win.btns={};win.btns.stick=btnStick;win.btns.sticked=btnSticked;win.btns.help=btnHelp;win.btns.park=btnPark;win.btns.minmax1=btnMinMax1;win.btns.minmax2=btnMinMax2;win.btns.close=btnClose;var b=win.childNodes[3].childNodes[0].childNodes[0].childNodes[0];for(var a in win.btns){var btn=win.btns[a];var td=document.createElement("TD");td.className="dhtmlx_wins_btn_"+(btn.isVisible?"visible":"hidden");b.appendChild(td);td.appendChild(btn);this._attachEventsOnButton(win,btn);btn=null}};this._attachEventsOnButton=function(win,btn){btn.onmouseover=function(){if(this._isEnabled){this.className="button_"+this.label+"_over_"+(this.isPressed?"pressed":"default")}else{this.className="button_"+this.label+"_disabled"}};btn.onmouseout=function(){if(this._isEnabled){this.isPressed=false;this.className="button_"+this.label+"_default"}else{this.className="button_"+this.label+"_disabled"}};btn.onmousedown=function(){if(this._isEnabled){this.isPressed=true;this.className="button_"+this.label+"_over_pressed"}else{this.className="button_"+this.label+"_disabled"}};btn.onmouseup=function(){if(this._isEnabled){var wasPressed=this.isPressed;this.isPressed=false;this.className="button_"+this.label+"_over_default";if(wasPressed){if(this.checkEvent("onClick")){this.callEvent("onClick",[win,this])}else{this._doOnClick()}}}else{this.className="button_"+this.label+"_disabled"}};btn.show=function(){that._showButton(win,this.label)};btn.hide=function(){that._hideButton(win,this.label)};btn.enable=function(){that._enableButton(win,this.label)};btn.disable=function(){that._disableButton(win,this.label)};btn.isEnabled=function(){return this._isEnabled};btn.isHidden=function(){return(!this.isVisible)};btn.dhx_Event=this.dhx_Event;btn.dhx_Event()};this._parkWindow=function(win){if(!win._isParkedAllowed){return }if(this.enableParkEffect&&win.parkBusy){return }if(win._isParked){if(this.enableParkEffect){win.parkBusy=true;win.childNodes[0].childNodes[0].childNodes[1].childNodes[0].childNodes[0].childNodes[0].childNodes[0].style.display="";this._doParkDown(win)}else{win.h=win.lastParkH;win.childNodes[0].childNodes[0].childNodes[1].childNodes[0].childNodes[0].childNodes[0].childNodes[0].style.display="";win.btns.park.title=win.btns.park.titleIfNotParked;if(win._allowResizeGlobal==true){this._enableButton(win,"minmax1");this._enableButton(win,"minmax2")}}}else{win.lastParkH=(String(win.h).search(/\%$/)==-1?win.h:win.offsetHeight);if(win._allowResizeGlobal==true){this._disableButton(win,"minmax1");this._disableButton(win,"minmax2")}if(this.enableParkEffect){win.parkBusy=true;this._doParkUp(win)}else{var skinParams=(win._skinParams!=null?win._skinParams:this.skinParams[this.skin]);win.h=skinParams.header_height+skinParams.border_bottom_height;win.childNodes[0].childNodes[0].childNodes[1].childNodes[0].childNodes[0].childNodes[0].childNodes[0].style.display="none";win.btns.park.title=win.btns.park.titleIfParked}}if(!this.enableParkEffect){win._isParked=!win._isParked;this._redrawWindow(win);if(!win._isParked){if(win.tabbar){win.tabbar.adjustOuterSize()}if(win.menu!=null){win.menu._redistribTopLevelPositions()}if(win.grid!=null){win.grid.setSizes()}if(win.checkEvent("onParkDown")){win.callEvent("onParkDown",[win])}else{this.callEvent("onParkDown",[win])}}else{if(_isOpera){win.childNodes[0].border=1;win.childNodes[0].border=0}if(win.checkEvent("onParkUp")){win.callEvent("onParkUp",[win])}else{this.callEvent("onParkUp",[win])}}}};this._allowParking=function(win){win._isParkedAllowed=true;this._enableButton(win,"park")};this._denyParking=function(win){win._isParkedAllowed=false;this._disableButton(win,"park")};this.enableParkEffect=true;this.parkStartSpeed=80;this.parkSpeed=this.parkStartSpeed;this.parkTM=null;this.parkTMTime=5;this._doParkUp=function(win){if(String(win.h).search(/\%$/)!=-1){win.h=win.offsetHeight}win.h-=this.parkSpeed;var skinParams=(win._skinParams!=null?win._skinParams:this.skinParams[this.skin]);if(win.h<=skinParams.header_height+skinParams.border_bottom_height){win.h=skinParams.header_height+skinParams.border_bottom_height;win.childNodes[0].childNodes[0].childNodes[1].childNodes[0].childNodes[0].childNodes[0].childNodes[0].style.display="none";win.btns.park.title=win.btns.park.titleIfParked;win._isParked=true;win.parkBusy=false;this._redrawWindow(win,true);if(_isOpera){win.childNodes[0].border=1;win.childNodes[0].border=0}if(win.checkEvent("onParkUp")){win.callEvent("onParkUp",[win])}else{this.callEvent("onParkUp",[win])}}else{this._redrawWindow(win);this.parkTM=window.setTimeout(function(){that._doParkUp(win)},this.parkTMTime)}};this._doParkDown=function(win){win.h+=this.parkSpeed;if(win.h>=win.lastParkH){win.h=win.lastParkH;win.btns.park.title=win.btns.park.titleIfNotParked;if(win._allowResizeGlobal==true){this._enableButton(win,"minmax1");this._enableButton(win,"minmax2")}win._isParked=false;win.parkBusy=false;this._redrawWindow(win);if(win.tabbar){win.tabbar.adjustOuterSize()}if(win.menu!=null){win.menu._redistribTopLevelPositions()}if(win.grid!=null){win.grid.setSizes()}if(win.checkEvent("onParkDown")){win.callEvent("onParkDown",[win])}else{this.callEvent("onParkDown",[win])}}else{this._redrawWindow(win);this.parkTM=window.setTimeout(function(){that._doParkDown(win)},this.parkTMTime)}};this._enableButton=function(win,btn){win.btns[btn]._isEnabled=true;win.btns[btn].className="button_"+win.btns[btn].label+"_default"};this._disableButton=function(win,btn){win.btns[btn]._isEnabled=false;win.btns[btn].className="button_"+win.btns[btn].label+"_disabled"};this._showWindowHeader=function(win){win.childNodes[1].style.display="";win.childNodes[2].style.display="";win.childNodes[3].style.display="";for(var a in win._skinParams){delete win._skinParams[a]}win._skinParams=null;var h=this.skinParams[this.skin]["header_height"]+"px";win.childNodes[0].childNodes[0].childNodes[0].childNodes[0].style.height=h;win.childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].style.height=h;var hdr=win.childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0];for(var q=0;q<hdr.childNodes.length;q++){hdr.childNodes[q].style.height=h}this._redrawWindow(win)};this._hideWindowHeader=function(win){win.childNodes[1].style.display="none";win.childNodes[2].style.display="none";win.childNodes[3].style.display="none";win._skinParams={};for(var a in this.skinParams[this.skin]){win._skinParams[a]=Number(this.skinParams[this.skin][a]).valueOf()}win._skinParams.header_height=win._skinParams.border_bottom_height;var h=win._skinParams.header_height+"px";win.childNodes[0].childNodes[0].childNodes[0].childNodes[0].style.height=h;win.childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].style.height=h;var hdr=win.childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0];for(var q=0;q<hdr.childNodes.length;q++){hdr.childNodes[q].style.height=h}this._redrawWindow(win)};this._allowReszieGlob=function(win){win._allowResizeGlobal=true;this._enableButton(win,"minmax1");this._enableButton(win,"minmax2")};this._denyResize=function(win){win._allowResizeGlobal=false;this._disableButton(win,"minmax1");this._disableButton(win,"minmax2")};this._maximizeWindow=function(win){if(win._allowResizeGlobal==false){return }win.lastMaximizeX=win.x;win.lastMaximizeY=win.y;win.lastMaximizeW=win.w;win.lastMaximizeH=win.h;win.x=0;win.y=0;win._isMaximized=true;win._allowMove=false;win._allowResize=false;win.w=(win.maxW=="auto"?(this.vp==document.body?"100%":(this.vp.style.width!=""?parseInt(this.vp.style.width):this.vp.offsetWidth)):win.maxW);win.h=(win.maxH=="auto"?(this.vp==document.body?"100%":(this.vp.style.height!=""?parseInt(this.vp.style.height):this.vp.offsetHeight)):win.maxH);this._hideButton(win,"minmax1");this._showButton(win,"minmax2");this._redrawWindow(win);if(win.grid){win.grid.setSizes()}if(win.tabbar){win.tabbar.adjustOuterSize()}if(win.accordion){win.accordion.setSizes()}if(win.layout){win.layout.setSizes(win)}if(win.checkEvent("onMaximize")){win.callEvent("onMaximize",[win])}else{this.callEvent("onMaximize",[win])}};this._restoreWindow=function(win){if(win._allowResizeGlobal==false){return }if(win.layout){win.layout._defineWindowMinDimension(win)}win.x=win.lastMaximizeX;win.y=win.lastMaximizeY;win.w=win.lastMaximizeW;win.h=win.lastMaximizeH;win._isMaximized=false;win._allowMove=win._allowMoveGlobal;win._allowResize=true;this._fixWindowDimensionInViewport(win);this._hideButton(win,"minmax2");this._showButton(win,"minmax1");this._redrawWindow(win);if(win.grid){win.grid.setSizes()}if(win.tabbar){win.tabbar.adjustOuterSize()}if(win.accordion){win.accordion.setSizes()}if(win.layout){win.layout.setSizes(win)}if(win.checkEvent("onMinimize")){win.callEvent("onMinimize",[win])}else{this.callEvent("onMinimize",[win])}};this._showButton=function(win,btn){win.btns[btn].isVisible=true;var p=win.btns[btn].parentNode;p.className="dhtmlx_wins_btn_visible";p=null};this._hideButton=function(win,btn){win.btns[btn].isVisible=false;var p=win.btns[btn].parentNode;p.className="dhtmlx_wins_btn_hidden";p=null};this._showWindow=function(win){win.style.display="";if(win.checkEvent("onShow")){win.callEvent("onShow",[win])}else{this.callEvent("onShow",[win])}var w=this._getActive();if(w==null){this._bringOnTop(win);this._makeActive(win)}else{if(this._isWindowHidden(w)){this._bringOnTop(win);this._makeActive(win)}}};this._hideWindow=function(win){win.style.display="none";if(win.checkEvent("onHide")){win.callEvent("onHide",[win])}else{this.callEvent("onHide",[win])}var w=this.getTopmostWindow(true);if(w!=null){this._bringOnTop(w);this._makeActive(w)}};this._isWindowHidden=function(win){var isHidden=(win.style.display=="none");return isHidden};this._closeWindow=function(win){if(win.checkEvent("onClose")){if(!win.callEvent("onClose",[win])){return }}else{if(!this.callEvent("onClose",[win])){return }}this._removeWindowGlobal(win);var latest={zi:0};for(var a in this.wins){if(this.wins[a].zi>latest.zi){latest=this.wins[a]}}if(latest!=null){this._makeActive(latest)}};this._needHelp=function(win){if(win.checkEvent("onHelp")){win.callEvent("onHelp",[win])}else{this.callEvent("onHelp",[win])}};this._attachContent=function(win,type,obj,state){while(win._content.childNodes[2].childNodes.length>0){win._content.childNodes[2].removeChild(win._content.childNodes[2].childNodes[0])}while(win._content.childNodes.length>4){win._content.removeChild(win._content.childNodes[4])}if(type=="url"){var fr=document.createElement("IFRAME");fr.frameBorder=0;fr.border=0;fr.style.width="100%";fr.style.height="100%";fr.src=obj;win._content.childNodes[2].appendChild(fr);win._frame=fr;if(_isIE){win._frame.onreadystatechange=function(a){if(win._frame.readyState=="complete"){that.callEvent("onContentLoaded",[win])}}}else{win._frame.onload=function(){that.callEvent("onContentLoaded",[win])}}}else{if(type=="obj"){win._frame=null;win._content.childNodes[2].appendChild(obj);if(state){obj.style.display=""}}}var cover=document.createElement("DIV");cover.className="dhx_content_cover_blocker";cover.style.display="none";win._content.appendChild(cover)};this._setWindowIcon=function(win,iconEnabled,iconDisabled){win.iconsPresent=true;win.icons[0]=this.imagePath+iconEnabled;win.icons[1]=this.imagePath+iconDisabled;win.childNodes[1].src=win.icons[win.isOnTop()?0:1]};this._getWindowIcon=function(win){if(win.iconsPresent){return new Array(win.icons[0],win.icons[1])}else{return new Array(null,null)}};this._clearWindowIcons=function(win){win.iconsPresent=false;win.icons[0]=this.imagePath+this.skin+"/active/icon_blank.gif";win.icons[1]=this.imagePath+this.skin+"/inactive/icon_blank.gif";win.childNodes[1].src=win.icons[win.isOnTop()?0:1]};this._restoreWindowIcons=function(win){win.iconsPresent=true;win.icons[0]=this.imagePath+this.skin+"/active/icon_normal.gif";win.icons[1]=this.imagePath+this.skin+"/inactive/icon_normal.gif";win.childNodes[1].src=win.icons[win.isOnTop()?0:1]};this._attachWindowContentTo=function(win,obj,w,h){var data=win._content;data.parentNode.removeChild(data);win.hide();data.style.left="0px";data.style.top="0px";data.style.width=(w!=null?w:obj.offsetWidth)+"px";data.style.height=(h!=null?h:obj.offsetHeight)+"px";data.style.position="relative";obj.appendChild(data)};this._setWindowToFullScreen=function(win,state){if(state==true){var data=win._content;data.parentNode.removeChild(data);win.hide();win._isFullScreened=true;data.style.left="0px";data.style.top="0px";data.style.width=document.body.offsetWidth-(_isIE?4:0)+"px";data.style.height=document.body.offsetHeight-(_isIE?4:0)+"px";data.style.position="absolute";document.body.appendChild(data)}else{if(state==false){var data=win.childNodes[0].childNodes[0].childNodes[1].childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[1];var base=win._content;document.body.removeChild(base);data.appendChild(base);win._isFullScreened=false;win.setDimension(win.w,win.h);win.show();win.bringToTop();win.center();if(win.layout!=null){win.layout.setSizes(win)}}}};this._isWindowOnTop=function(win){var state=(this.getTopmostWindow()==win);return state};this._bringOnBottom=function(win){for(var a in this.wins){if(this.wins[a].zi<win.zi){this.wins[a].zi+=this.zIndexStep;this.wins[a].style.zIndex=this.wins[a].zi}}win.zi=50;win.style.zIndex=win.zi;this._makeActive(this.getTopmostWindow())};this._isWindowOnBottom=function(win){var state=true;for(var a in this.wins){if(this.wins[a]!=win){state=state&&(this.wins[a].zi>win.zi)}}return state};this._stickWindow=function(win){win._isSticked=true;this._hideButton(win,"stick");this._showButton(win,"sticked");this._bringOnTop(win)};this._unstickWindow=function(win){win._isSticked=false;this._hideButton(win,"sticked");this._showButton(win,"stick");this._bringOnTopAnyStickedWindows()};this._addUserButton=function(win,id,pos,title,label){var btn=document.createElement("DIV");btn.className="button_"+label+"_default";btn.title=title;btn.isVisible=true;btn._isEnabled=true;btn.isPressed=false;btn.label=label;win.btns[id]=btn;btn._doOnClick=function(){};var b=win.childNodes[3].childNodes[0].childNodes[0].childNodes[0];var td=document.createElement("TD");td.className="dhtmlx_wins_btn_"+(btn.isVisible?"visible":"hidden");if(pos>b.childNodes.length){b.appendChild(td)}else{if(pos<0){pos=0}b.insertBefore(td,b.childNodes[pos])}td.appendChild(btn);this._attachEventsOnButton(win,btn)};this._removeUserButton=function(win,id,btn){this._removeButtonGlobal(win,id,btn)};this._blockSwitcher=function(state){for(var a in this.wins){var winContent=this.wins[a]._content;var cover=null;for(var q=0;q<winContent.childNodes.length;q++){if(winContent.childNodes[q].className=="dhx_content_cover_blocker"){cover=winContent.childNodes[q]}}if(cover!=null){cover.style.display=(state?"":"none")}}};this.resizingWin=null;this.modalWin=null;this.resizingDirs="none";this._createViewport();this._doOnMouseUp=function(){that._stopMove()};this._doOnMoseMove=function(e){e=e||event;that._moveWindow(e)};this._resizeTM=null;this._resizeTMTime=200;this._doOnResize=function(){window.clearTimeout(that._resizeTM);that._resizeTM=window.setTimeout(function(){that._autoResizeViewport()},that._resizeTMTime)};this._doOnUnload=function(){that.unload()};this._doOnSelectStart=function(e){e=e||event;if(that.resizingWin!=null){e.returnValue=false}};if(_isIE){document.body.attachEvent("onselectstart",this._doOnSelectStart)}dhtmlxEvent(window,"resize",this._doOnResize);dhtmlxEvent(document.body,"unload",this._doOnUnload);dhtmlxEvent(document.body,"mouseup",this._doOnMouseUp);dhtmlxEvent(this.vp,"mousemove",this._doOnMoseMove);dhtmlxEvent(this.vp,"mouseup",this._doOnMouseUp);this._setWindowModal=function(win,state){if(state==true){this._makeActive(win);this._bringOnTop(win);this.modalWin=win;win._isModal=true;this.modalCoverI.style.zIndex=win.zi-2;this.modalCoverI.style.display="";this.modalCoverD.style.zIndex=win.zi-2;this.modalCoverD.style.display=""}else{this.modalWin=null;win._isModal=false;this.modalCoverI.style.zIndex=0;this.modalCoverI.style.display="none";this.modalCoverD.style.zIndex=0;this.modalCoverD.style.display="none"}};this._bringOnTopAnyStickedWindows=function(){var wins=new Array();for(var a in this.wins){if(this.wins[a]._isSticked){wins[wins.length]=this.wins[a]}}for(var q=0;q<wins.length;q++){this._bringOnTop(wins[q])}if(wins.length==0){for(var a in this.wins){if(this.wins[a].className=="dhtmlx_window_active"){this._bringOnTop(this.wins[a])}}}};this.unload=function(){this._clearAll()};this._removeButtonGlobal=function(win,id,btn){this._parseNestedForEvents(btn);for(var a in btn){if(typeof (btn[a])=="function"){var k=(btn[a].toString()).split("\n");if(!(k.length==3&&k[1].search(/\[native\scode\]/gi)!=-1)){btn[a]=null}}}var p=btn.parentNode;p.removeChild(btn);delete win.btns[id];btn=null;p=null};this._removeWindowGlobal=function(win){if(this.modalWin==win){this._setWindowModal(win,false)}this._parseNestedForEvents(win);for(var a in win.btns){this._removeButtonGlobal(win,a,win.btns[a])}for(var a in win){if(typeof (win[a])=="function"){var k=(win[a].toString()).split("\n");if(!(k.length==3&&k[1].search(/\[native\scode\]/gi)!=-1)){win[a]=null}}}win._content=null;var p=win.parentNode;p.removeChild(win);delete this.wins[win.idd];win=null;p=null};this._removeEvents=function(obj){obj.onmouseover=null;obj.onmouseout=null;obj.onmousemove=null;obj.onclick=null;obj.ondblclick=null;obj.onmouseenter=null;obj.onmouseleave=null;obj.onmouseup=null;obj.onmousewheel=null;obj.onmousedown=null;obj.onselectstart=null;obj.onfocus=null;obj.style.display=""};this._parseNestedForEvents=function(obj){this._removeEvents(obj);for(var q=0;q<obj.childNodes.length;q++){if(obj.childNodes[q].tagName!=null){this._parseNestedForEvents(obj.childNodes[q])}}};this._attachStatusBar=function(){};this._attachWebMenu=function(){return null};this._attachWebToolbar=function(){return null};this._clearAll=function(){this._clearDocumentEvents();for(var a in this.wins){this._diableOnSelectInWin(this.wins[a]);this._removeWindowGlobal(this.wins[a])}this.modalCoverD.style.display="";this._parseNestedForEvents(this.modalCoverD);this.modalCoverD.parentNode.removeChild(this.modalCoverD);this.modalCoverD=null;this._parseNestedForEvents(this.modalCoverI);this.modalCoverI.style.display="";this.modalCoverI.parentNode.removeChild(this.modalCoverI);this.modalCoverI=null;if(this.vp!=document.body){this.vp.parentNode.removeChild(this.vp)}this.vp=null;for(var a in this.skinParams){delete this.skinParams[a]}this.skinParams=null;that=null;for(var a in this){if(typeof (this[a])=="function"){this[a]=null}}for(var a in this){delete this[a]}};this._clearDocumentEvents=function(){if(_isIE){window.detachEvent("onresize",this._doOnResize);document.body.detachEvent("onselectstart",this._doOnSelectStart);document.body.detachEvent("onmouseup",this._doOnMouseUp);document.body.detachEvent("onunload",this._doOnUnload);this.vp.detachEvent("onmousemove",this._doOnMoseMove);this.vp.detachEvent("onmouseup",this._doOnMouseUp)}else{window.removeEventListener("resize",this._doOnResize,false);document.body.removeEventListener("mouseup",this._doOnMouseUp,false);document.body.removeEventListener("unload",this._doOnUnload,false);this.vp.removeEventListener("mousemove",this._doOnMoseMove,false);this.vp.removeEventListener("mouseup",this._doOnMouseUp,false)}};if(this._enableStatusBar!=null){this._enableStatusBar()}if(this._enableWebMenu!=null){this._enableWebMenu()}if(this._enableWebToolbar!=null){this._enableWebToolbar()}this._genStr=function(w){var s="";var z="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";for(var q=0;q<w;q++){s=s+z.charAt(Math.round(Math.random()*z.length))}return s};this.dhx_Event=function(){this.dhx_SeverCatcherPath="";this.attachEvent=function(original,catcher,CallObj){CallObj=CallObj||this;original="ev_"+original;if((!this[original])||(!this[original].addEvent)){var z=new this.eventCatcher(CallObj);z.addEvent(this[original]);this[original]=z}return(original+":"+this[original].addEvent(catcher))};this.callEvent=function(name,arg0){if(this["ev_"+name]){return this["ev_"+name].apply(this,arg0)}return true};this.checkEvent=function(name){if(this["ev_"+name]){return true}return false};this.eventCatcher=function(obj){var dhx_catch=new Array();var m_obj=obj;var z=function(){if(dhx_catch){var res=true}for(var i=0;i<dhx_catch.length;i++){if(dhx_catch[i]!=null){var zr=dhx_catch[i].apply(m_obj,arguments);res=res&&zr}}return res};z.addEvent=function(ev){if(typeof (ev)!="function"){ev=eval(ev)}if(ev){return dhx_catch.push(ev)-1}return false};z.removeEvent=function(id){dhx_catch[id]=null};return z};this.detachEvent=function(id){if(id!=false){var list=id.split(":");this[list[0]].removeEvent(list[1])}}};this.dhx_Event();return this}dhtmlXGridObject.prototype._updateTGRState=function(A){if(!A.update||A.id==0){return }this.rowsAr[A.id].imgTag.src=this.imgURL+A.state+".gif";A.update=false};dhtmlXGridObject.prototype.doExpand=function(C){this.editStop();var D=C.parentNode.parentNode.parentNode;var A=this._h2.get[D.idd];if(!this.callEvent("onOpen",[D.idd,(A.state=="plus"?-1:1)])){return }if(A.state=="plus"){this.expandKids(D)}else{if((A.state=="minus")&&(!A._closeable)){this.collapseKids(D)}}};function dhtmlxHierarchy(){var A={id:0,childs:[],level:-1,parent:null,index:0,state:dhtmlXGridObject._emptyLineImg};this.order=[A];this.get={"0":A};this.swap=function(D,C){var E=D.parent;var F=D.index;E.childs[F]=C;E.childs[C.index]=D;D.index=C.index;C.index=F};this.forEachChild=function(H,C,E){var F=this.get[H];for(var D=0;D<F.childs.length;D++){C.apply((E||this),[F.childs[D]]);if(F.childs[D].childs.length){this.forEachChild(F.childs[D].id,C,E)}}};this.change=function(F,C,E){var D=this.get[F];if(D[C]==E){return }D[C]=E;D.update=true};this.add=function(D,C){return this.addAfter(D,C)};this.addAfter=function(M,K,E,D){var I=this.get[K||0];if(E){var H=this.get[E].index+(D?0:1)}else{var H=I.childs.length}var C={id:M,childs:[],level:I.level+1,parent:I,index:H,state:dhtmlXGridObject._emptyLineImg};if(I.childs.length==0){this.change(K,"state",(K==0?"minus":"plus"))}if(E){for(var F=H;F<I.childs.length;F++){I.childs[F].index++}I.childs=I.childs.slice(0,H).concat([C]).concat(I.childs.slice(H,I.childs.length))}else{I.childs.push(C)}this.get[M]=C;return C};this.addBefore=function(E,D,C){return this.addAfter(E,D,C,true)};this.remove=function(E){var D=this.get[E||0];for(var C=0;C<D.childs.length;C++){this.deleteAll(D.childs[C].id)}D.childs=[];D.parent.childs=D.parent.childs.slice(0,D.index).concat(D.parent.childs.slice(D.index+1));for(var C=D.index;C<D.parent.childs.length;C++){D.parent.childs[C].index--}delete this.get[E]};this.deleteAll=function(E){var D=this.get[E||0];for(var C=0;C<D.childs.length;C++){this.deleteAll(D.childs[C].id)}D.childs=[];delete this.get[E]};return this}dhtmlXGridObject.prototype._getOpenLenght=function(E,D){var C=this._h2.get[E].childs;D+=C.length;for(var A=0;A<C.length;A++){if(C[A].childs.length&&C[A].state=="minus"){D+=this._getOpenLenght(C[A].id,0)}}return D};dhtmlXGridObject.prototype.collapseKids=function(D){var E=this._h2.get[D.idd];if(E.state!="minus"){return }if(!this.callEvent("onOpenStart",[D.idd,1])){return }var F=D.rowIndex;if(F<0){F=this.rowsCol._dhx_find(D)+1}this._h2.change(E.id,"state","plus");this._updateTGRState(E);var A=this._getOpenLenght(this.rowsCol[F-1].idd,0);for(var C=0;C<A;C++){this.rowsCol[F+C].parentNode.removeChild(this.rowsCol[F+C])}this.rowsCol.splice(F,A);this.callEvent("onGridReconstructed",[]);this.callEvent("onOpenEnd",[D.idd,-1]);this.setSizes()};dhtmlXGridObject.prototype._massInsert=function(F,K,H){var A=[];var E=(_isKHTML?this.obj:this.obj.rows[0].parentNode);for(var D=0;D<F.childs.length;D++){var I=this.rowsAr[F.childs[D].id];if(K){K.parentNode.insertBefore(I,K)}else{E.appendChild(I)}A.push(I)}this.rowsCol=dhtmlXHeir(this.rowsCol.slice(0,H).concat(A).concat(this.rowsCol.slice(H)),this._aEx);var C=0;for(var D=0;D<F.childs.length;D++){if(F.childs[D].state=="minus"){C+=this._massInsert(F.childs[D],this.rowsCol[H+D+C+1],H+D+C+1)}}return F.childs.length+C};dhtmlXGridObject.prototype.expandKids=function(C,H){var E=this._h2.get[C.idd];if((!E.childs.length)&&(!E._xml_await)){return }if(E.state!="plus"){return }if(!E._loading&&!H){if(!this.callEvent("onOpenStart",[E.id,-1])){return }}var F=this.getRowIndex(E.id)+1;if(E.childs.length){E._loading=false;this._h2.change(E.id,"state","minus");this._updateTGRState(E);var A=this._massInsert(E,this.rowsCol[F],F);this.callEvent("onGridReconstructed",[])}else{if(E._xml_await){if((this._slowParse)&&(C._xml)){this._reParse(C);return this.expandKids(C,true)}if(this.kidsXmlFile.indexOf("?")!=-1){var D="&"}else{var D="?"}E._loading=true;this.loadXML(this.kidsXmlFile+""+D+"id="+E.id)}}this.setSizes();if(!E._loading){this.callEvent("onOpenEnd",[E.id,1])}};dhtmlXGridObject.prototype.kidsXmlFile="";dhtmlXGridObject.prototype.sortTreeRows=function(E,H,A){this.forEachRow(function(O){var N=this._h2.get[O];var M=this.cells(O,E).getValue();if(H=="int"){N._sort=parseFloat(M);N._sort=isNaN(N._sort)?-99999999999999:N._sort}else{N._sort=M}});var D=this;var K=1;var I=-1;if(A=="des"){K=-1;I=1}var C=null;if(H=="cus"){C=function(N,M){return D._customSorts[E](N._sort,M._sort,A)}}if(H=="str"){C=function(N,M){return(N._sort<M._sort?I:(N._sort==M._sort?0:K))}}if(H=="int"){C=function(N,M){return(N._sort<M._sort?I:(N._sort==M._sort?0:K))}}if(H=="date"){C=function(N,M){return(Date.parse(new Date(N._sort))-Date.parse(new Date(M._sort)))*K}}this._sortTreeRows(C,0);for(var F=0;F<this.rowsCol.length;F++){this.rowsCol[F].parentNode.removeChild(this.rowsCol[F])}this.rowsCol=new dhtmlxArray();this._renderSort(0,true);this.callEvent("onGridReconstructed",[])};dhtmlXGridObject.prototype._sortTreeRows=function(A,E){var C=this._h2.get[E].childs;C.sort(A);for(var D=0;D<C.length;D++){if(C[D].childs.length){this._sortTreeRows(A,C[D].id)}}};dhtmlXGridObject.prototype._renderSort=function(H,F){var A=this._h2.get[H].childs;var D=(_isKHTML?this.obj:this.obj.rows[0].parentNode);for(var C=0;C<A.length;C++){if(F){var E=this.rowsAr[A[C].id];D.appendChild(E);this.rowsCol.push(E)}A[C].index=C;if(A[C].childs.length){if(A[C].state=="minus"){this._renderSort(A[C].id,true)}}}};dhtmlXGridObject.prototype._fixAlterCssTG=function(){};dhtmlXGridObject.prototype._fixAlterCssTGR=function(){this._h2.forEachChild(0,function(A){this.rowsAr[A.id].className=((A.level%2)?(this._cssUnEven+" "+this._cssUnEven):(this._cssEven+" "+this._cssEven))+"_"+A.level+(this.rowsAr[A.id]._css||"")},this)};dhtmlXGridObject.prototype.moveRowUDTG=function(K,E){var D=this._h2.get[K];var I=D.parent.childs[D.index+E];if((!I)||(I.parent!=D.parent)){return }var H=[D.state,I.state];this.collapseKids(this.rowsAr[D.id]);this.collapseKids(this.rowsAr[I.id]);var F=this.rowsCol._dhx_find(this.rowsAr[K]);var C=this.obj.rows[0].parentNode.removeChild(this.rowsCol[F]);var A=this.rowsCol[F+((E==1)?2:E)];if(A){A.parentNode.insertBefore(C,A)}else{this.obj.rows[0].parentNode.appendChild(C)}this.rowsCol._dhx_swapItems(F,F+E);this._h2.swap(I,D);if(H[0]=="minus"){this.expandKids(this.rowsAr[D.id])}if(H[1]=="minus"){this.expandKids(this.rowsAr[I.id])}};function eXcell_tree(A){if(A){this.cell=A;this.grid=this.cell.parentNode.grid}this.isDisabled=function(){return this.grid._edtc};this.edit=function(){if((this.er)||(this.grid._edtc)){return }this.er=this.cell.parentNode.valTag;this.val=this.er.innerHTML;this.er.innerHTML="<textarea class='dhx_combo_edit' type='text' style='height:"+(this.cell.offsetHeight-6)+"px; width:100%; border:0px; margin:0px; padding:0px; padding-top:"+(_isFF?1:2)+"px; overflow:hidden;'></textarea>";this.er.childNodes[0].onmousedown=function(C){(C||event).cancelBubble=true};this.er.childNodes[0].onselectstart=function(C){if(!C){C=event}C.cancelBubble=true;return true};if(_isFF){this.er.style.top="1px"}this.er.className+=" editable";this.er.firstChild.onclick=function(C){(C||event).cancelBubble=true};this.er.firstChild.value=this.val;this.er.firstChild.focus()};this.detach=function(){if(!this.er){return }this.setLabel(this.er.firstChild.value);this.er.className=this.er.className.replace("editable","");var C=(this.val!=this.er.innerHMTL);if(_isFF){this.er.style.top="2px"}if(this.grid._onCCH){this.grid._onCCH(this.cell.parentNode.idd,this.cell._cellIndex,this.er.innerHTML)}this.er=null;return(C)};this.getValue=function(){return this.getLabel()};this.setImage=function(C){this.cell.parentNode.imgTag.nextSibling.src=this.grid.imgURL+"/"+C;this.grid._h2.get[this.cell.parentNode.idd].image=C};this.getImage=function(){this.grid._h2.get[this.cell.parentNode.idd].image};this.setLabel=function(C){this.setValueA(C)};this.getLabel=function(C){return this.cell.parentNode.valTag.innerHTML}}eXcell_tree.prototype=new eXcell;eXcell_tree.prototype.setValueA=function(A){this.cell.parentNode.valTag.innerHTML=A;if(this.grid._onCCH){this.grid._onCCH(this.cell.parentNode.idd,this.cell._cellIndex,A)}};eXcell_tree.prototype.setValue=function(D){if(typeof (D)!="object"){D=D.split("^")}if(D.length==1){return this.setLabel(D[0])}if((this.grid._tgc.imgURL==null)||(this.grid._tgc.imgURL!=this.grid.imgURL)){var C={};C.spacer="<img src='"+this.grid.imgURL+"blanc.gif'  align='absmiddle' class='space'>";C.imst="<img src='"+this.grid.imgURL;C.imact="' align='absmiddle'  onclick='this."+(_isKHTML?"":"parentNode.")+"parentNode.parentNode.parentNode.parentNode.grid.doExpand(this);event.cancelBubble=true;'>";C.plus=C.imst+"plus.gif"+C.imact;C.minus=C.imst+"minus.gif"+C.imact;C.blank=C.imst+"blank.gif"+C.imact;C.start="<div style=' overflow:hidden; white-space : nowrap; height:"+(_isIE?20:18)+"px;'>";C.itemim="' align='absmiddle' "+(this.grid._img_height?(' height="'+this.grid._img_height+'"'):"")+(this.grid._img_width?(' width="'+this.grid._img_width+'"'):"")+" ><span "+(_isFF?"style='position:relative; top:2px;'":"")+"id='nodeval'>";C.close="</span></div>";this.grid._tgc=C}var A=this.grid._h2;var C=this.grid._tgc;var K=this.cell.parentNode.idd;var H=D[0];if(A.get[K]){return dhtmlxError.throwError("DuplicateID","Not unique ID :: "+K+", row skiped",[K])}var I=A.get[(H||0)];if((this.grid._add_trgr||this.grid._add_trgr=="0")&&I.childs.length){if(this.grid._add_trgr==0){var M=A.addBefore(K,(H||0),I.childs[0].id)}else{var M=A.addAfter(K,(H||0),I.childs[this.grid._add_trgr-1].id)}delete this.grid._add_trgr}else{var M=A.add(K,(H||0))}if((!this.grid.kidsXmlFile)&&(!this.grid._slowParse)){D[2]=0}M.has_kids=(D[2]||0);M._xml_await=(D[2]!=0);M.image=D[3];M.label=D[1];var F=[C.start];for(var E=0;E<M.level;E++){F.push(C.spacer)}if(D[2]!=""&&D[2]!=0){F.push(C.plus);M.state="plus"}else{F.push(C.blank)}F.push(C.imst);F.push(D[3]);F.push(C.itemim);F.push(D[1]);F.push(C.close);this.cell.innerHTML=F.join("");this.cell.parentNode.imgTag=this.cell.childNodes[0].childNodes[M.level];this.cell.parentNode.valTag=this.cell.childNodes[0].childNodes[M.level+2];if(_isKHTML){this.cell.vAlign="top"}if(I.id!=0&&I.state=="plus"){this.grid._updateTGRState(I,false);this.cell.parentNode._skipInsert=true}this.grid.callEvent("onCellChanged",[K,this.cell._cellIndex,D[1]])};dhtmlXGridObject.prototype._removeTrGrRow=function(E,C){if(C){this._h2.forEachChild(C.id,function(H){this._removeTrGrRow(null,H);delete this.rowsAr[H.id]},this);return }var F=this.getRowIndex(E.idd);var C=this._h2.get[E.idd];if(F!=-1){var A=1;if(C&&C.state=="minus"){A+=this._getOpenLenght(C.id,0)}for(var D=0;D<A;D++){this.rowsCol[D+F].parentNode.removeChild(this.rowsCol[D+F])}this.rowsCol.splice(F,A)}if(!C){return }this._removeTrGrRow(null,C);delete this.rowsAr[C.id];if(C.parent.childs.length==1){this._h2.change(C.parent.id,"state",dhtmlXGridObject._emptyLineImg);this._updateTGRState(C.parent)}this._h2.remove(C.id);if(this._math_summ&&C.parent){this._recalc_summ(C.parent)}};dhtmlXGridObject.prototype.openItem=function(C){var D=this._h2.get[C||0];var A=this.getRowById(C||0);if(!A){return }if(D.parent&&D.parent.id!=0){this.openItem(D.parent.id)}this.expandKids(A)};dhtmlXGridObject.prototype._addRowClassic=dhtmlXGridObject.prototype.addRow;dhtmlXGridObject.prototype.addRow=function(M,O,D,K,H,C){K=K||0;var E=this.cellType._dhx_find("tree");if(typeof (O)=="string"){O=O.split(this.delim)}var N=null;if((E!=-1)&&((O[E]||"").toString().search(/\^/gi)==-1)){var A=O[E];var I=K.toString().split(",");for(var F=0;F<I.length;F++){O[E]=I[F]+"^"+A+"^"+(C?1:0)+"^"+(H||"leaf.gif");if(I[F]!=0){if((!D)||(D==0)){D=this.getRowIndex(I[F]);if(D!=-1){if(this._h2.get[I[F]].state=="minus"){D+=this._getOpenLenght(I[F],0)+1}if((this._slowParse)&&(this.rowsCol[D]._xml)){this._reParse(this.rowsCol[D])}}}}if(!this._add_trgr){if(this._h2.get[K].state!="minus"){this._add_trgr=this._h2.get[K].childs.length}else{if(this.rowsCol[D-1]){this._add_trgr=this.trackParent(this._h2.get[this.rowsCol[D-1].idd],(K||0))}else{this._add_trgr=0}}}N=this._addRowClassic(M,O,((!K)&&(!D)&&(D!="0"))?window.undefined:D)}return N}return this._addRowClassic(M,O,D)};dhtmlXGridObject.prototype.trackParent=function(A,C){if(A.id==C){return 0}if(A.parent.id==C){return A.index+1}return this.trackParent(A.parent,C)};dhtmlXGridObject.prototype.addRowBefore=function(C,F,D,A,I){var H=this.rowsAr[D];if(!H){return }var E=this.getRowIndex(D);this._add_trgr=this._h2.get[D].index;return this.addRow(C,F,E,this._h2.get[D].parent.id,A,I)};dhtmlXGridObject.prototype.addRowAfter=function(C,F,D,A,I){var H=this.rowsAr[D];if(!H){return }var E=this.getRowIndex(D);this._add_trgr=this._h2.get[D].index+1;if(this._h2.get[D].state=="minus"){E+=this._getOpenLenght(D,0)+1}else{E++}return this.addRow(C,F,E,this._h2.get[D].parent.id,A,I)};dhtmlXGridObject.prototype.enableSmartXMLParsing=function(A){this._slowParse=convertStringToBoolean(A)};dhtmlXGridObject.prototype._seekAndDeploy=function(F){if(this._parsing_){return null}if((F=="null")||(!F)){return }var C;for(C in this.rowsAr){if((this.rowsAr[C])&&(this.rowsAr[C]._xml)){var E=this.xmlLoader.doXPath('//row[@id="'+F+'"]',this.rowsAr[C]._xml[0].parentNode);if(E&&E.length){E=E[0];var A=new Array();while(!this.rowsAr[E.getAttribute("id")]){A[A.length]=E.getAttribute("id");E=E.parentNode}A[A.length]=E.getAttribute("id");for(var D=A.length-1;D>0;D--){this._reParse(this.rowsAr[A[D]]);this._openItem(this.rowsAr[A[D]])}for(var D=1;D<A.length;D++){this.collapseKids(this.rowsAr[A[D]])}return this.getRowById(F)}}}return null};dhtmlXGridObject.prototype._reParse=function(C){var C=this.rowsAr[C.idd];if(C._xml){var A=this.rowsCol._dhx_find(C);A+=this._getOpenLenght(C.idd);this._innerParse(C._xml,A,this.cellType._dhx_find("tree"),C.idd)}C._xml_await=C._xml=null};dhtmlXGridObject.prototype._copyTreeGridRowContent=function(A,C,D){var E=this.cellType._dhx_find("tree");for(i=0;i<A.cells.length;i++){if(i!=E){this.cells(D,i).setValue(this.cells(C,i).getValue())}else{this.cells(D,i).setValueA(this.cells(C,i).getValue())}}};dhtmlXGridObject.prototype.closeItem=function(C){var A=this.getRowById(C);if(!A){return }this.collapseKids(A)};dhtmlXGridObject.prototype.deleteChildItems=function(A){var C=this._h2.get[A];if(!C){return }while(C.childs.length){this.deleteRow(C.childs[0].id)}};dhtmlXGridObject.prototype.getAllSubItems=function(C){var E=[];var D=this._h2.get[C||0];if(D){for(var A=0;A<D.childs.length;A++){E.push(D.childs[A].id);if(D.childs[A].childs.length){E=E.concat(this.getAllSubItems(D.childs[A].id).split(","))}}}return E.join(",")};dhtmlXGridObject.prototype.getChildItemIdByIndex=function(C,A){var D=this._h2.get[C||0];if(!D){return null}return(D.childs[A]?D.childs[A].id:null)};dhtmlXGridObject.prototype.getItemText=function(A){var C=this._h2.get[A||0];if(!C){return""}return C.label};dhtmlXGridObject.prototype.getOpenState=function(A){var C=this._h2.get[A||0];if(!C){return }if(C.state=="minus"){return true}return false};dhtmlXGridObject.prototype.getParentId=function(A){var C=this._h2.get[A||0];if((!C)||(!C.parent)){return null}return C.parent.id};dhtmlXGridObject.prototype.getSubItems=function(C){var E=[];var D=this._h2.get[C||0];if(D){for(var A=0;A<D.childs.length;A++){E.push(D.childs[A].id)}}return E.join(",")};dhtmlXGridObject.prototype.expandAll=function(){if(this._slowParse){this._deSmartAll()}for(var A=0;A<this.rowsCol.length;A++){this.obj.rows[0].parentNode.removeChild(this.rowsCol[A])}this.rowsCol=new dhtmlxArray();this._renderAllExpand(0);this.setSizes();this.callEvent("onGridReconstructed",[])};dhtmlXGridObject.prototype._deSmartAll=function(){for(var A=0;A<this.rowsCol.length;A++){if(this.rowsCol[A]._xml){this._slowParse=false;this._reParse(this.rowsCol[A]);this._slowParse=true}}};dhtmlXGridObject.prototype._renderAllExpand=function(E){var A=this._h2.get[E].childs;for(var C=0;C<A.length;C++){var D=this.rowsAr[A[C].id];this.rowsCol.push(D);this.obj.rows[0].parentNode.appendChild(D);if(A[C].childs.length){this._h2.change(A[C].id,"state","minus");this._updateTGRState(A[C]);this._renderAllExpand(A[C].id)}}};dhtmlXGridObject.prototype.collapseAll=function(C){var D=this._h2.get[0].childs;for(var A=0;A<D.length;A++){this.collapseKids(this.rowsAr[D[A].id])}for(id in this.rowsAr){var D=this._h2.get[id];if(D&&D.state=="minus"){D.state="plus";D.update=true;this._updateTGRState(D)}}};dhtmlXGridObject.prototype.hasChildren=function(C){var A=this._h2.get[C];if(A&&A.childs.length){return A.childs.length}if(this.getRowById(C)._xml_await){return -1}return 0};dhtmlXGridObject.prototype.setItemCloseable=function(D,C){var A=this._h2.get[D];if(!A){return }A._closeable=(!convertStringToBoolean(C))};dhtmlXGridObject.prototype.setItemText=function(A,C){this._h2.get[A].label=C;this.rowsAr[A].valTag.innerHTML=C};dhtmlXGridObject.prototype.setItemImage=function(C,A){this._h2.get[C].image=A;this.rowsAr[C].imgTag.nextSibling.src=A};dhtmlXGridObject.prototype.getItemImage=function(A){return this._h2.get[A].image};dhtmlXGridObject.prototype.setImageSize=function(C,A){this._img_width=C;this._img_height=A};dhtmlXGridObject.prototype._getRowImage=function(A){return this._h2.get[A.idd].image};dhtmlXGridObject.prototype.setOnOpenStartHandler=function(A){this.attachEvent("onOpenStart",A)};dhtmlXGridObject.prototype.setOnOpenEndHandler=function(A){this.attachEvent("onOpenEnd",A)};dhtmlXGridObject.prototype.enableTreeCellEdit=function(A){this._edtc=!convertStringToBoolean(A)};dhtmlXGridObject.prototype.getLevel=function(A){var C=this._h2.get[A||0];if(!C){return -1}return C.level};dhtmlXGridObject.prototype._fixHiddenRowsAllTG=function(C,A){for(i in this.rowsAr){if((this.rowsAr[i])&&(this.rowsAr[i].childNodes)){this.rowsAr[i].childNodes[C].style.display=A}}};dhtmlXGridObject._emptyLineImg="blank";function eXcell_math(cell){if(cell){this.cell=cell;this.grid=this.cell.parentNode.grid}this.isDisabled=function(){if(this.grid._strangeParams[this.cell._cellIndex]){var z=eval("new eXcell_"+this.grid._strangeParams[this.cell._cellIndex]+"(this.cell)");return z.isDisabled()}return false};this.edit=function(){this.val=this.getValue();if((this.cell._val.indexOf("=")==0)&&(!this.grid._mathEdit)){return false}if(this.grid._strangeParams[this.cell._cellIndex]){var z=eval("new eXcell_"+this.grid._strangeParams[this.cell._cellIndex]+"(this.cell)");this.getText=z.getText;this.combo=z.combo;this._typed=true;return z.edit.call(this)}this.obj=document.createElement("TEXTAREA");this.obj.style.width="100%";this.obj.style.height=(this.cell.offsetHeight-4)+"px";this.obj.style.border="0px";this.obj.style.margin="0px";this.obj.style.padding="0px";this.obj.style.overflow="hidden";this.obj.style.fontSize="12px";this.obj.style.fontFamily="Arial";this.obj.wrap="soft";this.obj.style.textAlign=this.cell.align;this.obj.onclick=function(e){(e||event).cancelBubble=true};this.obj.value=this.cell._val;this.cell.innerHTML="";this.cell.appendChild(this.obj);this.obj.onselectstart=function(e){if(!e){e=event}e.cancelBubble=true;return true};this.obj.focus();this.obj.focus()};this.getValue=function(){if(this.grid._strangeParams[this.cell._cellIndex]){var d=this.cell;var z=eval("new eXcell_"+(this.grid._strangeParams[this.cell._cellIndex])+"(d)");return z.getValue()}else{return this.cell.innerHTML.toString()._dhx_trim()}};this.setValueA=function(val){if(this.grid._strangeParams[this.cell._cellIndex]){var z=eval("new eXcell_"+this.grid._strangeParams[this.cell._cellIndex]+"(this.cell)");z.setValue(typeof (val)=="undefined"?"":val)}else{this.setCValue(this.grid._calcSCL(cell)||"0")}};this.setValue=function(val){this.cell._val=val;this.cell._code=this.grid._compileSCL(val,this.cell);this.setValueA(this.grid._calcSCL(cell));this.grid._checkSCL(this.cell)};this.detach=function(){if(this._typed&&this.grid._strangeParams[this.cell._cellIndex]){var z=eval("new eXcell_"+this.grid._strangeParams[this.cell._cellIndex]+"(this.cell)");return z.detach.call(this)}if((this.cell._val.indexOf("=")==0)&&(!this.grid._mathEdit)){return false}this.setValue(this.obj.value);return this.val!=this.getValue()}}eXcell_math.prototype=new eXcell;dhtmlXGridCellObject.prototype.setValueA=dhtmlXGridCellObject.prototype.setValue;eXcell_price.prototype.setValueA=eXcell_price.prototype.setValue;eXcell_dyn.prototype.setValueA=eXcell_dyn.prototype.setValue;eXcell_ch.prototype.setValueA=eXcell_ch.prototype.setValue;eXcell_ra.prototype.setValueA=eXcell_ra.prototype.setValue;eXcell_cp.prototype.setValueA=eXcell_cp.prototype.setValue;eXcell_co.prototype.setValueA=eXcell_co.prototype.setValue;eXcell_txt.prototype.setValueA=eXcell_txt.prototype.setValue;eXcell_edn.prototype.setValueA=eXcell_edn.prototype.setValue;eXcell_math.prototype._NsetValue=function(A){this.setValueA(A);this.grid._checkSCL(this.cell)};dhtmlXGridCellObject.prototype.setValue=eXcell_math.prototype._NsetValue;eXcell_price.prototype.setValue=eXcell_math.prototype._NsetValue;eXcell_dyn.prototype.setValue=eXcell_math.prototype._NsetValue;eXcell_ch.prototype.setValue=eXcell_math.prototype._NsetValue;eXcell_ra.prototype.setValue=eXcell_math.prototype._NsetValue;eXcell_cp.prototype.setValue=eXcell_math.prototype._NsetValue;eXcell_co.prototype.setValue=eXcell_math.prototype._NsetValue;eXcell_txt.prototype.setValue=eXcell_math.prototype._NsetValue;eXcell_edn.prototype.setValue=eXcell_math.prototype._NsetValue;dhtmlXGridObject.prototype._checkSCL=function(cell,pRow){if(!cell){return }if(!this.math_off){if(cell._SCL){for(var i=0;i<cell._SCL.length;i++){if(cell._SCL[i]){if(this._strangeParams[cell._SCL[i]._cellIndex]){var z=eval("new eXcell_"+this._strangeParams[cell._SCL[i]._cellIndex]+"(cell._SCL[i])");val=this._calcSCL(cell._SCL[i]);z.setValue(typeof (val)=="undefined"?"":val)}else{cell._SCL[i].innerHTML=this._calcSCL(cell._SCL[i])}this._checkSCL(cell._SCL[i])}}}if(this._math_summ&&this._math_summ[cell._cellIndex]){pRow=pRow||this._h2.get[cell.parentNode.idd].parent;if(!pRow){return }pRow=this.rowsAr[pRow.id];if(!pRow){return }if(this._strangeParams[cell._cellIndex]){var z=eval("new eXcell_"+this._strangeParams[cell._cellIndex]+"(pRow.childNodes[cell._cellIndex])");var val=this._calcSCL(pRow.childNodes[cell._cellIndex]);z.setValue(typeof (val)=="undefined"?"":val)}else{pRow.childNodes[cell._cellIndex].innerHTML=this._calcSCL(pRow.childNodes[cell._cellIndex])}this._checkSCL(pRow.childNodes[cell._cellIndex])}}else{this.math_req=true}};dhtmlXGridObject.prototype._recalc_summ=function(A){for(var C=0;C<this._math_summ.length;C++){if(this._math_summ[C]){this._checkSCL(this.rowsAr[A.id].childNodes[C],A)}}};dhtmlXGridObject.prototype.setMathRound=function(A){this._roundDl=A;this._roundD=Math.pow(10,A)};dhtmlXGridObject.prototype.enableMathEditing=function(A){this._mathEdit=convertStringToBoolean(A)};dhtmlXGridObject.prototype.enableMathSerialization=function(A){this._mathSerialization=convertStringToBoolean(A)};dhtmlXGridObject.prototype._calcSCL=function(cell){if(!cell._code){return""}try{var agrid=this;if(!this._roundD){var z=eval(cell._code);return z}else{var z=eval(cell._code);z=Math.round(z*this._roundD).toString();if(z==0){return 0}if(this._roundDl>0){var n=z.length-this._roundDl;if(n<0){z=("000000000"+z).substring(9+n);n=0}return(z.substring(0,n)+"."+z.substring(n,z.length))}else{return z}}}catch(e){return("#SCL")}};dhtmlXGridObject.prototype._countTotal=function(F,D){var A=0;var E=this._h2.get[F];for(var C=0;C<E.childs.length;C++){A=A*1+this.cells(E.childs[C].id,D).getValue()*1}return A};dhtmlXGridObject.prototype._compileSCL=function(D,A){if(!D){return""}D=D.toString();if(D.indexOf("=")!=0){this._reLink(new Array(),A,0);return D}var H=null;D=D.replace("=","");if(D.indexOf("sum")!=-1){D=D.replace("sum","(agrid._countTotal('"+A.parentNode.idd+"',"+A._cellIndex+"))");if(!this._math_summ){this._math_summ=[]}this._math_summ[A._cellIndex]=true;return D}if(D.indexOf("[[")!=-1){var F=/(\[\[([^\,]*)\,([^\]]*)]\])/g;var C=this;H=H||(new Array());D=D.replace(F,function(K,I,N,M){if(N=="-"){N=A.parentNode.idd}if(N.indexOf("#")==0){N=C.getRowId(N.replace("#",""))}H[H.length]=[N,M];return'(agrid.cells("'+N+'",'+M+").getValue()*1)"})}if(D.indexOf(":")!=-1){var F=/:(\w+)/g;var C=this;var E=A.parentNode.idd;H=H||(new Array());D=D.replace(F,function(K,I,N,M){H[H.length]=[E,C.getColIndexById(I)];return'(agrid.cells("'+E+'",agrid.getColIndexById("'+I+'")).getValue()*1)'})}else{var F=/c([0-9]+)/g;var C=this;var E=A.parentNode.idd;H=H||(new Array());D=D.replace(F,function(K,I,N,M){H[H.length]=[E,I];return'(agrid.cells("'+E+'",'+I+").getValue()*1)"})}this._reLink(H,A,0);return D};dhtmlXGridObject.prototype._laterLink=function(){var a=window._SCL_later;window._SCL_later=new Array();window._SCL_later_timer=null;for(var i=0;i<a.length;i++){(a[i][2])._reLink(a[i][0],a[i][1],a[i][3]);if((a[i][2])._strangeParams[a[i][1]._cellIndex]){var z=eval("new eXcell_"+(a[i][2])._strangeParams[a[i][1]._cellIndex]+"(a[i][1])");var val=(a[i][2])._calcSCL(a[i][1]);z.setValue(typeof (val)=="undefined"?"":val)}else{a[i][1].innerHTML=(a[i][2])._calcSCL(a[i][1])}(a[i][2])._checkSCL(a[i][1])}if(a[0]&&window._SCL_later.length==0){a[0][2].callEvent("onMathEnd",[])}};dhtmlXGridObject.prototype._reLink=function(E,C,H){if(H>5){return }if(C._alink){for(var F=0;F<C._alink.length;F++){(C._alink[F][0])._SCL[C._alink[F][1]]=null}}C._alink=new Array();for(var F=0;F<E.length;F++){var D=this.getRowById(E[F][0]);if(!D){if(!window._SCL_later){window._SCL_later=new Array()}window._SCL_later.grid=this;window._SCL_later[window._SCL_later.length]=[E,C,this,H+1];if(!window._SCL_later_timer){window._SCL_later_timer=window.setTimeout(this._laterLink,300)}return 0}var A=D.childNodes[E[F][1]];if(!A._SCL){A._SCL=new Array()}C._alink[F]=[A,A._SCL.length];A._SCL[A._SCL.length]=C}};if(_isKHTML){(function(){var A=String.prototype.replace;String.prototype.replace=function(N,D){if(typeof D!="function"){return A.apply(this,arguments)}var F=""+this;var K=D;if(!(N instanceof RegExp)){var I=F.indexOf(N);return(I==-1?F:A.apply(F,[N,K(N,I,F)]))}var C=N;var O=[];var H=C.lastIndex;var M;while((M=C.exec(F))!=null){var I=M.index;var E=M.concat(I,F);O.push(F.slice(H,I),K.apply(null,E).toString());if(!C.global){H+=RegExp.lastMatch.length;break}else{H=C.lastIndex}}O.push(F.slice(H));return O.join("")}})()}dhtmlXGridObject.prototype.splitAt=function(O){var N=document.createElement("DIV");this.entBox.appendChild(N);this._treeC=this.cellType._dhx_find("tree");this.entBox.style.position="relative";this._fake=new dhtmlXGridObject(N);this._fake._fake=this;this._fake._realfake=true;this._fake.imgURL=this.imgURL;this._fake._customSorts=this._customSorts;this._fake.noHeader=this.noHeader;this._fake._enbTts=this._enbTts;this._fake.fldSort=new Array();this._fake.selMultiRows=this.selMultiRows;this._fake.multiLine=this.multiLine;if(this.multiLine){this.attachEvent("onCellChanged",this._correctRowHeight);this.attachEvent("onXLE",function(){this.forEachRow(function(d){this._correctRowHeight(d)})});this.attachEvent("onResizeEnd",function(){this.forEachRow(function(d){this._correctRowHeight(d)})})}this._fake.loadedKidsHash=this.loadedKidsHash;if(this._h2){this._fake._h2=this._h2}this._fake._dInc=this._dInc;var T=[[],[],[],[],[],[],[]];var X=["hdrLabels","initCellWidth","cellType","cellAlign","cellVAlign","fldSort","columnColor"];var K=["setHeader","setInitWidths","setColTypes","setColAlign","setColVAlign","setColSorting","setColumnColor"];this._fake.callEvent=function(){return this._fake.callEvent.apply(this._fake,arguments)};if(this._elmn){this._fake.enableLightMouseNavigation(true)}if(this.__cssEven||this._cssUnEven){this._fake.setOnGridReconstructedHandler(function(){this._fixAlterCss()})}this._fake._cssEven=this._cssEven;this._fake._cssUnEven=this._cssUnEven;this._fake.isEditable=this.isEditable;this._fake._edtc=this._edtc;if(this._sst){this._fake.enableStableSorting(true)}if(this._aHead){var I=new Array();for(var c=0;c<this._aHead.length;c++){I[I.length]=[this._aHead[c][0].slice(0,O),(this._aHead[c][1]||[]).slice(0,O)];var H=0;for(var Y=0;Y<O;Y++){if((I[I.length-1][0][Y]=="#rspan")||(I[I.length-1][0][Y]=="#cspan")){continue}this.hdr.rows[c+2].childNodes[H].innerHTML="";H++}}this._fake._aHead=I}this._fake._sclE=this._sclE;this._fake._dclE=this._dclE;this._fake._f2kE=this._f2kE;this._fake._maskArr=this._maskArr;this._fake._dtmask=this._dtmask;this._fake.combos=this.combos;var U=0;for(var c=0;c<O;c++){for(var Y=0;Y<X.length;Y++){if(this[X[Y]]){T[Y][c]=this[X[Y]][c]}}if(_isFF){T[1][c]+=2}if(this.cellWidthType=="%"){T[1][c]=Math.round(parseInt(this[X[1]][c])*this.entBox.offsetWidth/100);U+=T[1][c]}else{U+=parseInt(this[X[1]][c])}this.setColumnHidden(c,true)}for(var Y=0;Y<X.length;Y++){var V=T[Y].join(",");if(V!=""){if(K[Y]!="setHeader"){this._fake[K[Y]](V)}else{this._fake[K[Y]](V,null,this._hstyles)}}}this._fake._drsclmn=this._drsclmn;var A=this.entBox.childNodes[0];A.style.left=U+"px";if(this.ftr){this.ftr.style.left=U+"px";this.ftr.style.position="relative";var M=this.ftr.childNodes[0].rows[0];var D=document.createElement("TH");M.appendChild(D);D.style.width="30px"}A.style.top=0+"px";A.style.position="absolute";var S=this.entBox.offsetWidth-U-(_isFF?0:(this.entBox.offsetWidth-this.entBox.clientWidth))+"px";if(S>0){A.style.width=S}N.style.width=U+"px";N.style.height=this.objBuf.offsetHeight;N.style.position="absolute";N.style.top="0px";N.style.left="0px";N.style.zIndex=11;if(this._ecspn){this._fake._ecspn=true}this._fake.init();this._fake.objBox.style.overflow="hidden";this._fake.objBox.style.overflowX="scroll";this._fake._srdh=this._srdh||20;if(this.ftr){var Q=this.ftr.childNodes[0].rows;for(var c=1;c<Q.length;c++){var Z=new Array();var F=new Array();var W=O;for(var Y=0;Y<W;Y++){var P=Q[c].cells[Y];Z.push(P.innerHTML);F.push(P.style.cssText.replace(/display/i,"ignore"));P.innerHTML="";if(P.colSpan>1){for(var C=1;C<P.colSpan;C++){Z.push("#cspan")}F.push("");W-=(P.colSpan-1)}}this._fake.attachFooter(Z,F)}}if(this.saveSizeToCookie){this.saveSizeToCookie=function(f,d){if(this._realfake){return this._fake.saveSizeToCookie.apply(this._fake,arguments)}if(!f){f=this.entBox.id}var h=new Array();if(this.cellWidthType=="px"){var l="cellWidthPX"}else{var l="cellWidthPC"}for(var g=0;g<this[l].length;g++){if(g<O){h[g]=this._fake[l][g]}else{h[g]=this[l][g]}}h=h.join(",");this.setCookie(f,d,0,h);this.setCookie(f,d,1,z2);this.setCookie("gridSizeA"+f,h,d);var h=(this.initCellWidth||(new Array)).join(",");this.setCookie("gridSizeB"+f,h,d);return true};this.loadSizeFromCookie=function(d){if(!d){d=this.entBox.id}var l=this.getCookie("gridSizeB"+d);if(!l){return }this.initCellWidth=l.split(",");var l=this.getCookie("gridSizeA"+d);if(this.cellWidthType=="px"){var o="cellWidthPX"}else{var o="cellWidthPC"}var g=0;if((l)&&(l.length)){l=l.split(",");for(var f=0;f<l.length;f++){if(f<O){this._fake[o][f]=l[f];g+=l[f]*1}else{this[o][f]=l[f]}}}this._fake.entBox.style.width=g+"px";this._fake.objBuf.style.width=g+"px";var h=this.entBox.childNodes[0];h.style.left=g-(_isFF?0:0)+"px";if(this.ftr){this.ftr.style.left=g-(_isFF?0:0)+"px"}h.style.width=this.entBox.offsetWidth-g+"px";this.setSizes();return true};this._fake.onRSE=this.onRSE}this._postRowProcessingA=this._postRowProcessing;this._postRowProcessing=function(f,d){this._postRowProcessingA(f,d);if(this._fake.rowsAr[f.idd]){this._fake._postRowProcessing(this._fake.rowsAr[f.idd],d)}};this.setCellTextStyleA=this.setCellTextStyle;this.setCellTextStyle=function(f,g,d){if(g<O){return this._fake.setCellTextStyle(f,g,d)}else{return this.setCellTextStyleA(f,g,d)}};this.setRowTextBoldA=this.setRowTextBold;this.setRowTextBold=function(d){this.setRowTextBoldA(d);this._fake.setRowTextBold(d)};this.setRowColorA=this.setRowColor;this.setRowColor=function(f,d){this.setRowColorA(f,d);this._fake.setRowColor(f,d)};this.setRowHiddenA=this.setRowHidden;this.setRowHidden=function(f,d){this.setRowHiddenA(f,d);this._fake.setRowHidden(f,d)};this.setRowTextNormalA=this.setRowTextNormal;this.setRowTextNormal=function(d){this.setRowTextNormalA(d);this._fake.setRowTextNormal(d)};this.getChangedRows=function(){var g=new Array();for(var f=0;f<this.rowsCol.length;f++){var l=this.rowsCol[f];var h=l.childNodes.length;for(var d=0;d<h;d++){if(d>=O){if(l.childNodes[d].wasChanged){g[g.length]=l.idd;break}}else{if(this._fake.rowsAr[l.idd].childNodes[d].wasChanged){g[g.length]=l.idd;break}}}}return g.join(this.delim)};this.setRowTextStyleA=this.setRowTextStyle;this.setRowTextStyle=function(f,d){this.setRowTextStyleA(f,d);this._fake.setRowTextStyle(f,d)};this.lockRowA=this.lockRow;this.lockRow=function(f,d){this.lockRowA(f,d);this._fake.lockRow(f,d)};this.getColWidth=function(d){if(d<O){return parseInt(this._fake.cellWidthPX[d])+((_isFF)?2:0)}else{return parseInt(this.cellWidthPX[d])+((_isFF)?2:0)}};this.setColWidthA=this._fake.setColWidthA=this.setColWidth;this.setColWidth=function(d,f){if(d<O){this._fake.setColWidthA(d,f)}else{this.setColWidthA(d,f)}if((d+1)==O){this._fake._correctSplit()}};this.adjustColumnSizeA=this.adjustColumnSize;this.adjustColumnSize=function(d,f){if(d<O){if(_isIE){this._fake.obj.style.tableLayout=""}this._fake.adjustColumnSize(d,f);if(_isIE){this._fake.obj.style.tableLayout="fixed"}this._fake._correctSplit()}else{return this.adjustColumnSizeA(d,f)}};var E="cells";this._bfs_cells=this[E];this[E]=function(){if(arguments[1]<O){return this._fake.cells.apply(this._fake,arguments)}else{return this._bfs_cells.apply(this,arguments)}};this._bfs_setColumnHidden=this.setColumnHidden;this.setColumnHidden=function(){if(arguments[0]<O){this._fake.setColumnHidden.apply(this._fake,arguments);return this._fake._correctSplit()}else{return this._bfs_setColumnHidden.apply(this,arguments)}};var E="cells2";this._bfs_cells2=this[E];this[E]=function(){if(arguments[1]<O){return this._fake.cells2.apply(this._fake,arguments)}else{return this._bfs_cells2.apply(this,arguments)}};var E="cells3";this._bfs_cells3=this[E];this[E]=function(){if(arguments[1]<O){arguments[0]=arguments[0].idd;return this._fake.cells.apply(this._fake,arguments)}else{return this._bfs_cells3.apply(this,arguments)}};var E="changeRowId";this._bfs_changeRowId=this[E];this[E]=function(){this._bfs_changeRowId.apply(this,arguments);this._fake.changeRowId.apply(this._fake,arguments)};if(this.collapseKids){this._fake._bfs_collapseKids=this.collapseKids;this._fake.collapseKids=function(){return this._fake.collapseKids.apply(this._fake,[this._fake.rowsAr[arguments[0].idd]])};this["_bfs_collapseKids"]=this.collapseKids;this["collapseKids"]=function(){var d=this["_bfs_collapseKids"].apply(this,arguments);this._fake._h2syncModel()};this._fake._bfs_expandKids=this.expandKids;this._fake.expandKids=function(){return this._fake.expandKids.apply(this._fake,[this._fake.rowsAr[arguments[0].idd]])};this["_bfs_expandAll"]=this.expandAll;this["expandAll"]=function(){this._bfs_expandAll();this._fake._h2syncModel()};this["_bfs_collapseAll"]=this.collapseAll;this["collapseAll"]=function(){this._bfs_collapseAll();this._fake._h2syncModel()};this["_bfs_expandKids"]=this.expandKids;this["expandKids"]=function(){var d=this["_bfs_expandKids"].apply(this,arguments);this._fake._h2syncModel()};this._fake._h2syncModel=function(){for(var d=0;d<this.rowsCol.length;d++){this.rowsCol[d].parentNode.removeChild(this.rowsCol[d])}this.rowsCol=new dhtmlxArray();this._renderSort(0,true);if(this._cssEven||this._cssUnEven){this._fixAlterCss()}};this._updateTGRState=function(d){return this._fake._updateTGRState(d)}}if(this._elmnh){this._setRowHoverA=this._fake._setRowHoverA=this._setRowHover;this._unsetRowHoverA=this._fake._unsetRowHoverA=this._unsetRowHover;this._setRowHover=this._fake._setRowHover=function(){var d=this.grid;d._setRowHoverA.apply(this,arguments);var f=(_isIE?event.srcElement:arguments[0].target);f=d._fake.rowsAr[d.getFirstParentOfType(f,"TD").parentNode.idd];if(f){d._fake._setRowHoverA.apply(d._fake.obj,[{target:f.childNodes[0]},arguments[1]])}};this._unsetRowHover=this._fake._unsetRowHover=function(){if(arguments[1]){var d=this}else{var d=this.grid}d._unsetRowHoverA.apply(this,arguments);d._fake._unsetRowHoverA.apply(d._fake.obj,arguments)};this._fake.enableRowsHover(true,this._hvrCss);this.enableRowsHover(false);this.enableRowsHover(true,this._fake._hvrCss)}var E="_insertRowAt";this._bfs_insertRowAt=this[E];this[E]=function(){var o=arguments[0].cloneNode(true);o._skipInsert=arguments[0]._skipInsert;var l=O;if(this._ecspn){l=0;for(var g=0;(g<o.childNodes.length&&g<O);g+=(o.childNodes[g].colSpan||1)){l++}}while(o.childNodes.length>l){o.removeChild(o.childNodes[o.childNodes.length-1])}var n=0;var p=l;for(var g=0;g<p;g++){o.childNodes[g].style.display=(this._fake._hrrar?(this._fake._hrrar[g]?this._fake._hrrar[g]:""):"");o.childNodes[g]._cellIndex=g;o.childNodes[g].combo_value=arguments[0].childNodes[g].combo_value;o.childNodes[g]._clearCell=arguments[0].childNodes[g]._clearCell;o.childNodes[g]._cellType=arguments[0].childNodes[g]._cellType;o.childNodes[g]._brval=arguments[0].childNodes[g]._brval;if(o.childNodes[g].colSpan>1){this._childIndexes=this._fake._childIndexes}}if(this._h2&&this._treeC<O){var s=this._h2.get[arguments[0].idd];o.imgTag=o.childNodes[this._treeC].childNodes[0].childNodes[s.level];o.valTag=o.childNodes[this._treeC].childNodes[0].childNodes[s.level+2]}var d=this["_bfs_insertRowAt"].apply(this,arguments);o.idd=arguments[0].idd;o.grid=this._fake;arguments[0]=o;var f=this._fake._insertRowAt.apply(this._fake,arguments);if(d._fhd){f.parentNode.removeChild(f);this._fake.rowsCol._dhx_removeAt(this._fake.rowsCol._dhx_find(f));d._fhd=false}if(this.complexCellSplit){for(var g=0;g<p;g++){var h=this.cells4(d.childNodes[g]);var q=this.cells4(o.childNodes[g]);q.setValue(h.getValue())}}return d};var E="setSizes";this._bfs_setSizes=this[E];this[E]=function(){if(this.cellWidthType=="%"){var n=this.entBox.childNodes[0].offsetWidth;var l=this.entBox.childNodes[1].offsetWidth;var h=Math.round(n*this.entBox.offsetWidth/(n+l));this.entBox.childNodes[0].style.left=h+"px";this.entBox.childNodes[1].style.width=h+(_isIE?0:2)+"px";this.entBox.childNodes[0].style.width=this.entBox.offsetWidth-h-(_isFF?0:(this.entBox.offsetWidth-this.entBox.clientWidth))+"px";this._rec_count=(this._rec_count?this._rec_count+1:1);if(this._rec_count<2){this._fake.setColWidth(O-1,this._fake.getColWidth(O-1)-(_isIE?0:2))}this._rec_count=null}this["_bfs_setSizes"].apply(this,arguments);if(this._notresize){return }var f=this.entBox.offsetWidth-this.entBox.clientWidth;N.style.height=this.entBox.offsetHeight-f+(this._sizeFix||0)+"px";if((!this.noHeader)&&this._fake.hdr.offsetHeight!=this.hdr.offsetHeight){if(this._fake._aHead){for(var g=0;g<=this._fake._aHead.length;g++){this._fake.hdr.rows[g+1].style.height=this.hdr.rows[g+1].offsetHeight+"px";var d=this._fake.hdr.rows[g+1].offsetHeight-this.hdr.rows[g+1].offsetHeight;if(d&&this.hdr.rows[g+1].offsetHeight>d){this._fake.hdr.rows[g+1].style.height=this.hdr.rows[g+1].offsetHeight-d+"px"}}}else{this._fake.hdr.style.height=this.hdr.offsetHeight+"px"}this._rec_count=(this._rec_count?this._rec_count+1:1);if(this._rec_count<2){this._fake.setSizes.apply(this._fake,arguments)}this._rec_count=null}if(((this.obj.offsetWidth+1*((this.objBox.offsetHeight<=this.objBox.scrollHeight)?(_isFF?20:18):0))<=this.objBox.offsetWidth)&&(this._fake.obj.offsetWidth<=this._fake.objBox.offsetWidth)){this._fake.objBox.style.overflowX="hidden";this.objBox.style.overflowX="hidden"}else{this._fake.objBox.style.overflowX="scroll";this.objBox.style.overflowX="scroll"}var o=this.entBox.offsetWidth-parseInt(this.entBox.childNodes[0].style.left)-(_isFF?2:0)+"px";if(o>0){this.entBox.childNodes[0].style.width=o}this._fake.objBox.scrollTop=this.objBox.scrollTop;this._fake._bfs_setSizes.apply(this._fake,arguments);this._fake.entCnt.rows[1].cells[0].childNodes[0].style.top=this.entCnt.rows[1].cells[0].childNodes[0].style.top};this._fake._bfs_setSizes=this._fake[E];this._fake[E]=function(){this["_bfs_setSizes"].apply(this,arguments);if(this._fake._notresize){return }if((!this.noHeader)&&this._fake.hdr.offsetHeight!=this.hdr.offsetHeight){if(this._aHead){for(var f=0;f<=this._aHead.length;f++){if(this.hdr.rows[f+1].offsetHeight<this._fake.hdr.rows[f+1].cells[0].scrollHeight){return this._fake.setSizes()}this._fake.hdr.rows[f+1].style.height=this.hdr.rows[f+1].offsetHeight+"px";var d=this._fake.hdr.rows[f+1].offsetHeight-this.hdr.rows[f+1].offsetHeight;if(d){this._fake.hdr.rows[f+1].style.height=this.hdr.rows[f+1].offsetHeight-d+"px"}}}else{this._fake.hdr.style.height=this.hdr.offsetHeight+"px"}this._fake.setSizes.apply(this._fake,arguments)}this.entCnt.rows[1].cells[0].childNodes[0].style.top=this._fake.entCnt.rows[1].cells[0].childNodes[0].style.top;if(((this._fake.obj.offsetWidth+1*((this._fake.objBox.offsetHeight<=this._fake.objBox.scrollHeight)?(_isFF?20:18):0))<=this._fake.objBox.offsetWidth)&&(this.obj.offsetWidth<=this.objBox.offsetWidth)){this.objBox.style.overflowX="hidden";this._fake.objBox.style.overflowX="hidden"}else{this.objBox.style.overflowX="scroll";this._fake.objBox.style.overflowX="scroll"}};var E="_doOnScroll";this._bfs__doOnScroll=this[E];this[E]=function(){this._bfs__doOnScroll.apply(this,arguments);this._fake.objBox.scrollTop=this.objBox.scrollTop;this._fake._doOnScroll.apply(this._fake,arguments)};var E="doClick";this._bfs_doClick=this[E];this[E]=function(){this["_bfs_doClick"].apply(this,arguments);if(arguments[0].tagName=="TD"){var d=(arguments[0]._cellIndex>=O);if(!arguments[0].parentNode.idd){return }arguments[0]=this._fake.cells(arguments[0].parentNode.idd,(d?0:arguments[0]._cellIndex)).cell;this._fake._bfs_doClick.apply(this._fake,arguments);if(this._fake.onRowSelectTime){clearTimeout(this._fake.onRowSelectTime)}if(d){arguments[0].className=arguments[0].className.replace(/cellselected/g,"");globalActiveDHTMLGridObject=this;this._fake.cell=this.cell}else{this.objBox.scrollTop=this._fake.objBox.scrollTop}}};this._fake._bfs_doClick=this._fake[E];this._fake[E]=function(){this["_bfs_doClick"].apply(this,arguments);if(arguments[0].tagName=="TD"){var d=(arguments[0]._cellIndex<O);if(!arguments[0].parentNode.idd){return }arguments[0]=this._fake._bfs_cells(arguments[0].parentNode.idd,(d?O:arguments[0]._cellIndex)).cell;this._fake._bfs_doClick.apply(this._fake,arguments);if(this._fake.onRowSelectTime){clearTimeout(this._fake.onRowSelectTime)}if(d){arguments[0].className=arguments[0].className.replace(/cellselected/g,"");globalActiveDHTMLGridObject=this;this._fake.cell=this.cell}}};this.moveRowUpA=this.moveRowUp;this.moveRowUp=function(d){this._fake.moveRowUp(d);this.moveRowUpA(d)};this.moveRowDownA=this.moveRowDown;this.moveRowDown=function(d){this._fake.moveRowDown(d);this.moveRowDownA(d)};this._fake.getUserData=function(){return this._fake.getUserData.apply(this._fake,arguments)};this._fake.setUserData=function(){return this._fake.setUserData.apply(this._fake,arguments)};this.getSortingStateA=this.getSortingState;this.getSortingState=function(){var d=this.getSortingStateA();if(d.length!=0){return d}return this._fake.getSortingState()};this.setSortImgStateA=this._fake.setSortImgStateA=this.setSortImgState;this.setSortImgState=function(g,f,l,h){((f<O)?this._fake:this).setSortImgStateA(g,f,l,h);((f<O)?this:this._fake).setSortImgStateA(false)};this._fake.doColResizeA=this._fake.doColResize;this._fake.doColResize=function(h,g,f,d,n){a=-1;var l=0;if(arguments[1]._cellIndex==(O-1)){a=this._initalSplR+(h.clientX-d);if(!this._initalSplF){this._initalSplF=arguments[3]+this.objBox.scrollWidth-this.objBox.offsetWidth}if(this.objBox.scrollWidth==this.objBox.offsetWidth&&(this._fake.alter_split_resize||(h.clientX-d)>0)){arguments[3]=(this._initalSplF||arguments[3]);l=this.doColResizeA.apply(this,arguments)}else{l=this.doColResizeA.apply(this,arguments)}}else{if(this.obj.offsetWidth<this.entBox.offsetWidth){a=this.obj.offsetWidth}l=this.doColResizeA.apply(this,arguments)}this._correctSplit(a);this.resized=this._fake.resized=1;return l};this._fake.changeCursorState=function(g){var f=g.target||g.srcElement;if(f.tagName!="TD"){f=this.getFirstParentOfType(f,"TD")}if((f.tagName=="TD")&&(this._drsclmn)&&(!this._drsclmn[f._cellIndex])){return }var d=(g.layerX||0)+(((!_isIE)&&(g.target.tagName=="DIV"))?f.offsetLeft:0);var h=parseInt(this.getPosition(f,this.hdrBox));if(((f.offsetWidth-(g.offsetX||(h-d)*-1))<10)||((this.entBox.offsetWidth-(g.offsetX?(g.offsetX+f.offsetLeft):0)+this.objBox.scrollLeft-d)<10)){f.style.cursor="E-resize"}else{f.style.cursor="default"}if(_isOpera){this.hdrBox.scrollLeft=this.objBox.scrollLeft}};this._fake.startColResizeA=this._fake.startColResize;this._fake.startColResize=function(f){var g=this.startColResizeA(f);this._initalSplR=this.entBox.offsetWidth;this._initalSplF=null;if(this.entBox.onmousemove){var d=this.entBox.parentNode;d._aggrid=d.grid;d.grid=this;this.entBox.parentNode.onmousemove=this.entBox.onmousemove;this.entBox.onmousemove=null}return g};this._fake.stopColResizeA=this._fake.stopColResize;this._fake.stopColResize=function(f){if(this.entBox.parentNode.onmousemove){var d=this.entBox.parentNode;d.grid=d._aggrid;d._aggrid=null;this.entBox.onmousemove=this.entBox.parentNode.onmousemove;this.entBox.parentNode.onmousemove=null}return this.stopColResizeA(f)};this.doKeyA=this.doKey;this._fake.doKeyA=this._fake.doKey;this._fake.doKey=this.doKey=function(d){if(!d){return true}if(this._htkebl){return true}switch(d.keyCode){case 9:if(!d.shiftKey){if(this._realfake){if((this.cell)&&(this.cell._cellIndex==(O-1))){if(d.preventDefault){d.preventDefault()}this._fake.selectCell(this.rowsCol._dhx_find(this.cell.parentNode),O,false,false,true);return false}else{var f=this.doKeyA(d)}globalActiveDHTMLGridObject=this;return f}else{if((this.cell)&&(this.cell._cellIndex==(this.rowsCol[0].childNodes.length-1))){if(d.preventDefault){d.preventDefault()}var f=this._fake.rowsCol[this.rowsCol._dhx_find(this.cell.parentNode)+1];if(f){this._fake.selectCell(f,0,false,false,true)}return false}else{return this.doKeyA(d)}}}else{if(this._realfake){if((this.cell)&&(this.cell._cellIndex==0)){if(d.preventDefault){d.preventDefault()}var f=this._fake.rowsCol[this.rowsCol._dhx_find(this.cell.parentNode)-1];if(f){this._fake.selectCell(f,this._fake.rowsCol[0].childNodes.length-1,false,false,true)}return false}else{return this.doKeyA(d)}}else{if((this.cell)&&(this.cell._cellIndex==O)){if(d.preventDefault){d.preventDefault()}this._fake.selectCell(this.rowsCol._dhx_find(this.cell.parentNode),O-1,false,false,true);return false}else{return this.doKeyA(d)}}}break}return this.doKeyA(d)};this.deleteRowA=this.deleteRow;this.deleteRow=function(d,f){if(this.deleteRowA(d,f)===false){return false}this._fake.deleteRow(d)};this.clearAllA=this.clearAll;this.clearAll=function(){this.clearAllA();this._fake.clearAll()};this._sortRowsA=this._sortRows;this._fake._sortRowsA=this._fake._sortRows;this._sortRows=this._fake._sortRows=function(g,h,d,f){this._sortRowsA(g,h,d,f);this._fake._sortRowsA(g,h,d,f);this._fake.setSortImgStateA(false);this._fake.fldSorted=null;(this._realfake?this:this._fake)._fixAlterCss()};this.sortTreeRowsA=this.sortTreeRows;this._fake.sortTreeRowsA=this._fake.sortTreeRows;this.sortTreeRows=this._fake.sortTreeRows=function(g,h,d,f){if(g<O){this._fake.sortTreeRowsA(g,h,d,f);if(this._cssEven||this._cssUnEven){this._fixAlterCss()}this._h2syncModel()}else{this.sortTreeRowsA(g,h,d,f);this._fake._h2syncModel()}this._fake.setSortImgStateA(false);this._fake.fldSorted=null};if(this.changePage){this.changePageA=this.changePage;this.changePage=function(l){this.changePageA(l);var f=this.rowsBufferOutSize;var n=this.currentPage*f-f;var p=this._fake.obj._rowslength();for(var g=0;g<p;g++){var h=this._fake.obj._rows(0).parentNode;h.removeChild(this._fake.obj._rows(0))}for(var g=n;g<(n*1+f*1);g++){var q=this.getRowFromCollection(g);if(!q){continue}if(!this._fake.rowsAr[q.idd]){var o=q.cloneNode(true);while(o.childNodes.length>O){o.removeChild(o.childNodes[o.childNodes.length-1])}for(var d=0;d<O;d++){o.childNodes[d].style.display="";o.childNodes[d]._cellIndex=d}o.idd=this.obj._rows(g).idd;o.grid=this._fake;this._fake._insertRowAt(o,-1)}this._fake.obj.rows[0].parentNode.appendChild(this._fake.rowsAr[q.idd])}};if(this.pagingOn){this._sortRows=function(){this._sortRowsA.apply(this,arguments);this._fake.setSortImgStateA(false);for(var d=0;d<this.rowsCol.length;d++){if(this.rowsCol[d]){this._fake.rowsCol[d]=this._fake.rowsAr[this.rowsCol[d].idd]}}};this._fake.sortRows=function(){this._fake.sortRows.apply(this._fake,arguments);this._fake.setSortImgStateA(false)}}}if(this._fastAddRowSpacer){this._fastAddRowSpacerA=this._fastAddRowSpacer;this._fastAddRowSpacer=function(f,d){this._fake._fastAddRowSpacer(f,d);this._fake.limit=this.limit;return this._fastAddRowSpacerA(f,d)};this._splitRowAtA=this._splitRowAt;this._splitRowAt=function(){this._fake._splitRowAt.apply(this._fake,arguments);this._splitRowAt=this._splitRowAtA;var d=this._splitRowAtA.apply(this,arguments);this._splitRowAt=this._splitRowAtB;return d};this._splitRowAtB=this._splitRowAt;this._fake._askRealRows=function(){};this.loadXMLA=this.loadXML;this.loadXML=function(){if(this._dload){this._fake._dload=true;this._fake._dInc=this._dInc;this._fake._dl_start=new Array();this._fake.limit=this.limit;this._fake._dloadSize=Math.floor(parseInt(this.entBox.style.height)/20)+2;if(!this.multiLine){this._fake.obj.className+=" row20px"}this._fake._dpref=this._dpref;this._dom_limit=this._fake._dom_limit=999999999}return this.loadXMLA.apply(this,arguments)};this._addFromBufferSR=function(d){if((!this.rowsCol[d])||(this.rowsCol[d]._sRow)){this._splitRowAt(d)}if(this.rowsBuffer[1][d].tagName=="row"){if(this._cssEven){if(d%2==1){this._fake.rowsCol[d].className=this.rowsCol[d].className=this._cssUnEven}else{this._fake.rowsCol[d].className=this.rowsCol[d].className=this._cssEven}}this.changeRowId(this.rowsCol[d].idd,this.rowsBuffer[1][d].getAttribute("id"));this._fake.changeRowId(this._fake.rowsCol[d].idd,this.rowsBuffer[1][d].getAttribute("id"));this._fillRowFromXML(this.rowsCol[d],this.rowsBuffer[1][d],-1)}this.rowsCol[d]._rLoad=false;this._fake.rowsCol[d]._rLoad=false;this.rowsBuffer[1][d]=null}}this._fake.combos=this.combos;this.setSizes();this.attachEvent("onXLE",function(){this._fake._correctSplit()});this._fake._correctSplit()};dhtmlXGridObject.prototype._correctSplit=function(A){A=A||(this.obj.scrollWidth-this.objBox.scrollLeft);if(A>-1){this.entBox.style.width=A+"px";this.objBuf.style.width=A+"px";var C=this._fake.entBox.childNodes[0];C.style.left=A+"px";if(this._fake.ftr){this._fake.ftr.style.left=A-(_isFF?2:0)+"px"}C.style.width=this._fake.entBox.offsetWidth-A+"px"}};dhtmlXGridObject.prototype._correctRowHeight=function(E,D){if(!this.rowsAr[E]){return }var C=this.rowsAr[E].offsetHeight;var A=this._fake.rowsAr[E].offsetHeight;if(C>A){this._fake.rowsAr[E].style.height=C+"px"}if(C<A){this.rowsAr[E].style.height=A+"px"}};dhtmlXGridObject.prototype.unGroup=function(){if(!this._groups){return }this._dndProblematic=false;if(typeof (this._gIndex)!="undefined"){var A=this._groups_get();this.rowsCol=new dhtmlxArray(0);for(var E=0;E<A.length;E++){var D=A[E]._cntr;for(var C=0;C<D._childs.length;C++){this.obj.firstChild.appendChild(D._childs[C]);D._childs[C].style.display="";this.rowsCol.push(D._childs[C])}}this._temp_par.appendChild(this.obj)}delete this._groups;delete this._gIndex;if(this.__sortRowsBG){this.sortRows=this.__sortRowsBG}this.callEvent("onUnGroup",[])};dhtmlXGridObject.prototype.groupBy=function(A){if(this._groups){this.unGroup()}this._dndProblematic=true;this._groups=[];this._gIndex=A;this._nextRow=function(E,C){var D=this.rowsCol[E+C];if(D&&(D.style.display=="none"||D._cntr)){return this._nextRow(E+C,C)}return D};this._key_events.k38_0_0=function(){if(this.editor&&this.editor.combo){this.editor.shiftPrev()}else{var C=this.row.rowIndex;if(!C){return }var D=this._nextRow(C-1,-1);if(D){this.selectCell(D,this.cell._cellIndex,true)}}};if(!this.__sortRowsBG){this.attachEvent("onClearAll",function(){this.unGroup()});this.attachEvent("onBeforeRowDeleted",function(E){if(!this.rowsAr[E]){return true}var D=this.cells(E,this._gIndex).getValue();if(D===""){D=" "}var C=this._groups[D];this._dec_group(C);return true});this.attachEvent("onCheckbox",function(E,C,D){this.callEvent("onEditCell",[2,E,C,(D?1:0),(D?0:1)])});this.attachEvent("onEditCell",function(O,E,M,K,P){if(O==2&&K!=P&&M==this._gIndex){if(P===""){P=" "}this._dec_group(this._groups[P]);var C=this.rowsAr[E];var N=this.rowsCol._dhx_find(C);var H=this._inc_group(K);var I=this.rowsCol[H];var D=C.parentNode;var F=C.rowIndex;D.removeChild(C);if(I){D.insertBefore(C,I)}else{D.appendChild(C)}this.rowsCol._dhx_insertAt(H,C);if(H<N){N++}this.rowsCol._dhx_delAt(N,C);this._fixAlterCss()}return true})}this.__sortRowsBG=this.sortRows;this.sortRows=function(D,E,C){if(D!=this._gIndex){return this._sortInGroup(D,E,C)}else{return this._sortByGroup(D,E,C)}};this._key_events.k13_1_0=this._key_events.k13_0_1=function(){};this._groupExisting();this.callEvent("onGroup",[])};dhtmlXGridObject.prototype._inc_group=function(D){if(D===""){D=" "}if(!this._groups[D]){this._groups[D]={text:D,row:this._addPseudoRow(),count:0,state:"minus"}}var C=this._groups[D];C.row._cntr=C;var A=this.rowsCol._dhx_find(C.row)+C.count+1;C.count++;this._updateGroupView(C);return A};dhtmlXGridObject.prototype._dec_group=function(A){if(!A){return }A.count--;if(A.count==0){A.row.parentNode.removeChild(A.row);this.rowsCol._dhx_delAt(this.rowsCol._dhx_find(A.row));delete this._groups[A.text]}else{this._updateGroupView(A)}return true};dhtmlXGridObject.prototype._insertRowAt_gA=dhtmlXGridObject.prototype._insertRowAt;dhtmlXGridObject.prototype._insertRowAt=function(C,D,A){if(typeof (this._groups)!="undefined"){var E=this.cells4(C.childNodes[this._gIndex]).getValue();if(!E){E=" "}D=this._inc_group(E)}return this._insertRowAt_gA(C,D,A)};dhtmlXGridObject.prototype._updateGroupView=function(C){var A="<img style='margin-bottom:-4px' src='"+this.imgURL+C.state+".gif'> ";if(this.customGroupFormat){A+=this.customGroupFormat(C.text,C.count)}else{A+=C.text+" ( "+C.count+" ) "}C.row.firstChild.innerHTML=A};dhtmlXGridObject.prototype._addPseudoRow=function(E){var D=document.createElement("TR");var A=document.createElement("TD");D.appendChild(A);A.style.cssText="vertical-align:middle; font-family:Tahoma; font-size:10pt; font-weight:bold; height:30px;  border:0px;  border-bottom: 2px solid navy; ";A.colSpan=this._cCount;var C=this;A.onclick=function(F){C._switchGroupState(C.getFirstParentOfType(this,"TR"));(F||event).cancelBubble="true"};A.ondblclick=function(F){(F||event).cancelBubble="true"};if(!E){if(_isKHTML){this.obj.appendChild(D)}else{this.obj.firstChild.appendChild(D)}this.rowsCol.push(D)}return D};dhtmlXGridObject.prototype._sortInGroup=function(F,I,C){var A=this._groups_get();A.reverse();for(var H=0;H<A.length;H++){var K=A[H]._cntr._childs;var D={};for(var E=0;E<K.length;E++){D[K[E].idd]=this.cells3(K[E],F).getValue()}this._sortCore(F,I,C,D,K)}this._groups_put(A);this.setSizes();this.callEvent("onGridReconstructed",[])};dhtmlXGridObject.prototype._sortByGroup=function(E,H,C){var A=this._groups_get();var D=[];for(var F=0;F<A.length;F++){A[F].idd="_sort_"+F;D["_sort_"+F]=A[F]._cntr.text}this._sortCore(E,H,C,D,A);this._groups_put(A);this.setSizes()};dhtmlXGridObject.prototype._groups_get=function(){var A=[];this._temp_par=this.obj.parentNode;this._temp_par.removeChild(this.obj);var C=[];for(var D=this.getRowsNum()-1;D>=0;D--){if(this.rowsCol[D]._cntr){this.rowsCol[D]._cntr._childs=C;C=[];A.push(this.rowsCol[D])}else{C.push(this.rowsCol[D])}this.rowsCol[D].parentNode.removeChild(this.rowsCol[D])}return A};dhtmlXGridObject.prototype._groups_put=function(A){this.rowsCol=new dhtmlxArray(0);for(var E=0;E<A.length;E++){var D=A[E]._cntr;this.obj.firstChild.appendChild(D.row);this.rowsCol.push(D.row);D.row.idd=null;for(var C=0;C<D._childs.length;C++){this.obj.firstChild.appendChild(D._childs[C]);this.rowsCol.push(D._childs[C])}delete D._childs}this._temp_par.appendChild(this.obj)};dhtmlXGridObject.prototype._groupExisting=function(A){if(!this.getRowsNum()){return }var A=[];this._temp_par=this.obj.parentNode;this._temp_par.removeChild(this.obj);var C=[];for(var D=this.getRowsNum()-1;D>=0;D--){var F=this.cells4(this.rowsCol[D].childNodes[this._gIndex]).getValue();if(!F){F=" "}if(!this._groups[F]){this._groups[F]={text:F,row:this._addPseudoRow(true),count:0,state:"minus"};var E=this._groups[F];E.row._cntr=E;this._groups[F]._childs=[];A.push(E.row)}this._groups[F].count++;this._groups[F]._childs.push(this.rowsCol[D]);this.rowsCol[D].parentNode.removeChild(this.rowsCol[D])}for(var D=0;D<A.length;D++){this._updateGroupView(A[D]._cntr)}this._groups_put(A);this.callEvent("onGridReconstructed",[])};dhtmlXGridObject.prototype._switchGroupState=function(E){var D=E._cntr;var C=this.rowsCol._dhx_find(D.row)+1;D.state=D.state=="minus"?"plus":"minus";var A=D.state=="plus"?"none":"";while(this.rowsCol[C]&&!this.rowsCol[C]._cntr){this.rowsCol[C].style.display=A;C++}this._updateGroupView(D);this.callEvent("onGroupStateChanged",[D.row.idd]);this.setSizes()};dhtmlXGridObject.prototype.expandGroup=function(A){if(this._groups[A].state=="plus"){}this._switchGroupState(this._groups[A].row)};dhtmlXGridObject.prototype.collapseGroup=function(A){if(this._groups[A].state=="minus"){}this._switchGroupState(this._groups[A].row)};dhtmlXGridObject.prototype.expandAllGroups=function(){for(var A in this._groups){if(this._groups[A]&&this._groups[A].state=="plus"){this._switchGroupState(this._groups[A].row)}}};dhtmlXGridObject.prototype.collapseAllGroups=function(){for(var A in this._groups){if(this._groups[A]&&this._groups[A].state=="minus"){this._switchGroupState(this._groups[A].row)}}};dhtmlXGridObject.prototype.useCSV=function(A){if(!this._csv_loadXML){this._csv_loadXML=this.loadXML;this._csv_loadXMLString=this.loadXMLString;this.loadXML=this.loadCSVFile;this.loadXMLString=this.loadCSVFile}};dhtmlXGridObject.prototype.loadCSVFile=function(C,A){this.xmlLoader=new dtmlXMLLoaderObject(this._onCSVFileLoad,this);this.xmlLoader.waitCall=A;this.xmlLoader.loadXML(C)};dhtmlXGridObject.prototype._onCSVFileLoad=function(D,A,H,F,C){var E=this.xmlDoc.responseText;D.loadCSVString(E)};dhtmlXGridObject.prototype.enableCSVAutoID=function(A){this._csvAID=convertStringToBoolean(A)};dhtmlXGridObject.prototype.enableCSVHeader=function(A){this._csvHdr=convertStringToBoolean(A);if(this._csvHdr){this.enableCSVAutoID(true)}};dhtmlXGridObject.prototype.setCSVDelimiter=function(C){this._csvDelim=(C||this._csvDelim);this._csvDelimX=this._csvDelim.charCodeAt(0);var A=[0,1,2,3,4,5,6,7,8,9,"A","B","C","D","E","F"];this._csvDelimX="\\x"+A[Math.floor(this._csvDelimX/16)]+""+A[(this._csvDelimX%16)]};dhtmlXGridObject.prototype.loadCSVString=function(E){if(!this._csvDelimX){this.setCSVDelimiter()}var D=new RegExp("^([^"+this._csvDelimX+"]+)"+this._csvDelimX);var C=new RegExp("\n([^"+this._csvDelimX+"]+)"+this._csvDelimX,"g");var A=new RegExp(""+this._csvDelimX+"","g");if(this._csvHdr){hdr=E.substr(0,E.indexOf("\n"));E=E.substr(E.indexOf("\n")+1);hdr="<head><beforeInit><call command='setHeader'><param>"+hdr.replace(new RegExp(this._csvDelimX,"g"),",")+"</param></call><call command='init'></call></beforeInit></head>"}if(this._csvAID){E=E.replace(D,"<row><cell><![CDATA[$1]]></cell><cell><![CDATA[");E=E.replace(C,"]]></cell></row><row id=''><cell><![CDATA[$1]]></cell><cell><![CDATA[")}else{E=E.replace(D,"<row id='$1'><cell><![CDATA[");E=E.replace(C,"]]></cell></row><row id='$1'><cell><![CDATA[")}E=E.replace(A,"]]></cell><cell><![CDATA[");if(E.indexOf("<row")!=0){E="<row><cell><![CDATA["+E}E="<?xml version='1.0'?><rows>"+(this._csvHdr?(hdr+E):E)+"]]></cell></row></rows>";this.xmlLoader=new dtmlXMLLoaderObject(this.doLoadDetails,window,true,this.no_cashe);this.xmlLoader.loadXMLString(E)};dhtmlXGridObject.prototype.serializeToCSV=function(){this.editStop();if(this._mathSerialization){this._agetm="getMathValue"}else{this._agetm="getValue"}var F="";if(this._csvHdr){var C=[];var A=this.hdr.rows[1].cells;for(var H=0;H<A.length;H++){if((!this._srClmn)||(this._srClmn[H])){C.push(_isIE?A[H].innerText:A[H].textContent)}}F=C.join(this._csvDelim)+"\n"}var H=0;var E=(this._dload)?this.rowsBuffer[0].length:(this.rowsBuffer[0].length+this.rowsCol.length);for(H;H<E;H++){if(H>=this.rowsCol.length&&this.pagingOn){var D=this._serializeRowToCVS(null,H-this.rowsCol.length)}else{var I=this.rowsCol[H];var D=this._serializeRowToCVS(I,H)}F+=D;if(D!=""){F+="\n"}}return F};dhtmlXGridObject.prototype._serializeRowToCVS=function(A,N,D,I){var K=new Array();if((!A)||(A._sRow)||(A._rLoad)||(A.tagName=="row")){if(this.rowsBuffer[1][N]){var A=this.rowsBuffer[1][N];if(!this._csvAID){K[K.length]=A.getAttribute("id")}for(var M=0;M<A.childNodes.length;M++){if(A.childNodes[M].tagName=="cell"){var P=A.childNodes[M];K[K.length]=P.firstChild?P.firstChild.nodeValue:""}}}return K.join(this._csvDelim)}if(!this._csvAID){K[K.length]=A.idd}D=D||0;I=I||A.childNodes.length;var Q=false;var E=D;for(var O=D;E<I;O++){var C=A.childNodes[O]._cellIndex;if((!this._srClmn)||(this._srClmn[C])){var F=A.childNodes[O];var H=this.cells(A.idd,C);while(E!=C){E++;K.push("")}E++;if(H.cell){zxVal=H[this._agetm]()}else{zxVal=""}if((this._chAttr)&&(H.wasChanged())){Q=true}K[K.length]=((zxVal===null)?"":zxVal);if((this._ecspn)&&(F.colSpan)){F=F.colSpan-1;for(var S=0;S<F;S++){K[K.length]=""}E++}}}if((this._onlChAttr)&&(!Q)){return""}return K.join(this._csvDelim)};dhtmlXGridObject.prototype.toClipBoard=function(A){if(window.clipboardData){window.clipboardData.setData("Text",A)}else{(new Clipboard()).copy(A)}};dhtmlXGridObject.prototype.fromClipBoard=function(){if(window.clipboardData){return window.clipboardData.getData("Text")}else{return(new Clipboard()).paste()}};dhtmlXGridObject.prototype.cellToClipboard=function(D,C){if((!D)||(!C)){if(!this.selectedRows[0]){return }D=this.selectedRows[0].idd;C=this.cell._cellIndex}var A=this.cells(D,C);this.toClipBoard(A.getLabel?A.getLabel():A.getValue())};dhtmlXGridObject.prototype.updateCellFromClipboard=function(D,C){if((!D)||(!C)){if(!this.selectedRows[0]){return }D=this.selectedRows[0].idd;C=this.cell._cellIndex}var A=this.cells(D,C);A[A.setImage?"setLabel":"setValue"](this.fromClipBoard())};dhtmlXGridObject.prototype.rowToClipboard=function(D){var A="";if(this._mathSerialization){this._agetm="getMathValue"}else{if(this._strictText){this._agetm="getTitle"}else{this._agetm="getValue"}}if(D){A=this._serializeRowToCVS(this.getRowById(D))}else{for(var C=0;C<this.selectedRows.length;C++){if(A){A+="\n"}A+=this._serializeRowToCVS(this.selectedRows[C])}}this.toClipBoard(A)};dhtmlXGridObject.prototype.updateRowFromClipboard=function(F){var A=this.fromClipBoard();if(!A){return }if(F){var E=this.getRowById(F)}else{var E=this.selectedRows[0]}if(!E){return }A=A.split(this._csvDelim);for(var D=1;D<A.length;D++){var C=this.cells3(E,D-1);C[C.setImage?"setLabel":"setValue"](A[D])}};dhtmlXGridObject.prototype.addRowFromClipboard=function(){var A=this.fromClipBoard();if(!A){return }var D=A.split("\n");for(var C=0;C<D.length;C++){if(D[C]){A=D[C].split(this._csvDelim);if(this._csvAID){this.addRow(this.getRowsNum()+2,A)}else{this.addRow(A[0],A.slice(1))}}}};dhtmlXGridObject.prototype.gridToClipboard=function(){this.toClipBoard(this.serializeToCSV())};dhtmlXGridObject.prototype.gridFromClipboard=function(){var A=this.fromClipBoard();if(!A){return }this.loadCSVString(A)};dhtmlXGridObject.prototype.getXLS=function(H){if(!this.xslform){this.xslform=document.createElement("FORM");this.xslform.action=(H||"")+"xls.php";this.xslform.method="post";this.xslform.target=(_isIE?"_blank":"");document.body.appendChild(this.xslform);var F=document.createElement("INPUT");F.type="hidden";F.name="csv";this.xslform.appendChild(F);var E=document.createElement("INPUT");E.type="hidden";E.name="csv_header";this.xslform.appendChild(E)}var I=this.serializeToCSV();this.xslform.childNodes[0].value=I;var D=[];var A=this._cCount;for(var C=0;C<A;C++){D.push(this.getHeaderCol(C))}D=D.join(",");this.xslform.childNodes[1].value=D;this.xslform.submit()};dhtmlXGridObject.prototype.printView=function(Q,A){var M="<style>TD {font-family:Arial;text-align:center};</style>";M+="<base href='"+document.location.href+"'></base>";M+=(Q||"");M+='<table width="100%" border="2px" cellpadding="0" cellspacing="0">';var E=this.rowsCol.length;var U=this._cCount;var C=this._printWidth();M+="<tr>";for(var K=0;K<U;K++){if(this._hrrar&&this._hrrar[K]){continue}var T=this.hdr.rows[1].cells[this.hdr.rows[1]._childIndexes?this.hdr.rows[1]._childIndexes[parseInt(K)]:K];var D=(T.colSpan||1);var H=(T.rowSpan||1);for(var I=1;I<D;I++){C[K]+=C[I]}M+='<td rowspan="'+H+'" width="'+C[K]+'%" style="padding-left:2px;padding-right:2px;background-color:lightgrey;" colspan="'+D+'">'+this.getHeaderCol(K)+"</td>";K+=D-1}M+="</tr>";for(var K=2;K<this.hdr.rows.length;K++){M+="<tr style='background-color:lightgrey'>"+this.hdr.rows[K].innerHTML+"</tr>"}for(var K=0;K<E;K++){M+="<tr>";if(this.rowsCol[K]._cntr){M+=this.rowsCol[K].innerHTML.replace(/<img[^>]*>/gi,"")+"</tr>";continue}for(var I=0;I<U;I++){if(this._hrrar&&this._hrrar[I]){continue}var P=this.cells(this.rowsCol[K].idd,I);if(P.getContent){S=P.getContent()}else{if(P.getImage||P.combo){var S=P.cell.innerHTML}else{var S=P.getValue()}}var F=this.columnColor[I]?"background-color:"+this.columnColor[I]+";":"";var N=this.cellAlign[I]?"text-align:"+this.cellAlign[I]+";":"";M+='<td style="padding-left:2px;padding-right:2px;'+F+N+'">'+(S===""?"&nbsp;":S)+"</td>"}M+="</tr>"}if(this.ftr){for(var K=1;K<this.ftr.childNodes[0].rows.length;K++){M+="<tr>";for(var I=0;I<this.ftr.rows[K].cells.length;I++){if(this._hrrar&&this._hrrar[I]){continue}else{M+="<td colspan='"+(this.ftr.rows[K].cells[I].colSpan||1)+"'>"+this.ftr.rows[K].cells[I].innerHTML+"</td>"}}M+="</tr>"}}M+="</table>";M+=(A||"");var O=window.open("","_blank");O.document.write(M);O.document.close()};dhtmlXGridObject.prototype._printWidth=function(){var F=[];var E=0;for(var D=0;D<this._cCount;D++){var A=this.getColWidth(D);F.push(A);E+=A}var I=[];var C=0;for(var D=0;D<F.length;D++){var H=Math.floor((F[D]/E)*100);C+=H;I.push(H)}I[I.length-1]+=100-C;return I};dhtmlXGridObject.prototype.loadObject=function(A){};dhtmlXGridObject.prototype.loadJSONFile=function(A){};dhtmlXGridObject.prototype.serializeToObject=function(){};dhtmlXGridObject.prototype.serializeToJSON=function(){};if(!window.clipboardData){window.clipboardData={_make:function(){var C=Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard);if(!C){return null}var A=Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);if(!A){return null}A.addDataFlavor("text/unicode");var D=Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);this._p=[C,A,D];return true},setData:function(A,D){netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");if(!this._make()){return false}this._p[2].data=D;this._p[1].setTransferData("text/unicode",this._p[2],D.length*2);var C=Components.interfaces.nsIClipboard;this._p[0].setData(this._p[1],null,C.kGlobalClipboard)},getData:function(A){netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");if(!this._make()){return false}this._p[0].getData(this._p[1],this._p[0].kGlobalClipboard);var C=new Object();var D=new Object();this._p[1].getTransferData("text/unicode",D,C);if(D){D=D.value.QueryInterface(Components.interfaces.nsISupportsString)}if(D){return D.data.substring(0,C.value/2)}return""}}};