﻿/*Kelex V1.0*/
/*HGET辅助组件*/
new HGET();
function HGET(){
	HGET.isNaming=function(tID,soID){
		if(undefined!==tID) if(undefined!==soID) if(''!==tID) if(''!==soID){var index=-1;if(-1===(index=tID.lastIndexOf('_'))) return false;if(soID===tID.substr(0,index)) return true;};
		return false;
	};HGET.$=function(id){return document.getElementById(id);};HGET.$OBJ=function(sign,sn){return HGET.$(String(sign)+'_'+String(sn));};HGET.$SN=function(sign,id){return String(id).substr((String(sign)+'_').length,String(id).length);};HGET.$FUN_TYPE=function(obj){return typeof obj=='function';};HGET.$ARR_TYPE=function(obj){return obj instanceof Array;};HGET.$BRO=function(){return -1===window.navigator.userAgent.indexOf("MSIE")?-1===window.navigator.userAgent.indexOf("Firefox")?'other':'Firefox':'IE'};HGET.toInteger=function(int){return isNaN(parseInt(int))?0:parseInt(int);}}

/*HEvent总控组件*/
var HEvent=new function(){var browser=HGET.$BRO();var POOL={MAPPING:new Array(),IDX:null,TEMP:null};var EVENT={KEY:0x000000,SOURCE:_INIT_SOURCE()};function _INIT_SOURCE(){var src=[];src['down']=["onmousedown",_IE_MOUSE_DOWN,"mousedown",_FOX_MOUSE_DOWN,0x000001];src['up']=["onmouseup",_IE_MOUSE_UP,"mouseup",_FOX_MOUSE_UP,0x000010];src['move']=["onmousemove",_IE_MOUSE_MOVE,"mousemove",_FOX_MOUSE_MOVE,0x000100];src['over']=["onmouseover",_IE_MOUSE_OVER,"mouseover",_FOX_MOUSE_OVER,0x100000];return src;};function _IDX_PARENT(O,K){if(null==K) return;while(null!=K){if(O==K) return true;K=K.HANDLE.KIN;}return false;};function _POOL_IDX(tID,key){for(var i=0;i<POOL.MAPPING.length;i++) if(POOL.MAPPING[parseInt(i)][0].soID===tID.substr(0,tID.lastIndexOf('_')) && _IS_INC(POOL.MAPPING[parseInt(i)][1],key)) return POOL.MAPPING[parseInt(i)];return null;};function _STACK(obj,key){for(var i=0;i<POOL.MAPPING.length;i++){if(obj===POOL.MAPPING[parseInt(i)][0]){POOL.MAPPING[parseInt(i)][1]=POOL.MAPPING[parseInt(i)][1]|key;return false;}}POOL.MAPPING.push([obj,key]);};function _DETACH(){if(_IS_INC(0x000100,EVENT.KEY)) _REMOVE_EVENT('move');if(_IS_INC(0x000010,EVENT.KEY)) _REMOVE_EVENT('up');if(null===POOL.IDX) return;POOL.IDX[0].end();POOL.IDX=null;};function _IS_INC(O,H){if(0==(O&H)) return false;return true;};function _REMOVE_EVENT(eve){var src=EVENT.SOURCE[eve];if("IE"==browser){document.detachEvent(src[0],src[1]);}else{document.removeEventListener(src[2],src[3],false);}if(!_IS_INC(src[4],EVENT.KEY)) return;EVENT.KEY=EVENT.KEY^src[4];};function _ADD_EVENT(eve){var src=EVENT.SOURCE[eve];if(_IS_INC(src[4],EVENT.KEY)) return;if("IE"==browser){document.attachEvent(src[0],src[1]);}else{document.addEventListener(src[2],src[3],false);}EVENT.KEY=EVENT.KEY|src[4];};function _FOX_MOUSE_OVER(e){var tID=e.target.id;if(''!==tID) _INTERFACE_OVER(tID,e.clientX,e.clientY);return false;};function _IE_MOUSE_OVER(){var tID=window.event.srcElement.id;if(''!==tID) _INTERFACE_OVER(tID,window.event.clientX,window.event.clientY);return false;};function _INTERFACE_OVER(tID,x,y){with(POOL){if(null==(TEMP=_POOL_IDX(tID,0x100000))) return;if(null!=IDX && TEMP[0].event.INFECTION) if(_IDX_PARENT(TEMP[0],IDX[0].HANDLE.KIN)){TEMP[0].end()}else{_DETACH()};if(TEMP[0]._INTERFACE_OVER(tID,x,y)) if(null==IDX) IDX=TEMP;TEMP=null;}};function _FOX_MOUSE_DOWN(e){var tID=e.target.id;if('a'==e.target.tagName.toLowerCase()) return;if(''==tID) return _DETACH();if(0===e.button) _INTERFACE_DOWN(tID,e.clientX,e.clientY);return;};function _IE_MOUSE_DOWN(){var tID=window.event.srcElement.id;if('a'==window.event.srcElement.tagName.toLowerCase()) return;if(''==tID) return _DETACH();if(1===window.event.button) _INTERFACE_DOWN(tID,window.event.clientX,window.event.clientY);return;};function _INTERFACE_DOWN(tID,x,y){with(POOL){if(null==(TEMP=_POOL_IDX(tID,0x000001))) return _DETACH();if(null!=IDX && TEMP[0].event.INFECTION) if(_IDX_PARENT(TEMP[0],IDX[0].HANDLE.KIN)){TEMP[0].end()}else{_DETACH()};if(_IS_INC(TEMP[1],0x000010)) _ADD_EVENT('up');if(_IS_INC(TEMP[1],0x000100)) _ADD_EVENT('move');if(TEMP[0]._INTERFACE_DOWN(tID,x,y)) if(null==IDX) IDX=TEMP;TEMP=null;}};function _FOX_MOUSE_UP(e){_INTERFACE_UP(e.target,e.clientX,e.clientY);return;};function _IE_MOUSE_UP(){_INTERFACE_UP(window.event.srcElement,window.event.clientX,window.event.clientY);return;};function _INTERFACE_UP(target,x,y){if(null!==POOL.IDX) POOL.IDX[0]._INTERFACE_UP(target,x,y);_DETACH();};function _FOX_MOUSE_MOVE(e){_INTERFACE_MOVE(e.target,e.clientX,e.clientY);return false;};function _IE_MOUSE_MOVE(){_INTERFACE_MOVE(window.event.srcElement,window.event.clientX,window.event.clientY);return false;};function _INTERFACE_MOVE(target,x,y){if(null!==POOL.IDX) if(!POOL.IDX[0]._INTERFACE_MOVE(target,x,y)) return _DETACH();return;};this._BIND=function(obj,type){var key=0x000000;switch(type.toLowerCase()){case 'down':key=0x000001;break;case 'over':key=0x100000;_ADD_EVENT('over');break;case 'motion':key=0x000111;break;default:return;break;}_STACK(obj,key);};_ADD_EVENT('down');}

