
var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;function ControlVersion()
{var version;var axo;var e;try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");version=axo.GetVariable("$version");}catch(e){}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");version="WIN 6,0,21,0";axo.AllowScriptAccess="always";version=axo.GetVariable("$version");}catch(e){}}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version=axo.GetVariable("$version");}catch(e){}}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version="WIN 3,0,18,0";}catch(e){}}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");version="WIN 2,0,0,11";}catch(e){version=-1;}}
return version;}
function GetSwfVer(){var flashVer=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var swVer2=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var flashDescription=navigator.plugins["Shockwave Flash"+swVer2].description;var descArray=flashDescription.split(" ");var tempArrayMajor=descArray[2].split(".");var versionMajor=tempArrayMajor[0];var versionMinor=tempArrayMajor[1];var versionRevision=descArray[3];if(versionRevision==""){versionRevision=descArray[4];}
if(versionRevision[0]=="d"){versionRevision=versionRevision.substring(1);}else if(versionRevision[0]=="r"){versionRevision=versionRevision.substring(1);if(versionRevision.indexOf("d")>0){versionRevision=versionRevision.substring(0,versionRevision.indexOf("d"));}}
var flashVer=versionMajor+"."+versionMinor+"."+versionRevision;}}
else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1)flashVer=4;else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1)flashVer=3;else if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1)flashVer=2;else if(isIE&&isWin&&!isOpera){flashVer=ControlVersion();}
return flashVer;}
function DetectFlashVer(reqMajorVer,reqMinorVer,reqRevision)
{versionStr=GetSwfVer();if(versionStr==-1){return false;}else if(versionStr!=0){if(isIE&&isWin&&!isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",");}else{versionArray=versionStr.split(".");}
var versionMajor=versionArray[0];var versionMinor=versionArray[1];var versionRevision=versionArray[2];if(versionMajor>parseFloat(reqMajorVer)){return true;}else if(versionMajor==parseFloat(reqMajorVer)){if(versionMinor>parseFloat(reqMinorVer))
return true;else if(versionMinor==parseFloat(reqMinorVer)){if(versionRevision>=parseFloat(reqRevision))
return true;}}
return false;}}
function AC_AddExtension(src,ext)
{if(src.indexOf('?')!=-1)
return src.replace(/\?/,ext+'?');else
return src+ext;}
function AC_Generateobj(objAttrs,params,embedAttrs)
{var str='';if(isIE&&isWin&&!isOpera)
{str+='<object ';for(var i in objAttrs)
{str+=i+'="'+objAttrs[i]+'" ';}
str+='>';for(var i in params)
{str+='<param name="'+i+'" value="'+params[i]+'" /> ';}
str+='</object>';}
else
{str+='<embed ';for(var i in embedAttrs)
{str+=i+'="'+embedAttrs[i]+'" ';}
str+='> </embed>';}
document.write(str);}
function AC_FL_RunContent_BOSS(){var ret=AC_GetArgs
(arguments,"","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);}
function AC_FL_RunContent(){var ret=AC_GetArgs
(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);}
function AC_SW_RunContent(){var ret=AC_GetArgs
(arguments,".dcr","src","clsid:166B1BCA-3F9C-11CF-8075-444553540000",null);AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);}
function AC_GetArgs(args,ext,srcParamName,classid,mimeType){var ret=new Object();ret.embedAttrs=new Object();ret.params=new Object();ret.objAttrs=new Object();for(var i=0;i<args.length;i=i+2){var currArg=args[i].toLowerCase();switch(currArg){case"classid":break;case"pluginspage":ret.embedAttrs[args[i]]=args[i+1];break;case"src":case"movie":args[i+1]=AC_AddExtension(args[i+1],ext);ret.embedAttrs["src"]=args[i+1];ret.params[srcParamName]=args[i+1];break;case"onafterupdate":case"onbeforeupdate":case"onblur":case"oncellchange":case"onclick":case"ondblClick":case"ondrag":case"ondragend":case"ondragenter":case"ondragleave":case"ondragover":case"ondrop":case"onfinish":case"onfocus":case"onhelp":case"onmousedown":case"onmouseup":case"onmouseover":case"onmousemove":case"onmouseout":case"onkeypress":case"onkeydown":case"onkeyup":case"onload":case"onlosecapture":case"onpropertychange":case"onreadystatechange":case"onrowsdelete":case"onrowenter":case"onrowexit":case"onrowsinserted":case"onstart":case"onscroll":case"onbeforeeditfocus":case"onactivate":case"onbeforedeactivate":case"ondeactivate":case"type":case"codebase":case"id":ret.objAttrs[args[i]]=args[i+1];break;case"width":case"height":case"align":case"vspace":case"hspace":case"class":case"title":case"accesskey":case"name":case"tabindex":ret.embedAttrs[args[i]]=ret.objAttrs[args[i]]=args[i+1];break;default:ret.embedAttrs[args[i]]=ret.params[args[i]]=args[i+1];}}
ret.objAttrs["classid"]=classid;if(mimeType)ret.embedAttrs["type"]=mimeType;return ret;}
var Spry;if(!Spry)Spry={};if(!Spry.Widget)Spry.Widget={};Spry.Widget.CollapsiblePanel=function(element,opts)
{this.init(element);Spry.Widget.CollapsiblePanel.setOptions(this,opts);this.attachBehaviors();};Spry.Widget.CollapsiblePanel.prototype.init=function(element)
{this.element=this.getElement(element);this.focusElement=null;this.hoverClass="CollapsiblePanelTabHover";this.openClass="CollapsiblePanelOpen";this.closedClass="CollapsiblePanelClosed";this.focusedClass="CollapsiblePanelFocused";this.enableAnimation=true;this.enableKeyboardNavigation=true;this.animator=null;this.hasFocus=false;this.contentIsOpen=true;};Spry.Widget.CollapsiblePanel.prototype.getElement=function(ele)
{if(ele&&typeof ele=="string")
return document.getElementById(ele);return ele;};Spry.Widget.CollapsiblePanel.prototype.addClassName=function(ele,className)
{if(!ele||!className||(ele.className&&ele.className.search(new RegExp("\\b"+className+"\\b"))!=-1))
return;ele.className+=(ele.className?" ":"")+className;};Spry.Widget.CollapsiblePanel.prototype.removeClassName=function(ele,className)
{if(!ele||!className||(ele.className&&ele.className.search(new RegExp("\\b"+className+"\\b"))==-1))
return;ele.className=ele.className.replace(new RegExp("\\s*\\b"+className+"\\b","g"),"");};Spry.Widget.CollapsiblePanel.prototype.hasClassName=function(ele,className)
{if(!ele||!className||!ele.className||ele.className.search(new RegExp("\\b"+className+"\\b"))==-1)
return false;return true;};Spry.Widget.CollapsiblePanel.prototype.setDisplay=function(ele,display)
{if(ele)
ele.style.display=display;};Spry.Widget.CollapsiblePanel.setOptions=function(obj,optionsObj,ignoreUndefinedProps)
{if(!optionsObj)
return;for(var optionName in optionsObj)
{if(ignoreUndefinedProps&&optionsObj[optionName]==undefined)
continue;obj[optionName]=optionsObj[optionName];}};Spry.Widget.CollapsiblePanel.prototype.onTabMouseOver=function()
{this.addClassName(this.getTab(),this.hoverClass);};Spry.Widget.CollapsiblePanel.prototype.onTabMouseOut=function()
{this.removeClassName(this.getTab(),this.hoverClass);};Spry.Widget.CollapsiblePanel.prototype.open=function()
{this.contentIsOpen=true;if(this.enableAnimation)
{if(this.animator)
this.animator.stop();this.animator=new Spry.Widget.CollapsiblePanel.PanelAnimator(this,true);this.animator.start();}
else
this.setDisplay(this.getContent(),"block");this.removeClassName(this.element,this.closedClass);this.addClassName(this.element,this.openClass);};Spry.Widget.CollapsiblePanel.prototype.close=function()
{this.contentIsOpen=false;if(this.enableAnimation)
{if(this.animator)
this.animator.stop();this.animator=new Spry.Widget.CollapsiblePanel.PanelAnimator(this,false);this.animator.start();}
else
this.setDisplay(this.getContent(),"none");this.removeClassName(this.element,this.openClass);this.addClassName(this.element,this.closedClass);};Spry.Widget.CollapsiblePanel.prototype.onTabClick=function()
{if(this.isOpen())
this.close();else
this.open();this.focus();};Spry.Widget.CollapsiblePanel.prototype.onFocus=function(e)
{this.hasFocus=true;this.addClassName(this.element,this.focusedClass);};Spry.Widget.CollapsiblePanel.prototype.onBlur=function(e)
{this.hasFocus=false;this.removeClassName(this.element,this.focusedClass);};Spry.Widget.CollapsiblePanel.ENTER_KEY=13;Spry.Widget.CollapsiblePanel.SPACE_KEY=32;Spry.Widget.CollapsiblePanel.prototype.onKeyDown=function(e)
{var key=e.keyCode;if(!this.hasFocus||(key!=Spry.Widget.CollapsiblePanel.ENTER_KEY&&key!=Spry.Widget.CollapsiblePanel.SPACE_KEY))
return true;if(this.isOpen())
this.close();else
this.open();if(e.stopPropagation)
e.stopPropagation();if(e.preventDefault)
e.preventDefault();return false;};Spry.Widget.CollapsiblePanel.prototype.attachPanelHandlers=function()
{var tab=this.getTab();if(!tab)
return;var self=this;Spry.Widget.CollapsiblePanel.addEventListener(tab,"click",function(e){return self.onTabClick();},false);Spry.Widget.CollapsiblePanel.addEventListener(tab,"mouseover",function(e){return self.onTabMouseOver();},false);Spry.Widget.CollapsiblePanel.addEventListener(tab,"mouseout",function(e){return self.onTabMouseOut();},false);if(this.enableKeyboardNavigation)
{var tabIndexEle=null;var tabAnchorEle=null;this.preorderTraversal(tab,function(node){if(node.nodeType==1)
{var tabIndexAttr=tab.attributes.getNamedItem("tabindex");if(tabIndexAttr)
{tabIndexEle=node;return true;}
if(!tabAnchorEle&&node.nodeName.toLowerCase()=="a")
tabAnchorEle=node;}
return false;});if(tabIndexEle)
this.focusElement=tabIndexEle;else if(tabAnchorEle)
this.focusElement=tabAnchorEle;if(this.focusElement)
{Spry.Widget.CollapsiblePanel.addEventListener(this.focusElement,"focus",function(e){return self.onFocus(e);},false);Spry.Widget.CollapsiblePanel.addEventListener(this.focusElement,"blur",function(e){return self.onBlur(e);},false);Spry.Widget.CollapsiblePanel.addEventListener(this.focusElement,"keydown",function(e){return self.onKeyDown(e);},false);}}};Spry.Widget.CollapsiblePanel.addEventListener=function(element,eventType,handler,capture)
{try
{if(element.addEventListener)
element.addEventListener(eventType,handler,capture);else if(element.attachEvent)
element.attachEvent("on"+eventType,handler);}
catch(e){}};Spry.Widget.CollapsiblePanel.prototype.preorderTraversal=function(root,func)
{var stopTraversal=false;if(root)
{stopTraversal=func(root);if(root.hasChildNodes())
{var child=root.firstChild;while(!stopTraversal&&child)
{stopTraversal=this.preorderTraversal(child,func);try{child=child.nextSibling;}catch(e){child=null;}}}}
return stopTraversal;};Spry.Widget.CollapsiblePanel.prototype.attachBehaviors=function()
{var panel=this.element;var tab=this.getTab();var content=this.getContent();if(this.contentIsOpen||this.hasClassName(panel,this.openClass))
{this.removeClassName(panel,this.closedClass);this.setDisplay(content,"block");this.contentIsOpen=true;}
else
{this.removeClassName(panel,this.openClass);this.addClassName(panel,this.closedClass);this.setDisplay(content,"none");this.contentIsOpen=false;}
this.attachPanelHandlers();};Spry.Widget.CollapsiblePanel.prototype.getTab=function()
{return this.getElementChildren(this.element)[0];};Spry.Widget.CollapsiblePanel.prototype.getContent=function()
{return this.getElementChildren(this.element)[1];};Spry.Widget.CollapsiblePanel.prototype.isOpen=function()
{return this.contentIsOpen;};Spry.Widget.CollapsiblePanel.prototype.getElementChildren=function(element)
{var children=[];var child=element.firstChild;while(child)
{if(child.nodeType==1)
children.push(child);child=child.nextSibling;}
return children;};Spry.Widget.CollapsiblePanel.prototype.focus=function()
{if(this.focusElement&&this.focusElement.focus)
this.focusElement.focus();};Spry.Widget.CollapsiblePanel.PanelAnimator=function(panel,doOpen,opts)
{this.timer=null;this.interval=0;this.stepCount=0;this.fps=0;this.steps=10;this.duration=500;this.onComplete=null;this.panel=panel;this.content=panel.getContent();this.panelData=[];this.doOpen=doOpen;Spry.Widget.CollapsiblePanel.setOptions(this,opts);if(this.fps>0)
{this.interval=Math.floor(1000/this.fps);this.steps=parseInt((this.duration+(this.interval-1))/this.interval);}
else if(this.steps>0)
this.interval=this.duration/this.steps;var c=this.content;var curHeight=c.offsetHeight?c.offsetHeight:0;if(doOpen&&c.style.display=="none")
this.fromHeight=0;else
this.fromHeight=curHeight;if(!doOpen)
this.toHeight=0;else
{if(c.style.display=="none")
{c.style.visibility="hidden";c.style.display="block";}
c.style.height="";this.toHeight=c.offsetHeight;}
this.increment=(this.toHeight-this.fromHeight)/this.steps;this.overflow=c.style.overflow;c.style.height=this.fromHeight+"px";c.style.visibility="visible";c.style.overflow="hidden";c.style.display="block";};Spry.Widget.CollapsiblePanel.PanelAnimator.prototype.start=function()
{var self=this;this.timer=setTimeout(function(){self.stepAnimation();},this.interval);};Spry.Widget.CollapsiblePanel.PanelAnimator.prototype.stop=function()
{if(this.timer)
{clearTimeout(this.timer);if(this.stepCount<this.steps)
this.content.style.overflow=this.overflow;}
this.timer=null;};Spry.Widget.CollapsiblePanel.PanelAnimator.prototype.stepAnimation=function()
{++this.stepCount;this.animate();if(this.stepCount<this.steps)
this.start();else if(this.onComplete)
this.onComplete();};Spry.Widget.CollapsiblePanel.PanelAnimator.prototype.animate=function()
{if(this.stepCount>=this.steps)
{if(!this.doOpen)
this.content.style.display="none";this.content.style.overflow=this.overflow;this.content.style.height=this.toHeight+"px";}
else
{this.fromHeight+=this.increment;this.content.style.height=this.fromHeight+"px";}};nlsMenu={};nlsMenuMgr={};nlsWinElmt=[];ag0=navigator.userAgent;nls_isIE=(ag0.indexOf("MSIE")>=0);nls_isIE5=(ag0.indexOf("MSIE 5.0")>=0);nls_isSafari=(ag0.indexOf("Safari")>=0);nls_isOpera=(ag0.indexOf("Opera")>=0);if(nls_isOpera){nls_isIE=false;nls_isIE5=false;}
function NlsMenuManager(mgr){this.mgrId=mgr;this.menus={};this.menubar=null;this.timeout=1000;this.flowOverFormElement=false;this.assocMenuMgr=[];this.defaultEffect=null;this.icPath="";this.memorizeSel=false;this.rt={};this.tmId=null;this.setTimeout=function(a,t){this.tmId=window.setTimeout(a,t);};this.clearTimeout=function(){if(this.tmId!=null){window.clearTimeout(this.tmId);this.tmId=null;}};nlsMenuMgr[mgr]=this;if(nls_isIE){window.attachEvent("onload",function(){nlsMenuMgr[mgr].init();});}
return this;}
NlsMnMgr=NlsMenuManager.prototype;NlsMnMgr.createMenu=function(mId){var m=new NlsMenu(mId);m.mgr=this;m.mgrId=this.mgrId;m.icPath=this.icPath;m.useEffect(this.defaultEffect);if(this.design){m.$menuItemClick=NlsMenu.$dsItemClick;}
this.menus[mId]=m;return m;};NlsMnMgr.createMenubar=function(mbarId){if(this.menubar){alert("Menubar already exists!");}
var m=new NlsMenubar(mbarId);m.mgr=this;m.mgrId=this.mgrId;m.icPath=this.icPath;if(this.design){m.$menuItemClick=NlsMenu.$dsItemClick;}
this.menubar=m;return m;};NlsMnMgr.renderMenus=function(plc){if(plc&&plc!=""){var d=NlsMenu.$GE(plc),s="";if(!d){d=document.createElement("SPAN");d.id=plc;document.body.insertBefore(d,document.body.childNodes[0]);}
for(it in this.menus){s+=this.menus[it].renderMenu();}
d.innerHTML=s;d.style.display="";}else{for(it in this.menus){document.write(this.menus[it].renderMenu());}}};NlsMnMgr.renderMenubar=function(plc,incSub){if(this.menubar){var mbar=this.menubar.renderMenubar();if(plc&&plc!=""){var d=NlsMenu.$GE(plc);d.style.display="";d.innerHTML=mbar;}else{document.write(mbar);}
if(incSub!=false){this.renderMenus(this.mgrId);}}
if(this.memorizeSel){this.loadPath();}};NlsMnMgr.hideMenus=function(){for(var it in this.menus){if(this.menus[it].rt.active){this.menus[it].hideMenu();}}
if(this.menubar){this.menubar.hideMenu();}};NlsMnMgr.addAssocMenuMgr=function(frm,mgrId){this.assocMenuMgr[this.assocMenuMgr.length]=[frm,mgrId];};NlsMnMgr.getMenu=function(mId){return this.menus[mId];};NlsMnMgr.init=function(){if(this.menubar){this.menubar.init();}};NlsMnMgr.setMenusProperties=function(opts){var mn;for(var m in opts){mn=nlsGetMenu(m);if(mn){mn.setProperties(opts[m]);}}};function listAllWinElmt(){nlsWinElmt=[];var arrWinEl=document.getElementsByTagName("SELECT");var elm;var tmp;var x;var y;for(var i=0;i<arrWinEl.length;i++){elm=arrWinEl[i];tmp=elm;x=0;y=0;while(tmp!=null){x+=tmp.offsetLeft;y+=tmp.offsetTop;tmp=tmp.offsetParent;}
nlsWinElmt[nlsWinElmt.length]={e:elm,x1:x,y1:y,x2:x+elm.offsetWidth,y2:y+elm.offsetHeight};}}
function NlsMenuItem(id,capt,url,ico,enb,xtra,subId,title){this.id=id;this.intKey="";this.capt=capt;this.url=$aonvl(url,"");this.ico=(ico==null||ico==""||ico.length==0)?null:ico;this.enable=$aonvl(enb,true);this.xtra=xtra;this.stlprf="";this.target=null;this.title=title==null?"":title;this.itemEffect=null;this.visible="false";this.state=1;this.selected=false;this.subMenuId=$aonvl(subId,"");this.crsFrame=false;this.subFrame=null;this.subPos=[null,null];this.subPosAdj=[0,0];this.subDir=["right","down"];this.useItemEffect=function(effName){this.itemEffect=new NlsMenuItemEffect(this.intKey,effName);};this.rt={subUrl:null,loaded:0};return this;}
function NlsMenuSeparator(cstSeparator){this.stlprf="";this.intKey="";this.seprt=$aonevl(cstSeparator,"");this.render=function(){if(this.seprt!=""){return this.seprt;}
return("<table border=0 cellpadding=0 cellspacing=0 width='100%' height='0%'><tr>"+"<td class=\""+this.stlprf+"nlsseparator\"></td>"+"</tr></table>");};return this;}
function NlsCustomMenuItem(cst){this.intKey="";this.cstMenu=$aonvl(cst,"&nbsp;");return this;}
function NlsMenu(mId){var o={lsItm:null,mgrId:"",mgr:null,winElmt:null,container:null,customBorder:null,shadow:new NlsMenuShadow("none","5px",mId),count:0,effect:null,srItems:[],rt:{ready:true,active:false},mId:mId,stlprf:"",subMenuIc:null,target:"_self",icPath:"",itemSpc:"",stretchItem:true,selection:false,showIcon:false,showSubIcon:true,absWidth:"",orient:"V",defItmEff:null,defPos:[0,0],maxItemCol:100,zIndex:100,wnd:window,itemIco:null};this.setProperties(o);this.items={};nlsMenu[mId]=this;return this;}
function NlsMenubar(mId){var mnBar=new NlsMenu(mId);mnBar.isMenubar=true;mnBar.isMenuOpened=false;mnBar.firstClickOnly=true;mnBar.dropOnClick=false;mnBar.renderMenubar=function(){return mnBar.renderMenu();};mnBar.rt.active=true;return mnBar;}
NLSMENU=NlsMenu.prototype;NLSMENU.addItem=function(key,capt,url,ico,enb,xtra,subId,title){key=(key?key:this.count+1);var intKey=this.mId+"_"+key,it=new NlsMenuItem(key,capt,url,ico,enb,xtra,subId,title);this.add(intKey,it);if(this.defItmEff!=null&&typeof(NlsMenuItemEffect)!="undefined"){it.useItemEffect(this.defItmEff);}
return it;};NLSMENU.addSeparator=function(sepr){var intKey="sep_"+this.count;var it=new NlsMenuSeparator(sepr?sepr:null);it.stlprf=this.stlprf;this.add(intKey,it);return it;};NLSMENU.addSubmenu=function(key,subId,crsFrame,subFrame,subPos,subPosAdj,subDir){var it=this.getItemById(key);it.subMenuId=subId;it.subFrame=$aonvl(subFrame,null);it.crsFrame=$aonvl(crsFrame,false);it.subPos=$aonvl(subPos,[null,null]);it.subPosAdj=$aonvl(subPosAdj,[0,0]);it.subDir=$aonvl(subDir,["right","down"]);return it;};NLSMENU.addCustomMenu=function(custom){var intKey="cst_"+this.count;var it=new NlsCustomMenuItem(custom);this.add(intKey,it);return it;};NLSMENU.add=function(intKey,it){it.mId=this.mId;it.intKey=intKey;this.items[intKey]=it;this.srItems[this.srItems.length]=it;this.count++;};NLSMENU.getItemById=function(key){return this.items[this.mId+"_"+key];};NLSMENU.setItemStyle=function(key,stlprf){this.getItemById(key).stlprf=stlprf;};NLSMENU.setItemText=function(key,tx){var it=this.getItemById(key);it.capt=tx;var oD=NlsMenu.$GE(it.intKey+"x2");if(oD){oD.innerHTML=tx;}};NLSMENU.enableItem=function(key,b){var it=this.getItemById(key);it.enable=b;setMnStyle(NlsMenu.$GE(it.intKey),(b?(it.selected?"S":"N"):"D"),NlsMenu.getPrf(it,this));setMnIcon(this,it,"N");};NLSMENU.dropShadow=function(pos,offset){if(this.shadow){this.shadow.pos=pos;this.shadow.offset=(offset?offset:"5px");}else{this.shadow=new NlsMenuShadow(pos,offset,this.mId);}};NLSMENU.useEffect=function(efN){if(efN!=null&&efN!=""){this.effect=new NlsMenuEffect(this.mId,efN);}};NLSMENU.renderMenu=function(){var scPath="/images/",sbIc=null;var allScs=(document.getElementsByTagName?document.getElementsByTagName("SCRIPT"):document.scripts);for(var i=0;i<allScs.length;i++){if(allScs[i].src.toLowerCase().indexOf("nlsmenu.js")>=0){scPath=allScs[i].src.replace(/nlsmenu.js/gi,"");}}
if(!this.subMenuIc){sbIc=[scPath+"submenu.gif",scPath+"submenuovr.gif"];}else{sbIc=[this.icPath+this.subMenuIc[0]];if(this.subMenuIc[1]){sbIc[1]=this.icPath+this.subMenuIc[1];}}
var cs="<table cellpadding='0' cellspacing='0' ";var sAbs=(this.absWidth==""?"":"width='"+this.absWidth+"'");var usel="unselectable='on' style='-moz-user-select:none;user-select:none;'";var s=["<table cellpadding='0' cellspacing='"+$aonevl(this.itemSpc,"0")+"' width='100%'>"];var tmpCnt=0,prf,it,mn,ic,j=1,k=1,l,ts,isV=(this.orient=="V");for(var i=0;i<this.srItems.length;i++){it=this.srItems[i];mn=nlsMenu[it.subMenuId];if(!it.crsFrame){if(mn){mn.prIt=it.intKey;}
if(!mn&&it.rt&&!it.rt.subUrl){it.subMenuId="";}}
prf=NlsMenu.getPrf(it,this);if(it.constructor==NlsMenuSeparator){it.stlprf=prf;ts="<td class='"+prf+"nlsseparatorcontainer'>"+it.render()+"</td>";s[j++]=(isV?("<tr>"+ts+"</tr>"):ts);}else{if(it.constructor==NlsCustomMenuItem){ts="<td>"+it.cstMenu+"</td>";s[j++]=isV?("<tr>"+ts+"</tr>"):ts;}else{if(isV){s[j++]="<tr>";}else{if(tmpCnt==0){s[j++]="<tr>";}
tmpCnt++;}
l=[];k=0;l[k++]="<td align='center' id=\"@itId\" class=\""+prf+"nlsitemcontainer\" onmouseover=\"$nlsItemOver(event,'@mId','@itId')\" onclick=\"return nlsMenu['@mId'].$menuItemClick(event, '@itId');\" onmouseout=\"$nlsItemOut(event, '@mId')\">";l[k++]=cs+(this.stretchItem?"width='100%'":"")+" height='100%'><tr style=\"cursor:pointer;\" title=\""+it.title+"\">";if(this.showIcon){l[k++]="<td id=\"@itIdx1\" class=\""+prf+"nlsiconcell\" align=\"center\" nowrap "+usel+">";ic=$aonevl(it.ico,this.itemIco);if(ic){if(ic[0]){l[k++]="<img id=\"ic_@itId\" "+(it.enable?"":"style='display:none'")+" src=\""+this.icPath+ic[0]+"\">";}
if(ic[1]){l[k++]="<img id=\"icovr_@itId\" style='display:none' src=\""+this.icPath+ic[1]+"\">";}
if(ic[2]){l[k++]="<img id=\"icdis_@itId\" "+(!it.enable?"":"style='display:none'")+" src=\""+this.icPath+ic[2]+"\">";}}
l[k++]="</td>";}
l[k++]="<td align='left' id=\"@itIdx2\" class=\""+prf+(it.enable?"nlsitem\"":"nlsitemdisable\"")+" nowrap "+usel+">"+it.capt+"</td>";if(this.showSubIcon&&it.subMenuId!=""){l[k++]="<td id=\"@itIdx3\" class=\""+prf+"nlssubmenucell\" align=\"center\" nowrap>"+(it.subMenuId!=""?"<img id='subic_@itId' src=\""+sbIc[0]+"\">"+(sbIc.length>1?"<img id='subicovr_@itId' style='display:none' src=\""+sbIc[1]+"\">":""):"")+"</td>";}
l[k++]="</tr></table>";l[k++]="</td>";s[j++]=l.join("").replace(/@itId/g,it.intKey);if(isV){s[j++]="</tr>";}else{if(!isV&&tmpCnt==this.maxItemCol){s[j++]="</tr>";tmpCnt=0;}}}}}
if(!isV&&tmpCnt!=0){if(this.srItems.length>this.maxItemCol){while(++tmpCnt<=this.maxItemCol){s[j++]="<td class=\""+prf+"nlsitemcontainer\">&nbsp;</td>";}}
s[j++]="</tr>";}
s[j++]="</table>";l=[];l=[cs+"class='"+this.stlprf+"nlsmenu' "+sAbs+">"],j=1;l[j++]="<tr><td><div id='mcnt_@mId'>"+s.join("")+"</div></td></tr>";l[j++]="</table>";ts=l.join("");if(this.customBorder!=null){ts=this.customBorder.applyBorder(ts,this.stlprf);}
ts=this.shadow.dropShadow(ts);s=[];j=0;s[j++]="<div "+(nls_isIE&&!this.isMenubar?"style='position:absolute;z-index:"+(this.zIndex-1)+";'":"")+">"+ts;if(!this.isMenubar&&nls_isIE&&!nls_isIE5&&this.mgr.flowOverFormElement){s[j++]="<iframe id='@mIdifrm' scrolling='no' frameborder=0 width='1' height='1' style='position:absolute;top:0px;left:0px;z-index:-1;filter:alpha(opacity=0)' src='"+scPath+"blank.gif"+"'></iframe>";}
s[j++]="</div>";ts=s.join("");if(arguments[0]=="content"){}else{ts="<div id='@mId' style="+(this.isMenubar?"''":"'position:absolute;z-index:"+this.zIndex+";display:none;'")+" onmouseover=\"$nlsMenuOver('"+this.mgrId+"', '@mId')\" onmouseout=\"$nlsMenuOut('"+this.mgrId+"')\">"+ts+"</div>";}
return ts.replace(/@mId/g,this.mId);};NLSMENU.init=function(){var v=this.rt.vshade;if(!v){v=NlsMenu.$GE("vshade_"+this.mId);}
var itm=this.rt.actmn;if(!itm){itm=NlsMenu.$GE("actmn_"+this.mId);}
if(v){var o=itm.childNodes[0].offsetHeight-parseInt(this.shadow.offset);if(o>=0){v.style.height=o+"px";}}
this.rt.actmn=itm;this.rt.vshade=v;};function NlsMenuShadow(pos,offset,mId){this.pos=pos;this.offset=offset;this.mId=mId;this.dropShadow=function(smenu){var mn=nlsMenu[this.mId];var cs="<table cellpadding=0 cellspacing=0 ";var shadow="<div>"+cs+"id='effwin_"+this.mId+"' height='0px'>";var hshadow="<td style='padding-@@PAD:"+this.offset+";'>"+cs+"width='100%' height='5px' class='"+mn.stlprf+"horzshadow'><tr><td></td></tr></table></td>";var vshadow="<td style='padding-@@PAD:"+this.offset+";height:100%;'>"+cs+"id='vshade_"+this.mId+"' width='5px' height='100%' class='"+mn.stlprf+"vertshadow'><tr><td></td></tr></table></td>";var menutd="<td id='actmn_"+this.mId+"'>"+smenu+"</td>";var cornertd="<td class='"+mn.stlprf+"cornshadow' width='5px' height='5px'></td>";var av=[vshadow.replace(/@@PAD/gi,"top"),vshadow.replace(/@@PAD/gi,"bottom")];var ah=[hshadow.replace(/@@PAD/gi,"left"),hshadow.replace(/@@PAD/gi,"right")];switch(this.pos){case"none":shadow+="<tr>"+menutd+"</tr>";break;case"bottomright":shadow+="<tr>"+menutd+av[0]+"</tr><tr>"+ah[0]+cornertd+"</tr>";break;case"bottomleft":shadow+="<tr>"+av[0]+menutd+"</tr><tr>"+cornertd+ah[1]+"</tr>";break;case"topleft":shadow+="<tr>"+cornertd+ah[1]+"</tr><tr>"+av[1]+menutd+"</tr>";break;case"topright":shadow+="<tr>"+ah[0]+cornertd+"</tr><tr>"+menutd+av[1]+"</tr>";break;}
return shadow+"</table></div>";};}
function $mPos(p1,p2,c,m,adj,scr,dr,drIdx,drVal){var v=0;if(drVal=="left"||drVal=="up"){if(p2+m>c){if(p1>=m){v=p1-m+adj+scr;dr[drIdx]=drVal;}else{v=(c<m?m:c)-m-1+scr;}}else{v=p2+scr-adj;}}else{if(p1-m<0){if(p2+m<c){v=p2-adj+scr;dr[drIdx]=drVal;}else{v=scr;}}else{v=p1-m+adj+scr;}}
return v;}
NLSMENU.showMenu=function(x1,y1,x2,y2,orn,subDir,subAdj){this.mgr.clearTimeout();if(this.menuOnShow(this.mId)==false){return;}
var ctx=NlsMenu.$GE(this.mId);if(!ctx){var dv=document.createElement("div");dv.innerHTML=this.renderMenu();document.body.insertBefore(dv,document.body.childNodes[0]);ctx=NlsMenu.$GE(this.mId);}
ctx.style.visibility="hidden";ctx.style.display="";if(nls_isIE){this.init();}
var w=window,d=document.body,de=document.documentElement;var scrOffX=w.scrollX||d.scrollLeft||de.scrollLeft;var scrOffY=w.scrollY||d.scrollTop||de.scrollTop;var cW=w.innerWidth||d.clientWidth,cH=w.innerHeight||d.clientHeight;var mW=ctx.childNodes[0].offsetWidth,mH=ctx.childNodes[0].offsetHeight;var sDir=(subDir?[subDir[0],subDir[1]]:["right","down"]);var adjX=(subAdj?subAdj[0]:this.defPos[0]),adjY=(subAdj?subAdj[1]:this.defPos[1]);var dmfrm=NlsMenu.$GE(this.mId+"ifrm");if(dmfrm){var actMn=NlsMenu.$GE("actmn_"+this.mId).children[0];dmfrm.width=actMn.offsetWidth;dmfrm.height=actMn.offsetHeight;}
var mX=0,mY=0;if(orn=="V"){mX=$mPos(x1,x2,cW,mW,adjX,scrOffX,sDir,0,(sDir[0]=="right"?"left":"right"));mY=$mPos(y2,y1,cH,mH,-adjY,scrOffY,sDir,1,(sDir[1]=="down"?"up":"down"));}else{mX=$mPos(x2,x1,cW,mW,-adjX,scrOffX,sDir,0,(sDir[0]=="right"?"left":"right"));mY=$mPos(y1,y2,cH,mH,adjY,scrOffY,sDir,1,(sDir[1]=="down"?"up":"down"));}
if(nls_isIE5||!this.mgr.flowOverFormElement){if(this.winElmt==null){hideWinElmt(this,{x1:mX,y1:mY,x2:mX+mW,y2:mY+mH});}
if(this.winElmt==null){this.winElmt=[];}
for(var i=0;i<this.winElmt.length;i++){this.winElmt[i].style.visibility="hidden";}}
with(ctx.style){left=mX+"px";top=mY+"px";zIndex=this.zIndex;if(this.effect){with(this.effect){prop["dir"]=sDir[(orn=="V"?0:1)];start(false);visibility="visible";run();}}else{visibility="visible";}}
this.rt.active=true;};function $fInts(o,p){return((o.x1>=p.x1&&o.x1<=p.x2)||(o.x2>=p.x1&&o.x2<=p.x2)||(o.x1<p.x1&&o.x2>p.x2))&&((o.y1>=p.y1&&o.y1<=p.y2)||(o.y2>=p.y1&&o.y2<=p.y2)||(o.y1<p.y1&&o.y2>p.y2));}
function hideWinElmt(mn,p){var o;for(var i=0;i<nlsWinElmt.length;i++){o=nlsWinElmt[i];if($fInts(o,p)||$fInts(p,o)){if(o.e.style.visibility!="hidden"){o.e.style.visibility="hidden";if(mn.winElmt==null){mn.winElmt=[];}
mn.winElmt[mn.winElmt.length]=o.e;}}}}
NLSMENU.showMenuAbs=function(x,y){var ctx=NlsMenu.$GE(this.mId);ctx.style.top=y+"px";ctx.style.left=x+"px";ctx.style.display="";this.rt.active=true;};NLSMENU.hideMenu=function(){var ctx=NlsMenu.$GE(this.mId);if(!ctx){return;}
if(!this.isMenubar){this.rt.active=false;if(this.effect){this.effect.start(true);if((nls_isIE&&this.effect.effName!="aoslide")||nls_isOpera&&this.effect.effName!="aoslide"){ctx.style.visibility="hidden";}else{this.effect.onHide=function(){ctx.style.visibility="hidden";};}
this.effect.run();}else{ctx.style.visibility="hidden";}
this.menuOnHide(this.mId);}else{this.isMenuOpened=false;}
if(this.lsItm!=null){var it=this.items[this.lsItm.id];if(it.state!=2&&!it.selected){setMnStyle(this.lsItm,(it.enable?"N":"D"),NlsMenu.getPrf(it,this));setMnIcon(this,it,"N");}
this.lsItm=null;}
if(this.winElmt!=null&&this.winElmt.length>0){for(i=0;i<this.winElmt.length;i++){this.winElmt[i].style.visibility="visible";}}
$wrtStatus("");};NLSMENU.hasSubmenu=function(key){var it=this.getItemById(key),w=(it.crsFrame?it.subFrame:window);return w.nlsGetMenu(it.subMenuId);};function $itemClick(mn,it){var mgr=nlsMenuMgr[mn.mgrId];mgr.hideMenus();$crsFrameDo(mgr,function(f,mg){f.hideAllNlsMenu();});var trgt=it.target;if(trgt==null){trgt=$aonvl(mn.target,"_self");}
if(it.url!=""){open(it.url,trgt);}else{return mn.menuOnClick(mn.mId,it.id);}}
NLSMENU.$menuItemClick=function(e,itemId){var it=this.items[itemId];if(!it.enable){return;}
var prf=NlsMenu.getPrf(it,this),oIt=NlsMenu.$GE(itemId),mgr=this.mgr;if(this.isMenubar&&this.dropOnClick&&(this.hasSubmenu(it.id)||it.rt.subUrl)){if(!this.isMenuOpened){NlsMenu.showMenu(this,it);if(this.firstClickOnly){this.isMenuOpened=true;}}else{mgr.hideMenus();setMnStyle(oIt,(it.enable?"O":"D"),prf);setMnIcon(this,it,"O");this.isMenuOpened=false;return null;}}else{if(it.toggle){this.setItemState(itemId,(it.state==1?2:1));}else{if(this.selection){this.setSelection(itemId,true);}else{if(mgr.memorizeSel){mgr.selectPath(this.mId,it.id);mgr.savePath(itemId);}}}
return $itemClick(this,it);}};NLSMENU.menuOnClick=function(menuId,itemId){return true;};NLSMENU.menuOnShow=function(menuId){return true;};NLSMENU.menuOnHide=function(menuId){return true;};NLSMENU.reload=function(dh){var ef=this.effect;if(ef){ef.elm=null;ef.prop["init"]=false;}
this.lsItm=null;if(dh!=true){this.mgr.hideMenus();}
var m=NlsMenu.$GE(this.mId);m.innerHTML=this.renderMenu("content");};NLSMENU.setProperties=function(obj){for(var p in obj){if(p=="items"){for(var it in obj[p]){this.setItemProperties(it,obj[p][it]);}}else{this[p]=obj[p];}}};NLSMENU.setItemProperties=function(id,obj){var it=this.getItemById(id);for(var p in obj){it[p]=obj[p];}};function setMnIcon(mn,mnItm,f){var tf=(mnItm.enable?f:"D"),ico=$aonevl(mnItm.ico,mn.itemIco);if(mn.showIcon&&ico&&ico.length>1){var k=mnItm.intKey;var c=NlsMenu.$GE("ic_"+k),o=NlsMenu.$GE("icovr_"+k),d=NlsMenu.$GE("icdis_"+k);c.style.display=(tf=="N"||(tf=="D"&&!d)?"":"none");o.style.display=(tf=="O"?"":"none");if(d){d.style.display=(tf=="D"?"":"none");}}
if(mn.showSubIcon&&mnItm.subMenuId!=""){var ic=NlsMenu.$GE("subicovr_"+mnItm.intKey);if(ic){ic.style.display=(tf=="O"?"":"none");ic=NlsMenu.$GE("subic_"+mnItm.intKey);if(ic){ic.style.display=(tf=="N"||tf=="D"?"":"none");}}}}
function setMnStyle(it,s,prefix){var suff=(s=="O"?"over":(s=="S"?"sel":"")),cn;it.className=prefix+"nlsitemcontainer"+suff;var r=it.childNodes[0].rows[0],rc=null;for(var i=0;i<r.cells.length;i++){rc=r.cells[i];if(rc.id==it.id+"x1"){cn=prefix+"nlsiconcell"+suff;}
if(rc.id==it.id+"x2"){cn=prefix+"nlsitem"+(s=="D"?"disable":suff);}
if(rc.id==it.id+"x3"){cn=prefix+"nlssubmenucell"+suff;}
rc.className=cn;}}
function nls_getXY(oIt){var p={};p.x=0;p.y=0;p.x2=0;p.y2=0;var tmp=oIt;var d=document;while(tmp){p.x+=tmp.offsetLeft;p.y+=tmp.offsetTop;tmp=tmp.offsetParent;}
p.x-=(window.scrollX||d.body.scrollLeft||d.documentElement.scrollLeft);p.y-=(window.scrollY||d.body.scrollTop||d.documentElement.scrollTop);if(oIt){p.x2=p.x+oIt.offsetWidth;p.y2=p.y+oIt.offsetHeight;}
return p;}
NlsMenu.showMenu=function(mn,it){if(it.rt.subUrl&&it.rt.loaded==0){NlsMenuUtil.loadAJAXMenu(mn,it);}else{NlsMenu.$showMenu(mn,it);}};NlsMenu.$showMenu=function(prMenu,it){var oIt=NlsMenu.$GE(it.intKey);if(it.subMenuId!=""&&it.enable==true){var p=nls_getXY(oIt),smn;if(it.crsFrame){var ps=it.subPos;if(ps[0]=="REL"){}else{p.x=ps[0];p.x2=p.x;}
if(ps[1]=="REL"){}else{p.y=ps[1];p.y2=p.y;}
if(!it.subFrame.nlsGetMenu){return;}
smn=it.subFrame.nlsGetMenu(it.subMenuId);if(!smn){return;}}else{smn=nlsGetMenu(it.subMenuId);if(!smn){return;}
if(smn.zIndex<=prMenu.zIndex){smn.zIndex=prMenu.zIndex+1;}
var ma=prMenu.rt.ma;if(ma){p.y-=ma.scrollTop;p.y2-=ma.scrollTop;}}
smn.showMenu(p.x,p.y,p.x2,p.y2,prMenu.orient,it.subDir,it.subPosAdj);}};NlsMenu.getPrf=function(it,mn){return $aonevl(it.stlprf,mn.stlprf);};function nls_showMenu(mId,oIt,orient,subDir,subPosAdj){var mn=nlsGetMenu(mId),p;if(!mn){hideAllNlsMenu();return;}
mn.mgr.clearTimeout();if(mn.rt.active){return;}
p=nls_getXY(oIt);mn.mgr.hideMenus();mn.showMenu(p.x,p.y,p.x2,p.y2,orient,subDir,subPosAdj);}
function nls_hideMenu(mId){var m=nlsGetMenu(mId);if(m){$nlsMenuOut(m.mgrId);}}
function $nlsMenuOver(mgrId,mId){var mgr=nlsMenuMgr[mgrId],mn=mgr.getMenu(mId);mgr.clearTimeout();if(mgr.rt.cmId!=mId){clearTimeout(mgr.rt.ctm);mgr.rt.ctm=null;}
$crsFrameDo(mgr,function(f,mg){f.clearTimeout(mg.rt.ctm);mg.rt.ctm=null;});if(mgr.rt.cmId!=mId){$$nlsItemOver1(null,mId+"_dmy");}}
function $nlsMenuOut(mgrId){var mgr=nlsMenuMgr[mgrId];if(mgr.design==true){return;}
mgr.clearTimeout();mgr.setTimeout(function(){mgr.hideMenus();},mgr.timeout);$crsFrameDo(mgr,function(f,mg){mg.clearTimeout();mg.setTimeout(function(){mg.hideMenus();},mg.timeout);});}
function $nlsItemOver(e,mId,itId){$$nlsItemOver1(e,itId);$$nlsItemOver2(mId,itId);e.cancelBubble=true;}
function $nlsItemOut(e,mId){var mn=nlsMenu[mId],mgr=mn.mgr;mgr.rt.cmId=mId;mgr.rt.ctm=setTimeout(function(){$$nlsItemOver1(e,mId+"_$dmy");},300);}
function $$nlsItemOver1(e,itId){var m=itId.split("_"),mn=nlsMenu[m[0]],mgr=mn.mgr;if(mgr.rt.cmId){clearTimeout(mgr.rt.ctm);mgr.rt.ctm=null;}
$crsFrameDo(mgr,function(f,mg){f.clearTimeout(mg.rt.ctm);mg.rt.ctm=null;});if(mn.mgr.design==true){return;}
if(!mn.rt.active||!mn.rt.ready){return;}
var it=null,st="",nli=null,li=mn.lsItm;if(li!=null){it=mn.items[li.id];if(!it){return;}
if(it.intKey==itId){return;}
if(it.state!=2&&!it.selected){var st=NlsMenu.getPrf(it,mn);var ef=(it.itemEffect!=null);if(ef){it.itemEffect.init();}
setMnStyle(li,(it.enable?"N":"D"),st);setMnIcon(mn,it,"N");if(ef){it.itemEffect.start();}}
var w=it.crsFrame?it.subFrame:window,tmp=null;if(w.nlsGetMenu){tmp=w.nlsGetMenu(it.subMenuId);}
while(tmp!=null){nli=null;if(tmp.lsItm){it=tmp.items[tmp.lsItm.id];w=it.crsFrame?it.subFrame:tmp.wnd;nli=w.nlsGetMenu(it.subMenuId);}
tmp.hideMenu();tmp=nli;}}
mn.lsItm=null;var oIt=NlsMenu.$GE(itId);it=mn.items[itId];if(!it){return;}
$wrtStatus(it.url);if(it.state!=2&&!it.selected){if(it.itemEffect!=null){it.itemEffect.init();}
setMnStyle(oIt,(it.enable?"O":"D"),NlsMenu.getPrf(it,mn));setMnIcon(mn,it,"O");if(it.itemEffect!=null){it.itemEffect.start();}}
if(!mn.isMenubar||(mn.isMenubar&&!mn.dropOnClick)||(mn.isMenubar&&mn.dropOnClick&&mn.isMenuOpened)){NlsMenu.showMenu(mn,it);}
mn.lsItm=oIt;}
function $$nlsItemOver2(mId,itId){var mn=nlsMenu[mId],mgr=mn.mgr;if(mgr.design==true){return;}
mgr.clearTimeout();$crsFrameDo(mgr,function(f,mg){mg.clearTimeout();});for(var it in nlsMenuMgr){if(it!=mgr.mgrId){nlsMenuMgr[it].hideMenus();}}}
function $crsFrameDo(mgr,f){var a=mgr.assocMenuMgr,frm;if(a&&a.length>0){for(var i=0;i<a.length;i++){frm=a[i];if(!frm[0].nlsMenuMgr){continue;}
f(frm[0],frm[0].nlsMenuMgr[frm[1]]);}}}
function nlsGetMenu(mId){return nlsMenu[mId];}
function hideAllNlsMenu(){for(it in nlsMenu){if(nlsMenu[it].rt.active){nlsMenu[it].hideMenu();}}}
function $wrtStatus(s){if(typeof(window.status)!="undefined"){window.status=s;}}
function $aonvl(v,c){if(v){return v;}else{return c;}}
function $aonevl(v,c){if(!v||v==""){return c;}else{return v;}}
NlsMenu.$GE=function(id){if(document.all){return document.all(id);}else{if(document.getElementById){return document.getElementById(id);}}};nlsEffectList={barn:"progid:DXImageTransform.Microsoft.Barn(Duration=0.3,motion=out,orientation=vertical);",blinds:"progid:DXImageTransform.Microsoft.Blinds(Duration=0.3,Bands=8,direction=right);",checkerboard:"progid:DXImageTransform.Microsoft.Checkerboard(Duration=0.3,Direction=right,SquaresX=20,SquaresY=20);",fade:"progid:DXImageTransform.Microsoft.Fade(Duration=0.3,Overlap=1.00);",inset:"progid:DXImageTransform.Microsoft.Inset(Duration=0.3);",iris:"progid:DXImageTransform.Microsoft.Iris(Duration=0.3,irisstyle=CIRCLE,motion=in);",pixelate:"progid:DXImageTransform.Microsoft.Pixelate(Duration=0.3,MaxSquare=10);",radialwipe:"progid:DXImageTransform.Microsoft.RadialWipe(Duration=0.3,wipestyle=WEDGE)",randombars:"progid:DXImageTransform.Microsoft.RandomBars(Duration=0.3,Orientation=horizontal);",randomdissolve:"progid:DXImageTransform.Microsoft.RandomDissolve(duration=0.3);",slide:"progid:DXImageTransform.Microsoft.Slide(Duration=0.3,slidestyle=HIDE,Bands=5);",spiral:"progid:DXImageTransform.Microsoft.Spiral(Duration=0.3,GridSizeX=64,GridSizeY=64);",stretch:"progid:DXImageTransform.Microsoft.Stretch(Duration=0.3,stretchstyle=HIDE);",strips:"progid:DXImageTransform.Microsoft.Strips(Duration=0.3,motion=rightdown);",wheel:"progid:DXImageTransform.Microsoft.Wheel(Duration=0.3,spokes=10);",gradienwipe:"progid:DXImageTransform.Microsoft.GradientWipe(Duration=0.3,GradientSize=0.75,wipestyle=0,motion=forward);",zigzag:"progid:DXImageTransform.Microsoft.Zigzag(Duration=0.3,GridSizeX=8,GridSizeY=8);",itemfade:"progid:DXImageTransform.Microsoft.Fade(Duration=0.2,Overlap=0.75);",itemdissolve:"progid:DXImageTransform.Microsoft.RandomDissolve(duration=0.3);",aoslide:"Duration:2"};function NlsMenuEffect(mId,effName){this.mId=mId;this.elm=null;this.effName=effName;this.isOut=false;this.prop=new Object();this.onShow=function(){};this.onHide=function(){};this.start=_defStart;this.run=_defRun;if(effName=="aoslide"){this.start=_slideStart;this.run=_slideRun}return this};_fadeTm=null;_fadesEff=new Object();function _defStart(isOut){var mn=NlsMenu.$GE(this.mId);mn.childNodes[0].style.position="";nlsMenu[this.mId].rt.ready=true;this.elm=NlsMenu.$GE("effwin_"+this.mId);if(nls_isIE){this.elm.style.filter=nlsEffectList[this.effName];if(this.elm.filters.length>0)this.elm.filters[0].apply();}else{this.elm=this.elm.parentNode;this.isOut=(isOut==true);if(!this.prop["init"]){this.elm.style.MozOpacity=(isOut?1:0);this.elm.style.opacity=(isOut?1:0);}this.prop["init"]=true;this.prop["dur"]=15;this.prop["rng"]=100;this.prop["spd"]=10}};function _defRun(){if(nls_isIE){if(this.elm.filters.length>0)this.elm.filters[0].play();}else{var me=this;if(this.elm.style.MozOpacity)this.prop["opa"]="MozOpacity";else this.prop["opa"]="opacity";var p=new Object();p.x1=this.elm.style[this.prop["opa"]]*this.prop["rng"];if(this.isOut){p.x2=0}else{p.x2=this.prop["rng"]-1}_fc_fade(p);this.prop["pt"]=p;this.prop["sd"]=0;_fadesEff[this.mId]=this;if(!_fadeTm)_fadeTm=setInterval(function(){_fadeAnimate();},this.prop["spd"]);}};function _fadeAnimate(){var b=true;for(var it in _fadesEff){var eff=_fadesEff[it];var p=eff.prop["pt"];if(eff.prop["sd"]<eff.prop["dur"]){eff.prop["sd"]++;eff.elm.style[eff.prop["opa"]]=effect_bezier(eff.prop["sd"]/eff.prop["dur"],p.x1,p.x2,p.c1,p.c2)/eff.prop["rng"]}else{eff.elm.style[eff.prop["opa"]]=p.x2/eff.prop["rng"];if(eff.isOut){eff.onHide();eff.elm.style[eff.prop["opa"]]=0}else{eff.onShow();}delete _fadesEff[eff.mId]}b=false}if(b){clearInterval(_fadeTm);_fadeTm=null}};_slideTm=null;_slidesEff=new Object();function _slideStart(isOut){var mn=NlsMenu.$GE(this.mId);this.elm=mn.childNodes[0];if(!isOut&&this.prop["init"]!=true){this.elm.style.position="";var w=this.elm.offsetWidth;var h=this.elm.offsetHeight;with(mn.style){overflow="hidden";width=w+"px";height=h+"px"};with(this.elm.style){position=nls_isIE?"absolute":"relative";switch(this.prop["dir"]){case"right":top="0px";left=-w+"px";this.prop["st"]="left";break;case"left":top="0px";left=w+"px";this.prop["st"]="left";break;case"down":top=-h+"px";left="0px";this.prop["st"]="top";break;case"up":top=h+"px";left="0px";this.prop["st"]="top";break}};this.prop["mw"]=w;this.prop["mh"]=h;if(!nls_isIE)this.prop["init"]=true}this.prop["dur"]=parseFloat(nlsEffectList[this.effName].split(":")[1])*10;this.prop["spd"]=15;this.isOut=(isOut==true);nlsMenu[this.mId].rt.ready=false};function _slideRun(){var me=this;var p=new Object();var l=parseInt(this.elm.style.left);var t=parseInt(this.elm.style.top);var c=this.isOut?1:0;switch(this.prop["dir"]){case"right":p.x1=l;p.x2=-this.prop["mw"]*c;break;case"left":p.x1=l;p.x2=this.prop["mw"]*c;break;case"down":p.x1=t;p.x2=-this.prop["mh"]*c;break;case"up":p.x1=t;p.x2=this.prop["mh"]*c;break};_fc_slide(p);this.prop["pt"]=p;this.prop["sd"]=0;_slidesEff[this.mId]=this;if(!_slideTm)_slideTm=setInterval(function(){_slideAnimate();},this.prop["spd"]);};function _slideAnimate(){var b=true;for(var it in _slidesEff){var eff=_slidesEff[it];var p=eff.prop["pt"];if(eff.prop["sd"]<eff.prop["dur"]){eff.elm.style[eff.prop["st"]]=effect_bezier(eff.prop["sd"]/eff.prop["dur"],p.x1,p.x2,p.c1,p.c2)+"px";eff.prop["sd"]++}else{eff.elm.style[eff.prop["st"]]=p.x2+"px";if(eff.isOut){eff.onHide();}else{nlsMenu[eff.mId].rt.ready=true;eff.onShow();}delete _slidesEff[eff.mId]}b=false}if(b){clearInterval(_slideTm);_slideTm=null}};function _fc_fade(p){p.c1=p.x1+(p.x2-p.x1)*2/3;p.c2=p.x2};function _fc_slide(p){p.c1=p.x1+(p.x2-p.x1)*2/3;p.c2=p.x2};function _f1(t){return(1-t);};function _f2(t){return(1-t)*(1-t);};function _f3(t){return(1-t)*(1-t)*(1-t);};function _f4(t){return t*t*t};function effect_bezier(t,x1,x2,c1,c2){return _f3(t)*x1+3*t*_f2(t)*c1+3*t*t*_f1(t)*c2+_f4(t)*x2};function NlsMenuItemEffect(itemId,effName){this.tmId=null;this.itemId=itemId;this.elm=null;this.effName=effName};NlsMenuItemEffect.prototype.init=function(){if(!nls_isIE)return;if(this.elm==null)this.elm=NlsMenu.$GE(this.itemId);if(nlsEffectList[this.effName])this.elm.style.filter=nlsEffectList[this.effName];if(this.elm.filters.length>0)this.elm.filters[0].apply();};NlsMenuItemEffect.prototype.start=function(){if(!nls_isIE)return;if(this.elm.filters.length>0)this.elm.filters[0].play();};NLSMENU.applyBorder=function(bTop,bBottom,bLeft,bRight){if(!bTop&&!bBottom&&!bLeft&&!bRight){this.customBorder=null}else{this.customBorder=new NlsMenuBorder(bTop,bBottom,bLeft,bRight);}};function NlsMenuBorder(bTop,bBottom,bLeft,bRight){var border="<table cellpadding=0 cellspacing=0>";var sTop="",sBottom="",sLeft="",sRight="";if(bTop)sTop="<td><table width='100%' cellpadding=0 cellspacing=0><tr><td class='@stlprf_mtop'></td></tr></table></td>";if(bBottom)sBottom="<td><table width='100%' cellpadding=0 cellspacing=0><tr><td class='@stlprf_mbottom'></td></tr></table></td>";if(bLeft){sLeft="<td height='100%' class='@stlprf_mleft' style='font-size:1pt;'>&nbsp;</td>";if(bTop)sTop="<td class='@stlprf_mtopleft'></td>"+sTop;if(bBottom)sBottom="<td class='@stlprf_mbottomleft'></td>"+sBottom}if(bRight){sRight="<td height='100%' class='@stlprf_mright' style='font-size:1pt;'>&nbsp;</td>";if(bTop)sTop+="<td class='@stlprf_mtopright'></td>";if(bBottom)sBottom+="<td class='@stlprf_mbottomright'></td>"}if(sTop!="")sTop="<tr>"+sTop+"</tr>";if(sBottom!="")sBottom="<tr>"+sBottom+"</tr>";border+=sTop+"<tr height='100%'>"+sLeft+"<td>@menu</td>"+sRight+"</tr>"+sBottom;border+="</table>";this.applyBorder=function(smenu,stlprf){var b=border.replace(/@stlprf_/gi,stlprf);return b.replace(/@menu/gi,smenu);};return this};var $nls_ieXML=["MSXML2.DOMDocument.5.0","MSXML2.DOMDocument.4.0","MSXML2.DOMDocument.3.0","MSXML2.DOMDocument","Microsoft.XmlDom"];function NlsMenuUtil(){}
NLSMNUTIL=NlsMenuUtil.prototype;NlsMenuUtil.createFromXML=function(xml){var rt=xml.documentElement;var mgr=new NlsMenuManager(rt.getAttribute("id"));mgr.flowOverFormElement=$aonevl(rt.getAttribute("flowoverformelement"),false);mgr.defaultEffect=$aonevl(rt.getAttribute("defaulteffect"),null);mgr.icPath=$aonvl(rt.getAttribute("icpath"),"");mgr.memorizeSel=$aonevl(rt.getAttribute("memorizesel"),false);mgr.assocMenuMgr=$aonevl(eval(rt.getAttribute("assocmenumgr")),[]);var dm=rt.getElementsByTagName("menubar")[0];if(dm){NlsMenuUtil.createMenu(dm,mgr);}
var mns=rt.getElementsByTagName("menus")[0];if(mns){for(var i=0;i<mns.childNodes.length;i++){dm=mns.childNodes[i];if(dm.nodeType!=1){continue;}
if(dm.nodeName=="menu"){NlsMenuUtil.createMenu(dm,mgr);}}}
return mgr;};NlsMenuUtil.createMenu=function(dm,mgr,pc){var id=dm.getAttribute("id"),mn=nlsMenu[id];if(mn){if(pc!==true){mn.items=new Object();mn.srItems=[];mn.useEffect(mgr.defaultEffect);}}else{mn=(dm.nodeName=="menubar"?mgr.createMenubar(id):mgr.createMenu(id));}
var a=dm.attributes,n,v;for(var i=0;i<a.length;i++){n=a[i].nodeName;v=a[i].nodeValue;switch(n){case"orient":mn.orient=v;break;case"showicon":mn.showIcon=(v=="true");break;case"showsubicon":mn.showSubIcon=(v=="true");break;case"target":mn.target=v;break;case"stlprf":mn.stlprf=v;break;case"submenuic":if(v&&v!=""){mn.subMenuIc=eval(v);}
break;case"icpath":mn.icPath=v;case"itemspc":mn.itemSpc=v;case"droponclick":if(mn.isMenubar){mn.dropOnClick=(v=="true");}
case"firstclickonly":if(mn.isMenubar){mn.firstClickOnly=(v=="true");}}}
var its=dm.getElementsByTagName("items")[0].childNodes,ic="",itm;for(var i=0;i<its.length;i++){a=its[i];if(a.nodeType!=1){continue;}
if(a.nodeName=="separator"){mn.addSeparator();continue;}
ic=a.getAttribute("ico");itm=mn.addItem(a.getAttribute("id"),(a.childNodes[0]?a.childNodes[0].nodeValue:""),$aonvl(a.getAttribute("url"),null),(!ic||ic==""?null:eval(ic)),(!a.getAttribute("enb")?null:a.getAttribute("enb")=="true"),null,$aonvl(a.getAttribute("title"),null));itm.stlprf=$aonvl(a.getAttribute("stlprf"),"");itm.target=a.getAttribute("target");if(itm.target==""){itm.target=null;}
if(a.getAttribute("subid")){mn.addSubmenu(a.getAttribute("id"),a.getAttribute("subid"),(!a.getAttribute("crsframe")?null:a.getAttribute("crsframe")=="true"),(!a.getAttribute("subframe")?null:eval(a.getAttribute("subframe"))),(!a.getAttribute("subpos")?null:eval(a.getAttribute("subpos"))),(!a.getAttribute("subposadj")?null:eval(a.getAttribute("subposadj"))),(!a.getAttribute("subdir")?null:eval(a.getAttribute("subdir"))));if(a.getAttribute("suburl")){mn.setSubmenuUrl(a.getAttribute("id"),a.getAttribute("suburl"));}}}
return mn;};NlsMenuUtil.createFromXMLString=function(sXml){var xml=NlsMenuUtil.createXMLDom(sXml);return NlsMenuUtil.createFromXML(xml);};NlsMenuUtil.createFromXMLFile=function(fName){var xmlDom=NlsMenuUtil.$createDoc();xmlDom.async=false;xmlDom.load(fName);return NlsMenuUtil.createFromXML(xmlDom);};NlsMenuUtil.loadFromXMLFile=function(context,taal,mCnt){var req=NlsMenuUtil.createXMLRequest();req.open("GET",context+"/servlet/topmenu"+'?taal='+taal,true);req.onreadystatechange=function(){if(req.readyState==4){var mgr=NlsMenuUtil.createFromXMLString(req.responseText);if(mgr.menubar){mgr.renderMenubar(mCnt);}}};req.send(null);};NlsMenuUtil.newLoadFromXMLFile=function(context,taal,mCnt){var req=NlsMenuUtil.createXMLRequest();req.open("GET",context+"/servlet/newTopmenu"+'?type=nlstree&taal='+taal,true);req.onreadystatechange=function(){if(req.readyState==4){var mgr=NlsMenuUtil.createFromXMLString(req.responseText);if(mgr.menubar){mgr.renderMenubar(mCnt);}}};req.send(null);};NlsMenuUtil.createXMLDom=function(sXml){var xmlDom=null;if(typeof DOMParser!="undefined"){var parser=new DOMParser();xmlDom=parser.parseFromString(sXml,"text/xml");}else{xmlDom=NlsMenuUtil.$createDoc();xmlDom.loadXML(sXml);}
return xmlDom;};NlsMenuUtil.$createDoc=function(){var xmlDom=null;if(nls_isIE){for(var i=0;i<$nls_ieXML.length;i++){try{xmlDom=new ActiveXObject($nls_ieXML[i]);break;}
catch(e){}}}else{xmlDom=document.implementation.createDocument("","",null);}
return xmlDom;};NlsMenuUtil.createXMLRequest=function(){if(typeof XMLHttpRequest!="undefined"){var httpReq=new XMLHttpRequest();return httpReq;}else{var arrObj=["MSXML2.XMLHttp.5.0","MSXML2.XMLHttp.4.0","MSXML2.XMLHttp.3.0","MSXML2.XMLHttp","Microsoft.XMHttp"];var oXml=null;for(var i=0;i<arrObj.length;i++){try{oXml=new ActiveXObject(arrObj[i]);return oXml;}
catch(e){}}}};NlsMnMgr.loadingText="Loading menu, please wait...";NLSMENU.addAJAXSubmenu=function(key,subId,url,crsFrame,subFrame,subPos,subPosAdj,subDir){var it=this.addSubmenu(key,subId,crsFrame,subFrame,subPos,subPosAdj,subDir);this.setSubmenuUrl(key,url);};NLSMENU.setSubmenuUrl=function(key,url){var it=this.getItemById(key);it.rt.subUrl=url;it.rt.loaded=0;};NlsMenuUtil.$createMenuDom=function(s){var dv=document.createElement("div");dv.innerHTML=s;document.body.insertBefore(dv,document.body.childNodes[0]);};NlsMenuUtil.loadAJAXMenu=function(mn,it){var mgr=mn.mgr,fr=window;if(it.crsFrame){var ass=mgr.assocMenuMgr;for(var i=0;i<ass.length;i++){if(it.subFrame==ass[i][0]){mgr=ass[i][0].nlsMenuMgr[ass[i][1]];break;}}
fr=it.subFrame;}
var req=NlsMenuUtil.createXMLRequest();req.open("get",it.rt.subUrl,true);req.onreadystatechange=function(){if(req.readyState==4){if(req.status==200||req.status==304){var de=req.responseXML.documentElement;if(!de||de.childNodes.length==0){}else{de=de.childNodes;var sub=null,main=null;subs=new Object(),smenu="";for(var i=0;i<de.length;i++){if(de[i].nodeType!=1){continue;}
sub=fr.NlsMenuUtil.createMenu(de[i],mgr);if(sub.mId==it.subMenuId){main=sub;}else{subs[sub.mId]=sub;}}
for(var x in subs){smenu+=subs[x].renderMenu();}
if(smenu){fr.NlsMenuUtil.$createMenuDom(smenu);}
if(main){main.prIt=it.intKey;main.reload(true);if(main.rt.active){NlsMenu.$showMenu(mn,it);}
it.rt.loaded=2;}}}}};var smn=mgr.createMenu(it.subMenuId);smn.effect=null;smn.addItem("ajaxload",mgr.loadingText);fr.NlsMenuUtil.$createMenuDom(smn.renderMenu());NlsMenu.$showMenu(mn,it);it.rt.loaded=1;req.send(null);};var nlsTree=new Object();var nlsTreeIc=new Object();var _ua=window.navigator.userAgent;var nls_isIE=(_ua.indexOf("MSIE")>=0);var nls_isSafari=(_ua.indexOf("Safari")>=0);var nls_isOpera=(_ua.indexOf("Opera")>=0);if(nls_isOpera)nls_isIE=false;var NLSTREE=NlsTree.prototype;function NlsTree(tId,context){this.tId=tId;this.opt=new StdOpt();this.nLst={};this.ctxMenu=null;this.rt=null;this.selNd=null;this.defImgPath=context+"/images/";this.chUrl=null;this.selElm=null;this.tmId=null;this.nCnt=0;this._fl=true;this.msNds={};this.rtm={};nlsTree[this.tId]=this;this.useIconSet(new StdIco(this.defImgPath));this.renderer=new DefRenderer(tId);return this;};function NlsTreeUtil(){};function StdIco(path){this.pnb=path+"plusnl.gif";this.pb=path+"plusnl.gif";this.pnl=path+"spacer.gif";this.mnb=path+"minusnl.gif";this.mb=path+"minusnl.gif";this.mnl=path+"minusnl.gif";this.opf=path+"spacer.gif";this.clf=path+"spacer.gif";this.chd=path+"leaf.gif";this.rot=path+"spacer.gif";this.lnb=path+"spacer.gif";this.lb=path+"spacer.gif";this.lin=path+"blank.gif";this.bln=path+"blank.gif";this.lod=path+"blank.gif";this.toString=function(){return"Standard Icons"};return this;};function StdOpt(){this.enbScroll=false;this.height="300px";this.width="200px";this.trg="_self";this.stlprf="";this.sort="no";this.icon=true;this.check=false;this.editable=false;this.selRow=false;this.editKey=113;this.oneExp=false;this.enableCtx=true;this.oneClick=true;this.mntState=false;this.icAsSel=false;this.checkIncSub=true;this.checkParents=false;this.indent=true;this.hideRoot=true;this.showExpdr=true;this.checkOnLeaf=false;this.renderOnDemand=false;this.evDblClick=false;this.evCtxMenu=false;this.evMouseUp=false;this.evMouseDown=false;this.evMouseMove=false;this.evMouseOut=false;this.evMouseOver=false;return this;};function NlsNode(orgId,capt,url,ic,exp,chk,xtra,title){this.orgId=orgId;this.id="";this.capt=capt;this.url=(url==null||url=="")?"":url;this.ic=null;this.exp=exp==null?false:exp;this.chk=(chk?chk:false);this.xtra=xtra==null?false:xtra;this.ctxMenu=null;this.cstStyle="";this.trg=null;this.custom=null;this.title=title==null?capt:title;this.editablity=true;this.checkbox=true;this.setIcon=function(ic){var ac=(ic==null||ic=="")?null:ic.split(",");if(ac){for(var i=0;i<ac.length;i++)preloadIcon(ac[i]);};this.ic=ac;}
this.isCustomNode=function(){return this.custom==null;};this.nx=null;this.pv=null;this.fc=null;this.lc=null;this.pr=null;this.equals=function(nd){if(!nd)return false;else return(this.id==nd.id);};this.setIcon(ic);};NLSTREE.genIntId=function(id){return this.tId+id;};NLSTREE.genOrgId=function(intId){return intId.substr(this.tId.length);};NLSTREE.compareNode=function(aN,bN){return(aN.capt>=bN.capt);};NLSTREE.add=function(id,prn,capt,url,ic,exp,chk,xtra,title){var nNd=new NlsNode(((id==null||String(id)=="")?("int"+(++this.nCnt)):id),capt,url,ic,exp,chk,xtra,title);nNd.id=this.genIntId(nNd.orgId);if(this.nLst[nNd.id]!=null){return;}
if(this.rt==null){this.rt=nNd;}else{var pnd=this.nLst[this.genIntId(prn)];if(pnd==null){return;}
nNd.pr=pnd;if(pnd.lc==null){pnd.fc=nNd;pnd.lc=nNd;}else{var t=pnd.fc;if(this.opt.sort!="no"){do{if(this.opt.sort=="asc"?this.compareNode(t,nNd):this.compareNode(nNd,t))break;t=t.nx;}while(t!=null);if(t!=null){if(t.pv==null){t.pv=nNd;pnd.fc=nNd;}else{nNd.pv=t.pv;t.pv.nx=nNd;t.pv=nNd;}
nNd.nx=t;}}
if(this.opt.sort=="no"||t==null){nNd.pv=pnd.lc;pnd.lc.nx=nNd;pnd.lc=nNd;}}}
this.nLst[nNd.id]=nNd;return nNd;};NLSTREE.addCustomNode=function(id,prn,custom){var nd=this.add(id,prn,"");nd.capt="";nd.custom=custom;return nd;};NLSTREE.addBefore=function(id,sib,capt,url,ic,exp,chk,xtra,title){var nd=this.getNodeById(sib);if(nd==null)return;var nNd=new NlsNode(((id==null||id=="")?("int"+(++this.nCnt)):id),capt,url,ic,exp,chk,xtra,title);nNd.id=this.genIntId(nNd.orgId);if(this.nLst[nNd.id]!=null){alert("Item with id "+id+" already exist");return;}
this.nLst[nNd.id]=nNd;nNd.pr=nd.pr;nNd.nx=nd;if(nd.pv==null){nd.pv=nNd;nd.pr.fc=nNd;}else{nNd.pv=nd.pv;nd.pv.nx=nNd;nd.pv=nNd;}
return nNd;};NLSTREE.addAfter=function(id,sib,capt,url,ic,exp,chk,xtra,title){var nd=this.getNodeById(sib);if(nd==null)return;var nNd=new NlsNode(((id==null||id=="")?("int"+(++this.nCnt)):id),capt,url,ic,exp,chk,xtra,title);nNd.id=this.genIntId(nNd.orgId);if(this.nLst[nNd.id]!=null){alert("Item with id "+id+" already exist");return;}
this.nLst[nNd.id]=nNd;nNd.pr=nd.pr;nNd.pv=nd;if(nd.nx==null){nd.nx=nNd;nd.pr.lc=nNd;}else{nNd.nx=nd.nx;nd.nx.pv=nNd;nd.nx=nNd;}
return nNd;};NLSTREE.append=function(id,prn,capt,url,ic,exp,chk,xtra,title){var nd=this.add(id,prn,capt,url,ic,exp,chk,xtra,title);this.reloadNode(prn);return nd;};NLSTREE.remove=function(id,reload){var rNd=(id!=null?this.nLst[this.genIntId(id)]:this.selNd);if(rNd!=null){if(this.rt.equals(rNd)){this.rt=null;this.nLst=new Object();this.selNd=null;this.selElm=null;return rNd};if(this.selNd&&rNd.equals(this.selNd)){this.selNd=null;this.selElm=null;}
var pr=rNd.pr;if(pr.lc.equals(rNd))pr.lc=rNd.pv;if(pr.fc.equals(rNd))pr.fc=rNd.nx;if(rNd.pv!=null)rNd.pv.nx=rNd.nx;if(rNd.nx!=null)rNd.nx.pv=rNd.pv;rNd.nx=null;rNd.pv=null;rNd.pr=null;var treeId=this.tId;this.loopTree(rNd,function(n){nlsTree[treeId].nLst[n.id]=null;});if(this.opt.multiSel){delete this.msNds[rNd.id];}
if(reload==null||reload)this.reloadNode(this.genOrgId(pr.id));}
return rNd;};NLSTREE.removeSelected=function(){var sNds=this.getSelNodes();for(var i=0;i<sNds.length;i++){this.remove(sNds[i].orgId);}}
NLSTREE.removeChilds=function(id,reload){var rNd=(id!=null?this.nLst[this.genIntId(id)]:this.selNd);if(rNd!=null){while(rNd.fc)this.remove(rNd.fc.orgId,false);if(reload==null||reload)this.reloadNode(id);}};NLSTREE.getSelNode=function(){return this.selNd;};NLSTREE.getSelNodes=function(){var a=[];if(this.opt.multiSel){for(var it in this.msNds){if(this.msNds[it]instanceof NlsNode)a[a.length]=this.msNds[it];}}else
if(this.selNd!=null){a[0]=this.selNd;}
return a;}
NLSTREE.isSelected=function(orgId){var nd=this.getNodeById(orgId);var sNds=this.getSelNodes();for(var i=0;i<sNds.length;i++){if(nd.id==sNds[i].id)return true;}
return false;}
NLSTREE.genTree=function(){return this.renderer.genTree();};NLSTREE.genAttrib=function(){var attr="<input id='ndedt"+this.tId+"' type='text' class='"+this.opt.stlprf+"nodeedit' style='display:none' value='' onblur='if (nlsTree."+this.tId+"._fl) nlsTree."+this.tId+".liveNodeWrite()'>"+
(!NlsGetElementById("ddGesture")?"<div id='ddGesture' style='position:absolute;border:#f0f0f0 1px solid;left:0px;top:0px;display:none'></div>":"");if(typeof(nlsctxmenu)!="undefined"){for(var it in nlsctxmenu){if(nlsctxmenu[it]instanceof NlsCtxMenu){if(!NlsGetElementById(it))attr+=nlsctxmenu[it].genMenu();}}}
return attr;}
NLSTREE.renderAttributes=function(plc){var oPl=(plc?NlsGetElementById(plc):null);if(oPl)oPl.innerHTML="";var attr=this.genAttrib();if(oPl)oPl.innerHTML=attr;else document.write(attr);};NLSTREE.render=function(plc){var dv=NlsGetElementById(this.tId+"$attr");if(!dv){dv=document.createElement("SPAN");dv.id=this.tId+"$attr";document.body.insertBefore(dv,document.body.childNodes[0]);}else{dv.innerHTML="";}
dv.innerHTML=this.genAttrib();if(this.opt.renderOnDemand)this.renderer.genNodes=DefRenderer.$genNodes;this.renderer.render(plc);this.initEvent();this.selNd=null;this.selElm=null;var sid=null;if(this.opt.mntState&&nls_getCookie){var sid=nls_getCookie(this.tId+"_selnd");nls_maintainNodeState(this.tId,true);}
if(sid&&sid!="")this.selectNodeById(sid);};NLSTREE.renderTo=function(id,incCh){var n=this.getNodeById(id),tmp=n,apt=[];if(incCh&&n.fc&&!NlsGetElementById(n.fc.id)){apt[apt.length]=n;}
while(tmp){if(NlsGetElementById(tmp.id))break;apt[apt.length]=tmp.pr;tmp=tmp.pr;}
for(var i=apt.length;i>0;i--){this.reloadNode(apt[i-1].orgId);}}
function DefRenderer(tId){var tr=nlsTree[tId];this.tr=tr;this.rat=new Object();this.dsp=new Object();this.initRender=function(){var opt=tr.opt;var ico=tr.ico;var ev="onclick=\"return nls_c2(event, '"+tId+"','@id')\" ";if(opt.evDblClick)ev+="ondblclick=\"return nls_c3(event, '"+tId+"', '@id')\" ";if(opt.evCtxMenu)ev+="oncontextmenu=\"return nls_c4(event, '"+tId+"', '@id')\" ";if(opt.evMouseUp)ev+="onmouseup=\"return nls_c5(event, '"+tId+"', '@id')\" ";if(opt.evMouseDown)ev+="onmousedown=\"return nls_c6(event, '"+tId+"', '@id')\" ";if(opt.evMouseOver)ev+="onmouseover=\"return nls_c7(event, '"+tId+"', '@id')\" ";if(opt.evMouseOut)ev+="onmouseout=\"return nls_c8(event, '"+tId+"', '@id')\" ";if(opt.evMouseMove)ev+="onmousemove=\"return nls_c9(event, '"+tId+"', '@id')\" ";var cbev="onclick=\"nls_cb1(event, '"+tId+"','@id')\"";var ex=["<img src='@expdr' onclick=\"nls_c1(event, '"+tId+"', '@id')\" onmouseover=\"nls_c11(event, '"+tId+"', '@id')\" onmouseout=\"nls_c12(event, '"+tId+"', '@id')\">","<img src='@expdr'>","<img src='@ic' "+ev+">"];this.rat["cnt"]=["<div id='@id' class='"+opt.stlprf+"row' title=\"@title\">","<div id='@id' class='"+opt.stlprf+"row' title=\"@title\" style='display:none'>","</div><div style='display:block' id='ch_@id'>","</div><div style='display:none' id='ch_@id'>"];this.rat["ex"]=[[[ex[1].replace(/@expdr/gi,ico.lnb),ex[1].replace(/@expdr/gi,ico.lb)],[ex[1].replace(/@expdr/gi,ico.lnb),ex[1].replace(/@expdr/gi,ico.lb)]],[[ex[0].replace(/@expdr/gi,ico.pnb),ex[0].replace(/@expdr/gi,ico.pb)],[ex[0].replace(/@expdr/gi,ico.mnb),ex[0].replace(/@expdr/gi,ico.mb)]]];this.rat["mn"]=["<table cellspacing=0 cellpadding=0><tr><td wrap>","</td><td wrap>","</td><td wrap>","</td><td wrap>","</td><td width='100%'>","</td></tr></table>"];this.rat["ics"]=ex[2];this.rat["ic"]=[[ex[2].replace(/@ic/gi,ico.chd),ex[2].replace(/@ic/gi,ico.chd)],[ex[2].replace(/@ic/gi,ico.clf),ex[2].replace(/@ic/gi,(tr.opt.icAsSel?ico.clf:ico.opf))]];this.rat["rt"]=[ex[2].replace(/@ic/gi,ico.rot),[ex[0].replace(/@expdr/gi,ico.pnl),ex[0].replace(/@expdr/gi,ico.mnl)]];this.rat["ln"]=["<img src=\""+ico.bln+"\">","<img src=\""+ico.lin+"\">"];this.rat["ac"]=["<a class=\"@nstyle\" style='display:block' href=\"javascript:void(0);\" "+ev+" >@capt</a>","<a class=\"@nstyle\" style='display:block' target='@trg' "+ev+" href=\""];this.rat["st"]=[opt.stlprf+"node",opt.stlprf+"prnnode"];this.rat["cb"]=["<input style='height:14px;margin:1px' type='checkbox' id='cb_@id' name='cb_@id' "+cbev+" >","<input style='height:14px;margin:1px' type='checkbox' checked id='cb_@id' name='cb_@id' "+cbev+" >"];this.rat["rd"]=["<input style='height:14px;margin:1px' type='radio' name='rd_@id'>","<input style='height:14px;margin:1px' type='radio' checked name='rd_@id'>"];};this.genANode=function(sNd){this.dsp["ln"]="";this.dsp["ic"]="";this.dsp["chk"]="";var n=sNd.pr;if(tr.opt.indent)while(true){if(!n||n.equals(tr.rt)&&!tr.opt.showExpdr||(tr.opt.hideRoot&&(n.equals(tr.rt)||(!tr.opt.showExpdr&&n.pr.equals(tr.rt)))))break;this.dsp["ln"]=this.rat["ln"][(n.nx!=null?1:0)]+this.dsp["ln"];n=n.pr;}
if(sNd.custom!=null){this.dsp["nd"]=sNd.custom;this.dsp["ip"]=this.rat["ln"][0];return this.rat["mn"][0]+this.dsp["ln"]+this.rat["mn"][1]+this.dsp["ip"]+this.dsp["ic"]+this.rat["mn"][2]+this.dsp["chk"]+this.rat["mn"][4]+this.dsp["nd"]+this.rat["mn"][5];}else{var fc=1,ex=0,nx=1,rt=0;if(!sNd.fc){fc=0;sNd.exp=false;};if(sNd.svrLoad&&sNd.loaded==0){fc=1;}if(sNd.exp)ex=1;if(!sNd.nx)nx=0;if(sNd.id==tr.rt.id)rt=1;this.dsp["ip"]=this.rat["ex"][fc][ex][nx];if(rt==1){this.dsp["ip"]=(tr.opt.showExpdr?this.rat["rt"][1][ex]:"");}else
if(tr.opt.hideRoot&&!tr.opt.showExpdr&&sNd.pr.id==tr.rt.id){this.dsp["ip"]="";}
if(tr.opt.icon||rt==1){if(sNd.ic!=null){this.dsp["ic"]=this.rat["ics"].replace(/@ic/gi,sNd.ic[(!tr.opt.icAsSel&&sNd.ic[ex]?ex:0)]);}
else{this.dsp["ic"]=this.rat["ic"][fc][ex];if(rt==1)this.dsp["ic"]=this.rat["rt"][0];}}
if(sNd.url){this.dsp["nd"]=this.rat["ac"][1].replace(/@trg/gi,(sNd.trg==null?tr.opt.trg:sNd.trg))+sNd.url+"\">"+sNd.capt+"</a>";}
else{this.dsp["nd"]=this.rat["ac"][0].replace(/@capt/gi,sNd.capt);}
if(sNd.cstStyle!=""){this.dsp["nd"]=this.dsp["nd"].replace(/@nstyle/gi,sNd.cstStyle);}else{this.dsp["nd"]=this.dsp["nd"].replace(/@nstyle/gi,this.rat["st"][fc]);}
if(tr.opt.check&&sNd.checkbox){var c=tr.opt.checkOnLeaf;if(!c||(c&&fc==0))this.dsp["chk"]=this.rat["cb"][(sNd.chk?1:0)];}
if(sNd.pr&&sNd.pr.rad){this.dsp["chk"]=this.rat["rd"][(sNd.chk?1:0)].replace(/@id/gi,sNd.pr.id);}
return this.rat["mn"][0]+this.dsp["ln"]+this.rat["mn"][1]+this.dsp["ip"]+this.dsp["ic"]+this.rat["mn"][2]+this.dsp["chk"]+this.rat["mn"][3]+this.dsp["nd"]+this.rat["mn"][5];}};this.genNodes=function(sNd,incpar,wrt){var s="";if(incpar){s=this.rat["cnt"][(tr.opt.hideRoot&&sNd.equals(tr.rt)?1:0)]+this.genANode(sNd)+this.rat["cnt"][(sNd.fc&&sNd.exp?2:3)];};s=s.replace(/@id/gi,sNd.id).replace(/@title/gi,sNd.title);if(wrt)document.write(s);if(sNd.fc!=null){var chNode=sNd.fc;do{if(wrt)this.genNodes(chNode,true,wrt);else s=s+this.genNodes(chNode,true,wrt);chNode=chNode.nx;}while(chNode!=null)}
if(wrt){if(incpar)document.write("</div>");return"";}else{s=incpar?(s+"</div>"):s;return s;}};this.genTree=function(){this.initRender();return this.genNodes(tr.rt,true,false);};this.render=function(plc){var sc="class='"+this.tr.opt.stlprf+"nlstree' ";if(this.tr.opt.enbScroll)sc+="style='overflow:auto;height:"+this.tr.opt.height+";width:"+this.tr.opt.width+";' onmousemove=\"return nls_c10(event, '"+tId+"')\"";if(plc&&plc!=""){NlsGetElementById(plc).innerHTML="<div id=\""+tId+"\" "+sc+" >"+this.genTree()+"</div>";}else{this.initRender();document.write("<div id=\""+tId+"\" "+sc+" >");this.genNodes(tr.rt,true,true);document.write("</div>");}};return this;};DefRenderer.$genNodes=function(sNd,incpar,wrt){var s="",tr=this.tr;if(incpar){s=this.rat["cnt"][(tr.opt.hideRoot&&sNd.equals(tr.rt)?1:0)]+this.genANode(sNd)+this.rat["cnt"][(sNd.fc&&sNd.exp?2:3)];};s=s.replace(/@id/gi,sNd.id).replace(/@title/gi,sNd.title);if(wrt)document.write(s);var chNode=sNd.fc,tmp="";while(chNode){if(chNode.exp){if(wrt)this.genNodes(chNode,true,wrt);else s=s+this.genNodes(chNode,true,wrt);}else{tmp=this.rat["cnt"][0]+this.genANode(chNode)+this.rat["cnt"][(chNode.fc&&chNode.exp?2:3)]+"</div>";tmp=tmp.replace(/@id/gi,chNode.id).replace(/@title/gi,chNode.title);if(wrt)document.write(tmp);else s=s+tmp;}
chNode=chNode.nx;}
if(wrt){if(incpar)document.write("</div>");return"";}else{s=incpar?(s+"</div>"):s;return s;}};function $getAnchor(nd){return nd.childNodes[0].childNodes[0].childNodes[0].childNodes[3].childNodes[0]}
NLSTREE.initEvent=function(){var orgEvent=(nls_isIE?document.body.onkeydown:window.onkeydown);if(!orgEvent||orgEvent.toString().search(/orgEvent/gi)<0){var newEvent=function(e){if(nlsTree.selectedTree)nlsTree.selectedTree.liveNodePress(nls_isIE?event:e);if(orgEvent)return orgEvent();};if(nls_isIE)document.body.onkeydown=newEvent;else window.onkeydown=newEvent;}};NLSTREE.reloadNode=function(id,incChd){this.renderer.initRender();var intId=this.genIntId(id);var cNode=this.nLst[intId];var dvN=NlsGetElementById("ch_"+intId);if(incChd!=false){var s=this.renderer.genNodes(cNode,false);dvN.innerHTML=s;if(dvN.innerHTML=="")dvN.style.display="none";}
if(cNode.exp==true&&cNode.fc!=null)dvN.style.display="";dvN=NlsGetElementById(intId);dvN.innerHTML="";dvN.innerHTML=this.renderer.genANode(cNode).replace(/@id/gi,intId);dvN.setAttribute("title",cNode.title);if(this.selNd!=null){var sId=this.selNd.id;this.selNd=null;this.selElm=null;this.selectNode(sId);}};NLSTREE.selNToggle=function(id){this.toggleNode(id);if(!this.selNd||this.selNd.id!=id)this.selectNode(id);if(this.tmId!=null){clearTimeout(this.tmId);this.tmId=null;}};function $pbsHasChild(n){return(n.fc||(n.svrLoad&&n.loaded==0));};function nls_setStyle(tree,sNd,sElm,selected){var prf=(selected?"sel":"");if(tree.opt.selRow)sElm.className=tree.opt.stlprf+prf+"row";ac=$getAnchor(sElm);ac.className=(sNd.cstStyle!=""?prf+sNd.cstStyle:tree.opt.stlprf+prf+($pbsHasChild(sNd)?"prnnode":"node"));};function nls_setNodeIcon(tree,sNd,sElm,selected){if(tree.opt.icon){ic=sElm.childNodes[0].childNodes[0].childNodes[0].childNodes[1];if(ic.childNodes.length==2){ic=ic.childNodes[1];}else{ic=ic.childNodes[0];}
if(selected){if(sNd.ic!=null){ic.src=nlsTreeIc[sNd.ic[1]?sNd.ic[1]:sNd.ic[0]].src}else{ic.src=nlsTreeIc[(sNd.id==tree.rt.id?tree.ico.rot:($pbsHasChild(sNd)?tree.ico.opf:tree.ico.chd))].src;}}else{if(sNd.ic!=null){ic.src=nlsTreeIc[sNd.ic[0]].src}else{ic.src=nlsTreeIc[(sNd.id==tree.rt.id?tree.ico.rot:($pbsHasChild(sNd)?tree.ico.clf:tree.ico.chd))].src;}}}};NLSTREE.selectNode=function(id){nlsTree.selectedTree=this;if(this.opt.editable){var sNd=this.selNd;if(sNd!=null&&sNd.id!=id){if(this.tmId){clearTimeout(this.tmId);this.tmId=null;}}
if(sNd!=null&&sNd.id==id&&!NlsTree._blockEdit){this.tmId=setTimeout("nlsTree."+this.tId+".liveNodeEdit('"+id+"')",1000);}
var edt=NlsGetElementById("ndedt"+this.tId);if(edt&&edt.style.display==""){edt.style.display="none";edt.disabled=true;}}
var ac=null;var ic=null;var sNd=this.selNd;var sElm=this.selElm;if(sElm!=null){nls_setStyle(this,sNd,sElm,false);if(this.opt.icAsSel)nls_setNodeIcon(this,sNd,sElm,false);}
sNd=this.nLst[id];if(this.opt.renderOnDemand){this.renderTo(sNd.orgId);}
this.selNd=sNd;this.selElm=NlsGetElementById(id);sElm=this.selElm;nls_setStyle(this,sNd,sElm,true);if(this.opt.icAsSel)nls_setNodeIcon(this,sNd,sElm,true);if(this.opt.mntState&&nls_setCookie)nls_setCookie(this.tId+"_selnd",sNd.orgId);if(this.opt.multiSel){this.msRemoveAll();this.msAdd(sNd);}};NLSTREE.selectNodeById=function(id){var node=this.getNodeById(id);if(!node)return;var tmp=node.pr;while(tmp!=null){this.expandNode(tmp.orgId);tmp=tmp.pr;}
this.selectNode(node.id);};NLSTREE.unselectNodeById=function(id){var nd=this.getNodeById(id);if(this.selNd!=null&&this.selNd.equals(nd)){var oNode=NlsGetElementById(nd.id)
if(this.opt.icAsSel)nls_setNodeIcon(this,nd,oNode,false);if(this.opt.mntState&&nls_setCookie)nls_removeCookie(this.tId+"_selnd");this.selNd=null;this.selElm=null;nls_setStyle(this,nd,oNode,false);}};NLSTREE.isChild=function(c,p){var nd=this.getNodeById(c);if(!nd)return false;var tmp=nd.pr;while(tmp!=null){if(tmp.orgId==p)return true;tmp=tmp.pr;}
return false;};NLSTREE.hasChild=function(id){var nd=this.getNodeById(id);return(nd.fc!=null);};NLSTREE.expandNode=function(id){var sNd=this.getNodeById(id);if(sNd&&((!sNd.exp&&sNd.fc)||(sNd.svrLoad&&sNd.loaded==0)))this.toggleNode(sNd.id);};NLSTREE.collapseNode=function(id){var sNd=this.nLst[this.genIntId(id)];if(sNd.exp&&sNd.fc)this.toggleNode(sNd.id);};NLSTREE.prepareToggle=function(id){var sNd=this.selNd;if(sNd==null){this.selectNode(id);return;}
if(sNd.id==id)return;while(sNd!=null&&sNd.id!=id){sNd=sNd.pr;}
if(sNd==null)return;if(sNd.id==id)this.selectNode(id);};NLSTREE.toggleNode=function(id){var sNd=this.nLst[id];if(sNd.svrLoad&&sNd.loaded==0){this.ajaxLoadChildNodes(sNd.orgId);return;};if(this.opt.renderOnDemand){this.renderTo(sNd.orgId,true);}
var nd=NlsGetElementById("ch_"+id),ip=null;if(id!=this.rt.id||(id==this.rt.id&&this.opt.showExpdr)){ip=NlsGetElementById(id).childNodes[0].childNodes[0].childNodes[0].childNodes[1].childNodes[0];}
if(this.opt.hideRoot&&!this.opt.showExpdr&&sNd.pr&&sNd.pr.equals(this.rt))ip=null;if(sNd.exp){sNd.exp=false;nd.style.display="none";if(ip!=null&&sNd.fc!=null)ip.src=(id==this.rt.id?this.ico.pnl:(sNd.nx?this.ico.pb:this.ico.pnb));if(!this.opt.icAsSel)nls_setNodeIcon(this,sNd,NlsGetElementById(id),false);if(this.opt.mntState&&nls_delExpandedId)nls_delExpandedId(this.tId+"_ndstate",sNd.orgId);this.treeOnCollapse(sNd.orgId);}else{if(this.opt.oneExp&&sNd.pr){var tNd=sNd.pr.fc;while(tNd){if(tNd.id!=id&&tNd.exp)this.collapseNode(tNd.orgId);tNd=tNd.nx;}}
sNd.exp=true;nd.style.display="block";if(ip!=null&&sNd.fc!=null)ip.src=(id==this.rt.id?this.ico.mnl:(sNd.nx?this.ico.mb:this.ico.mnb));if(!this.opt.icAsSel)nls_setNodeIcon(this,sNd,NlsGetElementById(id),true);if(this.opt.mntState&&nls_addExpandedId)nls_addExpandedId(this.tId+"_ndstate",sNd.orgId);this.treeOnExpand(sNd.orgId);}};NLSTREE.expandAll=function(id){var treeId=this.tId;var startNode=(!id?this.rt:this.getNodeById(id));this.loopTree(startNode,function(n){nlsTree[treeId].expandNode(n.orgId);});};NLSTREE.collapseAll=function(incPr,id){var treeId=this.tId;var startNode=(!id?this.rt:this.getNodeById(id));this.loopTree(startNode,function(n){if(n.fc&&(!startNode.equals(n)||incPr))nlsTree[treeId].collapseNode(n.orgId);});};NLSTREE.checkNode=function(intId,chkOvr){var nd=NlsGetElementById("cb_"+intId);var sNd=this.nLst[intId];if(arguments.length>1)nd.checked=chkOvr;sNd.chk=nd.checked;if(this.opt.checkIncSub){if(nd.checked==true){this.loopTree(sNd,$nlsCheck);}else{this.loopTree(sNd,$nlsUnCheck);}}
if(this.opt.checkParents){var t=sNd;if(nd.checked==true){while(t){$nlsCheck(t);t=t.pr;};}else{var t2,fl=false;while(t){$nlsUnCheck(t);t2=t;if(t2.pr!=null)t2=t2.pr.fc;while(t2){if(t2.chk==true){fl=true;break;}t2=t2.nx;}
if(fl)break;t=t.pr;};}}};function $nlsCheck(sNd){$setCheck(sNd,true);}
function $nlsUnCheck(sNd){$setCheck(sNd,false);}
function $setCheck(sNd,f){if(!sNd.checkbox)return;var nd=NlsGetElementById("cb_"+sNd.id);if(nd)nd.checked=f;sNd.chk=f;}
NLSTREE.setNodeStyle=function(id,cls,rt){var nd=this.getNodeById(id);nd.cstStyle=cls;if(rt){var oNd=NlsGetElementById(nd.id);if(oNd){var ac=$getAnchor(oNd);ac.className=cls;}}};NLSTREE.setNodeCaption=function(id,capt){var intId=this.genIntId(id);var nd=$getAnchor(NlsGetElementById(intId));var sNd=this.nLst[intId];nd.innerHTML=capt;sNd.capt=capt;};NLSTREE.getNodeById=function(id){return this.nLst[this.genIntId(id)]};NLSTREE.setGlobalCtxMenu=function(ctx){this.opt.evCtxMenu=true;this.ctxMenu=ctx;ctx.container=this;};NLSTREE.setNodeCtxMenu=function(id,ctx){this.opt.evCtxMenu=true;var nd=this.nLst[this.genIntId(id)];nd.ctxMenu=ctx;if(ctx.mId)ctx.container=this;};NLSTREE.setNodeTarget=function(id,trg){var nd=this.nLst[this.genIntId(id)];nd.trg=trg;};NLSTREE.setEditablity=function(id,v){var nd=this.nLst[this.genIntId(id)];nd.editablity=v;};NLSTREE.enableCheckbox=function(id,v){var nd=this.nLst[this.genIntId(id)];nd.checkbox=v;};NLSTREE.useIconSet=function(icSet){this.ico=icSet;preloadIcon(icSet.pnb,icSet.pb,icSet.pnl,icSet.mnb,icSet.mb,icSet.mnl,icSet.opf,icSet.clf,icSet.chd,icSet.rot,icSet.lnb,icSet.lb,icSet.lin,icSet.bln,icSet.lod);};NLSTREE.contextMenu=function(ev,id){if(!this.opt.enableCtx)return false;var sNd=this.nLst[id];var ctx=null;if(sNd.ctxMenu&&sNd.ctxMenu.mId)ctx=sNd.ctxMenu;else
if(sNd.ctxMenu=="DEFAULT")ctx=null;else
if(sNd.ctxMenu=="NONE")return false;else ctx=this.ctxMenu;if(!ctx)return true;if(this.opt.multiSel&&this.isSelected(sNd.orgId)){var sNds=this.getSelNodes();for(var i=0;i<sNds.length;i++){var t=(sNds[i].ctxMenu==null?this.ctxMenu:sNds[i].ctxMenu);if(t!=null&&t.mId!=ctx.mId){this.selectNode(id);break;}}}else{this.selectNode(id);}
if(this.tmId)clearTimeout(this.tmId);ctx.container=this;ctx.showMenu(ev.clientX,ev.clientY);return false;};NLSTREE.loopTree=function(sNd,act){act(sNd);if(sNd.fc!=null){var chNode=sNd.fc;do{this.loopTree(chNode,act);chNode=chNode.nx;}while(chNode!=null)}};NLSTREE.liveNodeEditStart=function(id){this.tmId=setTimeout("nlsTree."+this.tId+".liveNodeEdit('"+id+"')",0)};NLSTREE.liveNodeEdit=function(id){if(!this.nLst[id].editablity){this.tmId=null;return;}
if(this.tmId!=null){var edt=NlsGetElementById("ndedt"+this.tId);var ac=$getAnchor(NlsGetElementById(id));var x=0,y=0,elm=ac;while(elm){x+=elm.offsetLeft;y+=elm.offsetTop;elm=elm.offsetParent;}
elm=NlsGetElementById(this.tId);if(elm){y-=elm.scrollTop;x-=elm.scrollLeft;}
edt.disabled=false;var posAdj=this.editBoxPosAdj();edt.style.top=y+posAdj[1]+"px";edt.style.left=x+posAdj[0]+"px";edt.style.display="block";edt.focus();edt.value=this.nLst[id].capt;this.tmId=null;this.$editing=true;}};NLSTREE.liveNodeWrite=function(){var edt=NlsGetElementById("ndedt"+this.tId);if(edt.style.display=="none")return;var ac=$getAnchor(NlsGetElementById(this.selNd.id));if(edt.value!=""&&edt.value!=this.selNd.capt){if(this.treeOnBeforeNodeChange(this.selNd.orgId)){ac.innerHTML=edt.value;this.selNd.capt=edt.value;this.treeOnNodeChange(this.selNd.orgId);}else{return;}}
edt.style.display="none";edt.disabled=true;this.$editing=false;};NLSTREE.liveNodePress=function(e){if(!this.opt.editable)return;if(e.keyCode==13){this._fl=false;this.liveNodeWrite();this._fl=true;}else if(e.keyCode==27){var edt=NlsGetElementById("ndedt"+this.tId);edt.style.display="none";edt.disabled=true;}else if(e.keyCode==this.opt.editKey){this.tmId=setTimeout("nlsTree."+this.tId+".liveNodeEdit('"+this.selNd.id+"')",10);}};NLSTREE.editBoxPosAdj=function(){return[0,0];};function nls_c1(e,tId,nId){nlsTree[tId].prepareToggle(nId);nlsTree[tId].toggleNode(nId);};function nls_c2(e,tId,nId){var t=nlsTree[tId];var nd=t.nLst[nId];if(e.ctrlKey&&e.altKey){if(e.stopPropagation){e.stopPropagation();}else{e.cancelBubble=true};return t.contextMenu(e,nId);}
if(t.opt.multiSel){if(!nls_msTreeOnClick(e,tId,nId))return false;}
if((t.opt.oneClick||(t.opt.hideRoot&&t.rt.equals(nd.pr)))&&t.nLst[nId].fc&&!t.rt.equals(nd)){t.selNToggle(nId);}else{t.selectNode(nId);}
return t.treeOnClick(e,t.genOrgId(nId));};function nls_c3(e,tId,nId){var t=nlsTree[tId];if(t.nLst[nId].fc)t.selNToggle(nId);return t.treeOnDblClick(e,t.genOrgId(nId));};function nls_c4(e,tId,nId){var t=nlsTree[tId];return t.contextMenu(e,nId);};function nls_c5(e,tId,nId){var t=nlsTree[tId];return t.treeOnMouseUp(e,t.genOrgId(nId));};function nls_c6(e,tId,nId){var t=nlsTree[tId];return t.treeOnMouseDown(e,t.genOrgId(nId));};function nls_c7(e,tId,nId){var t=nlsTree[tId];return t.treeOnMouseOver(e,t.genOrgId(nId));};function nls_c8(e,tId,nId){var t=nlsTree[tId];return t.treeOnMouseOut(e,t.genOrgId(nId));};function nls_c9(e,tId,nId){var t=nlsTree[tId];return t.treeOnMouseMove(e,t.genOrgId(nId));};function nls_c10(e,tId){var t=nlsTree[tId];return t.$treeMove(e);};function nls_c11(e,tId,nId){var t=nlsTree[tId];t.$expdrMove(e,t.genOrgId(nId));};function nls_c12(e,tId,nId){var t=nlsTree[tId];t.$expdrOut(e,t.genOrgId(nId));};function nls_cb1(e,tId,nId){var t=nlsTree[tId];t.checkNode(nId);t.treeOnCheck(t.genOrgId(nId));};NLSTREE.$expdrMove=function(e,id){}
NLSTREE.$expdrOut=function(e,id){}
NLSTREE.$treeMove=function(e){};NLSTREE.treeOnClick=function(e,id){return true;};NLSTREE.treeOnDblClick=function(e,id){};NLSTREE.treeOnMouseOver=function(e,id){};NLSTREE.treeOnMouseMove=function(e,id){};NLSTREE.treeOnMouseOut=function(e,id){};NLSTREE.treeOnMouseDown=function(e,id){};NLSTREE.treeOnMouseUp=function(e,id){};NLSTREE.treeOnCheck=function(id){};NLSTREE.treeOnExpand=function(id){};NLSTREE.treeOnCollapse=function(id){};NLSTREE.treeOnNodeChange=function(id){};NLSTREE.treeOnBeforeNodeChange=function(id){return true;};function preloadIcon(){var arg=preloadIcon.arguments,ic;for(var i=0;i<arg.length;i++){if(!arg[i])continue;ic=nlsTreeIc[arg[i]]
if(!ic){ic=new Image();ic.src=arg[i];nlsTreeIc[arg[i]]=ic;}}};function NlsGetElementById(id){if(document.all){return document.all(id);}else
if(document.getElementById){return document.getElementById(id);}};NlsTree.isEquals=function(a,b){if(!a||!b)return false;return(a.id==b.id);}
NlsTreeUtil.loadFromHTMLById=function(hId,rep,context){var r=NlsGetElementById(hId);return NlsTreeUtil.loadFromHTML(r,rep,context);};NlsTreeUtil.loadFromHTML=function(r,rep,context){var ch,t=new NlsTree("htmlTree_"+r.id,context),o=t.opt;for(var i=0;i<r.childNodes.length;i++){ch=r.childNodes[i];if(ch.nodeType!=1)continue;switch(ch.nodeName.toUpperCase()){case"INPUT":var vl=ch.value.split(";"),kvp,v;for(var j=0;j<vl.length;j++){kvp=vl[j].split("=");v=kvp[1];switch(kvp[0]){case"enbscroll":o.enbScroll=(v=="true");break;case"width":o.width=v;break;case"height":o.height=v;break;case"trg":o.trg=v;break;case"stlprf":o.stlprf=v;break;case"sort":o.sort=v;break;case"icon":o.icon=(v=="true");break;case"check":o.check=(v=="true");break;case"editable":o.editable=(v=="true");break;case"selrow":o.selRow=(v=="true");break;case"editkey":o.editKey=v;break;case"oneexp":o.oneExp=(v=="true");break;case"enablectx":o.enableCtx=(v=="true");break;case"oneclick":o.oneClick=(v=="true");break;case"mntstate":o.mntState=(v=="true");break;case"icassel":o.icAsSel=(v=="true");break;case"checkincsub":o.checkIncSub=(v=="true");break;case"checkparents":o.checkParents=(v=="true");break;case"checkonleaf":o.checkOnLeaf=(v=="true");break;case"hideroot":o.hideRoot=(v=="true");break;case"indent":o.indent=(v=="true");break;case"showexpdr":o.showExpdr=(v=="true");break;case"renderondemand":o.renderOnDemand=(v=="true");break;case"evdblclick":o.evDblClick=(v=="true");break;case"evctxmenu":o.evCtxMenu=(v=="true");break;case"evmouseup":o.evMouseUp=(v=="true");break;case"evmousedown":o.evMouseDown=(v=="true");break;case"evmousemove":o.evMouseMove=(v=="true");break;case"evmouseout":o.evMouseOut=(v=="true");break;case"evmouseover":o.evMouseOver=(v=="true");break;}}
break;case"UL":t.$buildTreeFromHTML(ch,this.rt);break;}}
if(rep==true){t.render(r.id);}else{r.style.display="";t.render();}
return t;};NLSTREE.$buildTreeFromHTML=function(n,p){var li=null,t,prId,nNd;if(!p)p="root";for(var i=0;i<n.childNodes.length;i++){li=n.childNodes[i];if(li.nodeType!=1||li.nodeName.toUpperCase()!="LI")continue;prId=null;for(var j=0;j<li.childNodes.length;j++){t=li.childNodes[j];if(t.nodeType!=1)continue;switch(t.nodeName.toUpperCase()){case"A":nNd=this.add(t.id,p,t.innerHTML,t.href,t.getAttribute("ic"),$aonevl(t.getAttribute("exp"),false),$aonevl(t.getAttribute("chk")),null,t.title);if(t.target)nNd.trg=t.target;prId=nNd.orgId;break;case"INPUT":var vl=t.value.split(";"),v=null;for(var i=0;i<vl.length;i++){v=vl[i].split("=");switch(v[0]){case"ic":nNd.setIcon(v[1]);break;case"exp":nNd.exp=(v[1]=="true");break;case"chk":nNd.chk=(v[1]=="true");break;case"xtra":nNd.xtra=v[1];break;case"trg":nNd.trg=v[1];break;}}
break;case"UL":this.$buildTreeFromHTML(t,prId);break;}}};};NLSTREE.loadFromHTML=function(hId,prId){var r=NlsGetElementById(hId);var pr=(prId?this.getNodeById(prId):this.rt);for(var i=0;i<r.childNodes.length;i++){if(r.childNodes[i].nodeType!=1)continue;this.$buildTreeFromHTML(r.childNodes[i],(pr?pr:this.rt));return;}
return null;};function $aonvl(v,c){if(v)return v;else return c;};function $aonevl(v,c){if(!v||v=="")return c;else return v;};var Spry;if(!Spry)Spry={};if(!Spry.Widget)Spry.Widget={};Spry.Widget.Accordion=function(element,opts)
{this.element=this.getElement(element);this.defaultPanel=0;this.hoverClass="AccordionPanelTabHover";this.openClass="AccordionPanelOpen";this.closedClass="AccordionPanelClosed";this.focusedClass="AccordionFocused";this.enableAnimation=true;this.enableKeyboardNavigation=true;this.currentPanel=null;this.animator=null;this.hasFocus=null;this.duration=500;this.previousPanelKeyCode=Spry.Widget.Accordion.KEY_UP;this.nextPanelKeyCode=Spry.Widget.Accordion.KEY_DOWN;this.useFixedPanelHeights=true;this.fixedPanelHeight=0;Spry.Widget.Accordion.setOptions(this,opts,true);if(Spry.Widget.Accordion.onloadDidFire)
this.attachBehaviors();else
Spry.Widget.Accordion.loadQueue.push(this);};Spry.Widget.Accordion.onloadDidFire=false;Spry.Widget.Accordion.loadQueue=[];Spry.Widget.Accordion.addLoadListener=function(handler)
{if(typeof window.addEventListener!='undefined')
window.addEventListener('load',handler,false);else if(typeof document.addEventListener!='undefined')
document.addEventListener('load',handler,false);else if(typeof window.attachEvent!='undefined')
window.attachEvent('onload',handler);};Spry.Widget.Accordion.processLoadQueue=function(handler)
{Spry.Widget.Accordion.onloadDidFire=true;var q=Spry.Widget.Accordion.loadQueue;var qlen=q.length;for(var i=0;i<qlen;i++)
q[i].attachBehaviors();};Spry.Widget.Accordion.addLoadListener(Spry.Widget.Accordion.processLoadQueue);Spry.Widget.Accordion.prototype.getElement=function(ele)
{if(ele&&typeof ele=="string")
return document.getElementById(ele);return ele;};Spry.Widget.Accordion.prototype.addClassName=function(ele,className)
{if(!ele||!className||(ele.className&&ele.className.search(new RegExp("\\b"+className+"\\b"))!=-1))
return;ele.className+=(ele.className?" ":"")+className;};Spry.Widget.Accordion.prototype.removeClassName=function(ele,className)
{if(!ele||!className||(ele.className&&ele.className.search(new RegExp("\\b"+className+"\\b"))==-1))
return;ele.className=ele.className.replace(new RegExp("\\s*\\b"+className+"\\b","g"),"");};Spry.Widget.Accordion.setOptions=function(obj,optionsObj,ignoreUndefinedProps)
{if(!optionsObj)
return;for(var optionName in optionsObj)
{if(ignoreUndefinedProps&&optionsObj[optionName]==undefined)
continue;obj[optionName]=optionsObj[optionName];}};Spry.Widget.Accordion.prototype.onPanelTabMouseOver=function(panel)
{if(panel)
this.addClassName(this.getPanelTab(panel),this.hoverClass);};Spry.Widget.Accordion.prototype.onPanelTabMouseOut=function(panel)
{if(panel)
this.removeClassName(this.getPanelTab(panel),this.hoverClass);};Spry.Widget.Accordion.prototype.openPanel=function(panel)
{var panelA=this.currentPanel;var panelB=panel;if(!panelB||panelA==panelB)
return;var contentA;if(panelA)
contentA=this.getPanelContent(panelA);var contentB=this.getPanelContent(panelB);if(!contentB)
return;if(this.useFixedPanelHeights&&!this.fixedPanelHeight)
{this.fixedPanelHeight=(contentA.offsetHeight)?contentA.offsetHeight:contentA.scrollHeight;}
if(this.enableAnimation)
{if(this.animator)
this.animator.stop();this.animator=new Spry.Widget.Accordion.PanelAnimator(this,panelB,{duration:this.duration});this.animator.start();}
else
{if(contentA)
contentA.style.height="0px";contentB.style.height=(this.useFixedPanelHeights?this.fixedPanelHeight:contentB.scrollHeight)+"px";}
if(panelA)
{this.removeClassName(panelA,this.openClass);this.addClassName(panelA,this.closedClass);}
this.removeClassName(panelB,this.closedClass);this.addClassName(panelB,this.openClass);this.currentPanel=panelB;};Spry.Widget.Accordion.prototype.openNextPanel=function()
{var panels=this.getPanels();var curPanelIndex=this.getCurrentPanelIndex();if(panels&&curPanelIndex>=0&&(curPanelIndex+1)<panels.length)
this.openPanel(panels[curPanelIndex+1]);};Spry.Widget.Accordion.prototype.openPreviousPanel=function()
{var panels=this.getPanels();var curPanelIndex=this.getCurrentPanelIndex();if(panels&&curPanelIndex>0&&curPanelIndex<panels.length)
this.openPanel(panels[curPanelIndex-1]);};Spry.Widget.Accordion.prototype.openFirstPanel=function()
{var panels=this.getPanels();if(panels)
this.openPanel(panels[0]);};Spry.Widget.Accordion.prototype.openLastPanel=function()
{var panels=this.getPanels();if(panels)
this.openPanel(panels[panels.length-1]);};Spry.Widget.Accordion.prototype.onPanelClick=function(panel)
{if(panel!=this.currentPanel)
this.openPanel(panel);this.focus();};Spry.Widget.Accordion.prototype.onFocus=function(e)
{this.hasFocus=true;this.addClassName(this.element,this.focusedClass);};Spry.Widget.Accordion.prototype.onBlur=function(e)
{this.hasFocus=false;this.removeClassName(this.element,this.focusedClass);};Spry.Widget.Accordion.KEY_UP=38;Spry.Widget.Accordion.KEY_DOWN=40;Spry.Widget.Accordion.prototype.onKeyDown=function(e)
{var key=e.keyCode;if(!this.hasFocus||(key!=this.previousPanelKeyCode&&key!=this.nextPanelKeyCode))
return true;var panels=this.getPanels();if(!panels||panels.length<1)
return false;var currentPanel=this.currentPanel?this.currentPanel:panels[0];var nextPanel=(key==this.nextPanelKeyCode)?currentPanel.nextSibling:currentPanel.previousSibling;while(nextPanel)
{if(nextPanel.nodeType==1)
break;nextPanel=(key==this.nextPanelKeyCode)?nextPanel.nextSibling:nextPanel.previousSibling;}
if(nextPanel&&currentPanel!=nextPanel)
this.openPanel(nextPanel);if(e.stopPropagation)
e.stopPropagation();if(e.preventDefault)
e.preventDefault();return false;};Spry.Widget.Accordion.prototype.attachPanelHandlers=function(panel)
{if(!panel)
return;var tab=this.getPanelTab(panel);if(tab)
{var self=this;Spry.Widget.Accordion.addEventListener(tab,"click",function(e){return self.onPanelClick(panel);},false);Spry.Widget.Accordion.addEventListener(tab,"mouseover",function(e){return self.onPanelTabMouseOver(panel);},false);Spry.Widget.Accordion.addEventListener(tab,"mouseout",function(e){return self.onPanelTabMouseOut(panel);},false);}};Spry.Widget.Accordion.addEventListener=function(element,eventType,handler,capture)
{try
{if(element.addEventListener)
element.addEventListener(eventType,handler,capture);else if(element.attachEvent)
element.attachEvent("on"+eventType,handler);}
catch(e){}};Spry.Widget.Accordion.prototype.initPanel=function(panel,isDefault)
{var content=this.getPanelContent(panel);if(isDefault)
{this.currentPanel=panel;this.removeClassName(panel,this.closedClass);this.addClassName(panel,this.openClass);}
else
{this.removeClassName(panel,this.openClass);this.addClassName(panel,this.closedClass);content.style.height="0px";}
this.attachPanelHandlers(panel);};Spry.Widget.Accordion.prototype.attachBehaviors=function()
{var panels=this.getPanels();for(var i=0;i<panels.length;i++)
{this.initPanel(panels[i],i==this.defaultPanel);}
if(this.enableKeyboardNavigation)
{var tabIndexAttr=this.element.attributes.getNamedItem("tabindex");if(tabIndexAttr)
{var self=this;Spry.Widget.Accordion.addEventListener(this.element,"focus",function(e){return self.onFocus(e);},false);Spry.Widget.Accordion.addEventListener(this.element,"blur",function(e){return self.onBlur(e);},false);Spry.Widget.Accordion.addEventListener(this.element,"keydown",function(e){return self.onKeyDown(e);},false);}}};Spry.Widget.Accordion.prototype.getPanels=function()
{return this.getElementChildren(this.element);};Spry.Widget.Accordion.prototype.getCurrentPanel=function()
{return this.currentPanel;};Spry.Widget.Accordion.prototype.getCurrentPanelIndex=function()
{var panels=this.getPanels();for(var i=0;i<panels.length;i++)
{if(this.currentPanel==panels[i])
return i;}
return 0;};Spry.Widget.Accordion.prototype.getPanelTab=function(panel)
{if(!panel)
return null;return this.getElementChildren(panel)[0];};Spry.Widget.Accordion.prototype.getPanelContent=function(panel)
{if(!panel)
return null;return this.getElementChildren(panel)[1];};Spry.Widget.Accordion.prototype.getElementChildren=function(element)
{var children=[];var child=element.firstChild;while(child)
{if(child.nodeType==1)
children.push(child);child=child.nextSibling;}
return children;};Spry.Widget.Accordion.prototype.focus=function()
{if(this.element&&this.element.focus)
this.element.focus();};Spry.Widget.Accordion.PanelAnimator=function(accordion,panel,opts)
{this.timer=null;this.interval=0;this.stepCount=0;this.fps=0;this.steps=10;this.duration=500;this.onComplete=null;this.panel=panel;this.panelToOpen=accordion.getElement(panel);this.panelData=[];Spry.Widget.Accordion.setOptions(this,opts,true);if(this.fps>0)
{this.interval=Math.floor(1000/this.fps);this.steps=parseInt((this.duration+(this.interval-1))/this.interval);}
else if(this.steps>0)
this.interval=this.duration/this.steps;var panels=accordion.getPanels();for(var i=0;i<panels.length;i++)
{var p=panels[i];var c=accordion.getPanelContent(p);if(c)
{var h=c.offsetHeight;if(h==undefined)
h=0;if(p==panel||h>0)
{var obj=new Object;obj.panel=p;obj.content=c;obj.fromHeight=h;obj.toHeight=(p==panel)?(accordion.useFixedPanelHeights?accordion.fixedPanelHeight:c.scrollHeight):0;obj.increment=(obj.toHeight-obj.fromHeight)/this.steps;obj.overflow=c.style.overflow;this.panelData.push(obj);c.style.overflow="hidden";c.style.height=h+"px";}}}};Spry.Widget.Accordion.PanelAnimator.prototype.start=function()
{var self=this;this.timer=setTimeout(function(){self.stepAnimation();},this.interval);};Spry.Widget.Accordion.PanelAnimator.prototype.stop=function()
{if(this.timer)
{clearTimeout(this.timer);if(this.stepCount<this.steps)
{for(i=0;i<this.panelData.length;i++)
{obj=this.panelData[i];obj.content.style.overflow=obj.overflow;}}}
this.timer=null;};Spry.Widget.Accordion.PanelAnimator.prototype.stepAnimation=function()
{++this.stepCount;this.animate();if(this.stepCount<this.steps)
this.start();else if(this.onComplete)
this.onComplete();};Spry.Widget.Accordion.PanelAnimator.prototype.animate=function()
{var i,obj;if(this.stepCount>=this.steps)
{for(i=0;i<this.panelData.length;i++)
{obj=this.panelData[i];if(obj.panel!=this.panel)
obj.content.style.height="0px";obj.content.style.overflow=obj.overflow;obj.content.style.height=obj.toHeight+"px";}}
else
{for(i=0;i<this.panelData.length;i++)
{obj=this.panelData[i];obj.fromHeight+=obj.increment;obj.content.style.height=obj.fromHeight+"px";}}};var Spry;if(!Spry)Spry={};if(!Spry.Widget)Spry.Widget={};Spry.Widget.TabbedPanels=function(element,opts)
{this.element=this.getElement(element);this.defaultTab=0;this.bindings=[];this.tabSelectedClass="TabbedPanelsTabSelected";this.tabHoverClass="TabbedPanelsTabHover";this.tabFocusedClass="TabbedPanelsTabFocused";this.panelVisibleClass="TabbedPanelsContentVisible";this.focusElement=null;this.hasFocus=false;this.currentTabIndex=0;this.enableKeyboardNavigation=true;Spry.Widget.TabbedPanels.setOptions(this,opts);if(typeof(this.defaultTab)=="number")
{if(this.defaultTab<0)
this.defaultTab=0;else
{var count=this.getTabbedPanelCount();if(this.defaultTab>=count)
this.defaultTab=(count>1)?(count-1):0;}
this.defaultTab=this.getTabs()[this.defaultTab];}
if(this.defaultTab)
this.defaultTab=this.getElement(this.defaultTab);this.attachBehaviors();};Spry.Widget.TabbedPanels.prototype.getElement=function(ele)
{if(ele&&typeof ele=="string")
return document.getElementById(ele);return ele;}
Spry.Widget.TabbedPanels.prototype.getElementChildren=function(element)
{var children=[];var child=element.firstChild;while(child)
{if(child.nodeType==1)
children.push(child);child=child.nextSibling;}
return children;};Spry.Widget.TabbedPanels.prototype.addClassName=function(ele,className)
{if(!ele||!className||(ele.className&&ele.className.search(new RegExp("\\b"+className+"\\b"))!=-1))
return;ele.className+=(ele.className?" ":"")+className;};Spry.Widget.TabbedPanels.prototype.removeClassName=function(ele,className)
{if(!ele||!className||(ele.className&&ele.className.search(new RegExp("\\b"+className+"\\b"))==-1))
return;ele.className=ele.className.replace(new RegExp("\\s*\\b"+className+"\\b","g"),"");};Spry.Widget.TabbedPanels.setOptions=function(obj,optionsObj,ignoreUndefinedProps)
{if(!optionsObj)
return;for(var optionName in optionsObj)
{if(ignoreUndefinedProps&&optionsObj[optionName]==undefined)
continue;obj[optionName]=optionsObj[optionName];}};Spry.Widget.TabbedPanels.prototype.getTabGroup=function()
{if(this.element)
{var children=this.getElementChildren(this.element);if(children.length)
return children[0];}
return null;};Spry.Widget.TabbedPanels.prototype.getTabs=function()
{var tabs=[];var tg=this.getTabGroup();if(tg)
tabs=this.getElementChildren(tg);return tabs;};Spry.Widget.TabbedPanels.prototype.getContentPanelGroup=function()
{if(this.element)
{var children=this.getElementChildren(this.element);if(children.length>1)
return children[1];}
return null;};Spry.Widget.TabbedPanels.prototype.getContentPanels=function()
{var panels=[];var pg=this.getContentPanelGroup();if(pg)
panels=this.getElementChildren(pg);return panels;};Spry.Widget.TabbedPanels.prototype.getIndex=function(ele,arr)
{ele=this.getElement(ele);if(ele&&arr&&arr.length)
{for(var i=0;i<arr.length;i++)
{if(ele==arr[i])
return i;}}
return-1;};Spry.Widget.TabbedPanels.prototype.getTabIndex=function(ele)
{var i=this.getIndex(ele,this.getTabs());if(i<0)
i=this.getIndex(ele,this.getContentPanels());return i;};Spry.Widget.TabbedPanels.prototype.getCurrentTabIndex=function()
{return this.currentTabIndex;};Spry.Widget.TabbedPanels.prototype.getTabbedPanelCount=function(ele)
{return Math.min(this.getTabs().length,this.getContentPanels().length);};Spry.Widget.TabbedPanels.addEventListener=function(element,eventType,handler,capture)
{try
{if(element.addEventListener)
element.addEventListener(eventType,handler,capture);else if(element.attachEvent)
element.attachEvent("on"+eventType,handler);}
catch(e){}};Spry.Widget.TabbedPanels.prototype.onTabClick=function(e,tab)
{this.showPanel(tab);};Spry.Widget.TabbedPanels.prototype.onTabMouseOver=function(e,tab)
{this.addClassName(tab,this.tabHoverClass);};Spry.Widget.TabbedPanels.prototype.onTabMouseOut=function(e,tab)
{this.removeClassName(tab,this.tabHoverClass);};Spry.Widget.TabbedPanels.prototype.onTabFocus=function(e,tab)
{this.hasFocus=true;this.addClassName(this.element,this.tabFocusedClass);};Spry.Widget.TabbedPanels.prototype.onTabBlur=function(e,tab)
{this.hasFocus=false;this.removeClassName(this.element,this.tabFocusedClass);};Spry.Widget.TabbedPanels.ENTER_KEY=13;Spry.Widget.TabbedPanels.SPACE_KEY=32;Spry.Widget.TabbedPanels.prototype.onTabKeyDown=function(e,tab)
{var key=e.keyCode;if(!this.hasFocus||(key!=Spry.Widget.TabbedPanels.ENTER_KEY&&key!=Spry.Widget.TabbedPanels.SPACE_KEY))
return true;this.showPanel(tab);if(e.stopPropagation)
e.stopPropagation();if(e.preventDefault)
e.preventDefault();return false;};Spry.Widget.TabbedPanels.prototype.preorderTraversal=function(root,func)
{var stopTraversal=false;if(root)
{stopTraversal=func(root);if(root.hasChildNodes())
{var child=root.firstChild;while(!stopTraversal&&child)
{stopTraversal=this.preorderTraversal(child,func);try{child=child.nextSibling;}catch(e){child=null;}}}}
return stopTraversal;};Spry.Widget.TabbedPanels.prototype.addPanelEventListeners=function(tab,panel)
{var self=this;Spry.Widget.TabbedPanels.addEventListener(tab,"click",function(e){return self.onTabClick(e,tab);},false);Spry.Widget.TabbedPanels.addEventListener(tab,"mouseover",function(e){return self.onTabMouseOver(e,tab);},false);Spry.Widget.TabbedPanels.addEventListener(tab,"mouseout",function(e){return self.onTabMouseOut(e,tab);},false);if(this.enableKeyboardNavigation)
{var tabIndexEle=null;var tabAnchorEle=null;this.preorderTraversal(tab,function(node){if(node.nodeType==1)
{var tabIndexAttr=tab.attributes.getNamedItem("tabindex");if(tabIndexAttr)
{tabIndexEle=node;return true;}
if(!tabAnchorEle&&node.nodeName.toLowerCase()=="a")
tabAnchorEle=node;}
return false;});if(tabIndexEle)
this.focusElement=tabIndexEle;else if(tabAnchorEle)
this.focusElement=tabAnchorEle;if(this.focusElement)
{Spry.Widget.TabbedPanels.addEventListener(this.focusElement,"focus",function(e){return self.onTabFocus(e,tab);},false);Spry.Widget.TabbedPanels.addEventListener(this.focusElement,"blur",function(e){return self.onTabBlur(e,tab);},false);Spry.Widget.TabbedPanels.addEventListener(this.focusElement,"keydown",function(e){return self.onTabKeyDown(e,tab);},false);}}};Spry.Widget.TabbedPanels.prototype.showPanel=function(elementOrIndex)
{var tpIndex=-1;if(typeof elementOrIndex=="number")
tpIndex=elementOrIndex;else
tpIndex=this.getTabIndex(elementOrIndex);if(!tpIndex<0||tpIndex>=this.getTabbedPanelCount())
return;var tabs=this.getTabs();var panels=this.getContentPanels();var numTabbedPanels=Math.max(tabs.length,panels.length);for(var i=0;i<numTabbedPanels;i++)
{if(i!=tpIndex)
{if(tabs[i])
this.removeClassName(tabs[i],this.tabSelectedClass);if(panels[i])
{this.removeClassName(panels[i],this.panelVisibleClass);panels[i].style.display="none";}}}
this.addClassName(tabs[tpIndex],this.tabSelectedClass);this.addClassName(panels[tpIndex],this.panelVisibleClass);panels[tpIndex].style.display="block";this.currentTabIndex=tpIndex;};Spry.Widget.TabbedPanels.prototype.attachBehaviors=function(element)
{var tabs=this.getTabs();var panels=this.getContentPanels();var panelCount=this.getTabbedPanelCount();for(var i=0;i<panelCount;i++)
this.addPanelEventListeners(tabs[i],panels[i]);this.showPanel(this.defaultTab);};function setAction(name,target){var e=document.getElementsByTagName("form");for(var i=0;i<e.length;i++){if(e[i].name==name){e[i].action.value=target;}}}
function getElement(name){var e=document.getElementsByName(name);if(e.length>0){return e[0];}
return null;}
function getParentForm(e){var parent=e.parentNode;while(parent!=null&&parent.nodeName.toLowerCase()!="form"){parent=parent.parentNode;}
return parent;}
function getParentFormName(e){var form=getParentForm(e);if(form==null){return"";}
return form.name;}
function setActionOnForm(element,target){var form=getParentForm(element);if(form!=null){form.action.value=target;}}
function submitAction(element,target){var form=getParentForm(element);if(form!=null){form.action.value=target;}
form.submit();}
function showBossPopup(anchor,url,width,height){var win=new PopupWindow();win.autoHide();win.setUrl(url);win.setSize(width,height);win.refresh();win.showPopup(anchor);}
var newwindow='';function showPopup(url,type,width,height){return showPopup(url,type,width,height,'yes');}
function showPopup(url,type,width,height,scrollbars){if(!window.focus){return true;}
var href;if(typeof(url)=="string"){href=url;}else{href=url.href;}
if(!newwindow.closed&&newwindow.location){newwindow.location.href=href;}else{var winl=(screen.width-width)/2;var wint=(screen.height-height)/2;newwindow=window.open(href,"Popup","height="+height+",width="+width+",top="+wint+",left="+winl+",scrollbars="+scrollbars);if(!newwindow.opener){newwindow.opener=self;}}
if(window.focus){newwindow.focus();}
return false;}
function submitForm(formName,actionValue){var form=document.forms[formName];form.elements['action'].value=actionValue;form.submit();}
function getHTTPObject(){var xhr=false;if(window.XMLHttpRequest){xhr=new XMLHttpRequest();}else{if(window.ActiveXObject){try{xhr=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e){try{xhr=new ActiveXObject("Microsoft.XMLHTTP");}
catch(e){xhr=false;}}}}
return xhr;}
function displayResponse(request){if(request.readyState==4){if(request.status==200||request.status==304){alert(request.responseText);}}}
function register(){var request=getHTTPObject();var email=document.getElementById("subscribefieldfooter").value;if(request){request.onreadystatechange=function(){displayResponse(request);};request.open("GET","http://localhost/colora/registration.do",false);request.send(null);}}
function executeEllipsis(){var ellipsisSeq=0;var ellipsisEls=document.getElementsByTagName("span");for(var i=0;i<ellipsisEls.length;i++){var el=ellipsisEls[i];if(el.className.match(/ellipsis/)){var maxLength=el.getAttribute("maxLength");if(!maxLength){maxLength=200;}
var longText=trim(el.innerHTML);if(longText.substring(0,3).toLowerCase()=="<p>"){longText=longText.substring(3,longText.length-4);}
var shortText=trim(stripTags(el.innerHTML));if(shortText.length>maxLength){shortText=shortText.substring(0,maxLength);shortText=shortText.replace(/\w+$/,"");el.id="ellipsis"+ellipsisSeq++;el.innerHTML="<span id=\""+el.id+"short\">"+"<p>"+shortText+"<a style=\"text-decoration: none\" href=\"javascript:ellipsisLong('"+el.id+"')\">...</a>"+"</span>"+"<span style=\"display:none\" id=\""+el.id+"long\">"+longText+"<a style=\"text-decoration: none\" href=\"javascript:ellipsisShort('"+el.id+"')\">...</a> "+"</span>"+"</p>";}else{el.innerHTML=longText;}}}}
function stripTags(t){while(t.match(/<.*>/)){t=t.replace(/<[^>]*>/,"");}
return t;}
function trim(t){return t.replace(/&nbsp;/g,"").replace(/^[ \r\n\t]*/,"").replace(/[ \r\n\t]*$/,"");}
function ellipsisShort(id){document.getElementById(id+"short").style.display="inline";document.getElementById(id+"long").style.display="none";}
function ellipsisLong(id){document.getElementById(id+"short").style.display="none";document.getElementById(id+"long").style.display="inline";}
function write_flash(image){document.write("<object type=\"application/x-shockwave-flash\" class=\"visual\" data=\""+image+"\" width=\"1004\" height=\"170\">");document.write("<param name=\"movie\" value=\""+image+"\"/>");document.write("<param name=\"autoStart\" value=\"-1\"/>");document.write("<param name=\"quality\" value=\"high\"/>");document.write("<param name=\"wmode\" value=\"transparent\"/>");document.write("<param name=\"showControls\" value=\"false\"/></object>");}
function write_flash_on_id(image,id){var htmlString;htmlString="<object type=\"application/x-shockwave-flash\" class=\"visual\" data=\""+image+"\" width=\"1004\" height=\"170\">";htmlString=htmlString+"<param name=\"movie\" value=\""+image+"\"/>";htmlString=htmlString+"<param name=\"autoStart\" value=\"-1\"/>";htmlString=htmlString+"<param name=\"quality\" value=\"high\"/>";htmlString=htmlString+"<param name=\"wmode\" value=\"transparent\"/>";htmlString=htmlString+"<param name=\"showControls\" value=\"false\"/></object>";document.getElementById(id).innerHTML=htmlString;}
function write_flash_on_id(image,id,width){var htmlString;htmlString="<object type=\"application/x-shockwave-flash\" class=\"visual\" data=\""+image+"\" width=\""+width+"\">";htmlString=htmlString+"<param name=\"movie\" value=\""+image+"\"/>";htmlString=htmlString+"<param name=\"autoStart\" value=\"-1\"/>";htmlString=htmlString+"<param name=\"quality\" value=\"high\"/>";htmlString=htmlString+"<param name=\"wmode\" value=\"transparent\"/>";htmlString=htmlString+"<param name=\"showControls\" value=\"false\"/></object>";document.getElementById(id).innerHTML=htmlString;}
function write_flash_on_id(image,id,width,height){var htmlString;htmlString="<object type=\"application/x-shockwave-flash\" class=\"visual\" data=\""+image+"\" width=\""+width+"\" height=\""+height+"\">";htmlString=htmlString+"<param name=\"movie\" value=\""+image+"\"/>";htmlString=htmlString+"<param name=\"autoStart\" value=\"-1\"/>";htmlString=htmlString+"<param name=\"quality\" value=\"high\"/>";htmlString=htmlString+"<param name=\"wmode\" value=\"transparent\"/>";htmlString=htmlString+"<param name=\"showControls\" value=\"false\"/></object>";document.getElementById(id).innerHTML=htmlString;}
Calendar=function(firstDayOfWeek,dateStr,onSelected,onClose){this.activeDiv=null;this.currentDateEl=null;this.getDateStatus=null;this.getDateToolTip=null;this.getDateText=null;this.timeout=null;this.onSelected=onSelected||null;this.onClose=onClose||null;this.dragging=false;this.hidden=false;this.minYear=1970;this.maxYear=2050;this.dateFormat=Calendar._TT["DEF_DATE_FORMAT"];this.ttDateFormat=Calendar._TT["TT_DATE_FORMAT"];this.isPopup=true;this.weekNumbers=true;this.firstDayOfWeek=typeof firstDayOfWeek=="number"?firstDayOfWeek:Calendar._FD;this.showsOtherMonths=false;this.dateStr=dateStr;this.ar_days=null;this.showsTime=false;this.time24=true;this.yearStep=2;this.hiliteToday=true;this.multiple=null;this.table=null;this.element=null;this.tbody=null;this.firstdayname=null;this.monthsCombo=null;this.yearsCombo=null;this.hilitedMonth=null;this.activeMonth=null;this.hilitedYear=null;this.activeYear=null;this.dateClicked=false;if(typeof Calendar._SDN=="undefined"){if(typeof Calendar._SDN_len=="undefined")
Calendar._SDN_len=3;var ar=new Array();for(var i=8;i>0;){ar[--i]=Calendar._DN[i].substr(0,Calendar._SDN_len);}
Calendar._SDN=ar;if(typeof Calendar._SMN_len=="undefined")
Calendar._SMN_len=3;ar=new Array();for(var i=12;i>0;){ar[--i]=Calendar._MN[i].substr(0,Calendar._SMN_len);}
Calendar._SMN=ar;}};Calendar._C=null;Calendar.is_opera=/opera/i.test(navigator.userAgent);Calendar.is_ie=(/msie/i.test(navigator.userAgent)&&!Calendar.is_opera);Calendar.is_ie5=(Calendar.is_ie&&/msie 5\.0/i.test(navigator.userAgent));Calendar.is_ie7=(Calendar.is_ie&&/msie 7\.0/i.test(navigator.userAgent));Calendar.is_mac_ie=(/msie.*mac/i.test(navigator.userAgent)&&!Zapatec.is_opera);Calendar.is_khtml=/Konqueror|Safari|KHTML/i.test(navigator.userAgent);Calendar.is_konqueror=/Konqueror/i.test(navigator.userAgent);Calendar.is_gecko=/Gecko/i.test(navigator.userAgent);Calendar.is_webkit=/WebKit/i.test(navigator.userAgent);Calendar.webkitVersion=Calendar.is_webkit?parseInt(navigator.userAgent.replace(/.+WebKit\/([0-9]+)\..+/,"$1")):-1;Calendar.getPageScrollY=function(){if(window.pageYOffset){return window.pageYOffset;}else{if(document.body&&document.body.scrollTop){return document.body.scrollTop;}else{if(document.documentElement&&document.documentElement.scrollTop){return document.documentElement.scrollTop;}}}
return 0;};Calendar.getPageScrollX=function(){if(window.pageXOffset){return window.pageXOffset;}else{if(document.body&&document.body.scrollLeft){return document.body.scrollLeft;}else{if(document.documentElement&&document.documentElement.scrollLeft){return document.documentElement.scrollLeft;}}}
return 0;};Calendar.getStyleProperty=function(oEl,sPr){var oDV=document.defaultView;if(oDV&&oDV.getComputedStyle){var oCS=oDV.getComputedStyle(oEl,"");if(oCS){sPr=sPr.replace(/([A-Z])/g,"-$1").toLowerCase();return oCS.getPropertyValue(sPr);}}else{if(oEl.currentStyle){return oEl.currentStyle[sPr];}}
return oEl.style[sPr];};Calendar.getAbsolutePos=function(el,scrollOff){var SL=0,ST=0;if(!scrollOff){var is_div=/^div$/i.test(el.tagName);if(is_div&&el.scrollLeft){SL=el.scrollLeft;}
if(is_div&&el.scrollTop){ST=el.scrollTop;}}
var r={x:el.offsetLeft-SL,y:el.offsetTop-ST};if(el.offsetParent){var tmp=this.getAbsolutePos(el.offsetParent);r.x+=tmp.x;r.y+=tmp.y;}
return r;};Calendar.getElementOffset=function(oEl){var iLeft=iTop=iWidth=iHeight=0;var sTag;if(oEl.getBoundingClientRect){var oRect=oEl.getBoundingClientRect();iLeft=oRect.left;iTop=oRect.top;iWidth=oRect.right-iLeft;iHeight=oRect.bottom-iTop;iLeft+=Calendar.getPageScrollX()-2;iTop+=Calendar.getPageScrollY()-2;}else{iWidth=oEl.offsetWidth;iHeight=oEl.offsetHeight;var sPos=Calendar.getStyleProperty(oEl,"position");if(sPos=="fixed"){iLeft=oEl.offsetLeft+Calendar.getPageScrollX();iTop=oEl.offsetTop+Calendar.getPageScrollY();}else{if(sPos=="absolute"){while(oEl){sTag=oEl.tagName;if(sTag){sTag=sTag.toLowerCase();if(sTag!="body"&&sTag!="html"){iLeft+=parseInt(oEl.offsetLeft,10)||0;iTop+=parseInt(oEl.offsetTop,10)||0;}}
oEl=oEl.offsetParent;sTag=oEl?oEl.tagName:null;if(sTag){sTag=sTag.toLowerCase();if(sTag!="body"&&sTag!="html"){iLeft-=oEl.scrollLeft;iTop-=oEl.scrollTop;}}}}else{var bMoz=(Calendar.is_gecko&&!Calendar.is_khtml);var fStyle=Calendar.getStyleProperty;var oP=oEl;while(oP){if(bMoz){sTag=oP.tagName;if(sTag){sTag=sTag.toLowerCase();if(sTag=="body"&&!(fStyle(oP,"-moz-box-sizing")=="border-box")){iLeft+=parseInt(fStyle(oP,"border-left-width"));iTop+=parseInt(fStyle(oP,"border-top-width"));}}}
iLeft+=parseInt(oP.offsetLeft,10)||0;iTop+=parseInt(oP.offsetTop,10)||0;oP=oP.offsetParent;}
oP=oEl;while(oP.parentNode){oP=oP.parentNode;sTag=oP.tagName;if(sTag){sTag=sTag.toLowerCase();if(sTag!="body"&&sTag!="html"&&sTag!="tr"){iLeft-=oP.scrollLeft;iTop-=oP.scrollTop;}}}}}}
return{left:iLeft,top:iTop,x:iLeft,y:iTop,width:iWidth,height:iHeight};};Calendar.getElementOffsetScrollable=function(oEl){var oPos=Zapatec.Utils.getElementOffset(oEl);if(oEl.scrollLeft){oPos.left-=oEl.scrollLeft;oPos.x=oPos.left;}
if(oEl.scrollTop){oPos.top-=oEl.scrollTop;oPos.y=oPos.top;}
return oPos;};Calendar.fixBoxPosition=function(box,leave){var screenX=Calendar.getPageScrollX();var screenY=Calendar.getPageScrollY();var sizes=Calendar.getWindowSize();leave=parseInt(leave,10)||0;if(box.x<screenX){box.x=screenX+leave;}
if(box.y<screenY){box.y=screenY+leave;}
if(box.x+box.width>screenX+sizes.width){box.x=screenX+sizes.width-box.width-leave;}
if(box.y+box.height>screenY+sizes.height){box.y=screenY+sizes.height-box.height-leave;}};Calendar.getWindowSize=function(){var iWidth=0;var iHeight=0;if(Calendar.is_opera){iWidth=document.body.clientWidth||0;iHeight=document.body.clientHeight||0;}else{if(Calendar.is_khtml){iWidth=window.innerWidth||0;iHeight=window.innerHeight||0;}else{if(document.compatMode&&document.compatMode=="CSS1Compat"){iWidth=document.documentElement.clientWidth||0;iHeight=document.documentElement.clientHeight||0;}else{iWidth=document.body.clientWidth||0;iHeight=document.body.clientHeight||0;}}}
return{width:iWidth,height:iHeight};};Calendar.isRelated=function(el,evt){var related=evt.relatedTarget;if(!related){var type=evt.type;if(type=="mouseover"){related=evt.fromElement;}else if(type=="mouseout"){related=evt.toElement;}}
while(related){if(related==el){return true;}
related=related.parentNode;}
return false;};Calendar.removeClass=function(el,className){if(!(el&&el.className)){return;}
var cls=el.className.split(" ");var ar=new Array();for(var i=cls.length;i>0;){if(cls[--i]!=className){ar[ar.length]=cls[i];}}
el.className=ar.join(" ");};Calendar.addClass=function(el,className){Calendar.removeClass(el,className);el.className+=" "+className;};Calendar.getElement=function(ev){var f=Calendar.is_ie?window.event.srcElement:ev.currentTarget;while(f.nodeType!=1||/^div$/i.test(f.tagName))
f=f.parentNode;return f;};Calendar.getTargetElement=function(ev){var f=Calendar.is_ie?window.event.srcElement:ev.target;while(f.nodeType!=1)
f=f.parentNode;return f;};Calendar.stopEvent=function(ev){ev||(ev=window.event);if(Calendar.is_ie){ev.cancelBubble=true;ev.returnValue=false;}else{ev.preventDefault();ev.stopPropagation();}
return false;};Calendar.addEvent=function(el,evname,func){if(el.attachEvent){el.attachEvent("on"+evname,func);}else if(el.addEventListener){el.addEventListener(evname,func,true);}else{el["on"+evname]=func;}};Calendar.removeEvent=function(el,evname,func){if(el.detachEvent){el.detachEvent("on"+evname,func);}else if(el.removeEventListener){el.removeEventListener(evname,func,true);}else{el["on"+evname]=null;}};Calendar.createElement=function(type,parent){var el=null;if(document.createElementNS){el=document.createElementNS("http://www.w3.org/1999/xhtml",type);}else{el=document.createElement(type);}
if(typeof parent!="undefined"){parent.appendChild(el);}
return el;};Calendar._add_evs=function(el){with(Calendar){addEvent(el,"mouseover",dayMouseOver);addEvent(el,"mousedown",dayMouseDown);addEvent(el,"mouseout",dayMouseOut);if(is_ie){addEvent(el,"dblclick",dayMouseDblClick);el.setAttribute("unselectable",true);}}};Calendar.findMonth=function(el){if(typeof el.month!="undefined"){return el;}else if(typeof el.parentNode.month!="undefined"){return el.parentNode;}
return null;};Calendar.findYear=function(el){if(typeof el.year!="undefined"){return el;}else if(typeof el.parentNode.year!="undefined"){return el.parentNode;}
return null;};Calendar.showMonthsCombo=function(){var cal=Calendar._C;if(!cal){return false;}
var cal=cal;var cd=cal.activeDiv;var mc=cal.monthsCombo;if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}
if(cal.activeMonth){Calendar.removeClass(cal.activeMonth,"active");}
var mon=cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];Calendar.addClass(mon,"active");cal.activeMonth=mon;var s=mc.style;s.display="block";if(cd.navtype<0)
s.left=cd.offsetLeft+"px";else{var mcw=mc.offsetWidth;if(typeof mcw=="undefined")
mcw=50;s.left=(cd.offsetLeft+cd.offsetWidth-mcw)+"px";}
s.top=(cd.offsetTop+cd.offsetHeight)+"px";};Calendar.showYearsCombo=function(fwd){var cal=Calendar._C;if(!cal){return false;}
var cal=cal;var cd=cal.activeDiv;var yc=cal.yearsCombo;if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}
if(cal.activeYear){Calendar.removeClass(cal.activeYear,"active");}
cal.activeYear=null;var Y=cal.date.getFullYear()+(fwd?1:-1);var yr=yc.firstChild;var show=false;for(var i=12;i>0;--i){if(Y>=cal.minYear&&Y<=cal.maxYear){yr.innerHTML=Y;yr.year=Y;yr.style.display="block";show=true;}else{yr.style.display="none";}
yr=yr.nextSibling;Y+=fwd?cal.yearStep:-cal.yearStep;}
if(show){var s=yc.style;s.display="block";if(cd.navtype<0)
s.left=cd.offsetLeft+"px";else{var ycw=yc.offsetWidth;if(typeof ycw=="undefined")
ycw=50;s.left=(cd.offsetLeft+cd.offsetWidth-ycw)+"px";}
s.top=(cd.offsetTop+cd.offsetHeight)+"px";}};Calendar.tableMouseUp=function(ev){var cal=Calendar._C;if(!cal){return false;}
if(cal.timeout){clearTimeout(cal.timeout);}
var el=cal.activeDiv;if(!el){return false;}
var target=Calendar.getTargetElement(ev);ev||(ev=window.event);Calendar.removeClass(el,"active");if(target==el||target.parentNode==el){Calendar.cellClick(el,ev);}
var mon=Calendar.findMonth(target);var date=null;if(mon){date=new Date(cal.date);if(mon.month!=date.getMonth()){date.setMonth(mon.month);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}else{var year=Calendar.findYear(target);if(year){date=new Date(cal.date);if(year.year!=date.getFullYear()){date.setFullYear(year.year);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}}
with(Calendar){removeEvent(document,"mouseup",tableMouseUp);removeEvent(document,"mouseover",tableMouseOver);removeEvent(document,"mousemove",tableMouseOver);cal._hideCombos();_C=null;return stopEvent(ev);}};Calendar.tableMouseOver=function(ev){var cal=Calendar._C;if(!cal){return;}
var el=cal.activeDiv;var target=Calendar.getTargetElement(ev);if(target==el||target.parentNode==el){Calendar.addClass(el,"hilite active");Calendar.addClass(el.parentNode,"rowhilite");}else{if(typeof el.navtype=="undefined"||(el.navtype!=50&&(el.navtype==0||Math.abs(el.navtype)>2)))
Calendar.removeClass(el,"active");Calendar.removeClass(el,"hilite");Calendar.removeClass(el.parentNode,"rowhilite");}
ev||(ev=window.event);if(el.navtype==50&&target!=el){var pos=Calendar.getAbsolutePos(el);var w=el.offsetWidth;var x=ev.clientX;var dx;var decrease=true;if(x>pos.x+w){dx=x-pos.x-w;decrease=false;}else
dx=pos.x-x;if(dx<0)dx=0;var range=el._range;var current=el._current;var count=Math.floor(dx/10)%range.length;for(var i=range.length;--i>=0;)
if(range[i]==current)
break;while(count-->0)
if(decrease){if(--i<0)
i=range.length-1;}else if(++i>=range.length)
i=0;var newval=range[i];el.innerHTML=newval;cal.onUpdateTime();}
var mon=Calendar.findMonth(target);if(mon){if(mon.month!=cal.date.getMonth()){if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}
Calendar.addClass(mon,"hilite");cal.hilitedMonth=mon;}else if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}}else{if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}
var year=Calendar.findYear(target);if(year){if(year.year!=cal.date.getFullYear()){if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}
Calendar.addClass(year,"hilite");cal.hilitedYear=year;}else if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}}else if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}}
return Calendar.stopEvent(ev);};Calendar.tableMouseDown=function(ev){if(Calendar.getTargetElement(ev)==Calendar.getElement(ev)){return Calendar.stopEvent(ev);}};Calendar.calDragIt=function(ev){var cal=Calendar._C;if(!(cal&&cal.dragging)){return false;}
var posX;var posY;if(Calendar.is_ie){posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft;}else{posX=ev.pageX;posY=ev.pageY;}
cal.hideShowCovered();var st=cal.element.style;st.left=(posX-cal.xOffs)+"px";st.top=(posY-cal.yOffs)+"px";return Calendar.stopEvent(ev);};Calendar.calDragEnd=function(ev){var cal=Calendar._C;if(!cal){return false;}
cal.dragging=false;with(Calendar){removeEvent(document,"mousemove",calDragIt);removeEvent(document,"mouseup",calDragEnd);tableMouseUp(ev);}
cal.hideShowCovered();};Calendar.dayMouseDown=function(ev){var el=Calendar.getElement(ev);if(el.disabled){return false;}
var cal=el.calendar;cal.activeDiv=el;Calendar._C=cal;if(el.navtype!=300)with(Calendar){if(el.navtype==50){el._current=el.innerHTML;addEvent(document,"mousemove",tableMouseOver);}else
addEvent(document,Calendar.is_ie5?"mousemove":"mouseover",tableMouseOver);addClass(el,"hilite active");addEvent(document,"mouseup",tableMouseUp);}else if(cal.isPopup){cal._dragStart(ev);}
if(el.navtype==-1||el.navtype==1){if(cal.timeout)clearTimeout(cal.timeout);cal.timeout=setTimeout("Calendar.showMonthsCombo()",250);}else if(el.navtype==-2||el.navtype==2){if(cal.timeout)clearTimeout(cal.timeout);cal.timeout=setTimeout((el.navtype>0)?"Calendar.showYearsCombo(true)":"Calendar.showYearsCombo(false)",250);}else{cal.timeout=null;}
return Calendar.stopEvent(ev);};Calendar.dayMouseDblClick=function(ev){Calendar.cellClick(Calendar.getElement(ev),ev||window.event);if(Calendar.is_ie){document.selection.empty();}};Calendar.dayMouseOver=function(ev){var el=Calendar.getElement(ev);if(Calendar.isRelated(el,ev)||Calendar._C||el.disabled){return false;}
if(el.ttip){if(el.ttip.substr(0,1)=="_"){el.ttip=el.caldate.print(el.calendar.ttDateFormat)+el.ttip.substr(1);}
el.calendar.tooltips.innerHTML=el.ttip;}
if(el.navtype!=300){Calendar.addClass(el,"hilite");if(el.caldate){Calendar.addClass(el.parentNode,"rowhilite");}}
return Calendar.stopEvent(ev);};Calendar.dayMouseOut=function(ev){with(Calendar){var el=getElement(ev);if(isRelated(el,ev)||_C||el.disabled)
return false;removeClass(el,"hilite");if(el.caldate)
removeClass(el.parentNode,"rowhilite");if(el.calendar)
el.calendar.tooltips.innerHTML=_TT["SEL_DATE"];return stopEvent(ev);}};Calendar.cellClick=function(el,ev){var cal=el.calendar;var closing=false;var newdate=false;var date=null;if(typeof el.navtype=="undefined"){if(cal.currentDateEl){Calendar.removeClass(cal.currentDateEl,"selected");}
Calendar.addClass(el,"selected");closing=(cal.currentDateEl==el);if(!closing){cal.currentDateEl=el;}
cal.date.setDateOnly(el.caldate);date=cal.date;var other_month=!(cal.dateClicked=!el.otherMonth);if(!other_month&&!cal.currentDateEl)
cal._toggleMultipleDate(new Date(date));else
newdate=!el.disabled;if(other_month)
cal._init(cal.firstDayOfWeek,date);}else{if(el.navtype==200){Calendar.removeClass(el,"hilite");cal.callCloseHandler();return;}
date=new Date(cal.date);if(el.navtype==0)
date.setDateOnly(new Date());cal.dateClicked=false;var year=date.getFullYear();var mon=date.getMonth();function setMonth(m){var day=date.getDate();var max=date.getMonthDays(m);if(day>max){date.setDate(max);}
date.setMonth(m);};switch(el.navtype){case 400:Calendar.removeClass(el,"hilite");var text=Calendar._TT["ABOUT"];if(typeof text!="undefined"){text+=cal.showsTime?Calendar._TT["ABOUT_TIME"]:"";}else{text="Help and about box text is not translated into this language.\n"+"If you know this language and you feel generous please update\n"+"the corresponding file in \"lang\" subdir to match calendar-en.js\n"+"and send it back to <mihai_bazon@yahoo.com> to get it into the distribution  ;-)\n\n"+"Thank you!\n"+"http://dynarch.com/mishoo/calendar.epl\n";}
alert(text);return;case-2:if(year>cal.minYear){date.setFullYear(year-1);}
break;case-1:if(mon>0){setMonth(mon-1);}else if(year-->cal.minYear){date.setFullYear(year);setMonth(11);}
break;case 1:if(mon<11){setMonth(mon+1);}else if(year<cal.maxYear){date.setFullYear(year+1);setMonth(0);}
break;case 2:if(year<cal.maxYear){date.setFullYear(year+1);}
break;case 100:cal.setFirstDayOfWeek(el.fdow);return;case 50:var range=el._range;var current=el.innerHTML;for(var i=range.length;--i>=0;)
if(range[i]==current)
break;if(ev&&ev.shiftKey){if(--i<0)
i=range.length-1;}else if(++i>=range.length)
i=0;var newval=range[i];el.innerHTML=newval;cal.onUpdateTime();return;case 0:if((typeof cal.getDateStatus=="function")&&cal.getDateStatus(date,date.getFullYear(),date.getMonth(),date.getDate())){return false;}
break;}
if(!date.equalsTo(cal.date)){cal.setDate(date);newdate=true;}else if(el.navtype==0)
newdate=closing=true;}
if(newdate){ev&&cal.callHandler();}
if(closing){Calendar.removeClass(el,"hilite");ev&&cal.callCloseHandler();}};Calendar.prototype.create=function(_par){var parent=null;if(!_par){parent=document.getElementsByTagName("body")[0];this.isPopup=true;}else{parent=_par;this.isPopup=false;}
this.date=this.dateStr?new Date(this.dateStr):new Date();var table=Calendar.createElement("table");this.table=table;table.cellSpacing=0;table.cellPadding=0;table.calendar=this;Calendar.addEvent(table,"mousedown",Calendar.tableMouseDown);var div=Calendar.createElement("div");this.element=div;div.className="calendar";if(this.isPopup){div.style.position="absolute";div.style.display="none";}
div.appendChild(table);var thead=Calendar.createElement("thead",table);var cell=null;var row=null;var cal=this;var hh=function(text,cs,navtype){cell=Calendar.createElement("td",row);cell.colSpan=cs;cell.className="button";if(navtype!=0&&Math.abs(navtype)<=2)
cell.className+=" nav";Calendar._add_evs(cell);cell.calendar=cal;cell.navtype=navtype;cell.innerHTML="<div unselectable='on'>"+text+"</div>";return cell;};row=Calendar.createElement("tr",thead);var title_length=6;(this.isPopup)&&--title_length;(this.weekNumbers)&&++title_length;hh("?",1,400).ttip=Calendar._TT["INFO"];this.title=hh("",title_length,300);this.title.className="title";if(this.isPopup){this.title.ttip=Calendar._TT["DRAG_TO_MOVE"];this.title.style.cursor="move";hh("&#x00d7;",1,200).ttip=Calendar._TT["CLOSE"];}
row=Calendar.createElement("tr",thead);row.className="headrow";this._nav_py=hh("&#x00ab;",1,-2);this._nav_py.ttip=Calendar._TT["PREV_YEAR"];this._nav_pm=hh("&#x2039;",1,-1);this._nav_pm.ttip=Calendar._TT["PREV_MONTH"];this._nav_now=hh(Calendar._TT["TODAY"],this.weekNumbers?4:3,0);this._nav_now.ttip=Calendar._TT["GO_TODAY"];this._nav_nm=hh("&#x203a;",1,1);this._nav_nm.ttip=Calendar._TT["NEXT_MONTH"];this._nav_ny=hh("&#x00bb;",1,2);this._nav_ny.ttip=Calendar._TT["NEXT_YEAR"];row=Calendar.createElement("tr",thead);row.className="daynames";if(this.weekNumbers){cell=Calendar.createElement("td",row);cell.className="name wn";cell.innerHTML=Calendar._TT["WK"];}
for(var i=7;i>0;--i){cell=Calendar.createElement("td",row);if(!i){cell.navtype=100;cell.calendar=this;Calendar._add_evs(cell);}}
this.firstdayname=(this.weekNumbers)?row.firstChild.nextSibling:row.firstChild;this._displayWeekdays();var tbody=Calendar.createElement("tbody",table);this.tbody=tbody;for(i=6;i>0;--i){row=Calendar.createElement("tr",tbody);if(this.weekNumbers){cell=Calendar.createElement("td",row);}
for(var j=7;j>0;--j){cell=Calendar.createElement("td",row);cell.calendar=this;Calendar._add_evs(cell);}}
if(this.showsTime){row=Calendar.createElement("tr",tbody);row.className="time";cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=2;cell.innerHTML=Calendar._TT["TIME"]||"&nbsp;";cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=this.weekNumbers?4:3;(function(){function makeTimePart(className,init,range_start,range_end){var part=Calendar.createElement("span",cell);part.className=className;part.innerHTML=init;part.calendar=cal;part.ttip=Calendar._TT["TIME_PART"];part.navtype=50;part._range=[];if(typeof range_start!="number")
part._range=range_start;else{for(var i=range_start;i<=range_end;++i){var txt;if(i<10&&range_end>=10)txt='0'+i;else txt=''+i;part._range[part._range.length]=txt;}}
Calendar._add_evs(part);return part;};var hrs=cal.date.getHours();var mins=cal.date.getMinutes();var t12=!cal.time24;var pm=(hrs>12);if(t12&&pm)hrs-=12;var H=makeTimePart("hour",hrs,t12?1:0,t12?12:23);var span=Calendar.createElement("span",cell);span.innerHTML=":";span.className="colon";var M=makeTimePart("minute",mins,0,59);var AP=null;cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=2;if(t12)
AP=makeTimePart("ampm",pm?"pm":"am",["am","pm"]);else
cell.innerHTML="&nbsp;";cal.onSetTime=function(){var pm,hrs=this.date.getHours(),mins=this.date.getMinutes();if(t12){pm=(hrs>=12);if(pm)hrs-=12;if(hrs==0)hrs=12;AP.innerHTML=pm?"pm":"am";}
H.innerHTML=(hrs<10)?("0"+hrs):hrs;M.innerHTML=(mins<10)?("0"+mins):mins;};cal.onUpdateTime=function(){var date=this.date;var h=parseInt(H.innerHTML,10);if(t12){if(/pm/i.test(AP.innerHTML)&&h<12)
h+=12;else if(/am/i.test(AP.innerHTML)&&h==12)
h=0;}
var d=date.getDate();var m=date.getMonth();var y=date.getFullYear();date.setHours(h);date.setMinutes(parseInt(M.innerHTML,10));date.setFullYear(y);date.setMonth(m);date.setDate(d);this.dateClicked=false;this.callHandler();};})();}else{this.onSetTime=this.onUpdateTime=function(){};}
var tfoot=Calendar.createElement("tfoot",table);row=Calendar.createElement("tr",tfoot);row.className="footrow";cell=hh(Calendar._TT["SEL_DATE"],this.weekNumbers?8:7,300);cell.className="ttip";if(this.isPopup){cell.ttip=Calendar._TT["DRAG_TO_MOVE"];cell.style.cursor="move";}
this.tooltips=cell;div=Calendar.createElement("div",this.element);this.monthsCombo=div;div.className="combo";for(i=0;i<Calendar._MN.length;++i){var mn=Calendar.createElement("div");mn.className=Calendar.is_ie?"label-IEfix":"label";mn.month=i;mn.innerHTML=Calendar._SMN[i];div.appendChild(mn);}
div=Calendar.createElement("div",this.element);this.yearsCombo=div;div.className="combo";for(i=12;i>0;--i){var yr=Calendar.createElement("div");yr.className=Calendar.is_ie?"label-IEfix":"label";div.appendChild(yr);}
this._init(this.firstDayOfWeek,this.date);parent.appendChild(this.element);};Calendar._keyEvent=function(ev){var cal=window._dynarch_popupCalendar;if(!cal||cal.multiple)
return false;(Calendar.is_ie)&&(ev=window.event);var act=(Calendar.is_ie||ev.type=="keypress"),K=ev.keyCode;if(ev.ctrlKey){switch(K){case 37:act&&Calendar.cellClick(cal._nav_pm);break;case 38:act&&Calendar.cellClick(cal._nav_py);break;case 39:act&&Calendar.cellClick(cal._nav_nm);break;case 40:act&&Calendar.cellClick(cal._nav_ny);break;default:return false;}}else switch(K){case 32:Calendar.cellClick(cal._nav_now);break;case 27:act&&cal.callCloseHandler();break;case 37:case 38:case 39:case 40:if(act){var prev,x,y,ne,el,step;prev=K==37||K==38;step=(K==37||K==39)?1:7;function setVars(){el=cal.currentDateEl;var p=el.pos;x=p&15;y=p>>4;ne=cal.ar_days[y][x];};setVars();function prevMonth(){var date=new Date(cal.date);date.setDate(date.getDate()-step);cal.setDate(date);};function nextMonth(){var date=new Date(cal.date);date.setDate(date.getDate()+step);cal.setDate(date);};while(1){switch(K){case 37:if(--x>=0)
ne=cal.ar_days[y][x];else{x=6;K=38;continue;}
break;case 38:if(--y>=0)
ne=cal.ar_days[y][x];else{prevMonth();setVars();}
break;case 39:if(++x<7)
ne=cal.ar_days[y][x];else{x=0;K=40;continue;}
break;case 40:if(++y<cal.ar_days.length)
ne=cal.ar_days[y][x];else{nextMonth();setVars();}
break;}
break;}
if(ne){if(!ne.disabled)
Calendar.cellClick(ne);else if(prev)
prevMonth();else
nextMonth();}}
break;case 13:if(act)
Calendar.cellClick(cal.currentDateEl,ev);break;default:return false;}
return Calendar.stopEvent(ev);};Calendar.prototype._init=function(firstDayOfWeek,date){var today=new Date(),TY=today.getFullYear(),TM=today.getMonth(),TD=today.getDate();this.table.style.visibility="hidden";var year=date.getFullYear();if(year<this.minYear){year=this.minYear;date.setFullYear(year);}else if(year>this.maxYear){year=this.maxYear;date.setFullYear(year);}
this.firstDayOfWeek=firstDayOfWeek;this.date=new Date(date);var month=date.getMonth();var mday=date.getDate();var no_days=date.getMonthDays();date.setDate(1);var day1=(date.getDay()-this.firstDayOfWeek)%7;if(day1<0)
day1+=7;date.setDate(-day1);date.setDate(date.getDate()+1);var row=this.tbody.firstChild;var MN=Calendar._SMN[month];var ar_days=this.ar_days=new Array();var weekend=Calendar._TT["WEEKEND"];var dates=this.multiple?(this.datesCells={}):null;for(var i=0;i<6;++i,row=row.nextSibling){var cell=row.firstChild;if(this.weekNumbers){cell.className="day wn";cell.innerHTML=date.getWeekNumber();cell=cell.nextSibling;}
row.className="daysrow";var hasdays=false,iday,dpos=ar_days[i]=[];for(var j=0;j<7;++j,cell=cell.nextSibling,date.setDate(iday+1)){iday=date.getDate();var wday=date.getDay();cell.className="day";cell.pos=i<<4|j;dpos[j]=cell;var current_month=(date.getMonth()==month);if(!current_month){if(this.showsOtherMonths){cell.className+=" othermonth";cell.otherMonth=true;}else{cell.className="emptycell";cell.innerHTML="&nbsp;";cell.disabled=true;continue;}}else{cell.otherMonth=false;hasdays=true;}
cell.disabled=false;cell.innerHTML=this.getDateText?this.getDateText(date,iday):iday;if(dates)
dates[date.print("%Y%m%d")]=cell;if(this.getDateStatus){var status=this.getDateStatus(date,year,month,iday);if(this.getDateToolTip){var toolTip=this.getDateToolTip(date,year,month,iday);if(toolTip)
cell.title=toolTip;}
if(status===true){cell.className+=" disabled";cell.disabled=true;}else{if(/disabled/i.test(status))
cell.disabled=true;cell.className+=" "+status;}}
if(!cell.disabled){cell.caldate=new Date(date);cell.ttip="_";if(!this.multiple&&current_month&&iday==mday&&this.hiliteToday){cell.className+=" selected";this.currentDateEl=cell;}
if(date.getFullYear()==TY&&date.getMonth()==TM&&iday==TD){cell.className+=" today";cell.ttip+=Calendar._TT["PART_TODAY"];}
if(weekend.indexOf(wday.toString())!=-1)
cell.className+=cell.otherMonth?" oweekend":" weekend";}}
if(!(hasdays||this.showsOtherMonths))
row.className="emptyrow";}
this.title.innerHTML=Calendar._MN[month]+", "+year;this.onSetTime();this.table.style.visibility="visible";this._initMultipleDates();};Calendar.prototype._initMultipleDates=function(){if(this.multiple){for(var i in this.multiple){var cell=this.datesCells[i];var d=this.multiple[i];if(!d)
continue;if(cell)
cell.className+=" selected";}}};Calendar.prototype._toggleMultipleDate=function(date){if(this.multiple){var ds=date.print("%Y%m%d");var cell=this.datesCells[ds];if(cell){var d=this.multiple[ds];if(!d){Calendar.addClass(cell,"selected");this.multiple[ds]=date;}else{Calendar.removeClass(cell,"selected");delete this.multiple[ds];}}}};Calendar.prototype.setDateToolTipHandler=function(unaryFunction){this.getDateToolTip=unaryFunction;};Calendar.prototype.setDate=function(date){if(!date.equalsTo(this.date)){this._init(this.firstDayOfWeek,date);}};Calendar.prototype.refresh=function(){this._init(this.firstDayOfWeek,this.date);};Calendar.prototype.setFirstDayOfWeek=function(firstDayOfWeek){this._init(firstDayOfWeek,this.date);this._displayWeekdays();};Calendar.prototype.setDateStatusHandler=Calendar.prototype.setDisabledHandler=function(unaryFunction){this.getDateStatus=unaryFunction;};Calendar.prototype.setRange=function(a,z){this.minYear=a;this.maxYear=z;};Calendar.prototype.callHandler=function(){if(this.onSelected){this.onSelected(this,this.date.print(this.dateFormat));}};Calendar.prototype.callCloseHandler=function(){if(this.onClose){this.onClose(this);}
this.hideShowCovered();};Calendar.prototype.destroy=function(){var el=this.element.parentNode;el.removeChild(this.element);Calendar._C=null;window._dynarch_popupCalendar=null;};Calendar.prototype.reparent=function(new_parent){var el=this.element;el.parentNode.removeChild(el);new_parent.appendChild(el);};Calendar._checkCalendar=function(ev){var calendar=window._dynarch_popupCalendar;if(!calendar){return false;}
var el=Calendar.is_ie?Calendar.getElement(ev):Calendar.getTargetElement(ev);for(;el!=null&&el!=calendar.element;el=el.parentNode);if(el==null){window._dynarch_popupCalendar.callCloseHandler();return Calendar.stopEvent(ev);}};Calendar.prototype.show=function(){var rows=this.table.getElementsByTagName("tr");for(var i=rows.length;i>0;){var row=rows[--i];Calendar.removeClass(row,"rowhilite");var cells=row.getElementsByTagName("td");for(var j=cells.length;j>0;){var cell=cells[--j];Calendar.removeClass(cell,"hilite");Calendar.removeClass(cell,"active");}}
this.element.style.display="block";this.hidden=false;if(this.isPopup){window._dynarch_popupCalendar=this;Calendar.addEvent(document,"keydown",Calendar._keyEvent);Calendar.addEvent(document,"keypress",Calendar._keyEvent);Calendar.addEvent(document,"mousedown",Calendar._checkCalendar);}
this.hideShowCovered();};Calendar.prototype.hide=function(){if(this.isPopup){Calendar.removeEvent(document,"keydown",Calendar._keyEvent);Calendar.removeEvent(document,"keypress",Calendar._keyEvent);Calendar.removeEvent(document,"mousedown",Calendar._checkCalendar);}
this.element.style.display="none";this.hidden=true;this.hideShowCovered();};Calendar.prototype.showAt=function(x,y){var s=this.element.style;s.left=x+"px";s.top=y+"px";this.show();};Calendar.prototype.showAtElement=function(el,opts){var self=this;var p=Calendar.getElementOffset(el);if(!opts||typeof opts!="string"){this.showAt(p.x,p.y+el.offsetHeight);return true;}
function fixPosition(box){if(box.x<0)
box.x=0;if(box.y<0)
box.y=0;var cp=document.createElement("div");var s=cp.style;s.position="absolute";s.right=s.bottom=s.width=s.height="0px";document.body.appendChild(cp);var br=Calendar.getAbsolutePos(cp);document.body.removeChild(cp);if(Calendar.is_ie){br.y+=document.body.scrollTop;br.x+=document.body.scrollLeft;}else{br.y+=window.scrollY;br.x+=window.scrollX;}
var tmp=box.x+box.width-br.x;if(tmp>0)box.x-=tmp;tmp=box.y+box.height-br.y;if(tmp>0)box.y-=tmp;};this.element.style.display="block";Calendar.continuation_for_the_fucking_khtml_browser=function(){var w=self.element.offsetWidth;var h=self.element.offsetHeight;self.element.style.display="none";var valign=opts.substr(0,1);var halign="l";if(opts.length>1){halign=opts.substr(1,1);}
switch(valign){case"T":p.y-=h;break;case"B":p.y+=el.offsetHeight;break;case"C":p.y+=(el.offsetHeight-h)/2;break;case"t":p.y+=el.offsetHeight-h;break;case"b":break;}
switch(halign){case"L":p.x-=w;break;case"R":p.x+=el.offsetWidth;break;case"C":p.x+=(el.offsetWidth-w)/2;break;case"l":p.x+=el.offsetWidth-w;break;case"r":break;}
p.width=w;p.height=h+40;self.monthsCombo.style.display="none";Calendar.fixBoxPosition(p,10);self.showAt(p.x,p.y);};if(Calendar.is_khtml)
setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()",10);else
Calendar.continuation_for_the_fucking_khtml_browser();};Calendar.prototype.setDateFormat=function(str){this.dateFormat=str;};Calendar.prototype.setTtDateFormat=function(str){this.ttDateFormat=str;};Calendar.prototype.parseDate=function(str,fmt){if(!fmt)
fmt=this.dateFormat;this.setDate(Date.parseDate(str,fmt));};Calendar.prototype.hideShowCovered=function(){if(!Calendar.is_ie&&!Calendar.is_opera)
return;function getVisib(obj){var value=obj.style.visibility;if(!value){if(document.defaultView&&typeof(document.defaultView.getComputedStyle)=="function"){if(!Calendar.is_khtml)
value=document.defaultView.getComputedStyle(obj,"").getPropertyValue("visibility");else
value='';}else if(obj.currentStyle){value=obj.currentStyle.visibility;}else
value='';}
return value;};var tags=new Array("applet","iframe","select");var el=this.element;var p=Calendar.getAbsolutePos(el);var EX1=p.x;var EX2=el.offsetWidth+EX1;var EY1=p.y;var EY2=el.offsetHeight+EY1;for(var k=tags.length;k>0;){var ar=document.getElementsByTagName(tags[--k]);var cc=null;for(var i=ar.length;i>0;){cc=ar[--i];p=Calendar.getAbsolutePos(cc);var CX1=p.x;var CX2=cc.offsetWidth+CX1;var CY1=p.y;var CY2=cc.offsetHeight+CY1;if(this.hidden||(CX1>EX2)||(CX2<EX1)||(CY1>EY2)||(CY2<EY1)){if(!cc.__msh_save_visibility){cc.__msh_save_visibility=getVisib(cc);}
cc.style.visibility=cc.__msh_save_visibility;}else{if(!cc.__msh_save_visibility){cc.__msh_save_visibility=getVisib(cc);}
cc.style.visibility="hidden";}}}};Calendar.prototype._displayWeekdays=function(){var fdow=this.firstDayOfWeek;var cell=this.firstdayname;var weekend=Calendar._TT["WEEKEND"];for(var i=0;i<7;++i){cell.className="day name";var realday=(i+fdow)%7;if(i){cell.ttip=Calendar._TT["DAY_FIRST"].replace("%s",Calendar._DN[realday]);cell.navtype=100;cell.calendar=this;cell.fdow=realday;Calendar._add_evs(cell);}
if(weekend.indexOf(realday.toString())!=-1){Calendar.addClass(cell,"weekend");}
cell.innerHTML=Calendar._SDN[(i+fdow)%7];cell=cell.nextSibling;}};Calendar.prototype._hideCombos=function(){this.monthsCombo.style.display="none";this.yearsCombo.style.display="none";};Calendar.prototype._dragStart=function(ev){if(this.dragging){return;}
this.dragging=true;var posX;var posY;if(Calendar.is_ie){posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft;}else{posY=ev.clientY+window.scrollY;posX=ev.clientX+window.scrollX;}
var st=this.element.style;this.xOffs=posX-parseInt(st.left);this.yOffs=posY-parseInt(st.top);with(Calendar){addEvent(document,"mousemove",calDragIt);addEvent(document,"mouseup",calDragEnd);}};Date._MD=new Array(31,28,31,30,31,30,31,31,30,31,30,31);Date.SECOND=1000;Date.MINUTE=60*Date.SECOND;Date.HOUR=60*Date.MINUTE;Date.DAY=24*Date.HOUR;Date.WEEK=7*Date.DAY;Date.parseDate=function(str,fmt){var today=new Date();var y=0;var m=-1;var d=0;var a=str.split(/\W+/);var b=fmt.match(/%./g);var i=0,j=0;var hr=0;var min=0;for(i=0;i<a.length;++i){if(!a[i])
continue;switch(b[i]){case"%d":case"%e":d=parseInt(a[i],10);break;case"%m":m=parseInt(a[i],10)-1;break;case"%Y":case"%y":y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000);break;case"%b":case"%B":for(j=0;j<12;++j){if(Calendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){m=j;break;}}
break;case"%H":case"%I":case"%k":case"%l":hr=parseInt(a[i],10);break;case"%P":case"%p":if(/pm/i.test(a[i])&&hr<12)
hr+=12;else if(/am/i.test(a[i])&&hr>=12)
hr-=12;break;case"%M":min=parseInt(a[i],10);break;}}
if(isNaN(y))y=today.getFullYear();if(isNaN(m))m=today.getMonth();if(isNaN(d))d=today.getDate();if(isNaN(hr))hr=today.getHours();if(isNaN(min))min=today.getMinutes();if(y!=0&&m!=-1&&d!=0)
return new Date(y,m,d,hr,min,0);y=0;m=-1;d=0;for(i=0;i<a.length;++i){if(a[i].search(/[a-zA-Z]+/)!=-1){var t=-1;for(j=0;j<12;++j){if(Calendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){t=j;break;}}
if(t!=-1){if(m!=-1){d=m+1;}
m=t;}}else if(parseInt(a[i],10)<=12&&m==-1){m=a[i]-1;}else if(parseInt(a[i],10)>31&&y==0){y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000);}else if(d==0){d=a[i];}}
if(y==0)
y=today.getFullYear();if(m!=-1&&d!=0)
return new Date(y,m,d,hr,min,0);return today;};Date.prototype.getMonthDays=function(month){var year=this.getFullYear();if(typeof month=="undefined"){month=this.getMonth();}
if(((0==(year%4))&&((0!=(year%100))||(0==(year%400))))&&month==1){return 29;}else{return Date._MD[month];}};Date.prototype.getDayOfYear=function(){var now=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var then=new Date(this.getFullYear(),0,0,0,0,0);var time=now-then;return Math.floor(time/Date.DAY);};Date.prototype.getWeekNumber=function(){var d=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var DoW=d.getDay();d.setDate(d.getDate()-(DoW+6)%7+3);var ms=d.valueOf();d.setMonth(0);d.setDate(4);return Math.round((ms-d.valueOf())/(7*864e5))+1;};Date.prototype.equalsTo=function(date){return((this.getFullYear()==date.getFullYear())&&(this.getMonth()==date.getMonth())&&(this.getDate()==date.getDate())&&(this.getHours()==date.getHours())&&(this.getMinutes()==date.getMinutes()));};Date.prototype.setDateOnly=function(date){var tmp=new Date(date);this.setDate(1);this.setFullYear(tmp.getFullYear());this.setMonth(tmp.getMonth());this.setDate(tmp.getDate());};Date.prototype.print=function(str){var m=this.getMonth();var d=this.getDate();var y=this.getFullYear();var wn=this.getWeekNumber();var w=this.getDay();var s={};var hr=this.getHours();var pm=(hr>=12);var ir=(pm)?(hr-12):hr;var dy=this.getDayOfYear();if(ir==0)
ir=12;var min=this.getMinutes();var sec=this.getSeconds();s["%a"]=Calendar._SDN[w];s["%A"]=Calendar._DN[w];s["%b"]=Calendar._SMN[m];s["%B"]=Calendar._MN[m];s["%C"]=1+Math.floor(y/100);s["%d"]=(d<10)?("0"+d):d;s["%e"]=d;s["%H"]=(hr<10)?("0"+hr):hr;s["%I"]=(ir<10)?("0"+ir):ir;s["%j"]=(dy<100)?((dy<10)?("00"+dy):("0"+dy)):dy;s["%k"]=hr;s["%l"]=ir;s["%m"]=(m<9)?("0"+(1+m)):(1+m);s["%M"]=(min<10)?("0"+min):min;s["%n"]="\n";s["%p"]=pm?"PM":"AM";s["%P"]=pm?"pm":"am";s["%s"]=Math.floor(this.getTime()/1000);s["%S"]=(sec<10)?("0"+sec):sec;s["%t"]="\t";s["%U"]=s["%W"]=s["%V"]=(wn<10)?("0"+wn):wn;s["%u"]=w+1;s["%w"]=w;s["%y"]=(''+y).substr(2,2);s["%Y"]=y;s["%%"]="%";var re=/%./g;if(!Calendar.is_ie5&&!Calendar.is_khtml)
return str.replace(re,function(par){return s[par]||par;});var a=str.match(re);for(var i=0;i<a.length;i++){var tmp=s[a[i]];if(tmp){re=new RegExp(a[i],'g');str=str.replace(re,tmp);}}
return str;};Date.prototype.__msh_oldSetFullYear=Date.prototype.setFullYear;Date.prototype.setFullYear=function(y){var d=new Date(this);d.__msh_oldSetFullYear(y);if(d.getMonth()!=this.getMonth())
this.setDate(28);this.__msh_oldSetFullYear(y);};window._dynarch_popupCalendar=null;Calendar.setup=function(params){function param_default(pname,def){if(typeof params[pname]=="undefined"){params[pname]=def;}};param_default("inputField",null);param_default("displayArea",null);param_default("button",null);param_default("eventName","click");param_default("ifFormat","%Y/%m/%d");param_default("daFormat","%Y/%m/%d");param_default("singleClick",true);param_default("disableFunc",null);param_default("dateStatusFunc",params["disableFunc"]);param_default("dateText",null);param_default("firstDay",null);param_default("align","Br");param_default("range",[1900,2999]);param_default("weekNumbers",true);param_default("flat",null);param_default("flatCallback",null);param_default("onSelect",null);param_default("onClose",null);param_default("onUpdate",null);param_default("date",null);param_default("showsTime",false);param_default("timeFormat","24");param_default("electric",true);param_default("step",2);param_default("position",null);param_default("cache",false);param_default("showOthers",false);param_default("multiple",null);var tmp=["inputField","displayArea","button"];for(var i in tmp){if(typeof params[tmp[i]]=="string"){params[tmp[i]]=document.getElementById(params[tmp[i]]);}}
if(!(params.flat||params.multiple||params.inputField||params.displayArea||params.button)){alert("Calendar.setup:\n  Nothing to setup (no fields found).  Please check your code");return false;}
function onSelect(cal){var p=cal.params;var update=(cal.dateClicked||p.electric);if(update&&p.inputField){p.inputField.value=cal.date.print(p.ifFormat);if(typeof p.inputField.onchange=="function")
p.inputField.onchange();}
if(update&&p.displayArea)
p.displayArea.innerHTML=cal.date.print(p.daFormat);if(update&&typeof p.onUpdate=="function")
p.onUpdate(cal);if(update&&p.flat){if(typeof p.flatCallback=="function")
p.flatCallback(cal);}
if(update&&p.singleClick&&cal.dateClicked)
cal.callCloseHandler();};if(params.flat!=null){if(typeof params.flat=="string")
params.flat=document.getElementById(params.flat);if(!params.flat){alert("Calendar.setup:\n  Flat specified but can't find parent.");return false;}
var cal=new Calendar(params.firstDay,params.date,params.onSelect||onSelect);cal.showsOtherMonths=params.showOthers;cal.showsTime=params.showsTime;cal.time24=(params.timeFormat=="24");cal.params=params;cal.weekNumbers=params.weekNumbers;cal.setRange(params.range[0],params.range[1]);cal.setDateStatusHandler(params.dateStatusFunc);cal.getDateText=params.dateText;if(params.ifFormat){cal.setDateFormat(params.ifFormat);}
if(params.inputField&&typeof params.inputField.value=="string"){cal.parseDate(params.inputField.value);}
cal.create(params.flat);cal.show();return false;}
var triggerEl=params.button||params.displayArea||params.inputField;triggerEl["on"+params.eventName]=function(){var dateEl=params.inputField||params.displayArea;var dateFmt=params.inputField?params.ifFormat:params.daFormat;var mustCreate=false;var cal=window.calendar;if(dateEl)
params.date=Date.parseDate(dateEl.value||dateEl.innerHTML,dateFmt);if(!(cal&&params.cache)){window.calendar=cal=new Calendar(params.firstDay,params.date,params.onSelect||onSelect,params.onClose||function(cal){cal.hide();});cal.showsTime=params.showsTime;cal.time24=(params.timeFormat=="24");cal.weekNumbers=params.weekNumbers;mustCreate=true;}else{if(params.date)
cal.setDate(params.date);cal.hide();}
if(params.multiple){cal.multiple={};for(var i=params.multiple.length;--i>=0;){var d=params.multiple[i];var ds=d.print("%Y%m%d");cal.multiple[ds]=d;}}
cal.showsOtherMonths=params.showOthers;cal.yearStep=params.step;cal.setRange(params.range[0],params.range[1]);cal.params=params;cal.setDateStatusHandler(params.dateStatusFunc);cal.getDateText=params.dateText;cal.setDateFormat(dateFmt);if(mustCreate)
cal.create();cal.refresh();if(!params.position)
cal.showAtElement(params.button||params.displayArea||params.inputField,params.align);else
cal.showAt(params.position[0],params.position[1]);return false;};return cal;};