
var isDebug=true;var isMoz=(typeof document.implementation!='undefined')&&(typeof document.implementation.createDocument!='undefined');var isIE=(typeof window.ActiveXObject!='undefined');var enableMessage=true;var basePath="/jcl/res/default/";var imagePath=basePath+"image/";function $package(pkname){if(!pkname)return;var pkNames=pkname.split(".");var pn,prevpn="";for(var i=0;i<pkNames.length;i++){pn=pkNames[i];var _s="var adl_result=window."+prevpn+pn;executeScript(_s);if(!adl_result){_s="window."+prevpn+pn+"=new Object();";executeScript(_s);}
prevpn+=pn+".";}}
function executeScript(script){if(isIE)
return execScript(script,"JavaScript");else
return window.eval(script);}
$package("js.lang");js.lang.Object=Object;function $extends(superclass,_class){if(!superclass)return;var __class=_class;if(!__class)__class=this;if(__class.prototype){for(var key in superclass.prototype){if(!__class.prototype[key])
if(!(key.indexOf("__")==0)){__class.prototype[key]=superclass.prototype[key];}}}
else{var obj=__class;var superobject=superclass;if(superclass.prototype){superobject=superclass.prototype;}
else{}
obj.constructor=superobject.constructor;for(var key in superobject){if(!(key.indexOf("__")==0)){obj[key]=superobject[key];}}
superobject=null;}}
$implements=$extends;js.lang.BaseObject=function(){}
js.lang.BaseObject.prototype=new Object();js.lang.BaseObject.prototype.$super=function(){if(!this.constructor)
return null;var superclass=this.__superClass;if(!superclass)
superclass=this.constructor.prototype.__superClass;if(superclass){var __EnableMessage=enableMessage;enableMessage=false;var _super=new superclass();enableMessage=__EnableMessage;for(var key in this){if(!this[key]&&!(key.indexOf("__")==0)&&typeof(this[key])=="function")
_super[key]=this[key];}
return _super;}
return null;}
js.lang.BaseObject.prototype.destory=function(){browser.destory(this);}
js.lang.BaseObject.prototype.getClassName=function(object){var obj=object;if(obj==null)
obj=this;if(obj.className)return obj.className;try{if(!obj.constructor)
return typeof(object);var s=obj.constructor.toString();s=s.replace("function","");var pos=s.indexOf("(");if(pos!=-1)
s=s.substring(0,pos);s=s.Trim();obj.className=s;return obj.className;}
catch(e){return"unknown";}}
js.lang.BaseObject.prototype.getName=function(){if(!this.name){this.name="autoName"+Math.random();this.name=this.name.replace(".","");}
if(!this.hasRegisterName){var js='window.'+this.name+'=this;';eval(js);this.hasRegisterName=true;}
return this.name;}
js.lang.BaseObject.prototype.hashCode=function(){if(!this.__HashCode){this.__HashCode=this.GetClassName()+Math.random();this.__HashCode=this.__HashCode.replace(".","");}
return this.__HashCode;}
$package("js.lang");js.lang.String=String;js.lang.String.prototype.trim=function()
{return this.replace(/(^\s*)|(\s*$)/g,"");}
js.lang.String.prototype.leftTrim=function()
{return this.replace(/(^\s*)/g,"");}
js.lang.String.prototype.rightTrim=function()
{return this.replace(/(\s*$)/g,"");}
js.lang.String.prototype.toDate=function(token,mask){if(token==null)token="-";if(mask==null)mask="ymd";var dateArray=this.split(token);var y=dateArray[mask.indexOf("y")];var m=dateArray[mask.indexOf("m")]-1;var d=dateArray[mask.indexOf("d")];return new Date(y,m,d);}
js.lang.Math=Math;js.lang.Math.isOddNumber=function(value){var v=parseInt(value/2);if(v*2!=value)return true;else return false;}
js.lang.System=function(){this.processes=new Array();this.windows=new Array();this.listeners=new Array();}
js.lang.System.prototype=new js.lang.BaseObject();js.lang.System.prototype.messageBox=function(message,title)
{if(js.ui.MessageBox){if(!this.messageDlg)
this.messageDlg=new js.ui.MessageBox();if(!title)title="Info";this.messageDlg.showMessage(title,message);}
else
alert(message);}
js.lang.System.prototype.openWindow=function(url,parent){var win=new js.ui.Window();if(!parent)parent=document.body;parent.appendChild(win.getUI());win.iframe=document.createElement("iframe");win.add(win.iframe);win.iframe.src=url;return win;}
js.lang.System.prototype.isIE=isIE;js.lang.System.prototype.isMoz=isMoz;var arVersion=navigator.appVersion.split("MSIE");var version=parseFloat(arVersion[1]);if((version>=5.5)&&(version<7)&&(document.body))
js.lang.System.prototype.IsIE55_6=true;js.lang.System.prototype.getBrowserType=function()
{if(isIE)
return"IE";else if(isMoz)
return"Moz";return"Other";}
js.lang.System.prototype.destory=function(object){object=null;}
js.lang.System.prototype.gc=function(){if(this.isIE){CollectGarbage();setTimeout("CollectGarbage();",1);}}
js.lang.System.prototype.setTimeout=function(callback,timeout,param){var args=Array.prototype.slice.call(arguments,2);var _cb=function(){callback.apply(null,args);}
return setTimeout(_cb,timeout);}
js.lang.System.prototype.setInterval=function(callback,interval,param){var args=Array.prototype.slice.call(arguments,2);var _cb=function(){callback.apply(null,args);}
return setInterval(_cb,interval);}
js.lang.System.prototype.sendMessage=function(hwnd,msg,params,src){if(!enableMessage)return;if(hwnd){if(hwnd.processMessage)
hwnd.processMessage(msg,params,src);}
else{var hwnd;if(this.listeners[msg]){for(var i=0;i<this.listeners[msg].length;i++){hwnd=this.listeners[msg][i];if(hwnd.style)if(hwnd.style.display=="none")continue;if(hwnd.processMessage)
hwnd.processMessage(msg,params,src);}}}}
js.lang.System.prototype.addListener=function(hwnd,msg){if(!this.listeners[msg])
this.listeners[msg]=new js.lang.Array();if(!this.listeners[msg].contains(hwnd)){this.listeners[msg].addItem(hwnd);}}
js.lang.System.prototype.removeListener=function(hwnd,msg){if(this.listeners[msg])
this.listeners[msg].removeItem(hwnd);}
js.lang.System.prototype.language=(navigator.userLanguage==undefined?navigator.language:navigator.userLanguage).replace("-","_").toLowerCase();var browser=new js.lang.System();function props(propname){var value;if(typeof(ADL_LANGUAGE_PACKAGE)!="undefined")
value=ADL_LANGUAGE_PACKAGE[propname];if(!value)
if(typeof(TOMOS_LANGUAGE_PACKAGE)!="undefined")
value=TOMOS_LANGUAGE_PACKAGE[propname];if(!value)
value=propname;return value;}
$package("js.lang");js.lang.Array=Array;js.lang.Array.prototype.addItem=function(obj){this[this.length]=obj;}
js.lang.Array.prototype.removeItem=function(val){var retCount=0;for(var i=0;i<this.length;i++){if(this[i]==val){for(var j=i;j<this.length-1;j++){this[j]=this[j+1];}
this.length=this.length-1;retCount++;}}
return retCount;}
js.lang.Array.prototype.removeItemAt=function(index){if(index<this.length){for(var i=index;i<this.length-1;i++){this[i]=this[i+1];}
this.length=this.length-1;}}
js.lang.Array.prototype.clear=function(){this.length=0;}
js.lang.Array.prototype.contains=function(obj){return this.indexOf(obj,0)>=0;}
js.lang.Array.prototype.indexOf=function(obj,index){var i;if(!index)index=0;if(obj==null){for(i=index;i<this.length;i++)
if(this[i]==null)return i;}else{for(i=index;i<this.length;i++)
if(obj==this[i])return i;}
return-1;}
js.lang.Array.prototype.getItem=function(idx){return this[idx];}
js.lang.Array.prototype.getFirstItem=function(){if(this.length==0)throw"NoSuchItemException";return this[0];}
js.lang.Array.prototype.getLastItem=function(){if(this.length==0)throw"NoSuchItemException";return this[this.length-1];}
js.lang.Array.prototype.setItemAt=function(obj,index){if(index==null){alert("index is undefined!");throw"index is undefined!";}
if(this.length<index){alert("this.length < "+index);throw"this.length < "+index;}
this[index]=obj;}
js.lang.Array.prototype.insertItem=function(obj,index){if(index>this.length)throw"ArrayIndexOutOfBoundsException: "+index+" > "+this.length;if(this.length>0)
this.arrayCopy(this,index,this,index+1,this.length-index);this[index]=obj;}
js.lang.Array.prototype.arrayCopy=function(srcArray,srcIndex,dstArray,dstIndex,copyLength){if((srcIndex+copyLength)>srcArray.length){alert("(srcIndex + copyLength) > srcArray.length");throw"(srcIndex + copyLength) > srcArray.length";}
if(dstIndex>dstArray.length){alert("dstIndex > dstArray.length");throw"dstIndex > dstArray.length";}
if((dstArray.length-dstIndex)<copyLength){dstArray.length=dstIndex+copyLength;}
var i;var tempArray=new Array();for(i=0;i<copyLength;i++){tempArray.addItem(srcArray[srcIndex+i]);}
for(i=0;i<copyLength;i++){dstArray.setItemAt(tempArray[i],dstIndex+i);}}
$package("js.lang");js.lang.Thread=function(delay){if(delay!=null)this.delay=delay;}
js.lang.Thread.prototype=new js.lang.BaseObject();js.lang.ThreadState={UNSTARTED:-1,TERMINATED:0,STARTED:1,RUNNABLE:2,BLOCKED:3,WAITING:4,TIMED_WAITING:5};js.lang.ThreadPriority={MIN_PRIORITY:1,NORM_PRIORITY:5,MAX_PRIORITY:10};js.lang.Thread.prototype.priority=js.lang.ThreadPriority.MIN_PRIORITY;js.lang.Thread.prototype.state=js.lang.ThreadState.STARTED;js.lang.Thread.prototype.started=false;js.lang.Thread.prototype.delay=0;js.lang.Thread.prototype.tid=null;js.lang.Thread.prototype.interrupted=false;js.lang.Thread.prototype.stop=function(){if(!(this.started))return;window.clearInterval(this.tid);this.tid=null;this.state="TERMINATED";this.started=false;this.interrupted=false;}
js.lang.Thread.prototype.start=function(){if(this.started)return;this.started=true;this.state=js.lang.ThreadState.RUNNABLE;this.interrupted=false;this.tid=window.setInterval(this.run,this.delay);}
js.lang.Thread.prototype.sleep=function(_interval){if(!(this.started))return;if(this.interrupted)return;window.clearInterval(this.tid);this.state=js.lang.ThreadState.TIMED_WAITING;this.interrupted=true;window.setTimeout(this.getName()+".resume();",_interval);}
js.lang.Thread.prototype.run=function(){}
js.lang.Thread.prototype.suspend=function(){if(!(this.started))return;if(this.interrupted)return;window.clearInterval(this.tid);this.state=js.lang.ThreadState.WAITING;this.interrupted=true;}
js.lang.Thread.prototype.resume=function(){if(!(this.started))return;if(!(this.interrupted))return;this.state=js.lang.ThreadState.RUNNABLE;this.interrupted=false;this.tid=window.setInterval(this.run,this.delay);}
$package("js.util");js.util.Timer=function(interval){if(interval!=null)
this.delay=this.interval=interval;var js="if("+this.getName()+".ontimer)"+this.getName()+".ontimer("+this.getName()+");";this.run=new Function(js);}
js.util.Timer.prototype=new js.lang.Thread();js.util.Timer.prototype.interval=1000;js.util.Timer.prototype.active=false;js.util.Timer.prototype.ontimer=function(){};js.util.Timer.prototype.setInterval=function(interval){if(interval!=null)
this.delay=this.interval=interval;}
js.util.Timer.prototype.setActive=function(active){this.active=active;if(active){if(this.started)return;this.delay=this.interval;this.start();}
else{this.stop();}}
$package("js.data");js.data.DOMImpl=function(){}
js.data.DOMImpl.prototype.parse=function(st){var result;if(browser.isIE){result=new js.data.XmlDocument();result.loadXML(st);}
else{var parser=new DOMParser();result=parser.parseFromString(st,"text/xml");}
return result;}
js.data.DOMImpl.prototype.xmlToString=function(xml){if(browser.isIE){return xml.xml;}
else{var xmls=new XMLSerializer();var s=xmls.serializeToString(xml);return s;}}
js.data.XmlDocument=function(){var xmlDoc;if(browser.isIE){xmlDoc=new ActiveXObject("Microsoft.XMLDOM");}else{xmlDoc=document.implementation.createDocument("","",null);}
return xmlDoc;}
$package("js.util");js.util.Utils=function(){}
js.util.Utils.prototype.correctAllPNG=function(){for(var i=0;i<document.images.length;i++)
{js.util.Utils.prototype.correctPNG(document.images[i]);}}
js.util.Utils.prototype.correctPNG=function(img,w,h){var arVersion=navigator.appVersion.split("MSIE");var version=parseFloat(arVersion[1]);if((version>=5.5)&&(version<7)&&(document.body.filters)){var imgName=img.src;var imgNameUp=imgName.toUpperCase();var ext=null;var pos=imgNameUp.lastIndexOf(".");if(pos!=-1)
ext=imgNameUp.substring(pos+1,pos+4);if(ext=="PNG"){var LW=img.width;var LH=img.height;if(!LW)LW=img.offsetWidth;if(!LH)LH=img.offsetHeight;if(w)LW=w;if(h)LH=h;img.onload=null;img.src=imagePath+"/common/transparent.gif";img.__filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+imgName+"', sizingmethod=scale);";img.style.filter+=img.__filter;img.__src=imgName;img.style.width=LW;img.style.height=LH;}
else{if(img.__filter)
img.style.filter=img.style.filter.replace(img.__filter,"");}}}
js.util.Utils.prototype.correctPNGBackground=function(obj,url){var bg;if(!url){bg=obj.style.backgroundImage;bg=bg.replace(/url\(/g,'');bg=bg.replace(/\)/g,'');}
else{bg=url+"?";}
var imgName=bg.toUpperCase();var ext=null;var pos=imgName.lastIndexOf(".");if(pos!=-1)
ext=imgName.substring(pos+1,pos+4);if(ext=="PNG"){obj.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+bg+"', sizingmethod=scale);";if(!url)
obj.style.background="none";}}
js.util.Utils.prototype.setImage=function(img,src,w,h){if(w)img.style.width=w;if(h)img.style.height=h;if(browser.isIE){if(browser.isIE55_6){img.onload=function(){js.util.Utils.prototype.correctPNG(this,w,h);}}
img.src=src;}
else{img.src=src;}}
js.util.Utils.prototype.encodeString=function(text){text=text.replace(/%/g,"%25");text=text.replace(/ /g,"%20");text=text.replace(/\+/g,"%2B");text=text.replace(/#/g,"%23");text=text.replace(/&/g,"%26");text=text.replace(/=/g,"%3D");text=text.replace(/\?/g,"%3F");return text;}
js.util.Date=Date;js.util.Date.prototype.format=function(style){var o={"M+":this.getMonth()+1,"d+":this.getDate(),"H+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"w+":"å¤©ä¸€äºŒä¸‰å››äº”å…­".charAt(this.getDay()),"q+":Math.floor((this.getMonth()+3)/3),"S":this.getMilliseconds()}
if(/(y+)/.test(style)){style=style.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length));}
for(var k in o){if(new RegExp("("+k+")").test(style)){style=style.replace(RegExp.$1,RegExp.$1.length==1?o[k]:("00"+o[k]).substr((""+o[k]).length));}}
return style;}
js.util.Date.prototype.formatDateTime=function(format){var o={"M+":this.getMonth()+1,"d+":this.getDate(),"H+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),"S":this.getMilliseconds()}
if(/(y+)/.test(format))format=format.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length));for(var k in o)if(new RegExp("("+k+")").test(format))
format=format.replace(RegExp.$1,RegExp.$1.length==1?o[k]:("00"+o[k]).substr((""+o[k]).length));return format;}
js.util.Format=function(){}
js.util.Format.prototype.formatFloat=function(value,mask){var action;if(browser.isIE)
action="formatNumber";else
action="format-number";return js.util.Format.prototype.basicFormat(value,mask,action)}
js.util.Format.prototype.formatDate=function(varDate,bstrFormat,varDestLocale){if(browser.isIE){action="formatDate";return js.util.Format.prototype.basicFormat(varDate,bstrFormat,action,varDestLocale);}
else{var v=new js.util.Date(varDate);v=v.format(bstrFormat);return v;}}
js.util.Format.prototype.formatTime=function(varTime,bstrFormat,varDestLocale){if(browser.isIE){action="formatTime";return js.util.Format.prototype.basicFormat(varTime,bstrFormat,action,varDestLocale);}
else{var v=new js.util.Date(varTime);v=v.format(bstrFormat);return v;}}
js.util.Format.prototype.basicFormat=function(value,mask,action,param){var xmlDoc;var xslDoc;var dom_impl=new js.data.DOMImpl();var v='<formats><format><value>'+value+'</value><mask>'+mask+'</mask></format></formats>';xmlDoc=dom_impl.parse(v);var x;if(browser.isIE)
x='<xsl:stylesheet xmlns:xsl="uri:xsl">'
else
x='<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:math="http://exslt.org/math">';x+='<xsl:template match="/">';if(isIE){if(action=='formatDate'||action=='formatTime')
x+='<xsl:eval>'+action+'(new Date("'+value+'").getVarDate(),"'+mask+'"';else
x+='<xsl:eval>'+action+'('+value+',"'+mask+'"';if(param)x+=',"'+param+'"';x+=')</xsl:eval>';}
else{x+='<xsl:value-of select="'+action+'(\''+value+'\',\''+mask+'\')" />';}
x+='</xsl:template></xsl:stylesheet>';xslDoc=dom_impl.parse(x);var s;if(browser.isIE)
s=xmlDoc.transformNode(xslDoc)
else{var processor=new XSLTProcessor();processor.importStylesheet(xslDoc);var result=processor.transformToFragment(xmlDoc,xmlDoc);var xmls=new XMLSerializer();s=xmls.serializeToString(result);}
return s;}
js.util.Format.prototype.formatUnits=function(baseNumber,unitDivisors,unitLabels,singleFractional){var i,unit,unitDivisor,unitLabel;if(baseNumber===0){return"0 "+unitLabels[unitLabels.length-1];}
if(singleFractional){unit=baseNumber;unitLabel=unitLabels.length>=unitDivisors.length?unitLabels[unitDivisors.length-1]:"";for(i=0;i<unitDivisors.length;i++){if(baseNumber>=unitDivisors[i]){unit=(baseNumber/unitDivisors[i]).toFixed(2);unitLabel=unitLabels.length>=i?" "+unitLabels[i]:"";break;}}
return unit+unitLabel;}else{var formattedStrings=[];var remainder=baseNumber;for(i=0;i<unitDivisors.length;i++){unitDivisor=unitDivisors[i];unitLabel=unitLabels.length>i?" "+unitLabels[i]:"";unit=remainder/unitDivisor;if(i<unitDivisors.length-1){unit=Math.floor(unit);}else{unit=unit.toFixed(2);}
if(unit>0){remainder=remainder%unitDivisor;formattedStrings.push(unit+unitLabel);}}
return formattedStrings.join(" ");}}
js.util.Format.prototype.formatBytes=function(baseNumber){var sizeUnits=[1073741824,1048576,1024,1],sizeUnitLabels=["GB","MB","KB","bytes"];return this.formatUnits(baseNumber,sizeUnits,sizeUnitLabels,true);}
js.util.Format.prototype.formatMinutes=function(minutes){var day=parseInt(Math.floor(minutes/1440));var hour=day>0?Math.floor((minutes-day*1440)/60):Math.floor(minutes/60);var minute=hour>0?Math.floor(minutes-day*1440-hour*60):minutes;var time="";if(day>0)time+=day+" ";if(hour>0)time+=hour+":";if(minute>0)time+=minute+":";return time;}
js.util.Format.prototype.formatSeconds=function(seconds){if(seconds>0){var minutes=Math.floor(seconds/60);seconds=seconds-minutes*60;return this.formatMinutes(minutes)+(seconds>0?seconds+"s":"");}
return seconds;}
$package("js.ui");js.ui.Point=function(x,y){if(!x)
x=0;if(!y)
y=0;this.X=x;this.Y=y;}
js.ui.Point.prototype.setLocation=function(x,y){this.x=x;this.y=y;}
js.ui.Dimension=function(width,height){if(!width)
width=0;if(!height)
height=0;this.width=width;this.height=height;}
js.ui.Dimension.prototype.setSize=function(width,height){this.width=width;this.height=height;}
js.ui.Rectangle=function(x,y,width,height){if(!x)
x=0;if(!y)
y=0;if(!width)
width=0;if(!height)
height=0;this.x=x;this.y=y;this.width=width;this.height=height;}
js.ui.Rectangle.prototype.contains=function(x,y){var x1=this.x;var x2=this.width;var y1=this.y;var y2=this.height;if((x-x1)<x2&&(x-x1)>0&&(y-y1)<y2&&(y-y1)>0)return true;else return false;}
js.ui.MouseEvent=function(){if(browser.isIE){this.leftButton=1;this.rightButton=2;this.middleButton=4;}
else{this.leftButton=0;this.rightButton=2;this.middleButton=1;}}
var MouseEvent=new js.ui.MouseEvent();js.ui.Component=function(){}
js.ui.Component.prototype=new js.lang.BaseObject();js.ui.Component.prototype.popupMenu=null;js.ui.Component.prototype.ui=null;js.ui.Component.prototype.getUI=function(){if(this.ui)return this.ui;this.ui=this.getDomNode();this.ui.owner=this;this.bindUI();return this.ui;}
js.ui.Component.prototype.setUI=function(ui){this.ui=ui;ui.owner=this;this.bindUI();}
js.ui.Component.prototype.bindUI=function(){}
js.ui.Component.prototype.getDomNode=function(id){if(!id)id=this.getNativeClass();var classNode=document.getElementById(id);if(!classNode)
throw"NativeClass not exists.";var node=classNode.cloneNode(true);node.id="";return node;}
js.ui.Component.prototype.getNativeClass=function(){}
js.ui.Component.prototype.addListener=function(msg){browser.addListener(this,msg);}
js.ui.Component.prototype.removeListener=function(msg){browser.removeListener(this,msg);}
js.ui.Component.eventCancelBubble=function(event){if(!event)event=window.event;if(browser.isIE){event.cancelBubble=true;event.returnValue=false;}
else
event.stopPropagation();return false;}
js.ui.Component.prototype.show=function(){this.getUI().style.display="";}
js.ui.Component.prototype.hide=function(){this.getUI().style.display="none";}
js.ui.Component.prototype.setBounds=function(x,y,w,h){this.getUI().style.position="absolute";this.ui.style.left=x;this.ui.style.top=y;this.ui.style.width=w;this.ui.style.height=h;}
js.ui.Component.prototype.setOpacity=function(opacity){if(!this.ui)this.getUI();if(!this.ui.style)return;this.opacity=opacity;if(browser.isIE){if(opacity==null){if(this.ui.filters.alpha){var op="alpha(opacity="+this.ui.filters.alpha.opacity+")";this.ui.style.filter=this.ui.style.filter.replace(op,"");}}
else{if(!this.ui.style.filter)
this.ui.style.filter="alpha(opacity="+opacity+")";else
this.ui.style.filter+=" alpha(opacity="+opacity+")";if(typeof(this.ui.filters)!="unknown")
if(this.ui.filters.alpha)this.ui.filters.alpha.opacity=opacity;}}
else{if(opacity==null)
this.ui.style.MozOpacity=null;else
this.ui.style.MozOpacity=opacity/100;}}
js.ui.Component.prototype.center=function(){this.ui.style.position="absolute";this.ui.style.left=(document.documentElement.clientWidth-this.ui.offsetWidth)/2+document.body.scrollLeft+"px";this.ui.style.top=(document.documentElement.clientHeight-this.ui.offsetHeight)/2+document.body.scrollTop+"px";}
js.ui.Component.prototype.setMoveable=function(enable_move){this.moveable=enable_move;var ui=this.getUI();if(enable_move){ui.onmousedown=js.ui.Component.__onmousedown;ui.onmousemove=js.ui.Component.__onmousemove;ui.onmouseup=js.ui.Component.__onmouseup;ui.ondragstart=js.ui.Component.__ondragstart;ui.ondrag=js.ui.Component.__ondrag;ui.ondragend=js.ui.Component.__ondragend;}
else{ui.onmousedown=null;ui.onmousemove=null;ui.onmouseup=null;ui.ondragstart=null;ui.ondrag=null;ui.ondragend=null;}}
js.ui.Component.prototype.borderWidth=10;js.ui.Component.prototype.setResizeable=function(enable_resize){this.resizeable=enable_resize;var ui=this.getUI();if(enable_resize){ui.onmousedown=js.ui.Component.__onmousedown;ui.onmousemove=js.ui.Component.__onmousemove;ui.onmouseup=js.ui.Component.__onmouseup;ui.ondragstart=js.ui.Component.__ondragstart;ui.ondrag=js.ui.Component.__ondrag;ui.ondragend=js.ui.Component.__ondragend;ui.onmouseout=js.ui.Component.__onmouseout;}
else{ui.onmousedown=null;ui.onmousemove=null;ui.onmouseup=null;ui.ondragstart=null;ui.ondrag=null;ui.ondragend=null;ui.onmouseout=null;}}
js.ui.Component.prototype.setDragable=function(enable_drag){this.dragable=enable_drag;var ui=this.getUI();if(enable_drag){ui.onmousedown=js.ui.Component.__onmousedown;ui.onmousemove=js.ui.Component.__onmousemove;ui.onmouseup=js.ui.Component.__onmouseup;ui.ondragstart=js.ui.Component.__ondragstart;ui.ondrag=js.ui.Component.__ondrag;ui.ondragend=js.ui.Component.__ondragend;}
else{ui.onmousedown=null;ui.onmousemove=null;ui.onmouseup=null;ui.ondragstart=null;ui.ondrag=null;ui.ondragend=null;}}
js.ui.Component.prototype.getOffsetLeft=function(parent,scroll){var x=0;var el=this.getUI();while(el){x+=el.offsetLeft-el.scrollLeft;if(scroll)x-=el.scrollLeft;if(el.offsetParent==parent)break;el=el.offsetParent;}
return x;}
js.ui.Component.prototype.getOffsetTop=function(parent,scroll){var y=0;var el=this.getUI();while(el){y+=el.offsetTop-el.scrollTop;if(el.offsetParent==parent)break;el=el.offsetParent;}
return y;}
js.ui.Component.prototype.getOffsetZIndex=function(parent){var el=this.getUI();var zIndex=el.style.zIndex;if(!parent)parent==document.body;while(el){if(el.offsetParent==parent)break;zIndex=el.style.zIndex;el=el.offsetParent;}
if(zIndex==null)zIndex=1;return zIndex;}
js.ui.Component.__onmousedown=function(event){if(!event)event=window.event;var owner=this.owner;if(event.button==MouseEvent.leftButton&&(owner.dragable||owner.moveable||owner.resizeable)){var x=event.clientX?event.clientX:event.pageX;var y=event.clientY?event.clientY:event.pageY;owner.__oldX=x;owner.__oldY=y;owner.__oldOffsetLeft=this.offsetLeft;owner.__oldOffsetTop=this.offsetTop;owner.__oldOffsetWidth=this.offsetWidth;owner.__oldOffsetHeight=this.offsetHeight;if(owner.__willResize)owner.__isResize=true;if(!owner.__isResize)owner.__isDrag=true;owner.__isStartDrag=false;js.ui.Component.eventCancelBubble(event);}}
js.ui.Component.__onmouseup=function(event){var __this;if(window.captureEventObject)
__this=window.captureEventObject;else __this=this;var owner=__this.owner;if(owner.__isDrag||owner.__isResize){if(!event)event=window.event;if(owner.moveable&&owner.__isDrag){var x=event.clientX?event.clientX:event.pageX;var y=event.clientY?event.clientY:event.pageY;if(owner.__isStartDrag){if(x)__this.style.left=owner.__oldOffsetLeft+x-owner.__oldX;if(y){var top=owner.__oldOffsetTop+y-owner.__oldY;if(top>=0)__this.style.top=top;}
if(__this.style.position=='relative'){if(__this.parentNode.childNodes.length>1){__this.style.position="absolute";}}}}
if(owner.__isStartDrag){if(__this.ondragend)
__this.ondragend(event);}
if(browser.isIE)
this.releaseCapture();else{window.releaseEvents(Event.MOUSEMOVE|Event.MOUSEUP);}
if(owner.__isStartDrag){owner.__isStartDrag=false;js.ui.Component.eventCancelBubble(event);}}
owner.__isDrag=false;owner.__isResize=false;window.captureEventObject=null;}
js.ui.Component.__onmousemove=function(event){if(!event)event=window.event;var __this,owner;if(window.captureEventObject)
__this=window.captureEventObject;else __this=this;if(__this==window)return;owner=__this.owner;if(!owner.__oldCursor){owner.__oldCursor=__this.style.cursor;if(!owner.__oldCursor)owner.__oldCursor="default";}
var x=event.clientX?event.clientX:event.pageX;var y=event.clientY?event.clientY:event.pageY;if(!owner.__isStartDrag&&(owner.__isResize||owner.__isDrag)){if(x!=owner.__oldX||y!=owner.__oldY){owner.__isStartDrag=true;if(browser.isIE){this.setCapture();}
else{window.captureEventObject=this;window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP);window.__oldonmousemove=window.onmousemove;window.__oldonmouseup=window.onmouseup;window.onmousemove=this.onmousemove;window.onmouseup=this.onmouseup;}}}
if(owner.__isDrag&&owner.__isStartDrag){if(owner.dragable){if(browser.isIE)
this.dragDrop();else{if(__this.ondragstart&&!owner.__dragStart)
__this.ondragstart(event);if(__this.ondrag)
__this.ondrag(event);}}
else if(owner.moveable){if(__this.ondragstart&&!owner.__dragStart)
__this.ondragstart(event);if(__this.ondrag)
__this.ondrag(event);}}
else if(owner.resizeable){if(owner.__isResize&&owner.__isStartDrag){owner.__willResize=false;var cursor=__this.style.cursor;cursor=cursor.substring(0,2);if(cursor.indexOf("e")!=-1&&x){var w=x-__this.owner.getOffsetLeft();if(w>=0)__this.style.width=w;}
if(cursor.indexOf("s")!=-1&&y){var h=y-__this.owner.getOffsetTop();if(h>=0)__this.style.height=h;}
if(cursor.indexOf("w")!=-1&&x){var w=owner.__oldOffsetWidth+(owner.__oldX-x);if(w>=0)__this.style.width=w;__this.style.left=owner.__oldOffsetLeft-(owner.__oldX-x);}
if(cursor.indexOf("n")!=-1&&y){var h=owner.__oldOffsetHeight+(owner.__oldY-y);if(h>=0)__this.style.height=h;__this.style.top=owner.__oldOffsetTop-(owner.__oldY-y);}}
else{var cursor="";owner.__willResize=true;if(y<owner.getOffsetTop(null,true)+owner.borderWidth){cursor+="n";}
if(y>owner.getOffsetTop(null,true)+__this.offsetHeight-owner.borderWidth&&y<=owner.getOffsetTop(null,true)+__this.offsetHeight){cursor+="s";}
if(x>owner.getOffsetLeft(null,true)+__this.offsetWidth-owner.borderWidth&&x<=owner.getOffsetLeft(document.body,true)+__this.offsetWidth){cursor+="e";}
if(x<owner.getOffsetLeft(null,true)+owner.borderWidth){cursor+="w";}
if(cursor!=""){cursor+="-resize";}
if(!cursor){owner.__willResize=false;cursor=owner.__oldCursor;if(!cursor)cursor="default";}
__this.style.cursor=cursor;window.status=cursor;}}
if(owner.__isStartDrag){js.ui.Component.eventCancelBubble(event);}}
js.ui.Component.__onmouseout=function(event){if(!event)event=window.event;var owner=this.owner;if(owner.__isResize||owner.__isDrag){this.onmousemove(event);js.ui.Component.eventCancelBubble(event);}}
js.ui.Component.__ondragstart=function(event){if(!event)event=window.event;var owner=this.owner;if(this.owner.dragable){if(!event.dataTransfer)
event.dataTransfer=new js.lang.Array();event.dataTransfer.effectAllowed="move";}
owner.__dragStart=true;if(!owner.__dragView){owner.__dragView=new js.ui.Div();owner.__dragView.getUI().style.zIndex=this.style.zIndex+1;owner.__dragView.getUI().style.position="absolute";owner.__dragView.getUI().onmousemove=function(event){if(!event)event=window.event;var x=event.clientX?event.clientX:event.pageX;if(x)this.style.left=x;};}
owner.__dragView.getUI().innerHTML="";if(!this.owner.optimizeDisplay){var newnode=this.cloneNode(true);newnode.style.position="static";newnode.style.width="100%";newnode.style.height="100%";owner.__dragView.getUI().appendChild(newnode);owner.__dragView.setOpacity(50);}
else{owner.__dragView.getUI().className="ui_moving";}
document.body.appendChild(owner.__dragView.getUI());}
js.ui.Component.__ondrag=function(event){if(!event)event=window.event;var owner=this.owner;var x=event.clientX?event.clientX:event.pageX;var y=event.clientY?event.clientY:event.pageY;owner.__dragView.getUI().style.width=this.offsetWidth;owner.__dragView.getUI().style.height=this.offsetHeight;if(x&&y){owner.__dragView.getUI().style.left=this.owner.getOffsetLeft(document.body,true)+x-owner.__oldX;owner.__dragView.getUI().style.top=this.owner.getOffsetTop(document.body,true)+y-owner.__oldY;}}
js.ui.Component.__ondragend=function(event){if(!event)event=window.event;var owner=this.owner;owner.__dragStart=false;if(owner.__dragView){if(owner.__dragView.getUI().parentNode==document.body){document.body.removeChild(owner.__dragView.getUI());}}
if(browser.isIE)
this.releaseCapture();else{window.releaseEvents(Event.MOUSEMOVE|Event.MOUSEUP);}
owner.__isResize=false;owner.__isDrag=false;window.captureEventObject=null;}
js.ui.Container=function(){}
js.ui.Container.prototype=new js.ui.Component();js.ui.Component.prototype.container=null;js.ui.Container.prototype.getContainer=function(){if(!this.ui)this.getUI();return this.container;}
js.ui.Container.prototype.add=function(child){var childUI=child;if(child.getUI)childUI=child.getUI();this.getContainer().appendChild(childUI);}
js.ui.Container.prototype.remove=function(indexOrobj){}
js.ui.Container.prototype.removeAll=function(){}
js.ui.Container.prototype.destory=function(){}
js.ui.Component.prototype.getOuterHTML=function(element)
{if(!element)element=this;if(element.outerHTML)return element.outerHTML;element=element.cloneNode(true);var outer=document.createElement("DIV");outer.appendChild(element);return outer.innerHTML;}
$package("js.ui");js.ui.Img=function(){}
js.ui.Img.prototype=new js.ui.Component();js.ui.Img.prototype.getNativeClass=function(){return"js.ui.Img";}
js.ui.Img.prototype.setSrc=function(src,w,h){if(w)this.getUI().style.width=w;if(h)this.getUI().style.height=h;if(browser.isIE&&src){if(browser.isIE55_6&&src.indexOf(".png")!=-1){this.onload=function(){js.util.Utils.prototype.correctPNG(this.getUI(),w,h);}}
else this.getUI().src=src;}
else{this.getUI().src=src;}}
js.ui.Img.prototype.getSrc=function(){if(this.getUI().__src)
return this.getUI().__src;else
return this.getUI().src;}
js.ui.Edit=function(){}
js.ui.Edit.prototype=new js.ui.Component();js.ui.Edit.prototype.getUI=function(){if(!this.ui){this.ui=document.createElement("input");this.ui.type="text";this.ui.owner=this;this.bindUI();}
return this.ui;}
js.ui.Div=function(){}
js.ui.Div.prototype=new js.ui.Component();js.ui.Div.prototype.getUI=function(){if(!this.ui){this.ui=document.createElement("div");this.ui.owner=this;this.bindUI();}
return this.ui;}
js.ui.HLayout=function(){}
js.ui.HLayout.prototype=new js.ui.Component();js.ui.HLayout.prototype.getUI=function(){if(!this.ui){this.ui=document.createElement("table");this.ui.width=this.ui.height="100%";this.ui.border=0;this.ui.cellSpacing=0;this.ui.cellpadding=0;this.ui.owner=this;this.bindUI();}
return this.ui;}
js.ui.HLayout.prototype.bindUI=function(){this.row=this.ui.insertRow(-1);this.left=this.row.insertCell(-1);this.right=this.row.insertCell(-1);this.left.vAlign="top";this.right.vAlign="top";}
js.ui.HLayout.prototype.addLeft=function(child){if(!this.ui)this.getUI();if(child.getUI)child=child.getUI();this.left.appendChild(child);}
js.ui.HLayout.prototype.addRight=function(child){if(!this.ui)this.getUI();if(child.getUI)child=child.getUI();this.right.appendChild(child);}
js.ui.VLayout=function(){}
js.ui.VLayout.prototype=new js.ui.Component();js.ui.VLayout.prototype.getUI=function(){if(!this.ui){this.ui=document.createElement("table");this.ui.border=0;this.ui.cellSpacing=0;this.ui.cellpadding=0;this.ui.width=this.ui.height="100%";this.ui.owner=this;this.bindUI();}
return this.ui;}
js.ui.VLayout.prototype.bindUI=function(){this.topRow=this.ui.insertRow(-1);this.top=this.topRow.insertCell(-1);this.bottomRow=this.ui.insertRow(-1);this.bottom=this.bottomRow.insertCell(-1);}
js.ui.VLayout.prototype.addTop=function(child){if(!this.ui)this.getUI();if(child.getUI)child=child.getUI();this.top.appendChild(child);}
js.ui.VLayout.prototype.addBottom=function(child){if(!this.ui)this.getUI();if(child.getUI)child=child.getUI();this.bottom.appendChild(child);}
js.ui.ImageButton=function(){}
js.ui.ImageButton.prototype=new js.ui.Img();js.ui.ImageButton.prototype.bindUI=function(){var __this=this;this.ui.style.backgroundColor="";this.ui.onmouseover=function(){if(__this.mouseoverImage){this.style.filter="";__this.setSrc(__this.mouseoverImage);}
else{__this.__oldOpacity=__this.opacity;__this.setOpacity(100);}}
this.ui.onmouseout=function(){if(__this.mouseoverImage){this.style.filter="";__this.setSrc(__this.__image);}
else
__this.setOpacity(__this.__oldOpacity);}
this.ui.onmousedown=function(event){if(!event)event=window.event;if(__this.mousedownImage){this.style.filter="";__this.setSrc(__this.mousedownImage);}
else
__this.setOpacity(30);js.ui.Component.eventCancelBubble(event);}
this.ui.onmouseup=function(event){if(!event)event=window.event;if(__this.mousedownImage){this.style.filter="";__this.setSrc(__this.__image);}
else
__this.setOpacity(__this.__oldOpacity);js.ui.Component.eventCancelBubble(event);}}
js.ui.ImageButton.prototype.setImage=function(src,w,h){this.setSrc(src,w,h);this.__image=src;}
$package("js.ui")
js.ui.MenuSeparator=function(){}
js.ui.MenuSeparator.prototype=new js.ui.Component();js.ui.MenuSeparator.prototype.getNativeClass=function(){return"js.ui.MenuSeparator";}
js.ui.MenuItem=function(parent){this.items=new js.lang.Array();}
js.ui.MenuItem.prototype=new js.ui.Component();js.ui.MenuItem.prototype.selected=false;js.ui.MenuItem.prototype.isParent=false;js.ui.MenuItem.prototype.getNativeClass=function(){return"js.ui.MenuItem";}
js.ui.MenuItem.prototype.bindUI=function(){var tds=this.ui.getElementsByTagName("tr")[1].getElementsByTagName("td");this.iconCell=tds[1];this.text=tds[2];this.rightCell=tds[3];var __this=this;this.ui.onmouseover=function(){this.className="MenuItem Panel Panel_over";__this.setSelected(true);if(__this.__isMenuBarItem&&!__this.menu.__isPopuped)return;if(__this.hasSubMenu()&&__this.subMenu.visible)return;if(__this.menu){if(__this.menu.hideSubMenu){__this.menu.hideSubMenu(__this.menu);}}
__this.showSubMenu();}
this.ui.onmouseout=function(){this.className="MenuItem Panel";}
this.ui.onkeydown=function(event){};this.ui.onclick=function(event){if(!event)event=window.event;if(!__this.hasSubMenu()){if(__this.menu&&!__this.__isMenuBarItem){__this.menu.hide();}
if(!__this.root.isMenuBar)
__this.root.hide();else
__this.root.hideSubMenu();}
js.ui.Component.eventCancelBubble(event);if(__this.onclick){__this.onclick(event);browser.sendMessage(null,201,event,window);}};}
js.ui.MenuItem.prototype.setIcon=function(url,w,h){if(!this.ui)this.getUI();if(!this.icon){this.icon=new js.ui.Img();this.iconCell.appendChild(this.icon.getUI());}
this.icon.setSrc(url,w,h);}
js.ui.MenuItem.prototype.setRightIcon=function(url,w,h){if(!this.ui)this.getUI();if(!this.rightIcon){this.rightIcon=new js.ui.Img();this.rightCell.appendChild(this.rightIcon.getUI());}
this.rightIcon.setSrc(url,w,h);}
js.ui.MenuItem.prototype.setText=function(lable){if(!this.ui)this.getUI();this.text.innerHTML=lable;}
js.ui.MenuItem.prototype.setSubMenu=function(menu){document.body.appendChild(menu.getUI());this.subMenu=menu;this.subMenu.root=this.root;this.subMenu.menu=this.menu;this.subMenu.hide();menu.owner=this;if(!this.__isMenuBarItem){var url=imagePath+'menu/rightArrow.gif';this.setRightIcon(url);}}
js.ui.MenuItem.prototype.subMenuClass=null;js.ui.MenuItem.prototype.createSubMenu=function(){if(!this.subMenuClass)
this.subMenuClass=js.ui.Menu;this.subMenu=new this.subMenuClass();this.setSubMenu(this.subMenu);return this.subMenu;}
js.ui.MenuItem.prototype.showSubMenu=function(){if(!this.hasSubMenu())return;this.subMenu.getUI().style.zIndex=this.getOffsetZIndex()+1;this.subMenu.ui.style.position="absolute";this.subMenu.show();var top;if(this.__isMenuBarItem){top=this.getOffsetTop()+this.ui.offsetHeight;this.subMenu.getUI().style.left=this.getOffsetLeft();}
else{this.subMenu.getUI().style.left=this.getOffsetLeft()+this.ui.offsetWidth;top=this.getOffsetTop();var maxbottom=this.menu.getOffsetTop()+this.menu.ui.offsetHeight;if(top>maxbottom-this.subMenu.getUI().offsetHeight){top=maxbottom-this.subMenu.getUI().offsetHeight;}}
this.subMenu.getUI().style.top=top;this.subMenu.popup(this.subMenu.ui.style.left,top);this.menu.__isPopuped=true;}
js.ui.MenuItem.prototype.hideSubMenu=function(except){if(this.hasSubMenu()){this.subMenu.hideSubMenu(except);this.subMenu.setVisible(false);}
this.menu.__isPopuped=false;}
js.ui.MenuItem.prototype.setSelected=function(selected){this.selected=selected;if(selected){this.className="js_ui_Style_Selected js_ui_MenuItem js_ui_MenuItem_Selected";}
else{this.className="js_ui_MenuItem";}}
js.ui.MenuItem.prototype.setEnabled=function(enabled){if(enabled)this.enabled=enabled;this.disabled=!enabled;if(browser.isMoz){if(!enabled){this.setOpacity(30);if(this.onclick&&!this.__oldOnClick)
this.__oldOnClick=this.onclick;this.onmouseup=js.ui.Component.eventCancelBubble;}
else{this.setOpacity(null);if(this.__oldOnClick)
this.onclick=this.__oldOnClick;this.__oldOnClick=null;this.onmouseup=js.ui.MenuItem.prototype.__MenuItem_onclick;}}}
js.ui.MenuItem.prototype.isEnabled=function(){return this.enabled;}
js.ui.MenuItem.prototype.hasSubMenu=function(){if(this.subMenu)return true;else return false;}
js.ui.MenuItem.prototype.hasPopupMenu=function(){if(this.popupMenu)return true;else return false;}
js.ui.MenuItem.prototype.__MenuItem_onclick=function(event){if(!event)event=window.event;if(!this.hasSubMenu()){if(this.menu&&!this.__isMenuBarItem){this.menu.Hide();}
if(!this.root.isMenuBar)
this.root.hide();else
this.root.hideSubMenu();}
js.ui.Component.eventCancelBubble(event);if(this.onclick){this.onclick(event);browser.sendMessage(null,201,event,window);}}
function MenuItem_onmouseover(event){this.setSelected(true);if(this.__isMenuBarItem&&!this.menu.__isPopuped)return;if(this.hasSubMenu()&&this.subMenu.visible)return;if(this.menu){if(this.menu.hideSubMenu){this.menu.hideSubMenu(this.menu);}}
this.showSubMenu();this.setSelected(true);return true;}
function MenuItem_onmouseout(){if(!this.hasSubMenu())
this.setSelected(false);else{if(!this.subMenu.visible)
this.setSelected(false);}}
js.ui.Menu=function(){this.items=new js.lang.Array();}
js.ui.Menu.prototype=new js.ui.Container();js.ui.Menu.prototype.getNativeClass=function(){return"js.ui.Menu";}
js.ui.Menu.prototype.Init=function(){this.className="js_ui_Menu";this.cellSpacing=0;this.cellPadding=0;this.items=new js.lang.Array();this.AutoPopup=true;this.Root=this;this.AddListener(201);}
js.ui.Menu.prototype.bindUI=function(){this.container=this.ui;}
js.ui.Menu.prototype.addSeparator=function(){var sep=new js.ui.MenuSeparator();this.getContainer().appendChild(sep.getUI());return sep;}
js.ui.Menu.prototype.insert=function(menuitem,beforeitem){this.Add(menuitem,beforeitem);}
js.ui.Menu.prototype.add=js.ui.Menu.prototype.addItem=function(menuitem,beforeitem){if(beforeitem){this.getContainer().insertBefore(menuitem.getUI(),beforeitem.getUI());}else{this.getContainer().appendChild(menuitem.getUI());this.items.addItem(menuitem);}
menuitem.menu=this;menuitem.__isMenuBarItem=false;if(this.root)
menuitem.root=this.root;else
menuitem.root=this;}
js.ui.Menu.prototype.remove=function(indexOrobj){if(typeof indexOrobj=="object"){if(indexOrobj.Hide)indexOrobj.Hide();if(this.removeChild)
this.tbody.removeChild(indexOrobj);this.Items.RemoveItem(indexOrobj);}
else if(typeof indexOrobj=="number"){var obj=this.Items[indexOrobj];if(!obj){alert("out of index");return;}
if(obj.Hide)obj.Hide();if(this.removeChild)
this.tbody.removeChild(obj);this.Items.RemoveItem(obj);}}
js.ui.Menu.prototype.removeAll=function(){var num=this.Items.length;for(var i=0;i<num;i++){this.Remove(0);}
this.RemoveSubMenu();}
js.ui.Menu.prototype.contains=function(menuitem){var value=false;for(var i=0;i<this.Items.length;i++){var currentItem=this.Items[i];if(currentItem==menuitem)value=true;}}
js.ui.Menu.prototype.IndexOf=function(menuitem){for(var i=0;i<this.Items.length;i++){var currentItem=this.Items[i];if(currentItem==menuitem)return i;}
return null;}
js.ui.Menu.prototype.getItem=function(index){return this.Items.GetItem(index);}
js.ui.Menu.prototype.getItemCount=function(){return this.Items.GetLength();}
js.ui.Menu.prototype.getItemByName=function(name){}
js.ui.Menu.prototype.replace=function(olditem,newitem){var index=this.IndexOf(olditem);this.Remove(olditem);if(index)this.Add(newitem,index);}
js.ui.Menu.prototype.hide=function(){this.__superHide=js.ui.Component.prototype.hide;this.__superHide();this.hideSubMenu();if(this.root)
this.root.__isPopuped=false;if(this.owner)
if(this.owner.menu)
this.owner.menu.autoPopup=false;}
js.ui.Menu.prototype.hideSubMenu=function(except){var menuitem,submenu,isvisible;for(var i=0;i<this.items.length;i++){menuitem=this.items.getItem(i);if(menuitem.hasSubMenu()){if(except)
isvisible=this.isExistSubMenu(except);else
isvisible=false;if(!isvisible){menuitem.subMenu.hide();menuitem.setSelected(false);menuitem.subMenu.hideSubMenu(except);}}}}
js.ui.Menu.prototype.isExistSubMenu=function(menu){var result;for(var i=0;i<this.items.length;i++){menuitem=this.items.getItem(i);if(menuitem.subMenu==menu){return true;}
if(menuitem.hasSubMenu()){result=menuitem.subMenu.isExistSubMenu(menu);if(result)
return true;}}
return false;}
js.ui.Menu.prototype.removeSubMenu=function(except){var menuitem,submenu;for(var i=0;i<this.Items.length;i++){menuitem=this.Items.GetItem(i);if(menuitem.HasSubMenu()&&menuitem.SubMenu!=except){menuitem.SubMenu.RemoveAll();menuitem.SubMenu.RemoveSubMenu(except);}}}
js.ui.Menu.prototype.popup=function(x,y,zIndex){if(!zIndex)zIndex=999;this.getUI().style.zIndex=zIndex;if(x)
this.getUI().style.left=x;if(y)
this.getUI().style.top=y;this.show();if(browser.isIE){if(document.onmousedown!=js.ui.Component.__windowonmousedown){document.__oldonmousedown=document.onmousedown;document.onmousedown=js.ui.Component.__windowonmousedown;}}
else{if(window.onmousedown!=js.ui.Component.__windowonmousedown){window.__oldonmousedown=window.onmousedown;window.onmousedown=js.ui.Component.__windowonmousedown;}}
if(this.onpopup)this.onpopup(x,y);}
js.ui.Menu.prototype.__windowonmousedown=function(event){if(!event)event=window.event;browser.sendMessage(null,201,event,window);}
js.ui.Menu.prototype.processMessage=function(msg,params,src){switch(msg){case 201:if(browser.isIE){if(document.__oldonmousedown)
document.onmousedown=document.__Oldonmousedown;}
else
window.onmousedown=window.__oldonmousedown;this.hide();break;}}
js.ui.PopupMenu=function(parent){if(!parent)
parent=GetDocument().body;var obj=new js.ui.Menu(parent);obj.SetVisible(false);return obj;}
js.ui.MenuBar=function(parent){if(!parent)
parent=GetDocument().body;var obj=new js.ui.Menu(parent);obj.MenuBarRow=obj.AddRow(obj.Tbody);obj.SetVisible(true);obj.Items=new js.lang.Array();obj.AutoPopup=false;obj.RemoveListener(201);obj.IsMenuBar=true;obj.className="js_ui_MenuBar";return obj;}
js.ui.MenuBar.prototype.add=function(menuitem){var cell=this.AddCell(this.MenuBarRow);cell.style.borderwidth='0';cell.style.border='0';var table=new js.dhtml.Table(cell);table.style.borderwidth='0';table.cellSpacing="0";table.cellPadding="0";table.style.border='0';table.style.height="100%";table.style.paddingLeft=5;table.tbody.appendChild(menuitem);menuitem.Menu=this;menuitem.__IsMenuBarItem=true;menuitem.Text.style.paddingLeft=2;menuitem.Text.style.paddingRight=2;this.Items.AddItem(menuitem);if(this.Root)
menuitem.Root=this.Root;else
menuitem.Root=this;}
js.ui.MenuItem.prototype.popup=function(x,y){this.style.zIndex=999;if(x)
this.style.left=x;if(y)
this.style.top=y;this.PopMenu.Show();if(this.PopMenu.OnPopup)this.PopMenu.OnPopup(x,y);}
js.ui.MenuItem.prototype.getPopLocation=function(x,y){var point=new js.ui.Point();point.X=this.GetOffsetLeft();point.Y=this.GetOffsetTop()+this.offsetHeight;return point;}
js.ui.MenuItem.prototype.hidePopupMenu=function(){if(this.HasPopupMenu()){this.PopupMenu.Hide();}
this.Menu.AutoPopup=false;}
js.ui.MenuItem.prototype.showPopupMenu=function(){if(!this.HasPopupMenu())return;var point=this.GetPopLocation();this.PopupMenu.Owner=this;this.PopupMenu.Popup(point.X,point.Y);this.Menu.AutoPopup=true;}
js.ui.MenuItem.prototype.add=function(menuitem){if(!this.subMenu)
this.createSubMenu();this.subMenu.addItem(menuitem);}
js.ui.MenuItem.prototype.addSeparator=function(){if(!this.subMenu)
this.createSubMenu();this.subMenu.addSeparator();}
js.ui.MenuBar.prototype.hidePopupMenu=function(item){if(item)var item1=item;else var item1=null;for(var i=0;i<this.Items.length;i++){if(this.Items[i]!=item1){this.Items[i].HidePopupMenu();}
else item1.ShowPopupMenu();}
if(item1.PopupMenu)item1.Menu.AutoPopup=true;}
function MenuBar_MenuItem_OnMouseOver(){this.SetSelected(true);if(this.HasPopupMenu()&&this.PopupMenu.Visible)return;if(this.HasPopupMenu()&&this.Menu.AutoPopup)
this.Menu.HidePopupMenu(this);return true;}
function MenuBar_MenuItem_OnClick(){if(this.HasPopupMenu()&&(!this.PopupMenu.Visible)){this.ShowPopupMenu();}
else if(this.HasPopupMenu()&&this.PopupMenu.Visible){this.HidePopupMenu();}}
function MenuBar_MenuItem_OnMouseOut(){if(this.HasPopupMenu())this.SetSelected(false);}
$package("js.ui");js.ui.BaseWindow=function(){}
js.ui.BaseWindow.prototype=new js.ui.Container();js.ui.BaseWindow.prototype.borderWidth=20;js.ui.BaseWindow.prototype.state=1;js.ui.BaseWindow.prototype.NORMAL=1;js.ui.BaseWindow.prototype.MINIMIZE=2;js.ui.BaseWindow.prototype.MAXIMIZE=3;js.ui.BaseWindow.prototype.transparentBorder=true;js.ui.BaseWindow.prototype.optimizeDisplay=true;js.ui.BaseWindow.prototype.getNativeClass=function(){return"js.ui.BaseWindow";}
js.ui.BaseWindow.prototype.extendUI=function(){}
js.ui.BaseWindow.prototype.bindUI=function(){if(browser.isIE55_6){js.util.Utils.prototype.correctPNGBackground(this.ui.rows[0].cells[0]);js.util.Utils.prototype.correctPNGBackground(this.ui.rows[0].cells[1]);js.util.Utils.prototype.correctPNGBackground(this.ui.rows[0].cells[2]);js.util.Utils.prototype.correctPNGBackground(this.ui.rows[0].cells[3]);js.util.Utils.prototype.correctPNGBackground(this.ui.rows[0].cells[4]);js.util.Utils.prototype.correctPNGBackground(this.ui.rows[0].cells[5]);js.util.Utils.prototype.correctPNGBackground(this.ui.rows[0].cells[6]);js.util.Utils.prototype.correctPNGBackground(this.ui.rows[1].cells[0]);js.util.Utils.prototype.correctPNGBackground(this.ui.rows[1].cells[2]);js.util.Utils.prototype.correctPNGBackground(this.ui.rows[2].cells[0]);js.util.Utils.prototype.correctPNGBackground(this.ui.rows[2].cells[1]);js.util.Utils.prototype.correctPNGBackground(this.ui.rows[2].cells[2]);}
var __this=this;this.titleRow=new js.ui.Component();this.titleRow.ui=this.ui.rows[0];this.bodyRow=new js.ui.Component();this.bodyRow.ui=this.ui.rows[1];this.bottomRow=new js.ui.Component();this.bottomRow.ui=this.ui.rows[2];this.titleText=this.ui.rows[0].cells[2].getElementsByTagName("span")[0];this.iconCell=this.ui.rows[0].cells[1];this.closeCell=this.ui.rows[0].cells[5];this.container=this.ui.getElementsByTagName("div")[3];this.closeButton=new js.ui.ImageButton();this.closeCell.appendChild(this.closeButton.getUI());this.closeButton.setImage(imagePath+'window/closewindow.gif');this.closeButton.mouseoverImage=imagePath+'window/closewindow_mouseover.gif';this.closeButton.mousedownImage=imagePath+'window/closewindow_mousedown.gif';this.closeButton.getUI().onclick=function(){__this.close();}
if(this.minButton)
this.titleRow.getUI().ondblclick=function(event){if(!event)event=window.event;var x=event.clientX?event.clientX:event.pageX;if(x<__this.getOffsetLeft()+20+__this.borderWidth){__this.close();}
else if(__this.resizeable){if(__this.state==__this.NORMAL)
__this.maximize();else{__this.normal();}}};this.setResizeable(true);this.setMoveable(true);this.extendUI();browser.sendMessage(null,1,null,this);}
js.ui.BaseWindow.prototype.setMoveable=function(enable_move){this.__superSetMoveable=js.ui.Component.prototype.setMoveable;this.__superSetMoveable(enable_move);if(enable_move){this.getUI().onmousedown=js.ui.BaseWindow.__onmousedown;}
else{this.getUI().onmousedown=null;}}
js.ui.BaseWindow.__onmousedown=function(event){var __this=this.owner;__this.setActive(true);if(!event)event=window.event;this.__superonmousedown=js.ui.Component.__onmousedown;this.__superonmousedown(event);var x=event.clientX?event.clientX:event.pageX;var y=event.clientY?event.clientY:event.pageY;if(__this.__isDrag){if(y>__this.titleRow.getOffsetTop(null,true)+__this.titleRow.getUI().offsetHeight)
__this.__isDrag=false;}
browser.sendMessage(null,201,event,window);}
js.ui.BaseWindow.prototype.setIcon=function(url,w,h){if(!this.ui)this.getUI();if(!this.icon){this.icon=new js.ui.Img();this.iconCell.appendChild(this.icon.getUI());}
if(!w)w=16;if(!h)h=16;this.icon.setSrc(url,w,h);browser.sendMessage(null,74,url,this);}
js.ui.BaseWindow.prototype.title="";js.ui.BaseWindow.prototype.icon=null;js.ui.BaseWindow.prototype.setTitle=function(title){this.title=title;this.titleText.innerHTML=title;browser.sendMessage(null,12,title,this);}
js.ui.BaseWindow.prototype.showModal=function(){if(!this.__modalDiv){this.__modalDiv=new js.ui.Div();document.body.appendChild(this.__modalDiv.getUI());this.__modalDiv.ui.style.position="absolute";this.__modalDiv.ui.style.background="black";this.__modalDiv.setOpacity(10);}
this.__modalDiv.setBounds(0,0,document.documentElement.clientWidth,document.documentElement.clientHeight);this.__modalDiv.show();this.__oldzIndex=this.ui.style.zIndex;this.show();this.setActive(true);this.__modalDiv.ui.style.zIndex=this.ui.style.zIndex;this.ui.style.zIndex=this.ui.style.zIndex+1;}
js.ui.BaseWindow.prototype.close=function(){if(this.onclose)
if(!this.onclose())return;this.state=this.HIDE;if(this.__modalDiv)
this.__modalDiv.hide();if(this.__oldzIndex)
this.getUI().style.zIndex=this.__oldzIndex;this.__oldResizeDelay=this.resizeDelay;this.hide();this.setActive(false);browser.sendMessage(null,16,null,this);if(this.destoryOnClose)
this.destory();}
js.ui.BaseWindow.prototype.destory=function(){}
js.ui.BaseWindow.prototype.minimize=function(){this.__oldState=this.state;if(browser.taskProcessBar){this.hide();}
else{if(this.state==this.NORMAL){this.oldLeft=this.getUI().offsetLeft;this.oldTop=this.getUI().offsetTop;this.oldWidth=this.getUI().offsetWidth;this.oldHeight=this.getUI().offsetHeight;}
this.getUI().style.height=this.titleRow.getUI().offsetHeight;this.bodyRow.hide();this.bottomRow.hide();this.getUI().style.width=100;if(this.oldLeft){this.getUI().style.left=this.oldLeft;this.getUI().style.top=this.oldTop;}}
this.state=this.MINIMIZE;this.setActive(false);}
js.ui.BaseWindow.prototype.reset=function(){if(this.__oldState==this.NORMAL){this.normal();}
else if(this.__oldState==this.MAXIMIZE){this.maximize();}
if(browser.taskProcessBar){this.show();}}
js.ui.BaseWindow.prototype.maximize=function(){if(this.state==this.NORMAL){this.oldLeft=this.getUI().offsetLeft;this.oldTop=this.getUI().offsetTop;this.oldWidth=this.getUI().offsetWidth;this.oldHeight=this.getUI().offsetHeight;}
if(this.bodyRow.getUI().style.display=='none'){this.bodyRow.show();this.bottomRow.show();}
if(browser.taskProcessBar){this.setVisible(true);this.getUI().style.height=document.body.clientHeight-36;this.getUI().style.top=36;}
else{this.getUI().style.top=0;this.getUI().style.height="100%";}
this.getUI().style.width="100%";this.getUI().style.left=0;this.state=this.MAXIMIZE;}
js.ui.BaseWindow.prototype.normal=function(){this.show();if(this.bodyRow.getUI().style.display=='none'){this.bodyRow.show();this.bottomRow.show();}
if(this.oldWidth){this.getUI().style.left=this.oldLeft;this.getUI().style.top=this.oldTop;this.getUI().style.width=this.oldWidth;this.getUI().style.height=this.oldHeight;}
this.state=this.NORMAL;}
js.ui.BaseWindow.prototype.setActive=function(active){if(this.active==active)return;this.active=active;if(active){for(var i=0;i<browser.windows.length;i++){if(this!=browser.windows[i])
browser.windows[i].setActive(false);}
this.getUI().style.zIndex=100;this.titleRow.setOpacity(null);this.bottomRow.setOpacity(null);this.titleText.className=null;browser.sendMessage(null,6,null,this);if(this.onactive)this.onactive();}
else{if(this.getUI().style.zIndex>2)
this.getUI().style.zIndex=this.getUI().style.zIndex-1;else
this.getUI().style.zIndex=1;var opacity=70;this.titleRow.setOpacity(opacity);this.bottomRow.setOpacity(opacity);this.titleText.className="inactive";browser.sendMessage(null,801,null,this);if(this.oninactive)this.oninactive();}}
js.ui.Window=function(parent){}
js.ui.Window.prototype=new js.ui.BaseWindow();js.ui.Window.prototype.extendUI=function(){var __this=this;this.minCell=this.ui.rows[0].cells[3];this.minButton=new js.ui.ImageButton();this.minCell.appendChild(this.minButton.getUI());this.minButton.setImage(imagePath+'window/minwindow.gif');this.minButton.mouseoverImage=imagePath+'window/minwindow_mouseover.gif';this.minButton.mousedownImage=imagePath+'window/minwindow_mousedown.gif';this.minButton.getUI().onclick=function(){__this.minimize();__this.setActive(true);}
this.maxCell=this.ui.rows[0].cells[4];this.maxButton=new js.ui.ImageButton();this.maxCell.appendChild(this.maxButton.getUI());this.maxButton.setImage(imagePath+'window/maxwindow.gif');this.maxButton.mouseoverImage=imagePath+'window/maxwindow_mouseover.gif';this.maxButton.mousedownImage=imagePath+'window/maxwindow_mousedown.gif';this.maxButton.getUI().onclick=function(){__this.maximize();__this.setActive(true);}}
js.ui.Window.prototype.minimize=function(){var __this=this;this.maxButton.setImage(imagePath+'window/resetwindow.gif');this.maxButton.mouseoverImage=imagePath+'window/resetwindow_mouseover.gif';this.maxButton.mousedownImage=imagePath+'window/resetwindow_mousedown.gif';this.maxButton.getUI().onclick=function(){__this.reset();__this.setActive(true);};this.__superMinimize=js.ui.BaseWindow.prototype.minimize;this.__superMinimize();}
js.ui.Window.prototype.maximize=function(){var __this=this;this.maxButton.setImage(imagePath+'window/resetwindow.gif');this.maxButton.mouseoverImage=imagePath+'window/resetwindow_mouseover.gif';this.maxButton.mousedownImage=imagePath+'window/resetwindow_mousedown.gif';this.maxButton.getUI().onclick=function(){__this.normal();__this.setActive(true);};this.__superMaximize=js.ui.BaseWindow.prototype.maximize;this.__superMaximize();}
js.ui.Window.prototype.normal=function(){var __this=this;this.maxButton.setImage(imagePath+'window/maxwindow.gif');this.maxButton.mouseoverImage=imagePath+'window/maxwindow_mouseover.gif';this.maxButton.mousedownImage=imagePath+'window/maxwindow_mousedown.gif';this.maxButton.getUI().onclick=function(){__this.maximize();__this.setActive(true);};this.__superNormal=js.ui.BaseWindow.prototype.normal;this.__superNormal();}
$package("js.ui");js.ui.MessageBox=function(){}
js.ui.MessageBox.prototype=new js.ui.BaseWindow();js.ui.MessageBox.prototype.extendUI=function(){var __this=this;this.ui.style.zIndex=11;this.setTitle(props("Info"));var extui=this.getDomNode("js.ui.MessageBox");this.container.appendChild(extui);this.message=extui.getElementsByTagName("span")[0];this.okButton=extui.getElementsByTagName("button")[0];this.okButton.onclick=this.closeButton.ui.onclick;this.setResizeable(false);this.setMoveable(false);}
js.ui.MessageBox.prototype.showMessage=function(title,msg){if(!this.getUI().parentNode!=document.body)
document.body.appendChild(this.ui);this.setTitle(props(title));this.message.innerHTML=props(msg);this.showModal();this.center();}
$package("js.ui");js.ui.ToolBar=function(){}
js.ui.ToolBar.prototype=new js.ui.Container();js.ui.ToolBar.prototype.getNativeClass=function(){return"js.ui.ToolBar";}
js.ui.ToolBar.prototype.bindUI=function(){this.container=this.ui.getElementsByTagName("tr")[0];}
js.ui.ToolBar.prototype.add=function(button){var newCol=this.container.insertCell(this.container.cells.length-1);newCol.appendChild(button.getUI());}
js.ui.ToolBar.prototype.addSeparator=function(){var sep=new js.ui.Img();sep.setSrc(imagePath+"toolbar/separator.gif");sep.ui.className="ToolSeparator";this.add(sep);}
js.ui.ToolButton=function(){}
js.ui.ToolButton.prototype=new js.ui.Component();js.ui.ToolButton.prototype.getNativeClass=function(){return"js.ui.ToolButton";}
js.ui.ToolButton.prototype.bindUI=function(){var tds=this.ui.getElementsByTagName("tr")[1].getElementsByTagName("td");this.iconCell=tds[1];this.text=this.ui.getElementsByTagName("a")[0];this.rightCell=tds[3];var __this=this;this.ui.onmouseover=function(){if(__this.disabled)return;this.className="ToolButton Panel Panel_selected";}
this.ui.onmouseout=function(){this.className="ToolButton Panel";}}
js.ui.ToolButton.prototype.setText=function(text){if(!this.ui)this.getUI();this.text.innerHTML=text;}
js.ui.ToolButton.prototype.setIcon=function(url,w,h){if(!this.ui)this.getUI();if(!this.icon){this.icon=new js.ui.Img();this.iconCell.appendChild(this.icon.getUI());}
this.icon.setSrc(url,w,h);}
js.ui.ToolButton.prototype.setRightIcon=function(url,w,h){if(!this.ui)this.getUI();if(!this.rightIcon){this.rightIcon=new js.ui.Img();this.rightCell.appendChild(this.rightIcon.getUI());}
this.rightIcon.setSrc(url,w,h);}
js.ui.ToolButton.prototype.setEnabled=function(enabled){this.disabled=!enabled;if(enabled){if(this.enableImage)
this.setIcon(this.enableImage);if(this.oldonclick)this.onclick=this.oldonclick;this.className="Toolbar_disable";}
else{if(this.disableImage){if(!this.enableImage)
this.enableImage=this.icon.getUI().src;this.setIcon(this.disableImage);}
if(this.onclick)this.oldonclick=this.onclick;this.onclick=null;this.className="Toolbutton Panel";}}
$package("js.net");js.net.HttpConnection=function(httpType){this.httpType=js.net.HttpConnection.prototype.XMLHTTP;this.method=js.net.HttpConnection.prototype.POST;this.url="about:blank";this.async=true;if(httpType)
this.httpType=httpType;}
js.net.HttpConnection.prototype.XMLHTTP="js.net.XMLHttpConnection";js.net.HttpConnection.prototype.IFRAME="js.net.IFrameConnection";js.net.HttpConnection.prototype.WINDOW_OPEN="js.net.WindowOpenConnection";js.net.HttpConnection.prototype.HttpType=js.net.HttpConnection.prototype.XMLHTTP;js.net.HttpConnection.prototype.POST="POST";js.net.HttpConnection.prototype.GET="GET";js.net.HttpConnection.prototype.method=js.net.HttpConnection.prototype.POST;js.net.HttpConnection.prototype.url="about:blank";js.net.HttpConnection.prototype.async=true;js.net.HttpConnection.prototype.instance=null;js.net.HttpConnection.prototype.onload=null;js.net.HttpConnection.prototype.onerror=null;js.net.HttpConnection.prototype.open=function(url){if(url)
this.url=url;if(!this.instance){this.instance=new js.net.XMLHttpConnection();this.instance.owner=this;}
if(this.instance){return this.instance.open(this.method,this.url,this.async);}}
js.net.HttpConnection.prototype.send=function(text){if(this.instance){this.instance.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=utf-8");return this.instance.send(text);}}
js.net.HttpFactory=function(){}
js.net.HttpFactory.prototype.getInstance=function(httpType){if(!httpType)
httpType=js.net.HttpConnection.prototype.XMLHTTP;return js.lang.ClassLoader.prototype.load(httpType);}
js.net.IHttpRequest=function(){};js.net.IHttpRequest.prototype=new js.lang.BaseObject();js.net.IHttpRequest.prototype.open=function(url,method,async){};js.net.IHttpRequest.prototype.send=function(str){};js.net.IHttpRequest.prototype.onload=function(){};js.net.IHttpRequest.prototype.onerror=function(){};js.net.XMLHttpConnection=function()
{try{this.xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e){try
{this.xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}
catch(ex){this.xmlHttp=null;}}
if(!this.xmlHttp&&typeof XMLHttpRequest!="undefined")
{this.xmlHttp=new XMLHttpRequest();}}
js.net.XMLHttpConnection.prototype=new js.net.IHttpRequest();js.net.XMLHttpConnection.prototype.open=function(method,url,async){this.__method=method;this.xmlHttp.open(method,url,async);};js.net.XMLHttpConnection.prototype.setRequestHeader=function(key,value){this.xmlHttp.setRequestHeader(key,value);}
js.net.XMLHttpConnection.prototype.send=function(str){var __this=this;if(browser.isIE){this.xmlHttp.onreadystatechange=function(){var http=__this.xmlHttp;var result=false;if(http.readyState==4){if(http.status==200||http.status==0){result=true;if(__this.onload)__this.onload(http);}
if(!result&&__this.onerror)__this.onerror(http);}}}
else{this.xmlHttp.onload=function(){if(__this.onload)__this.onload(this);};this.xmlHttp.onerror=function(){if(__this.onerror)__this.onerror(this);};}
if(this.__method=="GET")
str=null;this.xmlHttp.send(str);}
js.net.XMLHttpConnection.prototype.onload=function(xmlhttp){if(this.owner)if(this.owner.onload)this.owner.onload(xmlhttp);};js.net.XMLHttpConnection.prototype.onerror=function(xmlhttp){if(this.owner)if(this.owner.onerror)this.owner.onerror(xmlhttp);};js.net.XMLHttpConnection.prototype.xmlHttp=null;$package("js.ui.list");js.ui.list.AbstractListItemRenderer=function(owner){this.owner=owner;}
js.ui.list.AbstractListItemRenderer.prototype=new js.ui.Container();js.ui.list.AbstractListItemRenderer.prototype.getNativeClass=function(){return"js.ui.list.AbstractListItemRenderer";}
js.ui.list.AbstractListItemRenderer.prototype.state=0;js.ui.list.AbstractListItemRenderer.prototype.bindUI=function(){var __this=this;this.ui.onmouseover=function(){__this.state=1;this.className=__this.baseCSS+" "+__this.baseCSS+"_over";}
this.ui.onmouseout=function(){__this.state=0;__this.paintSelect();}
this.ui.onclick=function(event){if(!event)event=window.event;var curListBox=__this.owner;if(!curListBox)return;if(!event.ctrlKey)
curListBox.clearSelection();curListBox.setSelectedValue(__this.userObject,!curListBox.isSelectedItem(__this.userObject));return js.ui.Component.eventCancelBubble(event);}
this.baseCSS=this.ui.className;}
js.ui.list.AbstractListItemRenderer.prototype.owner=null;js.ui.list.AbstractListItemRenderer.prototype.baseCSS=null;js.ui.list.AbstractListItemRenderer.prototype.userObject=null;js.ui.list.AbstractListItemRenderer.prototype.setValue=function(value){this.userObject=value;this.paint();}
js.ui.list.AbstractListItemRenderer.prototype.isSelected=function(){var curListBox=this.owner;if(!curListBox)return false;return curListBox.isSelectedItem(this.userObject);}
js.ui.list.AbstractListItemRenderer.prototype.paintSelect=function(){if(this.isSelected()){this.getUI().className=this.baseCSS+"_selected";}
else{this.getUI().className=this.baseCSS;}}
js.ui.list.AbstractListItemRenderer.prototype.paintText=function(){var text=this.userObject;if(text=='')text="&nbsp";this.getUI().innerHTML=text;}
js.ui.list.AbstractListItemRenderer.prototype.paint=function(){this.paintText();this.paintSelect();}
$package("js.ui.list");js.ui.list.Columns=function(){}
js.ui.list.Columns.prototype.column=new js.lang.Array();js.ui.list.Columns.prototype.colSpan=null;js.ui.list.Columns.prototype.visible=true;js.ui.list.Columns.prototype.add=function(column){this.column.addItem(column);column.index=this.column.length-1;}
js.ui.list.Columns.prototype.size=function(){return this.column.length;}
js.ui.list.Columns.prototype.remove=function(column){this.column.removeItem(column);this.count=this.column.length;for(var i=0;i<this.column.length;i++){this.column[i].index=i;}}
js.ui.list.Columns.prototype.clear=function(){this.column.clear();}
js.ui.list.Columns.prototype.getColumn=js.ui.list.Columns.prototype.getItem=function(i){return this.column[i];}
js.ui.list.Columns.prototype.getColumnByIndex=function(index){for(var j=0;j<this.column.length;j++){if(this.column[j].index==index)
return this.column[j];}
return null;}
js.ui.list.ColumnCellRenderer=function(owner){this.owner=owner;}
js.ui.list.ColumnCellRenderer.prototype=new js.ui.list.AbstractListItemRenderer();js.ui.list.ColumnCellRenderer.prototype.getNativeClass=function(){return"js.ui.list.ColumnCellRenderer";}
js.ui.list.ColumnCellRenderer.prototype.bindUI=function(){this.__superBindUI=js.ui.list.AbstractListItemRenderer.prototype.bindUI;this.__superBindUI();this.text=this.ui.getElementsByTagName("a")[0];}
js.ui.list.ColumnCellRenderer.prototype.paintText=function(){var text=this.userObject;if(text=='')text="&nbsp";this.text.innerHTML=text;}
js.ui.list.Column=function(){}
js.ui.list.Column.prototype=new js.lang.BaseObject();js.ui.list.Column.prototype.caption="";js.ui.list.Column.prototype.width=null;js.ui.list.Column.prototype.visible=true;js.ui.list.Column.prototype.allowSort=true;js.ui.list.Column.prototype.renderClass=js.ui.list.ColumnCellRenderer;js.ui.list.Column.prototype.editor=null;js.ui.list.Column.prototype.index=0;js.ui.list.Column.prototype.dataType;js.ui.list.Column.prototype.createCellRenderer=function(){if(!this.renderClass)this.renderClass=js.ui.list.AbstractListItemRenderer;var renderer=new this.renderClass();return renderer;}
$package("js.ui.list");js.ui.list.AbstractListSelectionModel=function(){this.delegate=new js.lang.Array();}
js.ui.list.AbstractListSelectionModel.prototype=new js.lang.BaseObject();js.ui.list.AbstractListSelectionModel.prototype.SINGLE_SELECTION=0;js.ui.list.AbstractListSelectionModel.prototype.SINGLE_INTERVAL_SELECTION=1;js.ui.list.AbstractListSelectionModel.prototype.MULTIPLE_INTERVAL_SELECTION=2;js.ui.list.AbstractListSelectionModel.prototype.selectionMode=js.ui.list.AbstractListSelectionModel.prototype.MULTIPLE_INTERVAL_SELECTION;js.ui.list.AbstractListSelectionModel.prototype.getSelectionMode=function(){return this.selectionMode;}
js.ui.list.AbstractListSelectionModel.prototype.setSelectionMode=function(selectionMode){switch(selectionMode){case this.SINGLE_SELECTION:case this.SINGLE_INTERVAL_SELECTION:case this.MULTIPLE_INTERVAL_SELECTION:this.selectionMode=selectionMode;break;default:throw props("invalid selectionMode");}}
js.ui.list.AbstractListSelectionModel.prototype.isSelected=function(index){return this.delegate[index];}
js.ui.list.AbstractListSelectionModel.prototype.setSelected=function(index,value){if(index<0){this.clearSelection();return;}
if(value&&this.selectionMode==this.SINGLE_SELECTION){this.clearSelection();}
this.delegate[index]=value;}
js.ui.list.AbstractListSelectionModel.prototype.insertSelected=function(value,index){this.delegate.insertItem(value,index);}
js.ui.list.AbstractListSelectionModel.prototype.removeItemAt=function(index){this.delegate.removeItemAt(index);}
js.ui.list.AbstractListSelectionModel.prototype.clearSelection=function(){this.delegate.length=0;}
js.ui.list.AbstractListSelectionModel.prototype.getSelectedIndex=function(){for(var i=0;i<this.delegate.length;i++){if(this.isSelected(i))
return i;}
return-1;}
js.ui.list.AbstractListSelectionModel.prototype.getSelectedIndices=function(){var retArray=new Array();for(var i=0;i<this.delegate.length;i++){if(this.isSelected(i))
retArray.addItem(i);}
return retArray;}
$package("js.ui.list");js.ui.list.AbstractListModel=function(){this.delegate=new js.lang.Array();this.selectionModel=new js.ui.list.AbstractListSelectionModel();}
js.ui.list.AbstractListModel.prototype=new js.lang.BaseObject();js.ui.list.AbstractListModel.prototype.getOwner=function(){return this.owner;}
js.ui.list.AbstractListModel.prototype.setOwner=function(value){this.owner=value;}
js.ui.list.AbstractListModel.prototype.size=function(){return this.delegate.length;}
js.ui.list.AbstractListModel.prototype.elementAt=js.ui.list.AbstractListModel.prototype.getElementAt=function(index){return this.delegate[index];}
js.ui.list.AbstractListModel.prototype.contains=function(elem){return this.delegate.contains(elem);}
js.ui.list.AbstractListModel.prototype.indexOf=function(elem){return this.delegate.indexOf(elem,0);}
js.ui.list.AbstractListModel.prototype.lastIndexOf=function(elem){return this.delegate.lastIndexOf(elem);}
js.ui.list.AbstractListModel.prototype.firstElement=function(){return this.delegate.getFirstItem();}
js.ui.list.AbstractListModel.prototype.lastElement=function(){return this.delegate.getLastItem();}
js.ui.list.AbstractListModel.prototype.setElementAt=function(elem,index){this.delegate.setItemAt(elem,index);}
js.ui.list.AbstractListModel.prototype.removeElementAt=function(index){this.delegate.removeItemAt(index);this.selectionModel.removeItemAt(index);}
js.ui.list.AbstractListModel.prototype.insertElementAt=function(elem,index){this.delegate.insertItem(elem,index);this.selectionModel.insertSelected(false,index);}
js.ui.list.AbstractListModel.prototype.add=js.ui.list.AbstractListModel.prototype.addElement=function(elem){this.delegate.addItem(elem);}
js.ui.list.AbstractListModel.prototype.remove=js.ui.list.AbstractListModel.prototype.removeElement=function(elem){var idx=this.indexOf(elem);this.removeElementAt(idx);}
js.ui.list.AbstractListModel.prototype.removeAllElements=function(){this.clear();}
js.ui.list.AbstractListModel.prototype.toArray=function(){return this.delegate;}
js.ui.list.AbstractListModel.prototype.get=function(index){return this.delegate.getItem(index);}
js.ui.list.AbstractListModel.prototype.set=function(index,elem){this.delegate.setItemAt(elem,index);}
js.ui.list.AbstractListModel.prototype.clear=function(){this.delegate.clear();this.selectionModel.clearSelection();}
js.ui.list.AbstractListModel.prototype.removeRange=function(fromIndex,toIndex){}
js.ui.list.AbstractListModel.prototype.getSelectedValue=js.ui.list.AbstractListModel.prototype.getFirstSelectedItem=function(){var idx=this.getSelectedIndex();if(idx>=0&&idx<this.Size())
return this.getElementAt(idx);else return null;}
js.ui.list.AbstractListModel.prototype.getSelectedIndex=function(){return this.selectionModel.getSelectedIndex();}
js.ui.list.AbstractListModel.prototype.getSelectedIndices=function(){return this.selectionModel.getSelectedIndices();}
js.ui.list.AbstractListModel.prototype.getSelectedValues=function(){var retArray=new Array();var selectedIndices=this.selectionModel.getSelectedIndices();for(var i=0;i<selectedIndices.length;i++){retArray.addItem(this.getElementAt(selectedIndices[i]));}
return retArray;}
js.ui.list.AbstractListModel.prototype.setMultiSelected=function(value){if(value)
this.selectionModel.setSelectionMode(2);else
this.selectionModel.setSelectionMode(0);}
js.ui.list.AbstractListModel.prototype.getMultiSelected=function(){return this.selectionModel.getSelectionMode()!=0;}
js.ui.list.AbstractListModel.prototype.isSelected=function(idx){return this.selectionModel.isSelected(idx);}
js.ui.list.AbstractListModel.prototype.isSelectedItem=function(item){var idx=this.delegate.indexOf(item,0);return this.selectionModel.isSelected(idx);}
js.ui.list.AbstractListModel.prototype.setSelected=function(idx,value){this.selectionModel.setSelected(idx,value);}
js.ui.list.AbstractListModel.prototype.clearSelection=function(){this.selectionModel.clearSelection();}
js.ui.list.AbstractListModel.prototype.setSelectedValue=function(anObject,value){if(anObject==null)
this.clearSelection();else{var idx=this.indexOf(anObject);this.setSelected(idx,value);}}
$package("js.ui.list");js.ui.list.AbstractListBox=function(){this.renderers=new js.lang.Array();}
js.ui.list.AbstractListBox.prototype=new js.ui.Container();js.ui.list.AbstractListBox.prototype.getNativeClass=function(){return"js.ui.list.AbstractListBox";}
js.ui.list.AbstractListBox.prototype.getModel=function(){if(!this.dataModel){this.dataModel=new js.ui.list.AbstractListModel();this.dataModel.setMultiSelected(this.multiSelected);}
return this.dataModel;}
js.ui.list.AbstractListBox.prototype.bindUI=function(){var __this=this;this.ui.onkeydown=js.ui.list.AbstractListBox.__onkeydown;this.container=this.ui.getElementsByTagName("table")[0];return this.ui;}
js.ui.list.AbstractListBox.prototype.addItem=function(item){this.getModel().addElement(item);var table=this.getContainer();var row=table.insertRow(-1);var cell=row.insertCell(-1);var renderer=this.createCellRenderer();renderer.setValue(item);cell.renderer=renderer;cell.appendChild(renderer.getUI());}
js.ui.list.AbstractListBox.prototype.getCellRenderer=function(idx){return this.renderers[idx];}
js.ui.list.AbstractListBox.prototype.createCellRenderer=function(){if(!this.renderClass)this.renderClass=js.ui.list.AbstractListItemRenderer;var renderer=new this.renderClass(this);return renderer;}
js.ui.list.AbstractListBox.prototype.multiSelected=false;js.ui.list.AbstractListBox.prototype.clearSelection=function(){var sel=this.getSelectedIndex();this.getModel().clearSelection();if(sel>=0)
for(var i=0;i<this.getModel().size();i++){var renderer=this.getCellRenderer(i);if(renderer)
renderer.paint();}}
js.ui.list.AbstractListBox.prototype.setSelected=function(idx,value){if(!this.multiSelected&&value){var oldSelectedIndex=this.getSelectedIndex();if(oldSelectedIndex==idx)
return;if(oldSelectedIndex>=0)
this.clearSelection();}
this.getModel().setSelected(idx,value);var renderer=this.getCellRenderer(idx);if(renderer)
renderer.paint();}
js.ui.list.AbstractListBox.prototype.getSelectedIndex=function(){return this.getModel().getSelectedIndex();}
js.ui.list.AbstractListBox.prototype.setSelectedValue=function(anObject,value){var idx=this.getModel().indexOf(anObject);this.setSelected(idx,value);}
js.ui.list.AbstractListBox.prototype.isSelectedItem=function(item){return this.getModel().isSelectedItem(item);}
js.ui.list.AbstractListBox.prototype.activeIndex=-1;js.ui.list.AbstractListBox.prototype.size=function(){return this.getModel().size();}
js.ui.list.AbstractListBox.prototype.getSelectedIndices=function(){return this.getModel().getSelectedIndices();}
js.ui.list.AbstractListBox.prototype.getSelectedValues=function(){return this.getModel().getSelectedValues();}
js.ui.list.AbstractListBox.__onkeydown=function(event){var __this=this.owner;if(!event)event=window.event;var keycode=event.keyCode?event.keyCode:event.which;switch(keycode){case 39:case 40:if(__this.activeIndex<__this.size()-1){if(!event.shiftKey){__this.clearSelection();__this.setSelected(__this.activeIndex+1,true);}
else{var idxs=__this.getSelectedIndices();var min_idx=idxs[0];var max_idx=idxs[idxs.length-1];if(__this.activeIndex<max_idx)
__this.setSelected(__this.activeIndex,false);else
__this.setSelected(__this.activeIndex+1,true);}
__this.activeIndex++;}
break;case 37:case 38:if(__this.activeIndex>0){if(!event.shiftKey){__this.clearSelection();__this.setSelected(__this.activeIndex-1,true);}
else{var idxs=__this.getSelectedIndices();var min_idx=idxs[0];var max_idx=idxs[idxs.length-1];if(__this.activeIndex<=min_idx)
__this.setSelected(__this.activeIndex-1,true);else
__this.setSelected(__this.activeIndex,false);}
__this.activeIndex--;}
break;case 13:if(__this.onclickItem)__this.onclickItem(__this.activeIndex);}}
js.ui.list.AbstractListBox.prototype.clear=function(){this.getModel().clear();this.renderers.clear();var e;var tb=this.getContainer();while(e=tb.firstChild)tb.removeChild(e);}
$package("js.ui.list");js.ui.list.AbstractListView=function(){}
js.ui.list.AbstractListView.prototype=new js.ui.list.AbstractListBox();js.ui.list.AbstractListView.prototype.getNativeClass=function(){return"js.ui.list.AbstractListView";}
js.ui.list.AbstractListView.prototype.bindUI=function(){this.__superBindUI=js.ui.list.AbstractListBox.prototype.bindUI;this.__superBindUI();this.container=this.ui.getElementsByTagName("table")[0];}
if(js.ui.list.Columns)
js.ui.list.AbstractListView.prototype.columns=new js.ui.list.Columns();js.ui.list.AbstractListView.prototype.multiSelected=true;js.ui.list.AbstractListView.ViewType={DETAILINFO:0,BIGICON:1,SMALLICON:2,ICON:3,LIST:4,LARGE:5};js.ui.list.AbstractListView.Arrangement={TOP:0,LEFT:1};js.ui.list.AbstractListView.prototype.arrangement=js.ui.list.AbstractListView.Arrangement.TOP;js.ui.list.AbstractListView.prototype.viewType=1;js.ui.list.AbstractListView.prototype.cols=5;js.ui.list.AbstractListView.prototype.setViewType=function(value){this.viewType=value;}
js.ui.list.AbstractListView.prototype.setOpenType=function(value){this.openType=value;}
js.ui.list.AbstractListView.prototype.createRow=function(){if(!this.cols)
this.cols=5;var row,cell;row=this.body.insertRow(-1);row.vAlign="top";for(var i=0;i<this.cols;i++){cell=this.body.insertCell(-1);}}
js.ui.list.AbstractListView.prototype.createCol=function(){if(!this.cols)
this.cols=5;var row,cell;if(this.body.rows.length<=0){for(var i=0;i<this.cols;i++){row=this.body.insertRow(-1);row.vAlign="top";}}
for(var i=0;i<this.cols;i++){row=this.body.rows[i];cell=row.insertCell(-1);}}
js.ui.list.AbstractListView.prototype.addItem=function(item){this.getModel().addElement(item);var table=this.getContainer();var renderer=this.createCellRenderer();if(this.viewType==0){table.appendChild(renderer.getUI());}
else{var rowIdx=Math.floor((this.getModel().size()/this.cols)-0.0001);var colIdx=(this.getModel().size()-1)%this.cols;if(!this.body){this.body=document.createElement("tbody");this.container.appendChild(this.body);}
if(this.arrangement==0&&rowIdx>=this.body.rows.length)
this.createRow();else if(this.arrangement==1&&(this.body.rows.length<=0||rowIdx>=this.body.rows[0].cells.length)){this.createCol();}
var cell;if(this.arrangement==0)
cell=this.body.rows[rowIdx].cells[colIdx];else
cell=this.body.rows[colIdx].cells[rowIdx];cell.appendChild(renderer.getUI());cell.renderer=renderer;}
renderer.setValue(item);this.renderers.addItem(renderer);}
js.ui.list.AbstractListView.prototype.addColumn=function(column){if(!this.thead){this.thead=this.getUI().getElementsByTagName("tbody")[0];this.theadrow=this.thead.rows[0];}
var col=this.theadrow.insertCell(-1);if(this.columns.size()==0&&!column.colSpan){col.colSpan=3;}
if(column.colSpan)
col.colSpan=column.colSpan;if(column.width)
col.width=column.width;var renderer=column.createCellRenderer();col.appendChild(renderer.getUI());renderer.setValue(column.caption);this.columns.add(column);}
js.ui.list.AbstractListView.prototype.createCellRenderer=function(){if(!this.renderClass)this.renderClass=js.ui.list.AbstractListItemRenderer;var renderer=new this.renderClass(this);renderer.style=this.viewType;return renderer;}
js.ui.list.AbstractListView.prototype.clear=function(){this.getModel().clear();this.renderers.clear();var tb=this.getContainer();for(var i=tb.childNodes.length-1;i>1;i--){tb.removeChild(tb.childNodes[i]);}}
js.ui.list.AbstractListView.prototype.paint=function(){}
$package("js.ui.tree");js.ui.tree.AbstractTreeCellRenderer=function(treeNode){this.treeNode=treeNode;}
js.ui.tree.AbstractTreeCellRenderer.prototype=new js.ui.list.AbstractListItemRenderer();js.ui.tree.AbstractTreeCellRenderer.prototype.getNativeClass=function(){return"js.ui.tree.AbstractTreeCellRenderer";}
js.ui.tree.AbstractTreeCellRenderer.prototype.bindUI=function(){this.__superBindUI=js.ui.list.AbstractListItemRenderer.prototype.bindUI;this.__superBindUI();this.topBody=this.ui.getElementsByTagName("tbody")[0];this.bottomBody=this.ui.getElementsByTagName("tbody")[1];this.container=this.bottomBody.getElementsByTagName("td")[0];this.btn=new js.ui.Img();this.btn.setUI(this.topBody.getElementsByTagName("img")[0]);this.text=this.ui.getElementsByTagName("a")[0];this.iconCell=this.topBody.getElementsByTagName("td")[5];this.bindEvents();}
js.ui.tree.AbstractTreeCellRenderer.prototype.bindEvents=function(){var __this=this;this.ui.onmouseover=function(event){__this.state=1;__this.paintSelect();js.ui.Component.eventCancelBubble(event);}
this.btn.ui.onclick=function(event){if(__this.container.style.display=="none"){__this.expand();}
else
__this.collapse();js.ui.Component.eventCancelBubble(event);}
this.ui.ondblclick=function(event){__this.btn.ui.onclick(event);js.ui.Component.eventCancelBubble(event);}
this.ui.onclick=function(event){if(__this.treeNode)
__this.treeNode.treeview.setSelected(__this.treeNode);js.ui.Component.eventCancelBubble(event);}}
js.ui.tree.AbstractTreeCellRenderer.prototype.setLevel=function(level){if(!this.ui)this.getUI();this.btn.ui.style.marginLeft=16*level+"px";}
js.ui.tree.AbstractTreeCellRenderer.prototype.expand=function(){this.container.style.display="";this.paintButton();}
js.ui.tree.AbstractTreeCellRenderer.prototype.collapse=function(){this.container.style.display="none";this.paintButton();}
js.ui.tree.AbstractTreeCellRenderer.prototype.isSelected=function(){if(this.treeNode){return this.treeNode.isSelected();}}
js.ui.tree.AbstractTreeCellRenderer.prototype.setIcon=function(url){if(!url)return;if(!this.icon){this.icon=new js.ui.Img();this.icon.getUI().className="icon";this.iconCell.appendChild(this.icon.getUI());}
this.icon.setSrc(url);}
js.ui.tree.AbstractTreeCellRenderer.prototype.paintSelect=function(){var css="Panel";if(this.isSelected())
css="Panel Panel_selected";if(this.state==1)
css="Panel Panel_over";this.topBody.className=css;}
js.ui.tree.AbstractTreeCellRenderer.prototype.paintText=function(){var text=this.treeNode.userObject;if(text=='')text="&nbsp";this.text.innerHTML=text;}
js.ui.tree.AbstractTreeCellRenderer.prototype.paintIcon=function(){var icon=this.treeNode.icon;this.setIcon(icon);}
js.ui.tree.AbstractTreeCellRenderer.prototype.paintButton=function(){if(!this.treeNode)return;if(this.treeNode.getChildCount()>0){this.btn.getUI().style.visibility="visible";if(this.container.style.display=="none")
this.btn.setSrc(imagePath+"tree/collapse.png");else
this.btn.setSrc(imagePath+"tree/expand.png");}
else
this.btn.getUI().style.visibility="hidden";}
js.ui.tree.AbstractTreeCellRenderer.prototype.paint=function(){this.paintButton();this.paintIcon();this.paintText();this.paintSelect();}
$package("js.ui.tree");js.ui.tree.AbstractTreeModel=function(){}
js.ui.tree.AbstractTreeModel.prototype.owner=null;js.ui.tree.AbstractTreeModel.prototype.root=null;js.ui.tree.AbstractTreeModel.prototype.asksAllowsChildren=true;js.ui.tree.AbstractTreeModel.prototype.setRoot=function(value){this.root=value;}
js.ui.tree.AbstractTreeModel.prototype.getRoot=function(){return this.root;}
js.ui.tree.AbstractTreeModel.prototype.getIndexOfChild=function(parent,child){if(parent==null||child==null)return-1;else return parent.getIndex(child);}
js.ui.tree.AbstractTreeModel.prototype.getChild=function(parent,index){return parent.GetChildAt(index);}
js.ui.tree.AbstractTreeModel.prototype.getChildCount=function(parent){return parent.getChildCount();}
js.ui.tree.AbstractTreeModel.prototype.isLeaf=function(node){if(this.asksAllowsChildren)return!node.getAllowsChildren();else return node.isLeaf();}
$package("js.ui.tree");js.ui.tree.AbstractTreeNode=function(treeview){this.treeview=treeview;}
js.ui.tree.AbstractTreeNode.prototype=new js.lang.BaseObject();js.ui.tree.AbstractTreeNode.prototype.parent=null;js.ui.tree.AbstractTreeNode.prototype.items=null;js.ui.tree.AbstractTreeNode.prototype.icon=null;js.ui.tree.AbstractTreeNode.prototype.isExpanded=function(){return this.expanded;}
js.ui.tree.AbstractTreeNode.prototype.isFocused=function(){return this.focused;}
js.ui.tree.AbstractTreeNode.prototype.setUserObject=function(value){this.userObject=value;}
js.ui.tree.AbstractTreeNode.prototype.getUserObject=function(){return this.userObject;}
js.ui.tree.AbstractTreeNode.prototype.setRenderer=function(renderer){if((this.renderer)&&(this.renderer!=renderer)){this.renderer.clear();}
this.renderer=renderer;this.renderer.paint();}
js.ui.tree.AbstractTreeNode.prototype.getRenderer=function(){if(!this.renderer)this.renderer=new this.treeview.renderClass(this);return this.renderer;}
js.ui.tree.AbstractTreeNode.prototype.focus=function(){var treeview=this.treeview;treeview.setSelected(this);}
js.ui.tree.AbstractTreeNode.prototype.isSelected=function(){var treeview=this.treeview;if(treeview)
return treeview.isSelected(this);}
js.ui.tree.AbstractTreeNode.prototype.doExpand=js.ui.tree.AbstractTreeNode.prototype.setExpanded=function(expanded){if(this.isExpanded()==expanded)return;var treeview=this.treeview;this.expanded=false;if(expanded){if(!this.isLeaf()){this.expanded=true;this.getRenderer().expand();if(this.treeview.onexpanded)this.treeview.onexpanded(this);}}else{if(!this.isLeaf()){this.getRenderer().collapse();if(this.treeview.oncollapsed)this.treeview.oncollapsed(this);}}}
js.ui.tree.AbstractTreeNode.prototype.expand=function(){this.doExpand(true);}
js.ui.tree.AbstractTreeNode.prototype.expandAll=function(){this.expand();for(var i=0;i<this.getChildCount();i++){var childNode=this.getChildAt(i);childNode.expandAll();}}
js.ui.tree.AbstractTreeNode.prototype.collapseAll=function(){this.collapse();for(var i=0;i<this.getChildCount();i++){var childNode=this.getChildAt(i);childNode.collapseAll();}}
js.ui.tree.AbstractTreeNode.prototype.collapse=function(){this.doExpand(false);}
js.ui.tree.AbstractTreeNode.prototype.isLastChild=function(){if(this.isRoot())return true;var lastChild=this.getParent().getLastChild();return(lastChild==this);}
js.ui.tree.AbstractTreeNode.prototype.insert=function(newChild,childIndex){if(childIndex==null)childIndex=0;if(!this.allowsChildren)alert("node does not allow children");else if(newChild==null)alert("new child is null");else if(this.isNodeAncestor(newChild))alert("new child is an ancestor");var oldParent=newChild.getParent();if(oldParent!=null)oldParent.remove(newChild);newChild.setParent(this);newChild.treeview=this.treeview;if(this.items==null)this.items=new js.lang.Array();if(childIndex<this.items.getLength()-1)
this.items.SetItemAt(newChild,childIndex);else this.items.AddItem(newChild);}
js.ui.tree.AbstractTreeNode.prototype.removeAt=function(childIndex){var child=this.getChildAt(childIndex);this.items.removeItemAt(childIndex);child.setParent(null);if(this.isLeaf())this.expanded=false;this.getRenderer().paint(this);if(this.treeview.ondeletion)this.treeview.ondeletion(this);}
js.ui.tree.AbstractTreeNode.prototype.remove=function(aChild){if(aChild==null)alert("argument is null");if(!this.isNodeChild(aChild))alert("argument is not a child");this.removeAt(this.getIndex(aChild));}
js.ui.tree.AbstractTreeNode.prototype.setParent=function(newParent){this.parent=newParent;}
js.ui.tree.AbstractTreeNode.prototype.getParent=function(){return this.parent;}
js.ui.tree.AbstractTreeNode.prototype.getChildAt=function(index){if(this.items==null)alert("node has no children");return this.items.getItem(index);}
js.ui.tree.AbstractTreeNode.prototype.getChildCount=function(){if(this.items==null)return 0;else return this.items.length;}
js.ui.tree.AbstractTreeNode.prototype.getIndex=function(aChild){if(aChild==null)alert("argument is null");if(!this.isNodeChild(aChild))return-1;return this.items.indexOf(aChild,0);}
js.ui.tree.AbstractTreeNode.prototype.getChildren=function(){return this.items;}
js.ui.tree.AbstractTreeNode.prototype.setAllowsChildren=function(allows){if(allows!=this.allowsChildren){this.allowsChildren=allows;if(!this.allowsChildren){this.removeAllChildren();}}}
js.ui.tree.AbstractTreeNode.prototype.getAllowsChildren=function(){return this.allowsChildren;}
js.ui.tree.AbstractTreeNode.prototype.setUserObject=function(userObject){this.userObject=userObject;}
js.ui.tree.AbstractTreeNode.prototype.getUserObject=function(){return this.userObject;}
js.ui.tree.AbstractTreeNode.prototype.removeFromParent=function(){var parent=this.getParent();if(parent!=null)parent.remove(this);}
js.ui.tree.AbstractTreeNode.prototype.removeAllChildren=function(){for(var i=this.getChildCount()-1;i>=0;i--){this.removeAt(0);}}
js.ui.tree.AbstractTreeNode.prototype.getItems=function(){if(!this.items)
this.items=new js.lang.Array();return this.items;}
js.ui.tree.AbstractTreeNode.prototype.add=function(newChild){if(!newChild)return;newChild.setParent(this);newChild.treeview=this.treeview;this.getItems().addItem(newChild);newChild.getRenderer().setLevel(this.getLevel()+1);this.getRenderer().add(newChild.getRenderer());this.getRenderer().paintButton();newChild.getRenderer().paint();if(this.treeview.onaddition)this.treeview.onaddition(newChild);}
js.ui.tree.AbstractTreeNode.prototype.isNodeAncestor=function(anotherNode){if(anotherNode==null)return false;var ancestor=this;if(ancestor==anotherNode)return false;do{if(ancestor==anotherNode)return true;}while((ancestor=ancestor.getParent())!=null);return false;}
js.ui.tree.AbstractTreeNode.prototype.isNodeDescendant=function(anotherNode){if(anotherNode==null)return false;return anotherNode.isNodeAncestor(this);}
js.ui.tree.AbstractTreeNode.prototype.getSharedAncestor=function(node){var aNode=node;if(aNode==null)return null;while(aNode){otherNode=this;while(otherNode){if(aNode==otherNode)return true;otherNode=otherNode.getParent();}
aNode=aNode.getParent();}
return false;}
js.ui.tree.AbstractTreeNode.prototype.isNodeRelated=function(aNode){return(aNode!=null)&&(this.getRoot()==aNode.getRoot());}
js.ui.tree.AbstractTreeNode.prototype.getLevel=function(){var ancestor;var levels=0;ancestor=this;while((ancestor=ancestor.getParent())!=null){levels++;}
return levels;}
js.ui.tree.AbstractTreeNode.prototype.getPath=function(){}
js.ui.tree.AbstractTreeNode.prototype.getPathToRoot=function(aNode,depth){}
js.ui.tree.AbstractTreeNode.prototype.getUserObjectPath=function(){}
js.ui.tree.AbstractTreeNode.prototype.getRoot=function(){var ancestor=this;var previous;do{previous=ancestor;ancestor=ancestor.getParent();}while(ancestor!=null);return previous;}
js.ui.tree.AbstractTreeNode.prototype.isRoot=function(){return this.getParent()==null;}
js.ui.tree.AbstractTreeNode.prototype.getNextNode=function(){if(this.getChildCount()==0){var nextSibling=this.getNextSibling();if(nextSibling==null){var aNode=this.getParent();do{if(aNode==null)return null;nextSibling=aNode.getNextSibling();if(nextSibling!=null)return nextSibling;aNode=aNode.getParent();}while(true);}else return nextSibling;}else return this.getChildAt(0);}
js.ui.tree.AbstractTreeNode.prototype.getPreviousNode=function(){var previousSibling;var myParent=this.getParent();if(myParent==null)return null;previousSibling=this.getPreviousSibling();if(previousSibling!=null){if(previousSibling.getChildCount()==0)return previousSibling;else return previousSibling.getLastLeaf();}else return myParent;}
js.ui.tree.AbstractTreeNode.prototype.isNodeChild=function(aNode){var retval;if(aNode==null)retval=false;else{if(this.getChildCount()==0)retval=false;else retval=(aNode.getParent()==this);}
return retval;}
js.ui.tree.AbstractTreeNode.prototype.getFirstChild=function(){if(this.getChildCount()==0)return null;return this.getChildAt(0);}
js.ui.tree.AbstractTreeNode.prototype.getLastChild=function(){if(this.getChildCount()==0)return null;return this.getChildAt(this.getChildCount()-1);}
js.ui.tree.AbstractTreeNode.prototype.getChildAfter=function(aChild){if(aChild==null)alert("argument is null");var index=this.getIndex(aChild);if(index==-1)alert("node is not a child");if(index<this.getChildCount()-1)return this.getChildAt(index+1);else return null;}
js.ui.tree.AbstractTreeNode.prototype.getChildBefore=function(aChild){if(aChild==null)alert("argument is null");var index=this.getIndex(aChild);if(index==-1)alert("argument is not a child");if(index>0)return this.getChildAt(index-1);else return null;}
js.ui.tree.AbstractTreeNode.prototype.isNodeSibling=function(anotherNode){var retval;if(anotherNode==null)retval=false;else if(anotherNode==this)retval=true;else{var myParent=this.getParent();retval=(myParent!=null&&myParent==anotherNode.getParent());if(retval&&!(this.getParent()).isNodeChild(anotherNode))
alert("sibling has different parent");}
return retval;}
js.ui.tree.AbstractTreeNode.prototype.getSiblingCount=function(){var myParent=this.getParent();if(myParent==null)return 1;else return myParent.getChildCount();}
js.ui.tree.AbstractTreeNode.prototype.getNextSibling=function(){var retval;var myParent=this.getParent();if(myParent==null)retval=null;else retval=myParent.getChildAfter(this);if(retval!=null&&!this.isNodeSibling(retval))
alert("child of parent is not a sibling");return retval;}
js.ui.tree.AbstractTreeNode.prototype.getPreviousSibling=function(){var retval;var myParent=this.getParent();if(myParent==null)retval=null;else retval=myParent.getChildBefore(this);if(retval!=null&&!this.isNodeSibling(retval))
alert("child of parent is not a sibling");return retval;}
js.ui.tree.AbstractTreeNode.prototype.isLeaf=function(){return(this.getChildCount()==0);}
js.ui.tree.AbstractTreeNode.prototype.getFirstLeaf=function(){var node=this;while(!node.isLeaf()){node=node.getFirstChild();}
return node;}
js.ui.tree.AbstractTreeNode.prototype.getLastLeaf=function(){var node=this;while(!node.isLeaf()){node=node.getLastChild();}
return node;}
js.ui.tree.AbstractTreeNode.prototype.getNextLeaf=function(){var nextSibling;var myParent=this.getParent();if(myParent==null)return null;nextSibling=this.getNextSibling();if(nextSibling!=null)return nextSibling.getFirstLeaf();return myParent.getNextLeaf();}
js.ui.tree.AbstractTreeNode.prototype.getPreviousLeaf=function(){var previousSibling;var myParent=this.getParent();if(myParent==null)return null;previousSibling=this.getPreviousSibling();if(previousSibling!=null)return previousSibling.getLastLeaf();return myParent.getPreviousLeaf();}
js.ui.tree.AbstractTreeNode.prototype.getLeafCount=function(){var count=0;var node=this;if(node.isLeaf())return 1;for(var i=0;i<node.getChildCount();i++){if(node.getChildAt(i)&&node.getChildAt(i).isLeaf())count=count+1;else if(node.getChildAt(i)&&!node.getChildAt(i).isLeaf())
count=count+node.getChildAt(i).getLeafCount();}
return count;}
js.ui.tree.AbstractTreeNode.prototype.clear=function(){this.getItems().clear();this.getRenderer().getContainer().innerHTML="";}
js.ui.tree.TreeNode=function(treeview){this.treeview=treeview;}
js.ui.tree.TreeNode.prototype=new js.ui.tree.AbstractTreeNode();$package("js.ui.tree");js.ui.tree.AbstractTree=function(){this.selections=new js.lang.Array();}
js.ui.tree.AbstractTree.prototype=new js.ui.Container();js.ui.tree.AbstractTree.prototype.getNativeClass=function(){return"js.ui.tree.AbstractTree";}
js.ui.tree.AbstractTree.prototype.renderClass=js.ui.tree.AbstractTreeCellRenderer;js.ui.tree.AbstractTree.prototype.treeModel=new js.ui.tree.AbstractTreeModel();js.ui.tree.AbstractTree.prototype.setRoot=function(value){this.getModel().setRoot(value);var rootui=this.getRoot().getRenderer().getUI();if(rootui.parentNode!=this.getUI()){this.getUI().appendChild(rootui);this.getRoot().getRenderer().paint();}}
js.ui.tree.AbstractTree.prototype.getRoot=function(){if(this.treeModel){return this.treeModel.getRoot();}else return null;}
js.ui.tree.AbstractTree.prototype.clearSelections=function(){this.selections.Clear();}
js.ui.tree.AbstractTree.prototype.getSelections=function(){return this.selections;}
js.ui.tree.AbstractTree.prototype.getSelectionsCount=function(){return this.selections.length;};js.ui.tree.AbstractTree.prototype.setModel=function(newModel){this.treeModel=newModel;}
js.ui.tree.AbstractTree.prototype.setAutoExpand=function(value){this.autoExpand=value;};js.ui.tree.AbstractTree.prototype.setEditable=function(value){this.editable=value;}
js.ui.tree.AbstractTree.prototype.setRootVisible=function(value){this.rootVisible=value;if(!this.rootVisible){var root=this.treeModel.getRoot();root.row0TreeNode.style.display="none";this.expand(root);}}
js.ui.tree.AbstractTree.prototype.setSelected=function(treeNode){if(!treeNode)return;if(this.oldSelected==treeNode)return;this.selected=treeNode;this.selected.focused=true;if(this.oldSelected){this.oldSelected.focused=false;this.oldSelected.getRenderer().paintSelect();}
this.selected.getRenderer().paintSelect();if(this.onchange)this.onchange(this.selected);this.oldSelected=this.selected;}
js.ui.tree.AbstractTree.prototype.isSelected=function(treeNode){return this.selected==treeNode;}
js.ui.tree.AbstractTree.prototype.getAutoExpand=function(){return this.autoExpand;};js.ui.tree.AbstractTree.prototype.getModel=function(){return this.treeModel;}
js.ui.tree.AbstractTree.prototype.isEditable=function(){return this.editable;}
js.ui.tree.AbstractTree.prototype.isRootVisible=function(){return this.rootVisible;}
js.ui.tree.AbstractTree.prototype.isExpanded=function(treeNode){return treeNode.isExpanded();}
js.ui.tree.AbstractTree.prototype.isCollapsed=function(treeNode){return treeNode.isCollapsed();}
js.ui.tree.AbstractTree.prototype.isVisible=function(treeNode){}
js.ui.tree.AbstractTree.prototype.isEditing=function(){}
js.ui.tree.AbstractTree.prototype.stopEditing=function(){}
js.ui.tree.AbstractTree.prototype.cancelEditing=function(){}
js.ui.tree.AbstractTree.prototype.expand=function(treeNode){treeNode.expand();}
js.ui.tree.AbstractTree.prototype.collapse=function(treeNode){treeNode.collapse();}
js.ui.tree.AbstractTree.prototype.fullExpand=function(){if(!this.selected)return;else this.selected.expandAll();}
js.ui.tree.AbstractTree.prototype.fullCollapse=function(){if(!this.selected)return;else this.selected.collapseAll();}
js.ui.tree.AbstractTree.prototype.removeChild=function(treeNode){var parentTreeNode=treeNode.getParent();parentTreeNode.remove(treeNode);}
js.ui.tree.AbstractTree.prototype.addChild=function(aParentNode,aChildNode){aParentNode.add(aChildNode);}
js.ui.tree.AbstractTree.prototype.paintChild=function(parent){for(var i=0;i<parent.getChildCount();i++){var child=parent.getChildAt(i);child.rreeView=parent.treeview;var childRenderer=child.getRenderer();childRenderer.paint(child);if(child.getChildCount()>0)this.paintChild(child);}}
js.ui.tree.AbstractTree.prototype.paint=function(){}
js.ui.tree.AbstractTree.prototype.onaddition=function(node){}
js.ui.tree.AbstractTree.prototype.onchange=function(node){}
js.ui.tree.AbstractTree.prototype.onchanging=function(node){}
js.ui.tree.AbstractTree.prototype.onclick=function(){}
js.ui.tree.AbstractTree.prototype.oncollapsed=function(node){}
js.ui.tree.AbstractTree.prototype.oncollapsing=function(node){}
js.ui.tree.AbstractTree.prototype.ondblClick=function(){}
js.ui.tree.AbstractTree.prototype.ondeletion=function(node){}
js.ui.tree.AbstractTree.prototype.onenter=function(){}
js.ui.tree.AbstractTree.prototype.onexit=function(){}
js.ui.tree.AbstractTree.prototype.onexpanded=function(node){}
js.ui.tree.AbstractTree.prototype.onexpanding=function(node,allowExpansion){}
js.ui.tree.AbstractTree.prototype.onkeydown=function(key,shift){}
js.ui.tree.AbstractTree.prototype.onkeypress=function(key){}
js.ui.tree.AbstractTree.prototype.onkeyup=function(key,shift){}
js.ui.tree.AbstractTree.prototype.onstopEditing=function(node){}
$package("js.ui.tree");js.ui.tree.TreeView=function(){this.selections=new js.lang.Array();}
js.ui.tree.TreeView.prototype=new js.ui.tree.AbstractTree();js.ui.tree.TreeView.prototype.getDefaultTreeModel=function(){var root=new js.ui.tree.TreeNode(this);root.setUserObject("JTree");var parent=new js.ui.tree.TreeNode(this);parent.setUserObject("colors");root.add(parent);var child;child=new js.ui.tree.TreeNode(this);child.setUserObject("blue");parent.add(child);child=new js.ui.tree.TreeNode(this);child.setUserObject("violet");parent.add(child);child=new js.ui.tree.TreeNode(this);child.setRenderer(new js.ui.RadioBoxTreeCellRenderer(child));child.setUserObject("red");parent.add(child);temp=new js.ui.tree.TreeNode(this);temp.setRenderer(new js.ui.CheckBoxTreeCellRenderer(temp));temp.setUserObject("yellow");parent.add(temp);parent=new js.ui.tree.TreeNode(this);parent.setUserObject("sports");root.add(parent);child=new js.ui.tree.TreeNode(this);child.setUserObject("basketball");parent.add(child);child=new js.ui.tree.TreeNode(this);child.setUserObject("soccer");parent.add(child);child=new js.ui.tree.TreeNode(this);child.setUserObject("football");parent.add(child);child=new js.ui.tree.TreeNode(this);child.setUserObject("hockey");parent.add(child);parent=new js.ui.tree.TreeNode(this);parent.setUserObject("food");root.add(parent);child=new js.ui.tree.TreeNode(this);child.setUserObject("hot dogs");parent.add(child);child=new js.ui.tree.TreeNode(this);child.setUserObject("pizza");parent.add(child);child=new js.ui.tree.TreeNode(this);child.setUserObject("ravioli");parent.add(child);child=new js.ui.tree.TreeNode(this);child.setUserObject("bananas");parent.add(child);return new js.ui.tree.TreeModel(root);}
$package("js.ui.list");js.ui.list.IconListItemRenderer=function(owner){this.owner=owner;}
js.ui.list.IconListItemRenderer.prototype=new js.ui.list.AbstractListItemRenderer();js.ui.list.IconListItemRenderer.prototype.style=1;js.ui.list.IconListItemRenderer.prototype.getNativeClass=function(){if(this.style==0)
return"js.ui.list.IconListItemRenderer_Report";else
return"js.ui.list.IconListItemRenderer";}
js.ui.list.IconListItemRenderer.prototype.getCSS=function(){if(this.isSelected())
return this.baseCSS+" Panel_selected";if(this.state==1)
return this.baseCSS+" Panel_over";return this.baseCSS;}
js.ui.list.IconListItemRenderer.prototype.bindUI=function(){this.__superBindUI=js.ui.list.AbstractListItemRenderer.prototype.bindUI;this.__superBindUI();this.edit=this.ui.getElementsByTagName("textarea")[0];this.textDiv=this.ui.getElementsByTagName("div")[3];this.text=this.ui.getElementsByTagName("a")[0];var icon=this.ui.getElementsByTagName("img")[0];this.iconDiv=icon.parentNode;this.icon=new js.ui.Img();this.icon.ui=icon;this.bindEvents();}
js.ui.list.IconListItemRenderer.prototype.bindEvents=function(){var __this=this;this.ui.onmouseover=function(){__this.state=1;this.className=__this.getCSS();}
this.ui.onkeydown=function(event){if(!event)event=window.event;if(event.which==113||event.keyCode==113)
__this.rename();};this.ui.ondblclick=function(event){__this.__mouseClickTimer.stop();if(__this.onopen)
__this.onopen();};this.__mouseClickTimer=new js.util.Timer();this.__mouseClickTimer.setInterval(500);this.__mouseClickTimer.ontimer=function(){__this.rename();this.stop();};this.text.onclick=function(){if(__this.isSelected())
__this.__mouseClickTimer.setActive(true);};this.edit.onkeydown=function(event){if(!event)event=window.event;if(event.which==13||event.keyCode==13)
__this.toTextView();if(event.which==27||event.keyCode==27)
__this.cancelEdit();}}
js.ui.list.IconListItemRenderer.prototype.rename=function(){if(this.readOnly)return;if(this.edit.style.display=="block")return;var value=this.text.innerHTML;this.edit.value=value;this.edit.style.width=this.textDiv.offsetWidth+2;this.edit.style.height=this.textDiv.offsetHeight+2;this.edit.style.display="block";this.textDiv.style.display="none";this.edit.focus();this.edit.select();var __this=this;this.edit.onblur=function(){__this.toTextView();}}
js.ui.list.IconListItemRenderer.prototype.toTextView=function(){this.text.innerHTML=this.edit.value;this.textDiv.style.display="";this.edit.style.display="none";if(this.onchange)this.onchange(this.edit.value);}
js.ui.list.IconListItemRenderer.prototype.cancelEdit=function(){var func=this.edit.onblur;this.edit.onblur=null;this.textDiv.style.display="";this.edit.style.display="none";}
js.ui.list.IconListItemRenderer.prototype.setIcon=function(url){this.icon.setSrc(url);}
js.ui.list.IconListItemRenderer.prototype.paintSelect=function(){this.getUI().className=this.getCSS();}
js.ui.list.IconListItemRenderer.prototype.paintText=function(){var text=this.userObject.text;if(text=='')text="&nbsp";this.text.innerHTML=text;this.edit.value=text;}
js.ui.list.IconListItemRenderer.prototype.paintIcon=function(){var icon=this.userObject.icon;this.setIcon(icon);}
js.ui.list.IconListItemRenderer.prototype.paint=function(){this.paintText();this.paintIcon();this.paintSelect();}
$package("com.joyistar.ui");com.joyistar.ui.Panel=function(){}
com.joyistar.ui.Panel.prototype=new js.ui.Container();com.joyistar.ui.Panel.prototype.bindUI=function(){this.container=this.ui.getElementsByTagName("td")[4];}
com.joyistar.ui.Panel.prototype.getNativeClass=function(){return"com.joyistar.ui.Panel";}
$package("com.joyistar.ui");com.joyistar.ui.IconListItemRenderer=function(owner){this.owner=owner;}
com.joyistar.ui.IconListItemRenderer.prototype=new js.ui.list.IconListItemRenderer();$package("com.joyistar.ui");com.joyistar.ui.IconListView=function(){}
com.joyistar.ui.IconListView.prototype=new js.ui.list.AbstractListView();com.joyistar.ui.IconListView.prototype.renderClass=com.joyistar.ui.IconListItemRenderer;$package("com.qn.ui");com.qn.ui.FileIconRenderer=function(owner){this.owner=owner;}
com.qn.ui.FileIconRenderer.prototype=new js.ui.list.IconListItemRenderer();com.qn.ui.FileIconRenderer.prototype.size=48;com.qn.ui.FileIconRenderer.prototype.getNativeClass=function(){if(this.style==0)
return"com.qn.ui.FileIconRenderer_Report";else
return"js.ui.list.IconListItemRenderer";}
com.qn.ui.FileIconRenderer.prototype.bindEvents=function(){var __this=this;this.checkbox=this.ui.getElementsByTagName("input")[0];this.size=this.ui.getElementsByTagName("span")[0];this.lastModified=this.ui.getElementsByTagName("span")[1];this.absoluteIP=this.ui.getElementsByTagName("span")[2];this.editButton=this.ui.getElementsByTagName("a")[1];this.linkButton=this.ui.getElementsByTagName("a")[2];this.__superBindEvents=js.ui.list.IconListItemRenderer.prototype.bindEvents;this.__superBindEvents();this.ui.onclick=null;var curListBox=this.owner;this.checkbox.onclick=function(){curListBox.setSelectedValue(__this.userObject,this.checked);}
this.text.onclick=function(){if(curListBox.onclickitem)curListBox.onclickitem(__this);}
this.editButton.onclick=function(){if(curListBox.onedit)curListBox.onedit(__this);}}
com.qn.ui.FileIconRenderer.prototype.setValue=function(value){this.userObject=value;this.getUI().title=value.getFilename();this.paint();}
com.qn.ui.FileIconRenderer.prototype.paintType=function(){var typeIcon=this.userObject.getTypeIcon();if(typeIcon&&!this.typeIcon){this.typeIcon=new js.ui.Img();this.typeIcon.getUI().className="typeIcon";this.iconDiv.appendChild(this.typeIcon.getUI());}
if(typeIcon&&this.typeIcon){this.typeIcon.show();this.typeIcon.setSrc(typeIcon);this.typeIcon.ui.style.left=this.icon.ui.offsetLeft;this.typeIcon.ui.style.top=this.icon.ui.offsetTop;}
else if(this.typeIcon)this.typeIcon.hide();}
com.qn.ui.FileIconRenderer.prototype.paintText=function(){if(this.userObject.isDirectory()){this.text.href="#";this.editButton.style.display="none";this.linkButton.style.display="none";}
else{this.linkButton.href=this.userObject.getLinkUrl();this.text.href=this.userObject.getDownLink();this.text.target="_blank";}
var text=this.userObject.getDisplayName();if(!text)text="";this.text.innerHTML=text;this.edit.value=text;if(this.viewType>0&&text.length>20)
this.textDiv.style.height=30;else
this.textDiv.style.height="";this.size.innerHTML=this.userObject.getSizeDisp();this.lastModified.innerHTML=this.userObject.getLastModifiedDisp();this.absoluteIP.innerHTML=this.userObject.getAbsoluteIPDisp();}
com.qn.ui.FileIconRenderer.prototype.paintIcon=function(){var icon;if(this.size>16)
icon=this.userObject.getBigIcon();else
icon=this.userObject.getSmallIcon();this.setIcon(icon);this.paintType();}
com.qn.ui.FileIconRenderer.prototype.onchange=function(text){this.userObject.setFilename(text);this.getUI().title=this.userObject.getFilename();this.paintText();}
$package("com.qn.ui");com.qn.ui.DesktopIconRenderer=function(owner){this.owner=owner;}
com.qn.ui.DesktopIconRenderer.prototype=new com.qn.ui.FileIconRenderer();com.qn.ui.DesktopIconRenderer.prototype.size=32;com.qn.ui.DesktopIconRenderer.prototype.bindUI=function(){this.__superBindUI=com.qn.ui.FileIconRenderer.prototype.bindUI;this.__superBindUI();this.ui.style.width=64;this.text.style.color="#ffffff";}
com.qn.ui.DesktopIconRenderer.prototype.onopen=function(){var win=new com.qn.dlg.Explorer();win.setBound(80,10,900,600);win.setActive(true);document.body.appendChild(win.ui);win.open("computer");}
$package("com.qn.ui");com.qn.ui.FileListView=function(){this.multiSelected=true;}
com.qn.ui.FileListView.prototype=new js.ui.list.AbstractListView();com.qn.ui.FileListView.prototype.renderClass=com.qn.ui.FileIconRenderer;com.qn.ui.FileListView.prototype.viewType=0;com.qn.ui.FileListView.prototype.list=function(path,exts,isListDirs,startRecord){var __this=this;this.getFile().onerror=function(msg){alert(msg);}
this.getFile().onload=function(files){__this.clear();__this.fillFiles(files);}
this.getFile().setPath(path);this.getFile().list(exts,isListDirs,startRecord);}
com.qn.ui.FileListView.prototype.refresh=function(){this.list(this.getFile().getPath());}
com.qn.ui.FileListView.prototype.file=null;com.qn.ui.FileListView.prototype.getFile=function(){if(!this.file){this.addListener(810);this.file=new com.qn.io.File();}
return this.file;}
com.qn.ui.FileListView.prototype.fillFiles=function(files){var file;for(var i=0;i<files.length;i++){file=files[i];this.addItem(file);}}
com.qn.ui.FileListView.prototype.processMessage=function(msg,action,file){if(msg==810){if(this.getFile().getPath()!=file.getParent())return;if(action==0){this.refresh();}
else if(action==1){}
else if(action==2){this.refresh();}}}
com.qn.ui.FileListView.prototype.getSelFilenames=function(){var sels=this.getSelectedValues();var fns="";for(var i=0;i<sels.length;i++){fns+=sels[i].getPath()+":";}
return fns;}
$package("com.qn.ui");com.qn.ui.FileTreeNodeRenderer=function(treeNode){this.treeNode=treeNode;}
com.qn.ui.FileTreeNodeRenderer.prototype=new js.ui.tree.AbstractTreeCellRenderer();com.qn.ui.FileTreeNodeRenderer.prototype.paintText=function(){var text=this.treeNode.userObject.getDisplayName();if(!text)text="";this.text.innerHTML=text;}
com.qn.ui.FileTreeNodeRenderer.prototype.paintIcon=function(){var icon=this.treeNode.userObject.getSmallIcon();this.setIcon(icon);}
$package("com.qn.ui");com.qn.ui.FileTreeView=function(){this.multiSelected=true;this.onchange=function(selNode){if(selNode.getChildCount()>0)
selNode.clear();var file=selNode.userObject;this.list(file.getTarget(),selNode);}}
com.qn.ui.FileTreeView.prototype=new js.ui.tree.AbstractTree();com.qn.ui.FileTreeView.prototype.renderClass=com.qn.ui.FileTreeNodeRenderer;com.qn.ui.FileTreeView.prototype.list=function(path,parentNode){var __this=this;this.getFile().onerror=function(msg){alert(msg);}
this.getFile().onload=function(files){__this.fillFiles(files,parentNode);if(__this.onload)__this.onload(files,parentNode);}
this.getFile().setPath(path);this.getFile().list();}
com.qn.ui.FileTreeView.prototype.fillFiles=function(files,parentNode){if(!parentNode)
parentNode=this.getRoot();if(parentNode)
parentNode.clear();var file;for(var i=0;i<files.length;i++){file=files[i];if(file.isDirectory()||file.isDirShortcut()||file.isShareDirectory()){var node=new js.ui.tree.TreeNode(this);node.setUserObject(file);parentNode.add(node);}}
parentNode.expand();}
com.qn.ui.FileTreeView.prototype.file=null;com.qn.ui.FileTreeView.prototype.getFile=function(){if(!this.file){this.file=new com.qn.io.File();this.addListener(810);}
return this.file;}
com.qn.ui.FileTreeView.prototype.locateNode=function(path,parentNode){if(!parentNode)
parentNode=this.getRoot();var node;for(var i=0;i<parentNode.getChildCount();i++){node=parentNode.getChildAt(i);if(node.userObject.getTarget()==path)
this.setSelected(node);}}
com.qn.ui.FileTreeView.prototype.processMessage=function(msg,action,file){if(msg==810){if(this.getFile().getPath()!=file.getParent())return;if(action==0){this.list(file.getParent(),this.selected);}
else if(action==1){}
else if(action==2){this.list(file.getParent(),this.selected);}}}
$package("com.qn.ui");com.qn.ui.Desktop=function(){this.arrangement=1;}
com.qn.ui.Desktop.prototype=new com.qn.ui.FileListView();com.qn.ui.Desktop.prototype.renderClass=com.qn.ui.DesktopIconRenderer;com.qn.ui.Desktop.prototype.viewType=1;com.qn.ui.Desktop.prototype.bindUI=function(){this.__superBindUI=js.ui.list.AbstractListView.prototype.bindUI;this.__superBindUI();this.ui.style.border=0;}
com.qn.ui.Desktop.prototype.setBg=function(url){this.getBg().style.display="";this.bg.src=url;}
com.qn.ui.Desktop.prototype.getBg=function(){if(!this.bg){if(!this.ui)this.getUI();var bg=this.bg=document.createElement("img");bg.style.zIndex=-1;bg.style.top=0;bg.style.position="absolute";this.bg.style.display="none";bg.style.width="100%";bg.style.height="100%";this.ui.appendChild(bg);}
return this.bg;}
$package("com.qn.ui");com.qn.ui.StartPanel=function(){}
com.qn.ui.StartPanel.prototype=new js.ui.Container();com.qn.ui.StartPanel.prototype.getNativeClass=function(){return"com.qn.ui.StartPanel";}
com.qn.ui.StartPanel.prototype.bindUI=function(){this.addListener(201);this.container=this.ui.getElementsByTagName("td")[1];this.logoutButton=new js.ui.ImageButton();this.closeButton=new js.ui.ImageButton();this.logoutButton.setUI(this.ui.getElementsByTagName("img")[0]);this.closeButton.setUI(this.ui.getElementsByTagName("img")[1]);this.closeButton.setImage(imagePath+"taskbar/close.png");this.closeButton.mouseoverImage=imagePath+"taskbar/close_over.png";this.logoutButton.setImage(imagePath+"taskbar/logout.png");this.logoutButton.mouseoverImage=imagePath+"taskbar/logout_over.png";this.hLayout=new js.ui.HLayout();this.hLayout.setUI(this.ui.getElementsByTagName("table")[0]);this.hLayout.left.style.paddingLeft=12;this.leftMenu=new js.ui.Menu();this.leftMenu.getUI().style.border="0";this.leftMenu.getUI().style.width=244;this.hLayout.addLeft(this.leftMenu);var item=new js.ui.MenuItem();item.setText("test1");item.setIcon("/images/music.jpg",32,32);this.leftMenu.add(item);this.leftMenu.addSeparator();var item=new js.ui.MenuItem();item.setText("test1");item.setIcon("/images/music.jpg",32,32);this.leftMenu.add(item);var item=new js.ui.MenuItem();item.setText("test1");item.setIcon("/images/music.jpg",32,32);this.leftMenu.add(item);var item=new js.ui.MenuItem();item.setText("test1");item.setIcon("/images/music.jpg",32,32);this.leftMenu.add(item);var item=new js.ui.MenuItem();item.setText("test1");item.setIcon("/images/music.jpg",32,32);this.leftMenu.add(item);this.leftMenu.addSeparator();var item=new js.ui.MenuItem();item.setText("ËùÓÐ³ÌÐò");item.setIcon("/images/music.jpg",32,32);this.leftMenu.add(item);this.rightMenu=new js.ui.Menu();this.rightMenu.getUI().style.border="0";this.rightMenu.getUI().style.width=130;this.hLayout.addRight(this.rightMenu);var item=new js.ui.MenuItem();item.setText("test2");this.rightMenu.add(item);}
com.qn.ui.StartPanel.prototype.Init=function(){var __this=this;this.border=0;this.style.borderWidth='0';this.cellPadding='0';this.cellSpacing='0';this.SystemRow=this.AddRow();this.SystemRow.style.backgroundColor='';this.SystemRow.style.width="100%";var SystemRowCell=this.AddCell(this.SystemRow);SystemRowCell.colSpan='2';var SystemRowTable=new js.dhtml.Table();SystemRowTable.style.width="100%";SystemRowTable.style.borderWidth='0';SystemRowTable.border='0';SystemRowTable.style.backgroundImage='url('+GetResourcePath()+'tomos/StartPanel/bg_top.png)';SystemRowCell.appendChild(SystemRowTable);this.InnerSystemRow=SystemRowTable.AddRow();this.InnerSystemRow.style.height="47";this.LogOutCell=SystemRowTable.AddCell(this.InnerSystemRow);this.LogOutCell.style.paddingRight='3';this.LogOutCell.align='right';this.LogOutCell.width='100%';this.LogOutCellButton=new js.ui.Image(this.LogOutCell);this.LogOutCellButton.Owner=this;this.LogOutCellButton.onmouseover=function(){if(this.disabled)return;this.style.padding=0;this.borderWidth=0;this.style.cursor="pointer";this.src=GetResourcePath()+"tomos/StartPanel/logout32m.gif";if(!this.parentNode.disabled)
this.parentNode.focus();}
this.LogOutCellButton.onmouseout=function(event){this.src=GetResourcePath()+"tomos/StartPanel/logout32.gif";this.style.cursor='default';}
this.LogOutCellButton.src=GetResourcePath()+"tomos/StartPanel/logout32.gif";this.CloseCell=SystemRowTable.AddCell(this.InnerSystemRow);this.CloseCell.align='right';this.CloseCell.style.paddingRight='3';this.CloseCellButton=new js.ui.Image(this.CloseCell);this.CloseCellButton.Owner=this;this.CloseCellButton.src=GetResourcePath()+"tomos/StartPanel/close_computer32.gif";this.CloseCellButton.onmouseover=function(){if(this.disabled)return;this.style.padding=0;this.borderWidth=0;this.style.cursor="pointer";this.src=GetResourcePath()+"tomos/StartPanel/close_computer32m.gif";if(!this.parentNode.disabled)
this.parentNode.focus();}
this.CloseCellButton.onmouseout=function(event){this.src=GetResourcePath()+"tomos/StartPanel/close_computer32.gif";this.style.cursor='default';}
this.LogOutCellButton.onmousedown=this.CloseCellButton.onmousedown=function(event){js.ui.Component.prototype.EventCancelBubble(event);}
function removeRing(){var DataSet1=new js.db.DataSet();DataSet1.Name='DataSet1';DataSet1.MaxRows=-1;DataSet1.OpenURL="/servlet/DataSet?datasource=tomos.user.UserManager.logout";DataSet1.Close();DataSet1.Open();}
this.LogOutCellButton.onclick=function(){location.href="index.html";Browser.userState="LogOut";}
this.CloseCellButton.onclick=function(){Browser.userState="Close";if(Browser.IsIE){window.close();}
else{location.href="index.html";}}
this.LogOutCell.border=0;this.LogOutCell.style.position='relative';this.CloseCell.border=0;this.BodyRow=this.AddRow2();this.BodyRow.CELL=this.BodyRow.AddCell();this.BodyRow.CELL.border='0';this.BodyRow.CELL.style.width='10%';this.BodyRow.CELL.style.backgroundImage='url('+GetResourcePath()+'tomos/StartPanel/bg_center_left.png)';this.UserInfoRow=this.AddRow();this.UserInfo=this.AddCell(this.UserInfoRow);this.UserInfo.colSpan='2';this.UserInfo.style.height=50;this.UserInfo.border=0;this.UserInfo.align='center';this.UserInfo.style.backgroundImage='url('+GetResourcePath()+'tomos/StartPanel/bg_bottom.png)';this.UserInfo.style.backgroundColor='';this.UserInfo.Text=new js.dhtml.Span(this.UserInfo);this.UserInfo.Text.innerHTML=Browser.Username;this.UserInfo.style.cursor="pointer";this.UserInfo.onmousedown=js.ui.Component.prototype.EventCancelBubble;this.UserInfo.onclick=function(){Browser.Open("TOMOS UserCenter");__this.Hide();}
this.UserInfo.onmouseover=function(event){this.Text.style.color=DefaultStyle.HighlightColor;this.style.cursor="pointer";}
this.UserInfo.onmouseout=function(event){this.Text.style.color="black";this.style.cursor='default';}
this.BodyRow.LeftCell=this.BodyRow.AddCell();this.BodyRow.LeftCell.style.width='90%';this.BodyRow.LeftCell.style.height='100';this.BodyRow.LeftCell.style.borderLeftWidth=0;this.BodyRow.LeftCell.style.borderRightWidth=0;this.LeftMenu=new js.ui.Menu();this.LeftMenu.style.backgroundImage='url('+GetResourcePath()+'tomos/StartPanel/center3.png?)';this.LeftMenu.style.backgroundRepeat="repeat-y";this.LeftMenu.style.borderWidth=0;this.LeftMenu.style.height='100';this.LeftMenu.style.width="100%";this.LeftMenu.Owner=this;this.RightMenu=new js.ui.Menu();this.LeftMenu.MenuBar=this;this.RightMenu.MenuBar=this;var item1=new js.ui.MenuItem();var item2=new js.ui.MenuItem();var item3=new js.ui.MenuItem();var item4=new js.ui.MenuItem();var item5=new js.ui.MenuItem();var item6=new js.ui.MenuItem();var item7=new js.ui.MenuItem();var item8=new js.ui.MenuItem();this.RightMenu.Add(item1);this.RightMenu.Add(item2);this.RightMenu.Add(item3);this.RightMenu.Add(item4);this.RightMenu.Add(item5);this.RightMenu.Add(item6);this.RightMenu.Add(item7);this.RightMenu.Add(item8);var subitem1=new js.ui.MenuItem();var subitem2=new js.ui.MenuItem();var subitem3=new js.ui.MenuItem();item1.Text.innerHTML="News";item2.Text.innerHTML="My Document";item3.Text.innerHTML="Projects";item4.Text.innerHTML="Demo";item5.Text.innerHTML="Tutorials";item6.Text.innerHTML="Forums";item7.Text.innerHTML="Downloads";item8.Text.innerHTML="Related_link";subitem1.Text.innerHTML="sub1";subitem2.Text.innerHTML="sub1";subitem3.Text.innerHTML="sub1";var item11=new js.ui.MenuItem();var item12=new js.ui.MenuItem();var item_toplist=new js.ui.MenuItem();this.LeftMenu.Add(item12);this.LeftMenu.Add(item_toplist);this.LeftMenu.AddSeparator();var progs_sep=this.LeftMenu.AddSeparator();item11.SetEnabled(false);item12.Text.innerHTML=props("User Center");item12.SetIcon(GetResourcePath()+"tomos/StartPanel/usercenter32.png",32,32);item_toplist.Text.innerHTML=props("Top List");item_toplist.SetIcon(GetResourcePath()+"tomos/StartPanel/TopList48.png",32,32);item11.Target="Desktop/News";item12.Target="TOMOS UserCenter";item_toplist.Target="Top List";item12.OnClick=item_toplist.OnClick=function(){Browser.Open(this.Target);}
this.RightMenu.onmouseout=null;this.LeftMenu.onmouseout=null;this.LeftMenu.style.position='static';this.RightMenu.style.position='static';this.BodyRow.LeftCell.appendChild(this.LeftMenu);this.AddListener(201);this.__File1=new js.io.File();this.__File1.SetPath("Computer/Settings/StartPanel/Short Start");this.__File1.__Menu=this.LeftMenu;this.GetMenuItemList(this.__File1,progs_sep);this.__File2=new js.io.File();this.__File2.SetPath("Computer/Settings/StartPanel/All Programs");this.__File2.__Menu=this.LeftMenu;this.GetMenuItemList(this.__File2);}
com.qn.ui.StartPanel.prototype.getMenuItemList=function(file,beforeitem){var __this=this;file.Onload=function(result){__this.BuildMenu(this.__Menu,result,beforeitem);if(this.__Menu.Owner.ShowSubMenu)
this.__Menu.Owner.ShowSubMenu();}
file.List();}
com.qn.ui.StartPanel.prototype.buildMenu=function(menu,menulist,beforeitem){var __this=this;var menuitem,submenu,file;for(var i=0;i<menulist.length;i++){file=menulist[i];menuitem=new js.ui.MenuItem();menuitem.Text.innerHTML=file.GetDisplayName();if(menu==this.LeftMenu){menuitem.SetIcon(file.GetBigIcon(),32,32);}
else{menuitem.SetIcon(file.GetSmallIcon(),16,16);}
menuitem.Target=file;menuitem.title=file.GetDescription();if(beforeitem)
menu.Insert(menuitem,beforeitem);else
menu.Add(menuitem);menuitem.__super_onmouseover=menuitem.onmouseover;menuitem.onmouseover=function(){var file=this.Target;if(file.IsDirectory()&&!this.SubMenu){var submenu=this.CreateSubMenu();file.__Menu=submenu;file.SetPath(this.Target.GetTarget());__this.GetMenuItemList(file);}
this.__super_onmouseover();}
if(file.IsDirectory()){var url=GetResourcePath()+'menu/rightArrow.gif';menuitem.SetRightImage(url);}
else{menuitem.OnClick=function(){Browser.Open(this.Target);}}}}
com.qn.ui.StartPanel.prototype.processMessage=function(msg,params,src){switch(msg){case 6:case 201:if(browser.IsIE)
document.onmousedown=document.__oldonmousedown;else
window.onmousedown=window.__oldonmousedown;this.hide();break;}}
com.qn.ui.StartPanel.prototype.show=function(){if(browser.isIE){if(document.onmousedown!=com.qn.ui.StartPanel.__windowonmousedown){document.__oldonmousedown=document.onmousedown;document.onmousedown=com.qn.ui.StartPanel.__windowonmousedown;}}
else{if(window.onmousedown!=com.qn.ui.StartPanel.__windowonmousedown){window.__oldonmousedown=window.onmousedown;window.onmousedown=com.qn.ui.StartPanel.__windowonmousedown;}}
this.__superShow=js.ui.Component.prototype.show;this.__superShow();}
com.qn.ui.StartPanel.prototype.hide=function(){this.__superHide=js.ui.Component.prototype.hide;this.__superHide();}
com.qn.ui.StartPanel.prototype.hideSubMenu=function(except){this.LeftMenu.HideSubMenu(except);}
com.qn.ui.StartPanel.__windowonmousedown=function(event){if(!event)event=window.event;browser.sendMessage(null,201,event,window);}
$package("com.qn.ui");com.qn.ui.TaskBar=function(){}
com.qn.ui.TaskBar.prototype=new js.ui.Component();com.qn.ui.TaskBar.prototype.getNativeClass=function(){return"com.qn.ui.TaskBar";}
com.qn.ui.TaskBar.prototype.bindUI=function(){var __this=this;this.startButton=new js.ui.ImageButton();this.startButton.setUI(this.ui.getElementsByTagName("img")[0]);this.startButton.setImage(imagePath+"taskbar/startbutton.png");this.startButton.mouseoverImage=imagePath+"taskbar/startbutton_over.png";this.startButton.ui.onclick=function(){__this.showStartPanel();}}
com.qn.ui.TaskBar.prototype.showStartPanel=function(){if(!this.startPanel){this.startPanel=new com.qn.ui.StartPanel();this.startPanel.getUI().style.position="absolute";this.startPanel.getUI().style.zIndex=1000;document.body.appendChild(this.startPanel.getUI());}
this.startPanel.show();this.startPanel.getUI().style.left=0;this.startPanel.getUI().style.top=this.getUI().offsetTop-this.startPanel.getUI().offsetHeight+11;}
com.qn.ui.TaskBar.prototype.hideStartPanel=function(){if(this.startPanel)
this.startPanel.hide();}
com.qn.ui.TaskBar.prototype.Init=function(){this.style.borderWidth=0;this.style.backgroundRepeat="repeat-x";this.style.backgroundImage='url('+GetResourcePath()+'tomos/taskbar/taskbar_bg.gif)';this.BodyRow=this.AddRow2();var cell=this.BodyRow.AddCell2();cell.style.borderWidth=0;var space=new js.dhtml.Image();space.src=GetResourcePath()+"common/space.gif";space.style.width=115;space.style.height=34;cell.appendChild(space);}
com.qn.ui.TaskBar.prototype.Add=function(component){var cell=this.BodyRow.AddCell2();cell.style.borderWidth=0;cell.Add(component);}
com.qn.ui.TaskProcessBar=function TaskProcessBar(parent){var obj=new js.ui.Table(parent);Extends(this,obj);obj.Init();return obj;}
com.qn.ui.TaskProcessBar.prototype.Init=function(){this.AddListener(1);this.AddListener(2);this.AddListener(6);this.AddListener(16);this.AddListener(12);this.AddListener(74);this.AddListener(801);this.__Window2Cell=new js.lang.Array();this.cellSpacing=0;this.cellPadding=0;this.Row=this.AddRow2();this.style.borderWidth=0;this.RightCell=this.Row.AddCell();this.BuildCellMenu();}
com.qn.ui.TaskProcessBar.prototype.ProcessMessage=function(message,params,src){switch(message){case 1:this.AddWindow(src);break;case 2:case 16:this.RemoveWindow(src);break;case 12:var cell=this.__Window2Cell[src.HashCode()];if(cell){if(params)
cell.Title.innerHTML=params.substring(0,5)+"...";}
break;case 74:var cell=this.__Window2Cell[src.HashCode()];if(!cell)return;if(!cell.Icon){cell.Icon=new js.dhtml.Image();cell.__icon_cell.appendChild(cell.Icon);}
if(src.Icon)
cell.Icon.SetSrc(src.Icon.GetSrc(),16,16);break;case 801:var cell=this.__Window2Cell[src.HashCode()];if(cell)
cell.SetSelected(false);break;case 6:var cell=this.__Window2Cell[src.HashCode()];if(cell)
cell.SetSelected(true);break;}}
com.qn.ui.TaskProcessBar.prototype.AddWindow=function(form){if(this.__Window2Cell[form.HashCode()])return;var cell=new com.qn.ui.TaskItem();this.Row.insertBefore(cell,this.RightCell);this.Row.Cells.InsertItem(cell,this.Row.Cells.length-1);cell.Window=form;cell.Owner=this;this.__Window2Cell[form.HashCode()]=cell;if(form.Title)
cell.Title.innerHTML=form.Title;if(!cell.Icon&&form.Icon){cell.Icon=new js.dhtml.Image();cell.__icon_cell.appendChild(cell.Icon);}
if(form.Icon)
cell.Icon.SetSrc(form.Icon.GetSrc(),16,16);cell.SetSelected(true);}
com.qn.ui.TaskProcessBar.prototype.RemoveWindow=function(form){var cell=this.__Window2Cell[form.HashCode()];if(cell)
this.Row.RemoveCell(cell);this.__Window2Cell[form.HashCode()]=null;}
com.qn.ui.TaskProcessBar.prototype.BuildCellMenu=function(){this.PopupMenu=new js.ui.Menu();this.PopupMenu.CurrentWindow;var item1=new js.ui.MenuItem();var item2=new js.ui.MenuItem();var item3=new js.ui.MenuItem();var item4=new js.ui.MenuItem();var item5=new js.ui.MenuItem();var item6=new js.ui.MenuItem();item1.Owner=this.PopupMenu;item2.Owner=this.PopupMenu;item3.Owner=this.PopupMenu;item4.Owner=this.PopupMenu;item5.Owner=this.PopupMenu;item6.Owner=this.PopupMenu;this.PopupMenu.Add(item1);this.PopupMenu.AddSeparator();this.PopupMenu.Add(item2);this.PopupMenu.Add(item3);this.PopupMenu.Add(item4);this.PopupMenu.Add(item5);this.PopupMenu.Add(item6);item1.Text.innerHTML=props("Close");item2.Text.innerHTML=props("Maximal Size");item3.Text.innerHTML=props("Minimal Size");item4.Text.innerHTML=props("Size");item4.SetEnabled(false);item5.Text.innerHTML=props("Move");item5.SetEnabled(false);item6.Text.innerHTML=props("revert");item6.SetEnabled(false);this.PopupMenu.EnabledChange=function(State){if(State==1){item4.SetEnabled(false);item5.SetEnabled(false);item6.SetEnabled(false);item2.SetEnabled(true);item3.SetEnabled(true);}
if(State==2){item3.SetEnabled(false);item2.SetEnabled(true);item6.SetEnabled(true);item4.SetEnabled(false);item5.SetEnabled(false);}
if(State==3){item4.SetEnabled(false);item5.SetEnabled(false);item2.SetEnabled(false);item3.SetEnabled(true);item6.SetEnabled(true);}}
item1.OnClick=function(){if(this.Owner.CurrentWindow)
this.Owner.CurrentWindow.Close();}
item2.OnClick=function(){if(this.Owner.CurrentWindow)
this.Owner.CurrentWindow.Maximize();}
item3.OnClick=function(){if(this.Owner.CurrentWindow)
this.Owner.CurrentWindow.Minimize();}
item6.OnClick=function(){if(this.Owner.CurrentWindow)
this.Owner.CurrentWindow.Reset();}
window.Add(this.PopupMenu);this.PopupMenu.style.position='absolute';this.PopupMenu.SetVisible(false);}
com.qn.ui.TaskItem=function TaskItem(){var cell=new js.dhtml.TD();Extends(this,cell);cell.Init();return cell;}
com.qn.ui.TaskItem.prototype.Init=function(){this.style.backgroundImage='';this.style.backgroundRepeat="no-repeat";this.style.borderWidth=0;this.__layout=new js.ui.Table();this.__layout.style.borderWidth=0;this.appendChild(this.__layout);var __layout_row=this.__layout.AddRow2();this.__icon_cell=__layout_row.AddCell();this.__title_cell=__layout_row.AddCell();this.__title_cell.style.borderWidth=0;this.__icon_cell.style.borderWidth=0;this.__icon_cell.style.paddingLeft=5;this.Title=new js.dhtml.Span();this.Title.style.color=Color.White;this.Title.style.whiteSpace="nowrap";this.Title.style.textOverflow="ellipsis";this.__title_cell.appendChild(this.Title);this.Selected=false;this.style.cursor="default";this.style.width=81;this.style.height=20;this.style.borderWidth=0;this.style.backgroundImage='url('+GetResourcePath()+'tomos/taskbar/taskitem_bg.gif)'
this.onclick=function(){var selected=!this.Selected;this.SetSelected(selected);if(this.Selected){this.Window.Reset();this.Window.SetActive(true);}
else
this.Window.Minimize();}
this.SetSelected=function(selected){this.Selected=selected;if(this.Selected){var c;for(var i=0;i<this.Owner.Row.Cells.length-1;i++){c=this.Owner.Row.Cells[i];if(this!=c){c.SetSelected(false);}}
this.style.backgroundImage='url('+GetResourcePath()+'tomos/taskbar/taskitem_down.gif)';this.style.backgroundPosition='0px -1px';}
else{this.style.backgroundImage='url('+GetResourcePath()+'tomos/taskbar/taskitem_bg.gif)';this.style.backgroundPosition='0px -1px';}}
this.onmouseover=function(){if(this.Selected){this.style.backgroundImage='url('+GetResourcePath()+'tomos/taskbar/taskitem_over.gif)';}
else{this.style.backgroundImage='url('+GetResourcePath()+'tomos/taskbar/taskitem_over.gif)';}}
this.oncontextmenu=function(event){this.SetSelected(true);if(!event)event=window.event;var x=event.clientX?event.clientX:event.pageX;var y=event.clientY?event.clientY:event.pageY;this.Owner.PopupMenu.CurrentWindow=this.Window;this.Owner.PopupMenu.EnabledChange(this.Window.State);this.Owner.PopupMenu.Popup(x,y);js.ui.Component.prototype.EventCancelBubble(event);}
this.onmouseout=function(){if(this.Selected){this.style.backgroundImage='url('+GetResourcePath()+'tomos/taskbar/taskitem_down.gif)';}
else
this.style.backgroundImage='url('+GetResourcePath()+'tomos/taskbar/taskitem_bg.gif)';}}
com.qn.ui.TrayIcon=function TrayIcon(){var obj=new js.ui.Img();Extends(this,obj);obj.Init();return obj;}
com.qn.ui.TrayIcon.prototype.Window;com.qn.ui.TrayIcon.prototype.SetWindow=function(win){if(this.Window==win)return;this.Window=win;if(!this.Window.__OldMinimize){this.Window.__OldMinimize=this.Window.Minimize;this.Window.Minimize=function(){this.__OldMinimize();Browser.TaskProcessBar.RemoveWindow(this);}}}
com.qn.ui.TrayIcon.prototype.Init=function(){this.style.cursor="default";this.style.height=16;this.style.width=16;this.onclick=function(){if(this.Window){if(this.Window.Visible){this.Window.Minimize();Browser.TaskProcessBar.RemoveWindow(this.Window);}
else{Browser.TaskProcessBar.AddWindow(this.Window);this.Window.Normal();this.Window.SetActive(true);}}}}
com.qn.ui.TrayIcon.prototype.Exit=function(){Browser.TrayBar.Remove(this);}
com.qn.ui.TrayBar=function TrayBar(parent){var obj=new js.ui.Table(parent);Extends(this,obj);obj.Init();return obj;}
com.qn.ui.TrayBar.prototype.Init=function(){this.cellSpacing=0;this.cellPadding=2;this.style.height='100%';this.style.backgroundImage='url('+GetResourcePath()+'tomos/taskbar/taskbar_right.gif)';this.style.backgroundPosition='0px 0px';this.style.backgroundRepeat="no-repeat";this.style.borderWidth=0;this.TrayIcons=new js.lang.Array();this.BodyRow=this.AddRow2();this.LeftCell=this.BodyRow.AddCell();this.LeftCell.style.paddingLeft='15';this.LeftCell.style.borderWidth=0;this.TimeDisplay=this.BodyRow.AddCell();this.TimeDisplay.style.backgroundRepeat="repeat-x";this.SysTimer=new js.util.Timer();this.TimeDisplay.style.borderWidth=0;this.TimeDisplay.style.color=Color.White;var now=new Date();this.TimeDisplay.innerHTML=js.util.Format.prototype.FormatFloat(now.getHours(),"00")+":"+js.util.Format.prototype.FormatFloat(now.getMinutes(),"00");this.SysTimer.Owner=this;this.SysTimer.OnTimer=function(){var now=new Date();this.Owner.TimeDisplay.innerHTML=js.util.Format.prototype.FormatFloat(now.getHours(),"00")+":"+js.util.Format.prototype.FormatFloat(now.getMinutes(),"00");}
this.RightCell=this.BodyRow.AddCell();this.SysTimer.SetInterval(30000);this.SysTimer.SetActive(true);}
com.qn.ui.TrayBar.prototype.Add=function(trayicon){var cell=new js.dhtml.TD();this.BodyRow.insertBefore(cell,this.TimeDisplay);cell.style.borderWidth=0;cell.appendChild(trayicon);cell.style.backgroundRepeat="repeat-x";this.TrayIcons.AddItem(trayicon);if(Browser.IsIE)
js.util.Utils.prototype.CorrectPNG(trayicon);}
com.qn.ui.TrayBar.prototype.Remove=function(trayicon){this.TrayIcons.RemoveItem(trayicon);var cell=trayicon.parentNode;if(cell)
if(cell.parentNode==this.BodyRow)
this.BodyRow.removeChild(cell);}
com.qn.ui.ShortcutBar=function ShortcutBar(parent){var obj=new js.ui.Table(parent);Extends(this,obj);obj.Buttons=new js.lang.Array();obj.Init();return obj;}
com.qn.ui.ShortcutBar.prototype.Init=function(){var __this=this;this.style.height='100%';this.style.borderWidth=0;this.BodyRow=this.AddRow2();this.leftCell=new js.dhtml.TD();this.leftCell.style.borderWidth=0;this.leftCell.innerHTML="&nbsp;&nbsp;";this.leftCell.style.backgroundImage='url('+GetResourcePath()+'tomos/taskbar/taskbar_right.gif)';this.BodyRow.appendChild(this.leftCell);var __this=this;this.__File=new js.io.File();this.__File.SetPath("Computer/Settings/ShortcutBar");this.__File.Onload=function(result){__this.BuildToolButtons(result);}
this.__RightCell=new js.dhtml.TD();this.BodyRow.appendChild(this.__RightCell);this.__RightCell.style.borderWidth=0;this.__RightCell.style.backgroundImage='url('+GetResourcePath()+'tomos/taskbar/taskbar_right.gif)';this.__RightCell.innerHTML="&nbsp;&nbsp;";}
com.qn.ui.ShortcutBar.prototype.Refresh=function(){this.__File.List();}
com.qn.ui.ShortcutBar.prototype.InitRefresh=function(){this.__File.ListJson(TOMOS_SHORTCUTBAR_FILES);}
com.qn.ui.ShortcutBar.prototype.BuildToolButtons=function(files){var button,file;for(var i=0;i<files.length;i++){file=files[i];button=new js.dhtml.Image();button.Target=file;button.title=props(file.GetDescription());button.SetSrc(file.GetSmallIcon(),16,16);button.onclick=function(){Browser.Open(this.Target);}
this.Add(button);}}
com.qn.ui.ShortcutBar.prototype.Add=function(toolbutton){toolbutton.style.padding=0;var cell=new js.dhtml.TD();this.BodyRow.insertBefore(cell,this.__RightCell);cell.style.borderWidth=0;cell.appendChild(toolbutton);this.Buttons.AddItem(toolbutton);toolbutton.style.cursor="default";toolbutton.style.width=18;toolbutton.style.height=18;cell.style.paddingLeft=2;cell.style.paddingRight=2;toolbutton.style.borderColor=Color.White;toolbutton.style.borderStyle="outset";toolbutton.style.borderWidth=0;toolbutton.onmouseover=function(event){if(this.disabled)return;this.style.borderWidth=1;cell.style.paddingLeft=1;cell.style.paddingRight=1;if(!this.parentNode.disabled)
this.parentNode.focus();}
toolbutton.onmouseout=function(event){this.style.borderWidth=0;cell.style.paddingLeft=2;cell.style.paddingRight=2;}}
com.qn.ui.ShortcutBar.prototype.Remove=function(toolbutton){this.Buttons.RemoveItem(toolbutton);var cell=toolbutton.parentNode;if(cell)
if(cell.parentNode==this.BodyRow)
this.BodyRow.removeChild(toolbutton);}
$package("com.qn.ui");com.qn.ui.Progress=function(){}
com.qn.ui.Progress.prototype=new js.ui.Component();com.qn.ui.Progress.prototype.getNativeClass=function(){return"com.qn.ui.Progress";}
com.qn.ui.Progress.prototype.bindUI=function(){this.icon=this.ui.getElementsByTagName("img")[0];this.message=this.ui.getElementsByTagName("span")[0];this.ui.style.zIndex=9;this.icon.src=imagePath+"/progress/progress1.gif";}
com.qn.ui.Progress.prototype.setMessage=function(msg){this.message.innerHTML=msg;}
com.qn.ui.Progress.prototype.start=function(msg){this.show();this.center();if(msg)this.message.innerHTML=msg;}
$package("com.qn.io");com.qn.io.File=function(path){this.path=path;}
com.qn.io.File.prototype=new js.lang.BaseObject();com.qn.io.File.prototype.async=true;com.qn.io.File.prototype.result=null;com.qn.io.File.prototype.returnValue=0;com.qn.io.File.prototype.path=null;com.qn.io.File.prototype.target=null;com.qn.io.File.prototype.desc=null;com.qn.io.File.prototype.fileId=null;com.qn.io.File.prototype.userId=null;com.qn.io.File.prototype.onload=null;com.qn.io.File.prototype.onerror=null;com.qn.io.File.prototype.score=0;com.qn.io.File.prototype.shareName=null;com.qn.io.File.prototype.host=null;com.qn.io.File.prototype.windowType=0;com.qn.io.File.prototype.baseUrl="/view?module=fileService&action=";com.qn.io.File.prototype.getHttp=function(){if(!this.http){this.http=new js.net.HttpConnection();this.http.method="POST";this.http.owner=this;}
this.http.async=this.async;this.http.onerror=function(http){if(browser.progress)browser.progress.hide();var error=http.responseText;if(!error)browser.messageBox("Network or service error.");else if(this.owner.onerror)
this.owner.onerror(error);else browser.messageBox(error);}
this.http.onload=function(http){var data=this.owner.processResponse(http.responseText);if(!data.errorMsg&&this.owner.onload)this.owner.onload(data);}
if(browser.progress)browser.progress.start(props("Loading......"));return this.http;}
com.qn.io.File.prototype.processResponse=function(responseText){if(browser.progress)browser.progress.hide();var data;try{eval('data='+responseText);}catch(e){data=new Array();};if(data.errorMsg)
if(this.onerror)
this.onerror(data.errorMsg);else
browser.messageBox(data.errorMsg);else if(!data.errorMsg){browser.sendMessage(null,810,this.__action,this);}
return data;}
com.qn.io.File.prototype.onerror=function(errorMsg){browser.messageBox(errorMsg);}
com.qn.io.File.prototype.list=function(exts,isListDirs,startRecord){this.async=true;var __this=this;var http=this.getHttp();var url=this.baseUrl+"dir";var params="path="+js.util.Utils.prototype.encodeString(this.path);if(exts){params+="&exts="+exts;}
if(isListDirs==true){params+="&islistdirs="+isListDirs;}
if(startRecord!=null){params+="&recno="+startRecord;}
http.onload=function(http){if(browser.progress)browser.progress.hide();this.owner.doListed(http.responseText);}
http.open(url);http.send(params);}
com.qn.io.File.prototype.doListed=function(responseText){var data=this.processResponse(responseText);if(!data)return;if(data.errorMsg)return;this.result=new js.lang.Array();var file;for(var i=0;i<data.length;i++){file=new com.qn.io.File();file.fillData(data[i]);this.result.addItem(file);}
if(this.onload)
this.onload(this.result);}
com.qn.io.File.prototype.fillData=function(data){this.path=data.path;this.target=data.target;this.type=data.type;this.filename=data.name;this.lastModified=data.lastModified;this.size=data.size;this.bigIcon=data.bigIcon;this.smallIcon=data.smallIcon;this.absoluteIP=data.absoluteIP;this.isShared=data.isShared;this.desc=data.desc;this.userId=data.userId;this.fileId=data.fileId;this.downLink=data.downLink;}
com.qn.io.File.prototype.mkdir=function(){this.async=false;var __this=this;var http=this.getHttp();var url=this.baseUrl+"createNewFolder";var params="path="+js.util.Utils.prototype.encodeString(this.path);this.__action=0;http.open(url);http.send(params);return this.returnValue;}
com.qn.io.File.prototype.deleteFile=function(files){if(!files||files.length==0)return;this.async=false;var __this=this;var http=this.getHttp();var url=this.baseUrl+"delete";var params="path="+js.util.Utils.prototype.encodeString(files);this.__action=2;http.open(url);http.send(params);return this.returnValue;}
com.qn.io.File.prototype.deleteOnExist=function(){return true;}
com.qn.io.File.prototype.getSizeDisp=function(){if(!this.isFile())return"";var ft=new js.util.Format();return ft.formatBytes(this.getSize());}
com.qn.io.File.prototype.getLastModifiedDisp=function(){if(this.getLastModified()==0)return"";var ft=new js.util.Format();var dt=new js.util.Date(this.getLastModified());return dt.formatDateTime("yyyy-MM-dd HH:mm:ss");}
com.qn.io.File.prototype.getAbsoluteIPDisp=function(){if(!this.absoluteIP||this.absoluteIP<=0)return"";return this.absoluteIP;}
com.qn.io.File.prototype.getDescDisp=function(){if(!this.desc)return"";return this.desc;}
com.qn.io.File.prototype.getAttributes=function(){this.async=true;var __this=this;var http=this.getHttp();var url=this.baseUrl+"getAttributes";var params="path="+js.util.Utils.prototype.encodeString(this.path);http.onload=function(http){var data=__this.processResponse(http.responseText);if(!data.errorMsg){__this.fillData(data);if(__this.onload)
__this.onload(data);}}
http.open(url);http.send(params);}
com.qn.io.File.prototype.editSave=function(){this.async=false;var __this=this;var http=this.getHttp();var url=this.baseUrl+"editSave";var params="path="+js.util.Utils.prototype.encodeString(this.getPath());params+="&desc="+js.util.Utils.prototype.encodeString(this.desc);http.open(url);http.send(params);}
com.qn.io.File.prototype.getDownLink=function(){return this.downLink;}
com.qn.io.File.prototype.getLinkUrl=function(){return"/explorer/getLink/"+this.userId+"/"+this.fileId+".html";}
com.qn.io.File.prototype.searchList=function(params,startRecord){}
com.qn.io.File.prototype.setAsync=function(async){this.async=async;this.getHttp().async=async;}
com.qn.io.File.prototype.clone=function(){var newfile=new com.qn.io.File();newfile.setPath(this.getPath());newfile.setTarget(this.getTarget());newfile.type=this.type;newfile.lastModified=this.lastModified;newfile.size=this.size;newfile.bigIcon=this.bigIcon;newfile.smallIcon=this.smallIcon;newfile.windowType=this.windowType;return newfile;}
com.qn.io.File.prototype.setTarget=function(target){this.target=target;}
com.qn.io.File.prototype.getTarget=function(){if(!this.target)
this.target=this.getPath();return this.target;}
com.qn.io.File.prototype.canRead=function(){return true;}
com.qn.io.File.prototype.canWrite=function(){return true;}
com.qn.io.File.prototype.renameTo=function(filename){var __this=this;this.__action=1;this.getHttp().OpenURL=com.qn.io.File.prototype.OPEN_URL+"?ds="+"tomos.filesystem.File.renameTo";this.GetDataSet().Close();this.GetDataSet().Fields.Clear();this.GetDataSet().Params.Clear();var param1=new js.db.Param("path",this.Path,"String");var param2=new js.db.Param("rename",filename,"String");this.GetDataSet().Params.Add(param1);this.GetDataSet().Params.Add(param2);this.GetDataSet().OnAfterOpen=function(){__this.ReturnValue=true;__this.Result=this;__this.__OldPath=__this.GetPath();__this.SetPath(__this.GetParent()+"/"+filename);__this.SetFileName(filename);if(!__this.IsFileShortcut()&&!__this.IsDirShortcut())
__this.Target=__this.GetPath();Browser.SendMessage(null,810,__this.__Action,__this);if(__this.Onload)
__this.Onload(__this.Result);}
this.GetDataSet().Open();return this.ReturnValue;}
com.qn.io.File.prototype.createShortcut=function(target,icon,windowtype){var __this=this;this.__Action=0;this.GetDataSet().OpenURL=com.qn.io.File.prototype.OPEN_URL+"?datasource="+"tomos.filesystem.File.createShortcut";this.GetDataSet().Close();this.GetDataSet().Fields.Clear();this.GetDataSet().Params.Clear();var param1=new js.db.Param("path",this.GetPath(),"String");var param2=new js.db.Param("target",target,"String");var param3=new js.db.Param("icon",icon,"String");var param4=new js.db.Param("windowtype",windowtype,"String");this.GetDataSet().Params.Add(param1);this.GetDataSet().Params.Add(param2);this.GetDataSet().Params.Add(param3);this.GetDataSet().Params.Add(param4);this.GetDataSet().OnAfterOpen=function(){__this.ReturnValue=true;__this.Result=this;var filename=__this.GetPath();var file=new com.qn.io.File(filename);if(__this.IsFile())
file.Type=3;else
file.Type=2;file.SetTarget(target);file.BigIcon=icon;file.WindowType=windowtype;Browser.SendMessage(null,810,__this.__Action,file);if(this.Owner.Onload)
this.Owner.Onload(this.Owner.Result);}
this.GetDataSet().Open();return this.ReturnValue;}
com.qn.io.File.prototype.createShare=function(sharename,permissions,desc,point,cash,sharetype){var __this=this;this.GetDataSet().OpenURL=com.qn.io.File.prototype.OPEN_URL+"?datasource="+"tomos.filesystem.File.createShare";this.GetDataSet().Close();this.GetDataSet().Fields.Clear();this.GetDataSet().Params.Clear();var param1=new js.db.Param("path",this.GetTarget(),"String");var param2=new js.db.Param("sharename",sharename,"String");var param3=new js.db.Param("permissions",permissions,"String");var param4=new js.db.Param("desc",desc,"String");var param5=new js.db.Param("point",point,"String");var param6=new js.db.Param("cash",cash,"String");var param7=new js.db.Param("sharetype",sharetype,"String");this.GetDataSet().Params.Add(param1);this.GetDataSet().Params.Add(param2);this.GetDataSet().Params.Add(param3);this.GetDataSet().Params.Add(param4);this.GetDataSet().Params.Add(param5);this.GetDataSet().Params.Add(param6);this.GetDataSet().Params.Add(param7);this.GetDataSet().OnAfterOpen=function(){__this.ReturnValue=true;if(__this.IsFile())
__this.Type=5;else
__this.Type=6;this.Owner.Result=this;if(this.Owner.Onload)
this.Owner.Onload(this.Owner.Result);}
this.GetDataSet().Open();return this.ReturnValue;}
com.qn.io.File.prototype.deleteShare=function(sharename){var __this=this;this.GetDataSet().OpenURL=com.qn.io.File.prototype.OPEN_URL+"?datasource="+"tomos.filesystem.File.deleteShare";this.GetDataSet().Close();this.GetDataSet().Fields.Clear();this.GetDataSet().Params.Clear();var param1=new js.db.Param("sharename",sharename,"String");this.GetDataSet().Params.Add(param1);this.GetDataSet().OnAfterOpen=function(){__this.ReturnValue=true;if(__this.IsShareFile()){__this.Type=0;}
else{__this.Type=1;}
this.Owner.Result=this;if(this.Owner.Onload)
this.Owner.Onload(this.Owner.Result);}
this.GetDataSet().Open();return this.ReturnValue;}
com.qn.io.File.prototype.cut=function(src,target){this.GetDataSet().OpenURL=com.qn.io.File.prototype.OPEN_URL+"?datasource="+"tomos.filesystem.File.cut";this.__Action=3;this.Copy(src,target);this.__Action=4;}
com.qn.io.File.prototype.copy=function(src,target){var __this=this;if(this.__Action!=3){this.__Action=4;this.GetDataSet().OpenURL=com.qn.io.File.prototype.OPEN_URL+"?datasource="+"tomos.filesystem.File.copy";}
this.GetDataSet().Close();this.GetDataSet().Fields.Clear();this.GetDataSet().Params.Clear();var param1=new js.db.Param("path",src,"String");var param2=new js.db.Param("target",target,"String");this.GetDataSet().Params.Add(param1);this.GetDataSet().Params.Add(param2);this.__BuildPriceInfo();this.GetDataSet().OnAfterOpen=function(){__this.ReturnValue=true;__this.Result=this;if(__this.__Action==3){var filenames=src.split(";");for(var i=0;i<filenames.length-1;i++){Browser.SendMessage(null,810,2,new com.qn.io.File(filenames[i]));}}
if(this.Owner.Onload)
this.Owner.Onload(this.Owner.Result);}
this.GetDataSet().Open();return this.ReturnValue;}
com.qn.io.File.prototype.setFilename=function(filename){this.filename=filename;}
com.qn.io.File.prototype.getFilename=function(filename){if(!filename){if(this.filename)
return this.filename;else
filename=this.getPath();}
if(!filename)return;var pos=filename.lastIndexOf("/");if(pos==-1)
pos=filename.lastIndexOf("\\");if(pos!=-1)
filename=filename.substring(pos+1);return filename;}
com.qn.io.File.prototype.getParent=function(){var path=this.getPath();if(!path)return;var pos=path.lastIndexOf("/");if(pos!=-1)
path=path.substring(0,pos);return path;}
com.qn.io.File.prototype.getPath=function(){var path=this.path;if(path&&path!=""){if("/"==path.substring(path.length-1)){path=path.substring(0,path.length-1);}}
return path;}
com.qn.io.File.prototype.setPath=function(path){this.path=path;}
com.qn.io.File.prototype.getDisplayName=function(){var filename=this.getFilename();var ext=com.qn.io.File.prototype.getExtName(filename);if("sht"==ext||"sfd"==ext||"share"==ext){return com.qn.io.File.prototype.getFrontName(filename)}
else return filename;}
com.qn.io.File.prototype.getDesc=function(){var desc=this.desc;if(!desc)
desc=this.getDisplayname();return desc;}
com.qn.io.File.prototype.readText=function(filename){var __this=this;if(filename)
this.SetPath(filename);if(!this.HttpConnection)
this.HttpConnection=new js.net.HttpConnection();this.HttpConnection.Async=this.Async;this.HttpConnection.Owner=this;this.HttpConnection.Onload=function(http){__this.ReturnValue=true;this.Owner.Result=http.responseText;if(this.Owner.Onload)
this.Owner.Onload(this.Owner.Result);}
this.HttpConnection.Onerror=function(http){__this.ReturnValue=false;this.Owner.Result=null;var error=http.responseText;if(this.Owner.Onerror)
this.Owner.Onerror(error);else Browser.MessageBox(error);}
this.HttpConnection.Open(com.qn.io.File.prototype.READTEXT_URL);this.HttpConnection.Instance.SetRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=utf-8");this.HttpConnection.Send(com.qn.io.File.prototype.__BuildPriceUrl("filename="+this.GetPath()));return this.ReturnValue;}
com.qn.io.File.prototype.writeText=function(text,filename){var __this=this;if(filename){this.SetPath(filename);}
if(!this.HttpConnection)
this.HttpConnection=new js.net.HttpConnection();this.HttpConnection.Async=this.Async;this.HttpConnection.Owner=this;this.HttpConnection.Onload=function(http){__this.ReturnValue=true;__this.Result=http.responseText;if(!http.responseText||http.responseText==""){if(__this.Onload)
__this.Onload(__this.Result);}
else{__this.ReturnValue=false;if(__this.Onerror)
__this.Onerror(__this.Result);else Browser.MessageBox(__this.Result);}}
this.HttpConnection.Onerror=function(http){__this.ReturnValue=false;this.Owner.Result=null;var error=http.responseText;if(this.Owner.Onerror)
this.Owner.Onerror(error);else Browser.MessageBox(__this.Result);}
this.HttpConnection.Open(com.qn.io.File.prototype.WRITE_URL);this.HttpConnection.Send(this.GetPath()+"&context="+text);return this.ReturnValue;}
com.qn.io.File.prototype.OPEN_URL="/servlet/DataSet";com.qn.io.File.prototype.READ_URL="/servlet/ReadFileStream";com.qn.io.File.prototype.READTEXT_URL="/servlet/ReadFileText";com.qn.io.File.prototype.WRITE_URL="/servlet/WriteFileText";com.qn.io.File.prototype.read=function(){if(Browser.__PayPoint>0||Browser.__PayCash>0){var dataset=this.GetDataSet();dataset.OpenURL=com.qn.io.File.prototype.OPEN_URL+"?datasource="+"tomos.user.BalanceManager.judgePoints";dataset.Close();dataset.Async=false;dataset.Fields.Clear();dataset.Params.Clear();var payPoints=Browser.__PayPoint;var param1=new js.db.Param("paypoints",payPoints,"String");var param2=new js.db.Param("cash",Browser.__PayCash,"String");dataset.Params.Add(param1);dataset.Params.Add(param2);dataset.OnAfterOpen=function(Msg){}
dataset.Onerror=function(error){alert(error);return"";}
dataset.Open();}
var url=this.READ_URL+"?filename="+this.GetTarget();url=url.replace(/ /g,"%20");return com.qn.io.File.prototype.__BuildPriceUrl(url);}
com.qn.io.File.prototype.write=function(value){return true;}
com.qn.io.File.prototype.size=0;com.qn.io.File.prototype.getSize=function(){return this.size;}
com.qn.io.File.prototype.close=function(){return true;}
com.qn.io.File.prototype.getPathSeparator=function(){return"/";}
com.qn.io.File.prototype.createNewFile=function(){var __this=this;this.GetDataSet().OpenURL=com.qn.io.File.prototype.OPEN_URL+"?datasource="+"tomos.filesystem.File.createNewFile";this.__Action=0;this.BuildPathParams();this.GetDataSet().Open();return this.ReturnValue;}
com.qn.io.File.prototype.exists=function(){var __this=this;var dataset=this.GetDataSet();dataset.OpenURL=com.qn.io.File.prototype.OPEN_URL+"?datasource="+"tomos.filesystem.File.exists";dataset.Close();dataset.Fields.Clear();dataset.Params.Clear();var param1=new js.db.Param("path",this.GetPath(),"String");dataset.Params.Add(param1);dataset.OnAfterOpen=function(msg){if(msg=="true")
__this.ReturnValue=true;else
__this.ReturnValue=false;if(__this.Onload)__this.Onload(__this.ReturnValue);}
this.GetDataSet().Open();return this.ReturnValue;}
com.qn.io.File.prototype.type=0;com.qn.io.File.prototype.getType=function(){return this.Type;}
com.qn.io.File.prototype.getTypeName=function(){var name="unknown";if(this.Type==0)name=props("File")
else if(this.Type==1)name=props("Folder");else if(this.Type==2)name=props("DirShortcut");else if(this.Type==3)name=props("FileShortcut");else if(this.Type==4)name=props("Share");else if(this.Type==5)name=props("File");else if(this.Type==6)name=props("Folder");else if(this.Type==19)name=props("Group Share");else if(this.Type==20)name=props("My Groups");else if(this.Type==21)name=props("Group");else if(this.Type==22)name=props("Member");else if(this.Type==22)name=props("Manager");else if(this.Type==24)name=props("Creator");else if(this.Type==11)name=props("My Friends");else if(this.Type==12)name=props("Category");else if(this.Type==13)name=props("Friend");return name;}
com.qn.io.File.prototype.isDirectory=function(){return this.type==1;}
com.qn.io.File.prototype.isFile=function(){return this.type==0;}
com.qn.io.File.prototype.isShareFile=function(){return this.type==5;}
com.qn.io.File.prototype.isShareDirectory=function(){return this.type==6;}
com.qn.io.File.prototype.isFileShortcut=function(){return this.type==3;}
com.qn.io.File.prototype.isDirShortcut=function(){var idx=-1;var target=this.getTarget();if(target)
idx=target.indexOf("http://")!=-1;return this.type==2&&idx==-1;}
com.qn.io.File.prototype.isShare=function(){return this.type==4;}
com.qn.io.File.prototype.isHidden=function(){return true;}
com.qn.io.File.prototype.lastModified=0;com.qn.io.File.prototype.getLastModified=function(){return this.lastModified;}
com.qn.io.File.prototype.sort=function(files,attrname,ascend,datatype){if(files){var sortfunc;if(datatype=="NUMBER")
sortfunc=new Function("m, n","if(!isNaN(n['"+attrname+"'])&&!isNaN(n['"+attrname+"'])) return n['"+attrname+"']-m['"+attrname+"'];"+"if(n['"+attrname+"']<m['"+attrname+"'])return -1;else if(n['"+attrname+"']>=m['"+attrname+"']) return 1; return 0;");else
sortfunc=new Function("m, n","if(n['"+attrname+"']<m['"+attrname+"'])return -1;else if(n['"+attrname+"']>=m['"+attrname+"']) return 1; return 0;");files.sort(sortfunc);if(!ascend)
files.reverse();}}
com.qn.io.File.prototype.mkdirs=function(){return true;}
com.qn.io.File.prototype.setLastModified=function(langtime){this.lastModified=langtime;return true;}
com.qn.io.File.prototype.setReadOnly=function(readonly){return true;}
com.qn.io.File.prototype.getCondensationName=function(type){var filename=this.GetDisplayName();if(type==0||type==5){filename=filename.substring(0,filename.lastIndexOf("."))+".rar";if(filename.length>14)
filename=filename.substring(0,10)+"...";}else{filename=filename+".rar";}
return filename;}
com.qn.io.File.prototype.getExtName=function(filename){if(!filename)return;var ext=null;var pos=filename.lastIndexOf(".");if(pos!=-1)
ext=filename.substring(pos+1);return ext;}
com.qn.io.File.prototype.getFrontName=function(filename){var fnt=null;var pos=filename.lastIndexOf(".");if(pos!=-1)
fnt=filename.substring(0,pos);else
fnt=filename;return fnt;}
com.qn.io.File.prototype.getBigIcon=function(){return this.getIcon(this.bigIcon,com.qn.io.File.SYSBIGICON);}
com.qn.io.File.prototype.getSmallIcon=function(){return this.getIcon(this.smallIcon,com.qn.io.File.SYSSMALLICON);}
com.qn.io.File.prototype.getIcon=function(defIcon,sysIconList){var imagesrc;if(defIcon)
imagesrc=defIcon;else{if(this.isFile()||this.isFileShortcut()||this.isShareFile()){imagesrc=sysIconList.file;}
else if(this.isDirShortcut()||this.isDirectory()||this.isShareDirectory()){imagesrc=sysIconList.folder;}
else if(this.isShare()){imagesrc=sysIconList.share;}}
if(imagesrc)
if(imagesrc.indexOf("http://")==-1&&imagesrc.substring(0,1)!="/")
imagesrc=imagePath+imagesrc;return imagesrc;}
com.qn.io.File.prototype.getTypeIcon=function(){if(this.bigIcon||this.smallIcon)return null;if(this.isShareFile()||this.isShareDirectory())
return imagePath+com.qn.io.File.SYSTYPEICON.share;if(this.isFileShortcut()||this.isDirShortcut())
return imagePath+com.qn.io.File.SYSTYPEICON.shortcut;}
com.qn.io.File.SYSSMALLICON={"file":"file/file48.png","folder":"file/folder.png","share":"file/share48.png"};com.qn.io.File.SYSBIGICON={"file":"file/file48.png","folder":"file/folder.png","share":"file/share48.png"};com.qn.io.File.SYSTYPEICON={"share":"file/share.png","shortcut":"file/shortcut.png"};$package("com.qn.dlg");com.qn.ui.NewFolderDlg=function(){}
com.qn.ui.NewFolderDlg.prototype=new js.ui.BaseWindow();com.qn.ui.NewFolderDlg.prototype.basePath=null;com.qn.ui.NewFolderDlg.prototype.extendUI=function(){var __this=this;this.setTitle(props("New Folder"));var extui=this.getDomNode("com.qn.dlg.NewFolderDlg");this.container.appendChild(extui);this.okButton=extui.getElementsByTagName("input")[1];this.cancelButton=extui.getElementsByTagName("input")[2];this.nameText=extui.getElementsByTagName("input")[0];this.cancelButton.onclick=this.closeButton.ui.onclick;this.okButton.onclick=function(){var newfn=__this.nameText.value;if(newfn==""){browser.messageBox("Name can't empty.");__this.nameText.focus();return;}
var file=new com.qn.io.File();file.setPath(__this.basePath+"/"+newfn);file.mkdir();__this.close();}}
$package("com.qn.dlg");com.qn.ui.EditFileDlg=function(){}
com.qn.ui.EditFileDlg.prototype=new js.ui.BaseWindow();com.qn.ui.EditFileDlg.prototype.file=null;com.qn.ui.EditFileDlg.prototype.extendUI=function(){var __this=this;this.setTitle(props("File Edit"));var extui=this.getDomNode("com.qn.dlg.EditFileDlg");this.container.appendChild(extui);this.okButton=extui.getElementsByTagName("input")[0];this.cancelButton=extui.getElementsByTagName("input")[1];this.nameText=extui.getElementsByTagName("span")[0];this.descText=extui.getElementsByTagName("textarea")[0];this.cancelButton.onclick=this.closeButton.ui.onclick;this.okButton.onclick=function(){var desc=__this.descText.value;if(desc.length>=255){browser.messageBox("File description can't exceed 255 characters.");__this.descText.focus();return;}
__this.file.desc=desc;__this.file.onload=function(){browser.messageBox("File description saved.");__this.close();}
__this.file.editSave();}
this.ui.style.width="500px";this.ui.style.height="300px";}
com.qn.ui.EditFileDlg.prototype.getData=function(path){var __this=this;this.file=new com.qn.io.File(path);this.file.onload=function(){__this.nameText.innerHTML=this.getFilename();var desc=this.getDescDisp();__this.descText.value=desc;__this.descText.focus();}
this.file.getAttributes();}
$package("com.qn.dlg");com.qn.ui.UploadDlg=function(){}
com.qn.ui.UploadDlg.prototype=new js.ui.BaseWindow();com.qn.ui.UploadDlg.prototype.file=null;com.qn.ui.UploadDlg.prototype.extendUI=function(){var __this=this;this.setTitle(props("File Upload"));var extui=this.getDomNode("com.qn.dlg.UploadDlg");this.container.appendChild(extui);this.iframe=extui.getElementsByTagName("iframe")[0];this.ui.style.width="700px";this.ui.style.height="420px";this.setResizeable(false);this.setMoveable(false);}
com.qn.ui.UploadDlg.prototype.open=function(){this.iframe.src="/view?module=upload&action=uploadDlg";}
com.qn.ui.UploadDlg.prototype.openUrl=function(url){this.iframe.src=url;}