//拖动组件
function HDrag(sID,dID){var zIndex=0;this.soID='';this.doID='';this.area={x:0,y:0,width:0,height:0};this.style={dc:null,cc:null,mode:null};this.event={move:null,INFECTION:true};this.HANDLE={SO:null,DO:null,SPACE:{X:0,Y:0}};function _ZINDEX(){return zIndex=zIndex+1}HDrag.prototype._INTERFACE_DOWN=function(tID,x,y){var tSN=HGET.$SN(this.soID,tID);return this.start(tSN,x,y);};HDrag.prototype._INTERFACE_UP=function(tID,x,y){this.end()};HDrag.prototype._INTERFACE_MOVE=function(tID,x,y){if(HGET.$FUN_TYPE(this.event.move)) if(!this.event.move(tID,this.soID,this.doID,x,y)) return false;var windX=0;var windY=0;var windWidth=0;var windHeight=0;var offX=0;var offY=0;var docWidth=0;var docHeight=0;var docSLeft=0;var docSTop=0;if(null===this.HANDLE.DO) return this._DETACH();windX=x-this.HANDLE.SPACE.X;windY=y-this.HANDLE.SPACE.Y;windWidth=this.HANDLE.DO.offsetWidth;windHeight=this.HANDLE.DO.offsetHeight;if(0!==this.area.width && 0!==this.area.height){offX=this.area.x+this.area.width-windWidth;offY=this.area.y+this.area.height-windHeight;if(windX<this.area.x) windX=this.area.x;if(windX>offX) windX=offX;if(windY<this.area.y) windY=this.area.y;if(windY>offY) windY=offY;}else{docWidth=document.documentElement.clientWidth;docHeight=document.documentElement.clientHeight;docSLeft=document.documentElement.scrollLeft;docSTop=document.documentElement.scrollTop;offX=docWidth+docSLeft-windWidth;offY=docHeight+docSTop-windHeight;if(windX<docSLeft) windX=docSLeft;if(windX>offX) windX=offX;if(windY<docSTop) windY=docSTop;if(windY>offY) windY=offY;}this.HANDLE.DO.style.left=String(windX)+'px';this.HANDLE.DO.style.top=String(windY)+'px';return true;};HDrag.prototype._DETACH=function(){with(this.HANDLE){SPACE.x=0;SPACE.y=0;SO=null;DO=null;}return false;};HDrag.prototype.start=function(sn,x,y){var tSO,tDO;if(null===(tSO=HGET.$OBJ(this.soID,sn)) || null===(tDO=HGET.$OBJ(this.doID,sn))) return false;tDO.style.zIndex=_ZINDEX();with(this.style){if(null!==mode && null!==cc) tDO.className=mode?cc:cc+sn;}with(this.HANDLE){SPACE.X=x-HGET.toInteger(tDO.style.left);SPACE.Y=y-HGET.toInteger(tDO.style.top);SO=tSO;DO=tDO;}return true;};HDrag.prototype.end=function(){var tSN;if(null===this.HANDLE.DO) return;tSN=HGET.$SN(this.soID,this.HANDLE.DO.id);with(this.style){if(null!==mode && null!=dc) this.HANDLE.DO.className=mode?dc:dc+tSN;}this._DETACH();};HDrag.prototype.setArea=function(x1,y1,x2,y2){with(this.area){x=x1;y=y1;width=x2;height=y2;}};HDrag.prototype.cleanArea=function(){with(this.area){x=0;y=0;width=0;height=0;}};HDrag.prototype.addEvent=function(eve){HEvent._BIND(this,eve)};HDrag.prototype._INIT=function(sID,dID){this.soID=String(sID);this.doID=String(dID);};this._INIT(sID,dID);}

/*HTime定时器组件*/
function HTime(secs){this.sec=0;this.callback=null;this.parameter=null;this.id=-1;this.time=0;this.HANDLE={TIME:0,TIMER:null};HTime.prototype._CHANGE=function(sn){var P=this._VALID(sn);this.id=-1===P?0:P;};HTime.prototype._VALID=function(sn){for(var i=0;i<this.parameter.length;i++){if(String(sn)==String(this.parameter[parseInt(i)])) return parseInt(i);}return -1;};HTime.prototype._FALSH=function(){with(this){if(0<time && time<=HANDLE.TIME) return;HANDLE.TIME+=1;if(HGET.$ARR_TYPE(parameter)){this.id=0<this.parameter.length?this.parameter.length-1<this.id+1?0:this.id+1:0;HGET.$FUN_TYPE(callback)?callback(parameter[id]):undefined!==callback.start?callback.start(parameter[id]):false;}else{HGET.$FUN_TYPE(callback)?callback(parameter):undefined!==callback.start?callback.start(parameter):false;}}this.start();return;};HTime.prototype._STOP=function(){with(this.HANDLE){if(null===TIMER) return;clearInterval(TIMER);TIMER=null;}};HTime.prototype._DETACH=function(){with(this){_STOP();sec=1;parameter=null;callback=null;id=0}};HTime.prototype.bind=function(call,param){if(undefined===call || undefined===param || null===call) return false;this.callback=call;this.parameter=param;return true;};HTime.prototype.detach=function(){if(undefined!==this.callback.clearTimer) this.callback.clearTimer();this._DETACH();};HTime.prototype.start=function(){var THIS;if(null===this.callback || undefined===this.callback) return this._DETACH();THIS=this;this._STOP();this.HANDLE.TIMER=window.setTimeout(function(){THIS._FALSH()},parseInt(this.sec*1000));};HTime.prototype.end=function(){this._STOP();return;};HTime.prototype._INIT=function(secs){this.sec=parseInt(secs);};this._INIT(secs);}

/*HMenu菜单组件*/
function HMenu(sID,dID){this.soID='';this.doID='';this.HANDLE={SO:null,DO:null,KIN:null};this.style={dc:null,cc:null,mode:null};this.event={down:null,over:null,change:null,INFECTION:true};HMenu.prototype._INTERFACE_DOWN=function(tID,x,y){var tSN=HGET.$SN(this.soID,tID);if(HGET.$FUN_TYPE(this.event.down)) if(!this.event.down(tSN,this.soID,this.doID,x,y)) return false;return this.start(tSN);};HMenu.prototype._INTERFACE_OVER=function(tID,x,y){var tSN=HGET.$SN(this.soID,tID);if(HGET.$FUN_TYPE(this.event.over)) if(!this.event.over(tSN,this.soID,this.doID,x,y)) return false;return this.start(tSN);};HMenu.prototype._DETACH=function(){this.HANDLE.SO=null;this.HANDLE.DO=null;return false;};HMenu.prototype.start=function(sn){var tSO,tDO;if(null===(tSO=HGET.$OBJ(this.soID,sn)) || null===(tDO=HGET.$OBJ(this.doID,sn))) return false;tDO.style.display="block";with(this.style){if(null!==mode && null!==cc) tSO.className=mode?cc:cc+sn;}this.HANDLE.DO=tDO;this.HANDLE.SO=tSO;if(HGET.$FUN_TYPE(this.event.change)) this.event.change(sn,this.soID,this.doID);return true;};HMenu.prototype.end=function(){var tSN;if(null===this.HANDLE.DO || null===this.HANDLE.SO) return this._DETACH();if(null!==this.HANDLE.KIN) if(this.HANDLE.KIN.event.INFECTION) this.HANDLE.KIN.end();tSN=HGET.$SN(this.soID,this.HANDLE.SO.id);with(this.style){if(null!==mode && null!==dc) this.HANDLE.SO.className=mode?dc:dc+tSN;}this.HANDLE.DO.style.display="none";this._DETACH();};HMenu.prototype.value=function(){var val;if(null===this.HANDLE.SO) return null;switch(arguments.length){case 0:return this.HANDLE.SO.innerHTML;break;case 1:val=this.HANDLE.SO.innerHTML;this.HANDLE.SO.innerHTML=arguments[0];return val;break;case 2:val=HGET.$(arguments[1]).value;this.HANDLE.SO.innerHTML=arguments[0];HGET.$(arguments[1]).value=arguments[0];return val;break;case 3:val=HGET.$(arguments[1]).value;this.HANDLE.SO.innerHTML=arguments[0];HGET.$(arguments[1]).value=arguments[2];return val;break;}};HMenu.prototype.addChild=function(idx){this.HANDLE.KIN=idx};HMenu.prototype.addEvent=function(et){HEvent._BIND(this,et)};HMenu.prototype._INIT=function(sID,dID){this.soID=String(sID);this.doID=String(dID);};this._INIT(sID,dID);}

/*HClip属性页组件*/
function HClip(sID,dID){this.soID='';this.doID='';this.value=null;this.style={dc:null,cc:null,mode:null};this.event={down:null,over:null,change:null,INFECTION:false};this.HANDLE={SO:null,DO:null,TIMER:null};HClip.prototype._INTERFACE_DOWN=function(tID,x,y){var tSN=HGET.$SN(this.soID,tID);if(HGET.$FUN_TYPE(this.event.down)) if(!this.event.down(tSN,this.soID,this.doID,x,y)) return false;if(null!==this.HANDLE.TIMER) this.HANDLE.TIMER._CHANGE(tSN);return this.start(tSN);};HClip.prototype._INTERFACE_OVER=function(tID,x,y){var tSN=HGET.$SN(this.soID,tID);if(HGET.$FUN_TYPE(this.event.over)) if(!this.event.over(tSN,this.soID,this.doID,x,y)) return false;if(null!==this.HANDLE.TIMER) this.HANDLE.TIMER._CHANGE(tSN);return this.start(tSN);};HClip.prototype._UPDATE=function(sn){this.value=sn;if(null!==sn) if(HGET.$FUN_TYPE(this.event.change)) this.event.change(this.value,this.soID,this.doID);};HClip.prototype._DETACH=function(){this.HANDLE.SO=null;this.HANDLE.DO=null;this.value=null;return false;};HClip.prototype.setTimer=function(time,ord){if(time.bind(this,ord)) this.HANDLE.TIMER=time;};HClip.prototype.clearTimer=function(){if(null===this.HANDLE.TIMER) return false;this.HANDLE.TIMER._DETACH();this.HANDLE.TIMER=null;};HClip.prototype.start=function(sn){var tSO,tDO;if(null===(tSO=HGET.$OBJ(this.soID,sn)) || null===(tDO=HGET.$OBJ(this.doID,sn))) return false;this.end();with(this.style){if(null!==mode && null!==cc) tSO.className=mode?cc:cc+sn;}tDO.style.display='block';this.HANDLE.SO=tSO;this.HANDLE.DO=tDO;this._UPDATE(String(sn));return false;};HClip.prototype.end=function(){if(null===this.HANDLE.SO || null===this.HANDLE.DO) return this._DETACH();with(this.style){if(null!==mode && null!==dc) this.HANDLE.SO.className=mode?dc:dc+HGET.$SN(this.soID,this.HANDLE.SO.id);}this.HANDLE.DO.style.display='none';this._DETACH();};HClip.prototype.addEvent=function(eve){HEvent._BIND(this,eve)};HClip.prototype._INIT=function(sID,dID){this.soID=String(sID);this.doID=String(dID);};this._INIT(sID,dID);}

/*HView折叠组件*/
function HView(sID,dID){this.soID='';this.doID='';this.value=new Array();this.style={dc:null,cc:null,mode:null};this.event={down:null,over:null,change:null,INFECTION:false};HView.prototype._INTERFACE_DOWN=function(tID,x,y){var tSN=HGET.$SN(this.soID,tID);if(HGET.$FUN_TYPE(this.event.down)) if(!this.event.down(tSN,this.soID,this.doID,x,y)) return false;if(this._VALID(tSN)){this.start(tSN)}else{this.end(tSN)}return false;};HView.prototype._INTERFACE_OVER=function(tID,x,y){var tSN=HGET.$SN(this.soID,tID);if(HGET.$FUN_TYPE(this.event.over)) if(!this.event.over(tSN,this.soID,this.doID,x,y)) return false;if(this._VALID(tSN)){this.start(tSN)}else{this.end(tSN)}return false;};HView.prototype._VALID=function(sn){for(var i=0;i<this.value.length;i++) if(sn==this.value[parseInt(i)]) return true;return false;};HView.prototype._UPDATE=function(sn){for(var i=0;i<this.value.length;i++) if(sn==this.value[parseInt(i)]) break;if(sn==this.value[parseInt(i)]){this.value.splice(parseInt(i),1)}else{this.value.push(sn)}if(HGET.$FUN_TYPE(this.event.change)) this.event.change(this.value,this.soID,this.doID);};HView.prototype.start=function(sn){var tSO,tDO;if(null===(tSO=HGET.$OBJ(this.soID,sn)) || null===(tDO=HGET.$OBJ(this.doID,sn)) || !this._VALID(sn)) return false;tDO.style.display='block';with(this.style){if(null!==mode && null!=dc) tSO.className=mode?dc:dc+sn;}this._UPDATE(String(sn));};HView.prototype.end=function(sn){var tSO,tDO;if(null===(tSO=HGET.$OBJ(this.soID,sn)) || null===(tDO=HGET.$OBJ(this.doID,sn)) || this._VALID(sn)) return false;tDO.style.display='none';with(this.style){if(null!==mode && null!=cc) tSO.className=mode?cc:cc+sn;}this._UPDATE(String(sn));};HView.prototype.addEvent=function(eve){HEvent._BIND(this,eve)};HView.prototype._INIT=function(sID,dID){this.soID=String(sID);this.doID=String(dID);};this._INIT(sID,dID);}

/*HRadio单选组件*/
function HRadio(sID){this.soID='';this.value=null;this.style={dc:null,cc:null,mode:null};this.event={down:null,over:null,change:null,INFECTION:false};this.HANDLE={SO:null,TIMER:null};HRadio.prototype._INTERFACE_DOWN=function(tID,x,y){var tSN=HGET.$SN(this.soID,tID);if(HGET.$FUN_TYPE(this.event.down)) if(!this.event.down(tSN,this.soID,x,y)) return false;if(null!==this.HANDLE.TIMER) this.HANDLE.TIMER._CHANGE(tSN);return this.start(tSN);};HRadio.prototype._INTERFACE_OVER=function(tID,x,y){var tSN=HGET.$SN(this.soID,tID);if(HGET.$FUN_TYPE(this.event.over)) if(!this.event.over(tSN,this.soID,x,y)) return false;if(null!==this.HANDLE.TIMER) this.HANDLE.TIMER._CHANGE(tSN);return this.start(tSN);};HRadio.prototype._DETACH=function(){this.HANDLE.SO=null;this.value=null;};HRadio.prototype._UPDATE=function(sn){this.value=sn;if(null!==sn) if(HGET.$FUN_TYPE(this.event.change)) this.event.change(this.value,this.soID);return false;};HRadio.prototype.setTimer=function(time,ord){if(time.bind(this,ord)) this.HANDLE.TIMER=time;};HRadio.prototype.clearTimer=function(){if(null===this.HANDLE.TIMER) return false;this.HANDLE.TIMER._DETACH();this.HANDLE.TIMER=null;};HRadio.prototype.start=function(sn){var tSO;if(null===(tSO=HGET.$OBJ(this.soID,sn))) return false;this.end();this.HANDLE.SO=tSO;with(this.style){if(null!==mode && null!==cc) tSO.className=mode?cc:cc+sn;}return this._UPDATE(String(sn));};HRadio.prototype.end=function(){if(null===(tSO=HGET.$OBJ(this.soID,this.value))) return this._DETACH();with(this.style){if(null!==mode && null!==dc) this.HANDLE.SO.className=mode?dc:dc+HGET.$SN(this.soID,this.HANDLE.SO.id);}this._DETACH()};HRadio.prototype.addEvent=function(eve){HEvent._BIND(this,eve)};HRadio.prototype._INIT=function(sID){this.soID=String(sID);};this._INIT(sID);}

/*HCheck多选组件*/
function HCheck(sID){this.soID='';this.value=new Array();this.style={dc:null,cc:null,mode:null};this.event={down:null,over:null,change:null,INFECTION:false};HCheck.prototype._INTERFACE_DOWN=function(tID,x,y){var tSN=HGET.$SN(this.soID,tID);if(HGET.$FUN_TYPE(this.event.down)) if(!this.event.down(tSN,this.soID,x,y)) return false;if(this._VALID(tSN)){this.end(tSN)}else{this.start(tSN)};return false;};HCheck.prototype._INTERFACE_OVER=function(tID,x,y){var tSN=HGET.$SN(this.soID,tID);if(HGET.$FUN_TYPE(this.event.over)) if(!this.event.over(tSN,this.soID,x,y)) return false;if(this._VALID(tSN)){this.end(tSN)}else{this.start(tID)};return false;};HCheck.prototype._VALID=function(sn){for(var i=0;i<this.value.length;i++) if(sn==this.value[parseInt(i)]) return true;return false;};HCheck.prototype._UPDATE=function(sn){for(var i=0;i<this.value.length;i++) if(sn==this.value[parseInt(i)]) break;if(sn==this.value[parseInt(i)]){this.value.splice(parseInt(i),1)}else{this.value.push(sn)};if(HGET.$FUN_TYPE(this.event.change)) this.event.change(this.value,this.soID);};HCheck.prototype.start=function(sn){var tSO;if(null===(tSO=HGET.$OBJ(this.soID,sn))) return false;with(this.style){if(null!==mode && null!==cc) tSO.className=mode?cc:cc+sn;}this._UPDATE(String(sn));};HCheck.prototype.end=function(sn){var tSO;if(null===(tSO=HGET.$OBJ(this.soID,sn))) return false;with(this.style){if(null!==mode && null!==dc) tSO.className=mode?dc:dc+sn;}this._UPDATE(String(sn));};HCheck.prototype.addEvent=function(eve){HEvent._BIND(this,eve)};HCheck.prototype._INIT=function(sID){this.soID=String(sID)};this._INIT(sID);}

/*HClose关闭组件*/
function HClose(sID,dID){this.soID='';this.doID='';this.value=new Array();this.style={dc:null,cc:null,mode:null};this.event={down:null,over:null,change:null,INFECTION:false};HClose.prototype._INTERFACE_DOWN=function(tID,x,y){var tSN=HGET.$SN(this.soID,tID);if(HGET.$FUN_TYPE(this.event.down)) if(!this.event.down(tSN,this.soID,this.doID,x,y)) return false;if(this._VALID(tSN)){this.start(tSN)}else{this.end(tSN)}return false;};HClose.prototype._INTERFACE_OVER=function(tID,x,y){var tSN=HGET.$SN(this.soID,tID);if(HGET.$FUN_TYPE(this.event.over)) if(!this.event.over(tSN,this.soID,this.doID,x,y)) return false;if(this._VALID(tSN)){this.start(tSN)}else{this.end(tSN)}return false;};HClose.prototype.start=function(sn){var tSO,tDO;if(null===(tSO=HGET.$OBJ(this.soID,sn)) || null===(tDO=HGET.$OBJ(this.doID,sn)) || !this._VALID(sn)) return false;with(this.style){if(null!==mode && null!==dc) tSO.className=mode?dc:dc+sn;}tDO.style.display='block';this._UPDATE(String(sn));};HClose.prototype.end=function(sn){var tSO,tDO;if(null===(tSO=HGET.$OBJ(this.soID,sn)) || null===(tDO=HGET.$OBJ(this.doID,sn)) || this._VALID(sn)) return false;with(this.style){if(null!==mode && null!==cc) tSO.className=mode?cc:cc+sn;}tDO.style.display='none';this._UPDATE(String(sn));};HClose.prototype._VALID=function(sn){for(var i=0;i<this.value.length;i++) if(sn==this.value[parseInt(i)]) return true;return false;};HClose.prototype._UPDATE=function(sn){for(var i=0;i<this.value.length;i++) if(sn==this.value[parseInt(i)]) break;if(sn==this.value[parseInt(i)]){this.value.splice(parseInt(i),1)}else{this.value.push(sn)}if(typeof this.event.change=='function') this.event.change(this.value,this.soID,this.doID);};HClose.prototype.addEvent=function(eve){HEvent._BIND(this,eve)};HClose.prototype._INIT=function(sID,dID){this.soID=String(sID);this.doID=String(dID);};this._INIT(sID,dID);}

/*HAjaxHttp通讯组件*/
function HAjax(){HAjax.Version='V1.0';HAjax.browser='';this.xmlHttp=null;this.method='get';this.url='';this.async=false;this.encode='UTF-8';this.mode='html';this.sec=5;this.value=null;this.callback=null;this.HANDLE={TIMER:null};HAjax.prototype._CALLBACK=function(){var THIS=this;clearInterval(this.HANDLE.TIMER);this.HANDLE.TIMER=null;if(4==this.xmlHttp.readyState){if(200==this.xmlHttp.status){this.value='html'==this.mode.toLowerCase()?this.xmlHttp.responseText:"xml"==this.mode.toLowerCase()?this.xmlHttp.responseXML:null;if(typeof this.callback=='function'){this.callback(true);return;}}}this.HANDLE.TIMER=window.setTimeout(function(){THIS.xmlHttp.abort();THIS.callback(false);},(parseInt(this.sec)*1000));};HAjax.prototype.abort=function(){clearInterval(this.HANDLE.TIMER);this.HANDLE.TIMER=null;this.value=null;this.xmlHttp.abort();};HAjax.prototype.send=function(param){var THIS=this;this.value=null;this.abort();with(this.xmlHttp){open(this.method,this.url,this.async);if('IE'==HAjax.browser){onreadystatechange=function(){THIS._CALLBACK()};}else{onload=function(){THIS._CALLBACK()};}setRequestHeader('X-Prototype-Version',HAjax.Version);setRequestHeader('X-Requested-With','XMLHttpRequest');setRequestHeader("Accept","text/javascript,text/html,application/xml,text/xml,*/*");setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset="+this.encode);setRequestHeader("Connection","close");if(undefined===param || null===param) return send(null);send(param);}};HAjax.prototype.document=function(){if(null === this.value || typeof this.value!=='object') return null;return HAjax.clear(this.value.documentElement);};HAjax.text=function(element){var txt='';if('IE'==HAjax.browser) return undefined===element.text?undefined:element.text;if(undefined===element.childNodes) return undefined;for(var i=0;i<element.childNodes.length;i++) if(undefined===element.childNodes[i].tagName) txt+=element.childNodes[i].nodeValue;return txt;};HAjax.clear=function(element){var nodes;with(element){if(undefined===childNodes) return undefined;nodes=new Array();for(var i=0;i<childNodes.length;i++){if(null!==childNodes[i].nodeValue) childNodes[i].nodeValue=childNodes[i].nodeValue.replace(/\s/g,'');if(undefined===childNodes[i].tagName && ''==childNodes[i].nodeValue){nodes.push(childNodes[i]);}else{HAjax.clear(childNodes[i]);}}for(var j=0;j<nodes.length;j++) removeChild(nodes[j]);}nodes=null;return element;};function _INIT(){if(window.ActiveXObject){HAjax.browser='IE';return new ActiveXObject("Microsoft.XMLHTTP");}else if(window.XMLHttpRequest){HAjax.browser='FF';return new XMLHttpRequest();}};this.xmlHttp=_INIT();}