

/** stdjs.js **/
var _oW=window;var _oN=navigator;var _oL=location;var _oH=history;var _oD=document;var _SVR_="http://image.schoolspan.com";var _JV_="javascript:void(0)";var _NN_="none";var _TN_="";var g_zindex=601;function import_js(path){_oD.writeln('<script language="JavaScript" type="text/javascript" src="'+_SVR_+path+'"></script>');}
function import_css(path){_oD.writeln('<link rel="stylesheet" type="text/css" href="'+_SVR_+path+'"/>');}
function INHERIT_CLASS(oThis,oParent){for(var sProperty in oParent){try{oThis[sProperty]=oParent[sProperty];}
catch(excp){}}
oThis["base"]=oParent;}
function hxj_FindParent(node,tagname){tagname=tagname.toLowerCase();while(node!=null){node=node.parentNode;if(node==null)
break;if(node.nodeName.toLowerCase()==tagname)
break;}
return node;}
function hxj_FindParentSet(node,arrtags){while(node!=null){node=node.parentNode;if(node==null)
break;for(var i=0;i<arrtags.length;i++){if(node.nodeName.toLowerCase()==arrtags[i].toLowerCase())
return node;}}
return null;}
function hxj_FindParentByHandle(node,handle){while(node!=null){node=node.parentNode;if(node==null)
break;if(node==handle)
break;}
return node;}
function hxj_FindParentById(node,parentid){while(node!=null){if(node.id.indexOf(parentid)!=-1)
break;node=node.parentNode;}
return node;}
function hxj_FindChild(node,tagname){var children=node.childNodes;tagname=tagname.toLowerCase();for(var i=0;i<children.length;i++){if(children[i].nodeName.toLowerCase()==tagname)
return children[i];if(children[i].hasChildNodes()){var cnode=hxj_FindChild(children[i],tagname);if(cnode!=null)
return cnode;}}
return null;}
function hxj_FindNode(node,tagname){var children=node.childNodes;tagname=tagname.toLowerCase();for(var i=0;i<children.length;i++){if(children[i].nodeName.toLowerCase()==tagname)
return children[i];}
return null;}
function hxj_FindObject(v,frmv){var obj=null;if(frmv!=null){var ifrm=null;if(_oD.frames){ifrm=_oD.frames[frmv];}
else{ifrm=_oD.getElementById(frmv);}
if(ifrm){var dom=(ifrm.contentDocument)?ifrm.contentDocument:ifrm.document;if(dom.getElementById){obj=dom.getElementById(v);}
else if(dom.all){obj=dom.all[v];}}}
else{if(_oD.getElementById){obj=_oD.getElementById(v);}
else if(_oD.all){obj=_oD.all[v];}}
return obj;}
function hxj_GetChildNodes(node,tagname){var children=node.childNodes;var arrChild=null;tagname=tagname.toLowerCase();for(var i=0;i<children.length;i++){if(children[i].nodeName.toLowerCase()==tagname){if(arrChild==null)
arrChild=new hxjArray();arrChild.push(children[i]);}}
return arrChild;}
function hxj_GetIFrame(v){var ifrm;if(_oD.frames){ifrm=_oD.frames[v];}
else{ifrm=_oD.getElementById(v);}
return ifrm;}
function hxj_GetDocument(v){var ifrm=hxj_GetIFrame(v);var win=ifrm.contentWindow;if(win==null)
win=ifrm;return win.document;}
function hxj_GetInnerHTML(v){var obj=hxj_FindObject(v);if(!obj)
return"";if(obj.nodeName.toLowerCase()=="input")
return obj.value;return obj.innerHTML;}
function hxj_SetInnerHTML(v,html){var obj=hxj_FindObject(v);if(obj!=null){if(obj.nodeName.toLowerCase()=="input"){obj.value=html;}
else{obj.innerHTML=html;}}}
function hxj_AddEvent(obj,evtname,func){evtname=evtname.toLowerCase();if(typeof document.addEventListener=="function"){if(evtname.substr(0,2)=="on")
evtname=evtname.substr(2);obj.addEventListener(evtname,func,false);}
else{if(evtname.substr(0,2)!="on")
evtname="on"+evtname;obj.attachEvent(evtname,func);}}
function hxj_RemoveEvent(obj,evtname,func){evtname=evtname.toLowerCase();if(typeof document.addEventListener=="function"){if(evtname.substr(0,2)=="on")
evtname=evtname.substr(2);obj.removeEventListener(evtname,func,false);}
else{if(evtname.substr(0,2)!="on")
evtname="on"+evtname;obj.detachEvent(evtname,func);}}
function hxj_FixEvent(event){if(typeof event=='undefined')event=window.event;if(event.srcElement)event.target=event.srcElement;if(event.which)event.keyCode=event.which;if(event.keyCode==17)event.ctrlKey=true;if(event.keyCode==18)event.altKey=true;return event;}
function hxj_CancelEvent(event){if(typeof event.stopPropagation=='function'){event.stopPropagation();}
else{event.cancelBubble=true;}
return false;}
function hxjBrowser(){var ua=_oN.userAgent.toLowerCase();this.isGecko=(ua.indexOf('gecko')!=-1&&ua.indexOf('safari')==-1);this.isAppleWebKit=(ua.indexOf('applewebkit')!=-1);this.isSafari=(ua.indexOf('safari')!=-1);this.isOpera=(ua.indexOf('opera')!=-1||_oW.opera);this.isMozilla=(this.isGecko&&ua.indexOf('gecko/')+14==ua.length);this.isFirefox=(ua.indexOf('firefox')!=-1);this.isNS=(ua.indexOf('netscape')!=-1);this.isIE=(ua.indexOf('msie')!=-1&&_oW.showHelp);this.isDOM1=(document.getElementById);this.isDOM2=(document.addEventListener&&document.removeEventListener);this.isWin=(ua.indexOf('win')!=-1);this.isMac=(ua.indexOf('mac')!=-1);this.isUnix=(ua.indexOf('unix')!=-1||ua.indexOf('sunos')!=-1||ua.indexOf('bsd')!=-1||ua.indexOf('x11')!=-1)
this.isLinux=(ua.indexOf('linux')!=-1);this.versionMinor=parseFloat(_oN.appVersion);if(this.isGecko&&!this.isMozilla){this.versionMinor=parseFloat(ua.substring(ua.indexOf('/',ua.indexOf('gecko/')+6)+1));}
else if(this.isMozilla){this.versionMinor=parseFloat(ua.substring(ua.indexOf('rv:')+3));}
else if(this.isIE&&this.versionMinor>=4){this.versionMinor=parseFloat(ua.substring(ua.indexOf('msie ')+5));}
else if(this.isSafari){this.versionMinor=parseFloat(ua.substring(ua.lastIndexOf('safari/')+7));}
else if(this.isOpera){this.versionMinor=parseFloat(ua.substring(ua.indexOf('opera')+6));}
this.versionMajor=parseInt(this.versionMinor);this.isNS4x=(this.isNS&&this.versionMajor==4);this.isNS4up=(this.isNS&&this.versionMinor>=4);this.isNS6x=(this.isNS&&this.versionMajor==6);this.isNS6up=(this.isNS&&this.versionMajor>=6);this.isNS7x=(this.isNS&&this.versionMajor==7);this.isNS7up=(this.isNS&&this.versionMajor>=7);this.isIE5x=(this.isIE&&this.versionMajor==5);this.isIE5up=(this.isIE&&this.versionMajor>=5);this.isIE5dn=(this.isIE&&this.versionMajor<=5);this.isIE55=(this.isIE&&this.versionMinor==5.5);this.isIE55up=(this.isIE&&this.versionMinor>=5.5);this.isIE55dn=(this.isIE&&this.versionMinor<=5.5);this.isIE6x=(this.isIE&&this.versionMajor==6);this.isIE6up=(this.isIE&&this.versionMajor>=6);this.isIE6dn=(this.isIE&&this.versionMajor<=6);this.isIE7x=(this.isIE&&this.versionMajor==7);this.setCookie=function(name,value,expires,path,domain,secure){var curCookie=name+'='+escape(value)+((expires)?'; expires='+expires.toGMTString():'')+((path)?'; path='+path:'')+((domain)?'; domain='+domain:'')+((secure)?'; secure':'');_oD.cookie=curCookie;}
this.getCookie=function(name){var dc=_oD.cookie;var prefix=name+"=";var begin=dc.indexOf("; "+prefix);if(begin==-1){begin=dc.indexOf(prefix);if(begin!=0)
return null;}
else{begin+=2;}
var end=_oD.cookie.indexOf(";",begin);if(end==-1)
end=dc.length;return unescape(dc.substring(begin+prefix.length,end));}}
var _oB=new hxjBrowser();function hxjValidator(){this.IsEmail=function(input){input=input.trim();if(input.length<=0)
return false;var regex=/\w+([-+.]\w+)*@\w+([-.]\w+)*\.[a-zA-Z]+/;if(!regex.test(input))
return false;return true;}
this.IsPhone=function(input){input=input.trim();if(input.length<=0)
return false;var regex=/((\(\d{3}\)\s*|\d{3}-)?\d{3}-?\d{4}|\d{10})/;if(!regex.test(input))
return false;return true;}
this.IsURL=function(input){input=input.trim();if(input=="http://"||input=="https://"||input=="ftp://"){return false;}
if(input.substring(0,1)!="/"){var regurl=/^(https?|ftp):\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/;if(!regurl.test(input))
return false;}
return true;}
this.IsZipCode=function(input){input=input.trim();if(input.length<=0)
return false;var regex=/\d{5}(-\d{4})?/;if(!regex.test(input))
return false;return true;}
this.IsCurrency=function(input){input=input.trim();if(input.length<=0)
return false;var regex=/(\$)?\d{1,3}(,\d{3})*(\.\d{2})?/;if(!regex.test(input))
return false;return true;}
this.IsImageFile=function(input){input=input.trim();if(input.length<=0)
return false;var regex=/(\.gif|\.jpg|\.bmp|\.png|\.tif|\.tiff)$/i;if(!regex.test(input))
return false;return true;}
this.IsFileExtension=function(input,arrExt){input=input.trim();if(input.length<=0)
return false;for(var i=0;i<arrExt.length;i++){var regex=new RegExp(arrExt[i]+"$","i");if(regex.test(input))
return true;}
return false;}
this.IsDigit=function(input,minsize,maxsize){input=input.trim();if(input.length<=0)
return false;var regex=/^\d+$/;if(!regex.test(input))
return false;if(minsize!=null&&input.length<minsize)
return false;if(maxsize!=null&&input.length>maxsize)
return false;return true;}}
var _oV=new hxjValidator();

if (typeof Event == 'undefined') Event = new Object();
Event.domReady = {
    isReady: false,
    isBind: false,
    readyList: [],

    ready: function() {
        // Make sure that the DOM is not already loaded
		if ( !Event.domReady.isReady ) {
			// Remember that the DOM is ready
			Event.domReady.isReady = true;

            // If there are functions bound, to execute
			if ( Event.domReady.readyList ) {
				var observers = Event.domReady.readyList;
                for (var i = 0, length = observers.length; i < length; i++) {
                    var fn = observers[i];                
                    fn.call(document); // make 'this' as document
                }
        
                // Reset the list of functions
    			Event.domReady.readyList = null;
			}
        }
    },    
    bind: function() {
        //-----------------------------------------------------------
        // Already loaded?
        //-----------------------------------------------------------
        if (Event.domReady.isBind) return;
        Event.domReady.isBind = true;
        
        // Mozilla, Opera and webkit nightlies currently support this event
    	if ( document.addEventListener ) {
    		// Use the handy event callback
    		document.addEventListener( "DOMContentLoaded", function(){
    			document.removeEventListener( "DOMContentLoaded", arguments.callee, false );
    			Event.domReady.ready();
    		}, false );
    	} // If IE event model is used
    	else if ( document.attachEvent ) {
    		// ensure firing before onload,
    		// maybe late but safe also for iframes
    		document.attachEvent("onreadystatechange", function(){
    			if ( document.readyState === "complete" ) {
    				document.detachEvent( "onreadystatechange", arguments.callee );
    				Event.domReady.ready();
    			}
    		});
    
    		// If IE and not an iframe
    		// continually check to see if the document is ready
    		if ( document.documentElement.doScroll && window == window.top ) (function(){
    			if ( Event.domReady.isReady ) return;
    
    			try {
    				// If IE is used, use the trick by Diego Perini
    				// http://javascript.nwbox.com/IEContentLoaded/
    				document.documentElement.doScroll("left");
    			} catch( error ) {
    				setTimeout( arguments.callee, 0 );
    				return;
    			}
    
    			// and execute any waiting functions
    			Event.domReady.ready();
    		})();
    	}
    
        // A fallback to window.onload, that will always work
    	hxj_AddEvent( window, "load", Event.domReady.ready );
    },
    add: function(fn) {        
        // Attach the listeners
		Event.domReady.bind();

		// If the DOM is already ready
		if ( Event.domReady.isReady )
			// Execute the function immediately			
			fn.call(document);

		// Otherwise, remember the function for later
		else
			// Add the function to the wait list
			Event.domReady.readyList.push( fn );

		return this;
    }
}

/** ajax.js **/
function hxjAjax(async){this.xmlhttp=null;this.async=(async)?async:false;this.postBody="";this.error=null;this.oncomplate=null;this._getHttpObj=function(){if(typeof(XMLHttpRequest)!='undefined')
return new XMLHttpRequest();var axO=new Array('Msxml2.XMLHTTP.6.0','Msxml2.XMLHTTP.4.0','Msxml2.XMLHTTP.3.0','Msxml2.XMLHTTP','Microsoft.XMLHTTP');for(var i=0;i<axO.length;i++){try{return new ActiveXObject(axO[i]);}
catch(e){}}
return null;}
this._onstatechangeHTTP=function(){if(this.xmlhttp.readyState==4){if(this.oncomplate)
this.oncomplate(this,this.xmlhttp.status);}}
this.setRequestHeader=function(header,val){this.xmlhttp.setRequestHeader(header,val);}
this.getResponseHeader=function(header){return this.xmlhttp.getResponseHeader(header);}
this.appendParam=function(sname,sval){var param=sname+"="+escape(sval);if(this.postBody.length>0)
this.postBody+="&";this.postBody+=param;}
this.appendParamByForm=function(frm){var param=hxj_BuildParamByForm(frm);if(this.postBody.length>0)
this.postBody+="&";this.postBody+=param;}
this.openURL=function(method,url,postbody){if(this.xmlhttp){delete this.xmlhttp;this.xmlhttp=null;}
this.xmlhttp=this._getHttpObj();if(!this.xmlhttp)
return false;if(postbody!=null&&postbody.length>0)
this.postBody=postbody;if(url.charAt(0)=='/'){url="http://"+location.host+url;}
else{if(url.substring(0,4)!="http"){var path=location.pathname;if(path.charAt(0)!='/')
path="/"+path;path=path.substring(0,path.lastIndexOf("/")+1);url=location.protocol+"//"+location.host+path+url;}}
if(url.indexOf("?")!=-1){url+="&isajax=1";}
else{url+="?isajax=1";}
try{if(this.async)
this.xmlhttp.onreadystatechange=this._onstatechangeHTTP;this.xmlhttp.open(method,url,this.async);if(method.toUpperCase()=="POST"){this.xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");if(this.postBody)
this.xmlhttp.setRequestHeader("Content-length",this.postBody.length);if(this.xmlhttp.overrideMimeType&&!_oB.isSafari)
this.xmlhttp.setRequestHeader("Connection","close");}
if(document.cookie!="")
this.xmlhttp.setRequestHeader("Cookie",document.cookie);this.xmlhttp.send(this.postBody);if(this.statusCode()!=200)
return false;var scookie=this.xmlhttp.getResponseHeader("Set-Cookie");if(scookie&&scookie.length>0)
document.cookie=scookie;}
catch(e){this.error=e;return false;}
return true;}
this.abort=function(){this.xmlhttp.abort();}
this.response=function(xml){return(xml)?this.xmlhttp.responseXML:((this.error)?this.error:this.xmlhttp.responseText);}
this.statusCode=function(){return this.xmlhttp.status;}
this.statusText=function(){return this.xmlhttp.statusText;}}

/** lang.js **/
var False=false;var True=true;var fulldayofweek=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var fullmonthname=["January","February","March","April","May","June","July","August","September","October","November","December"];var weekdays=['S','M','T','W','T','F','S'];var dayofweek=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];var monthname=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var dayofmonth=new Array(31,28,31,30,31,30,31,31,30,31,30,31);var s_conv32map=['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V'];var s_dt2000=new Date(2000,0,1);var s_uuid=0;function max(a,b){if(a>b)
return a;return b;}
function min(a,b){if(a<b)
return a;return b;}
if(String.prototype.trim==null){String.prototype.trimLeft=function(){return this.replace(/^\s+/,'');}
String.prototype.trimRight=function(){return this.replace(/\s+$/,'');}
String.prototype.trim=function(){return this.replace(/^\s+|\s+$/,'');};}
if(String.prototype.replaceAll==null){String.prototype.replaceAll=function(source,target){source=source.replace(new RegExp("(\\W)","g"),"\\$1");target=target.replace(new RegExp("\\$","g"),"$$$$");return this.replace(new RegExp(source,"gm"),target);}}
if(String.prototype.indexOfAny==null){String.prototype.indexOfAny=function(pattern){for(var i=0;i<pattern.length;i++){var index=this.indexOf(pattern.charAt(i));if(index!=-1)
return index;}
return-1;}}
if(String.prototype.indexOfCaseInsensitive==null){String.prototype.indexOfCaseInsensitive=function(search,from){var string=(typeof from=="undefined")?this:this.substring(from,this.length);var result=(typeof search=="string")?new RegExp(search.replace(new RegExp("(\\W)","g"),"\\$1"),"i").exec(string):search.exec(string);return result?result.index+((typeof from=="number")?from:0):-1;}}
if(String.prototype.padLeft==null){String.prototype.padLeft=function(maxsize,padchar){var count=max(0,maxsize-this.length);var strpad=this;for(var i=0;i<count;i++){strpad=padchar+strpad;}
return strpad;}}
if(String.prototype.padRight==null){String.prototype.padRight=function(maxsize,padchar){var count=max(0,maxsize-this.length);var strpad=this;for(var i=0;i<count;i++){strpad=strpad+padchar;}
return strpad;}}
if(String.prototype.compare==null){String.prototype.compare=function(dest,len){var str=dest.substr(0,len);if(this==str)
return 0;return-1;}}
var b64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";if(String.prototype.encodeBase64==null){String.prototype.encodeBase64=function(utf8encode){utf8encode=(typeof utf8encode=='undefined')?false:utf8encode;var o1,o2,o3,bits,h1,h2,h3,h4,e=[],pad='',c,plain,coded;plain=utf8encode?this.encodeUTF8():this;c=plain.length%3;if(c>0){while(c++<3){pad+='=';plain+='\0';}}
for(c=0;c<plain.length;c+=3){o1=plain.charCodeAt(c);o2=plain.charCodeAt(c+1);o3=plain.charCodeAt(c+2);bits=o1<<16|o2<<8|o3;h1=bits>>18&0x3f;h2=bits>>12&0x3f;h3=bits>>6&0x3f;h4=bits&0x3f;e[c/3]=b64.charAt(h1)+b64.charAt(h2)+b64.charAt(h3)+b64.charAt(h4);}
coded=e.join('');coded=coded.slice(0,coded.length-pad.length)+pad;return coded;}}
if(String.prototype.decodeBase64==null){String.prototype.decodeBase64=function(utf8decode){utf8decode=(typeof utf8decode=='undefined')?false:utf8decode;var o1,o2,o3,h1,h2,h3,h4,bits,d=[],plain,coded;coded=utf8decode?this.decodeUTF8():this;for(var c=0;c<coded.length;c+=4){h1=b64.indexOf(coded.charAt(c));h2=b64.indexOf(coded.charAt(c+1));h3=b64.indexOf(coded.charAt(c+2));h4=b64.indexOf(coded.charAt(c+3));bits=h1<<18|h2<<12|h3<<6|h4;o1=bits>>>16&0xff;o2=bits>>>8&0xff;o3=bits&0xff;d[c/4]=String.fromCharCode(o1,o2,o3);if(h4==0x40)d[c/4]=String.fromCharCode(o1,o2);if(h3==0x40)d[c/4]=String.fromCharCode(o1);}
plain=d.join('');return utf8decode?plain.decodeUTF8():plain;}}
if(String.prototype.encodeUTF8==null){String.prototype.encodeUTF8=function(){var str=this.replace(/[\u0080-\u07ff]/g,function(c){var cc=c.charCodeAt(0);return String.fromCharCode(0xc0|cc>>6,0x80|cc&0x3f);});str=str.replace(/[\u0800-\uffff]/g,function(c){var cc=c.charCodeAt(0);return String.fromCharCode(0xe0|cc>>12,0x80|cc>>6&0x3F,0x80|cc&0x3f);});return str;}}
if(String.prototype.decodeUTF8==null){String.prototype.decodeUTF8=function(){var str=this.replace(/[\u00c0-\u00df][\u0080-\u00bf]/g,function(c){var cc=(c.charCodeAt(0)&0x1f)<<6|c.charCodeAt(1)&0x3f;return String.fromCharCode(cc);});str=str.replace(/[\u00e0-\u00ef][\u0080-\u00bf][\u0080-\u00bf]/g,function(c){var cc=((c.charCodeAt(0)&0x0f)<<12)|((c.charCodeAt(1)&0x3f)<<6)|(c.charCodeAt(2)&0x3f);return String.fromCharCode(cc);});return str;}}
if(Date.prototype.addSeconds==null){Date.prototype.addSeconds=function(sec){this.setSeconds(this.getSeconds()+parseInt(sec,10));}}
if(Date.prototype.addMinutes==null){Date.prototype.addMinutes=function(min){this.setMinutes(this.getMinutes()+parseInt(min,10));}}
if(Date.prototype.addDays==null){Date.prototype.addDays=function(day){this.setDate(this.getDate()+parseInt(day,10));}}
if(Date.prototype.addWeeks==null){Date.prototype.addWeeks=function(week){this.setDate(this.getDate()-(6-this.getDay()));this.setDate(this.getDate()+(parseInt(week,10)*7));}}
if(Date.prototype.addMonths==null){Date.prototype.addMonths=function(month){this.setDate(1);this.setMonth(this.getMonth()+parseInt(month,10));}}
if(Date.prototype.addYears==null){Date.prototype.addYears=function(year){this.setDate(1);this.setFullYear(this.getFullYear()+parseInt(year,10));}}
if(Date.prototype.dayCount==null){Date.prototype.dayCount=function(){return((this.getMonth()==1)&&((this.getYear()%400==0)||((this.getYear()%4==0)&&(this.getYear()%100!=0))))?29:dayofmonth[this.getMonth()];}}
if(Date.prototype.toFormat==null){Date.prototype.toFormat=function(format){var month=""+(this.getMonth()+1);var day=""+this.getDate();var year=""+this.getYear();var fullyear=""+this.getFullYear();var hours=""+this.getHours();var minutes=""+this.getMinutes();var secs=""+this.getSeconds();var tthours=""+((this.getHours()>12)?this.getHours()-12:this.getHours());var tt=(this.getHours()>12)?"PM":"AM";var str="";switch(format){case"x":str=month+"/1/"+fullyear;break;case"xx":str=month.padLeft(2,"0")+day.padLeft(2,"0")+fullyear;break;case"d":str=month+"/"+day+"/"+fullyear;break;case"dd":str=month.padLeft(2,"0")+"/"+day.padLeft(2,"0")+"/"+fullyear;break;case"ddd":str=dayofweek[this.getDay()];break;case"dddd":str=fulldayofweek[this.getDay()];break;case"D":str=fulldayofweek[this.getDay()]+", "+fullmonthname[this.getMonth()]+" "+day.padLeft(2,"0")+", "+fullyear;break;case"f":str=fulldayofweek[this.getDay()]+", "+fullmonthname[this.getMonth()]+" "+day.padLeft(2,"0")+", "+fullyear+" "+tthours+":"+minutes.padLeft(2,"0")+" "+tt;break;case"F":str=fulldayofweek[this.getDay()]+", "+fullmonthname[this.getMonth()]+" "+day.padLeft(2,"0")+", "+fullyear+" "+tthours+":"+minutes.padLeft(2,"0")+":"+secs.padLeft(2,"0")+" "+tt;break;case"g":str=month+"/"+day+"/"+fullyear+" "+tthours+":"+minutes.padLeft(2,"0")+" "+tt;break;case"gg":str=month.padLeft(2,"0")+"/"+day.padLeft(2,"0")+"/"+fullyear+" "+tthours.padLeft(2,"0")+":"+minutes.padLeft(2,"0")+" "+tt;break;case"G":str=month+"/"+day+"/"+fullyear+" "+tthours+":"+minutes.padLeft(2,"0")+":"+secs.padLeft(2,"0")+" "+tt;break;case"GG":str=month.padLeft(2,"0")+"/"+day.padLeft(2,"0")+"/"+fullyear+" "+tthours.padLeft(2,"0")+":"+minutes.padLeft(2,"0")+":"+secs.padLeft(2,"0")+" "+tt;break;case"m":str=monthname[this.getMonth()]+" "+day.padLeft(2,"0");break;case"M":str=fullmonthname[this.getMonth()]+" "+day.padLeft(2,"0");break;case"MMM":str=monthname[this.getMonth()];break;case"MMMM":str=fullmonthname[this.getMonth()];break;case"my":str=monthname[this.getMonth()]+" "+day.padLeft(2,"0")+", "+fullyear;break;case"My":str=fullmonthname[this.getMonth()]+" "+day.padLeft(2,"0")+", "+fullyear;break;case"t":str=tthours+":"+minutes.padLeft(2,"0")+" "+tt;break;case"tt":str=tthours.padLeft(2,"0")+":"+minutes.padLeft(2,"0")+" "+tt;break;case"T":str=tthours+":"+minutes.padLeft(2,"0")+":"+secs.padLeft(2,"0")+" "+tt;break;case"TT":str=tthours.padLeft(2,"0")+":"+minutes.padLeft(2,"0")+":"+secs.padLeft(2,"0")+" "+tt;break;case"y":str=monthname[this.getMonth()]+", "+fullyear;break;case"yy":str=month.padLeft(2,"0")+"/"+fullyear;break;case"Y":str=fullmonthname[this.getMonth()]+", "+fullyear;break;case"YYY":str=year;break;case"YYYY":str=fullyear;break;}
return str;}}
if(typeof HTMLElement!="undefined"&&!HTMLElement.prototype.insertAdjacentElement){HTMLElement.prototype.insertAdjacentElement=function(where,parsedNode){switch(where){case'beforeBegin':this.parentNode.insertBefore(parsedNode,this)
break;case'afterBegin':this.insertBefore(parsedNode,this.firstChild);break;case'beforeEnd':this.appendChild(parsedNode);break;case'afterEnd':if(this.nextSibling){this.parentNode.insertBefore(parsedNode,this.nextSibling);}
else{this.parentNode.appendChild(parsedNode);}
break;}}
HTMLElement.prototype.insertAdjacentHTML=function(where,htmlStr){var r=this.ownerDocument.createRange();r.setStartBefore(this);var parsedHTML=r.createContextualFragment(htmlStr);this.insertAdjacentElement(where,parsedHTML)}
HTMLElement.prototype.insertAdjacentText=function(where,txtStr){var parsedText=document.createTextNode(txtStr)
this.insertAdjacentElement(where,parsedText)}}
function hxjArray(){this.length=0;this.push=function(obj){this[this.length]=obj;this.length++;}
this.pop=function(){var obj=null;if(this.length>0){obj=this[this.length-1];delete this[this.length-1];this.length--;}
return obj;}
this.insertAt=function(pos,obj){if(pos<0||pos>=this.length)
return;for(var i=this.length;i>pos;i--){this[i]=this[i-1];}
this[pos]=obj;this.length++;}
this.removeAt=function(pos){var obj=null;if(pos<0||pos>=this.length)
return null;obj=this[pos];for(var i=pos;i<this.length-1;i++){this[i]=this[i+1];}
delete this[this.length-1];this.length--;return obj;}
this.remove=function(obj){return this.removeAt(this.find(obj));}
this.find=function(obj){for(var i=0;i<this.length;i++){if(this[i]==obj)
return i;}
return-1;}}
function hxjMap(){this.length=0;this.isExist=function(key){return(this[key])?true:false;}
this.get=function(key){return this[key];}
this.put=function(key,val){var prev=null;if(this[key]){prev=this[key];}
else{this.length++;}
this[key]=val;return prev;}
this.remove=function(key){var val=null;if(this[key]){val=this[key];delete this[key];this.length--;}
return val;}
this.toString=function(sep){var strGen=new hxjStringBuilder(sep);for(var v in this){if(typeof this[v]=="undefined"||typeof this[v]=="function"||v=="length"){continue;}
strGen.append(v+"="+escape(this[v]));}
return strGen.toString();}
this.Keys=function(){var arrKey=[];var i=0;for(var v in this){if(typeof this[v]=="undefined"||typeof this[v]=="function"||v=="length"){continue;}
arrKey[i++]=v;}
return arrKey;}
this.Values=function(){var arrVal=[];var i=0;for(var v in this){if(typeof this[v]=="undefined"||typeof this[v]=="function"||v=="length"){continue;}
arrVal[i++]=this[v];}
return arrVal;}}
function hxjPoint(x,y){this.x=(x!=null)?x:0;this.y=(y!=null)?y:0;this.Offset=function(x,y){this.x+=x;this.y+=y;}}
function hxjSize(cx,cy){this.cx=(cx!=null)?cx:0;this.cy=(cy!=null)?cy:0;this.Offset=function(cx,cy){this.cx+=cx;this.cy+=cy;}}
function hxjRect(left,top,right,bottom){this.left=(left!=null)?left:0;this.top=(top!=null)?top:0;this.right=(right!=null)?right:this.left;this.bottom=(bottom!=null)?bottom:this.top;this.Width=function(){return this.right-this.left;}
this.Height=function(){return this.bottom-this.top;}
this.OffsetRect=function(x,y){this.left+=x;this.right+=x;this.top+=y;this.bottom+=y;}
this.DeflateRect=function(x,y){this.left+=x;this.right-=x;this.top+=y;this.bottom-=y;}
this.InflateRect=function(x,y){this.left-=x;this.right+=x;this.top-=y;this.bottom+=y;}
this.PtInRect=function(x,y){if((this.left<=x)&&(this.right>=x)&&(this.top<=y)&&(this.bottom>=y))
return true;return false;}
this.TopLeft=function(){return new hxjPoint(this.left,this.top);}
this.BottomRight=function(){return new hxjPoint(this.right,this.bottom);}
this.CenterPoint=function(){var x=this.left+((this.right-this.left)/2);var y=this.top+((this.bottom-this.top)/2);return new hxjPoint(x,y);}
this.CopyRect=function(){return new hxjRect(this.left,this.top,this,right,this.bottom);}
this.IntersectRect=function(rc){var newRc=null;if(this.PtInRect(rc.left,rc.top)||this.PtInRect(rc.right,rc.top)||this.PtInRect(rc.left,rc.bottom)||this.PtInRect(rc.right,rc.bottom)||rc.PtInRect(this.left,this.top)||rc.PtInRect(this.right,this.top)||rc.PtInRect(this.left,this.bottom)||rc.PtInRect(this.right,this.bottom)){newRc=new hxjRect();newRc.left=(this.left<=rc.left)?rc.left:this.left;newRc.top=(this.top<=rc.top)?rc.top:this.top;newRc.right=(this.right<=rc.right)?this.right:rc.right;newRc.bottom=(this.bottom<=rc.bottom)?this.bottom:rc.bottom;}
return newRc;}}
var rcDefault=new hxjRect();function hxjStringBuilder(join){this._strings=new Array;this._join=(typeof join=="undefined")?"":join;this.append=function(str){this._strings.push(str);}
this.size=function(){return this._strings.length;}
this.clear=function(){this._strings.length=0;}
this.toString=function(){return this._strings.join(this._join);}}
var _ENUM_WS={left:0,top:1,width:2,height:3,position:4,align:6,valign:7,margin:8,high3dcolor:9,low3dcolor:10,followscroll:11,zindex:12,resizable:13,minwidth:14,maxwidth:15,minheight:16,maxheight:17,bgcolor:18,onbgcolor:19,bgimage:20,onbgimage:21,border:22,onborder:23,txtcolor:24,ontxtcolor:25,cursor:26,font:27,onfont:28,layoutGrid:29,onlayoutGrid:30,lineHeight:31,padding:32,txtDecoration:33,ontxtDecoration:34,txtOverflow:35,txtTransform:36,letterSpacing:37,zoom:38,dragable:39,rawcss:40,fontfamily:41,fontsize:42,fontstyle:43,fontweight:44,onfontfamily:45,onfontSize:46,onfontstyle:47,onfontweight:48,filter:49,onfilter:50,overflow:51,orientation:52,txtAlign:53};function hxjStyle(){this.built=0;for(var item in _ENUM_WS)
this[item]=null;this.Init=function(){if(!this.built){if(!this.cursor)this.cursor="hand";if(!_oB.isIE&&this.cursor=="hand")this.cursor="pointer";if(!this.padding||this.padding<=0)this.padding=1;if(!this.margin)this.margin=0;if(!this.width&&this.itemwidth)this.width=this.itemwidth;if(!this.position)this.position="absolute";if(this.position=="fixed"&&!_oB.isNS)this.position="absolute";if(this.overflow=="scroll")this.overflow="auto";}
this.built=1;}
this.toString=function(){if(!this.built)this.Init();var it=(this.left)?("left:"+hxj_MakePixel(this.left)):_TN_;it+=(this.top)?(";top:"+hxj_MakePixel(this.top)):_TN_;it+=(this.width)?(";width:"+hxj_MakePixel(this.width)):_TN_;it+=(this.height)?(";height:"+hxj_MakePixel(this.height)):_TN_;it+=(this.position)?(";position:"+this.position):_TN_;it+=(this.margin)?(";margin:"+hxj_MakePixel(this.margin)):_TN_;if(this.high3dcolor&&this.low3dcolor){it+=(";border-bottom-color:"+this.high3dcolor);it+=(";border-right-color:"+this.high3dcolor);it+=(";border-top-color:"+this.low3dcolor);it+=(";border-left-color:"+this.low3dcolor);}
it+=(this.zindex)?(";z-index:"+this.zindex):_TN_;it+=(this.bgcolor)?(";background-color:"+this.bgcolor):_TN_;it+=(this.bgimage)?(";background-image:url("+this.bgimage+")"):_TN_;it+=(this.border)?(";border:"+this.border):_TN_;it+=(this.txtcolor)?(";color:"+this.txtcolor):_TN_;if(this.font){it+=";font:"+this.font;}
else{it+=(this.fontfamily)?(";font-family:"+this.fontfamily):_TN_;it+=";font-size:"+((this.fontsize)?this.fontsize:"normal");it+=";font-style:"+((this.fontstyle)?this.fontstyle:"75%");it+=";font-weight:"+((this.fontweight)?this.fontweight:"normal");}
it+=(this.layoutGrid)?(";layout-grid:"+this.layoutGrid):_TN_;it+=(this.lineHeight)?(";line-height:"+hxj_MakePixel(this.lineHeight)):_TN_;it+=(this.padding)?(";padding:"+hxj_MakePixel(this.padding)):_TN_;it+=(this.txtDecoration)?(";text-decoration:"+this.txtDecoration):_TN_;it+=(this.txtOverflow)?(";text-overflow:"+this.txtOverflow):_TN_;it+=(this.txtTransform)?(";text-transform:"+this.txtTransform):_TN_;it+=(this.letterSpacing)?(";letter-spacing:"+hxj_MakePixel(this.letterSpacing)):_TN_;it+=(this.txtTransform)?(";text-transform:"+this.txtTransform):_TN_;it+=(this.overflow)?(";overflow:"+this.overflow):_TN_;it+=(this.zoom)?(";zoom:"+hxj_MakePercent(this.zoom)):_TN_;it+=(this.rawcss)?(";"+this.rawcss):_TN_;it+=";visibility:hidden";return it;}}
function hxjObject(wid){this.domobj=null;this.winstyle=new hxjStyle();if(!hxj_IsNull(wid)){this.domobj=hxj_FindObject(wid);if(!this.domobj)
throw"Object not found. Fail to attach object";}
this._ApplyFilter=function(bShow){if(this.domobj.filters){var sFlt=(bShow)?this.winstyle.onfilter:this.winstyle.filter;if(sFlt){var iedf="FILTER:";if(this.domobj.filters[0])
this.domobj.filters[0].stop();sFlt=sFlt.split(";");for(var i=0;i<sFlt.length;i++){iedf+=" progid:DXImageTransform.Microsoft."+sFlt[i];if(_oB.isIE55)
break;}
this.domobj.style.filter=iedf;if(this.domobj.filters[0])
this.domobj.filters[0].apply();}}}
this._PlayFilter=function(bShow){if(this.domobj.filters){var sFlt=(bShow)?this.winstyle.onfilter:this.winstyle.filter;if(sFlt&&this.domobj.filters[0])
this.domobj.filters[0].play();}}
this.ShowObject=function(bShow){this._ApplyFilter(bShow);hxj_ShowObject(this.domobj,bShow);if(bShow){this.domobj.style.zIndex=(this.winstyle.zindex)?this.winstyle.zindex:999;if(this.winstyle.overflow=="auto"){this.domobj.scrollTop=0;this.domobj.scrollLeft=0;}}
else{if(_oB.isMac)this.domobj.style.overflow="hidden";}
this._PlayFilter(bShow);}
this.MoveObject=function(x,y,cx,cy){hxj_MoveObject(this.domobj,x,y,cx,cy);}
this.GetObjectRect=function(){return hxj_GetObjectRect(this.domobj);}
this.AdjustPosition=function(objBase,nOffset,bHorz){hxj_AdjustPosition(this.domobj,objBase,nOffset,bHorz);}}

/** base64.js **/
function hxjBase64(){var _keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";this.encode=function(input){var output="";var chr1,chr2,chr3,enc1,enc2,enc3,enc4;var i=0;input=this._utf8_encode(input);while(i<input.length){chr1=input.charCodeAt(i++);chr2=input.charCodeAt(i++);chr3=input.charCodeAt(i++);enc1=chr1>>2;enc2=((chr1&3)<<4)|(chr2>>4);enc3=((chr2&15)<<2)|(chr3>>6);enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64;}
else if(isNaN(chr3)){enc4=64;}
output=output+
this._keyStr.charAt(enc1)+this._keyStr.charAt(enc2)+
this._keyStr.charAt(enc3)+this._keyStr.charAt(enc4);}
return output;}
this.decode=function(input){var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(i<input.length){enc1=this._keyStr.indexOf(input.charAt(i++));enc2=this._keyStr.indexOf(input.charAt(i++));enc3=this._keyStr.indexOf(input.charAt(i++));enc4=this._keyStr.indexOf(input.charAt(i++));chr1=(enc1<<2)|(enc2>>4);chr2=((enc2&15)<<4)|(enc3>>2);chr3=((enc3&3)<<6)|enc4;output=output+String.fromCharCode(chr1);if(enc3!=64){output=output+String.fromCharCode(chr2);}
if(enc4!=64){output=output+String.fromCharCode(chr3);}}
return this._utf8_decode(output);}
this._utf8_encode=function(string){string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128){utftext+=String.fromCharCode(c);}
else if((c>127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c&63)|128);}
else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)&63)|128);utftext+=String.fromCharCode((c&63)|128);}}
return utftext;}
this._utf8_decode=function(utftext){var string="";var i=0;var c=c1=c2=0;while(i<utftext.length){c=utftext.charCodeAt(i);if(c<128){string+=String.fromCharCode(c);i++;}
else if((c>191)&&(c<224)){c2=utftext.charCodeAt(i+1);string+=String.fromCharCode(((c&31)<<6)|(c2&63));i+=2;}
else{c2=utftext.charCodeAt(i+1);c3=utftext.charCodeAt(i+2);string+=String.fromCharCode(((c&15)<<12)|((c2&63)<<6)|(c3&63));i+=3;}}
return string;}}

/** jaes.js **/
var AES={Sbox:[0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5,0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76,0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0,0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0,0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc,0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15,0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a,0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75,0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0,0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84,0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b,0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf,0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85,0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8,0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5,0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2,0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17,0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73,0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88,0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb,0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c,0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79,0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9,0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08,0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6,0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a,0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e,0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e,0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94,0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf,0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68,0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16],Rcon:[[0x00,0x00,0x00,0x00],[0x01,0x00,0x00,0x00],[0x02,0x00,0x00,0x00],[0x04,0x00,0x00,0x00],[0x08,0x00,0x00,0x00],[0x10,0x00,0x00,0x00],[0x20,0x00,0x00,0x00],[0x40,0x00,0x00,0x00],[0x80,0x00,0x00,0x00],[0x1b,0x00,0x00,0x00],[0x36,0x00,0x00,0x00]],Cipher:function(input,w){var Nb=4;var Nr=w.length/Nb-1;var state=[[],[],[],[]];for(var i=0;i<4*Nb;i++)state[i%4][Math.floor(i/4)]=input[i];state=AES.AddRoundKey(state,w,0,Nb);for(var round=1;round<Nr;round++){state=AES.SubBytes(state,Nb);state=AES.ShiftRows(state,Nb);state=AES.MixColumns(state,Nb);state=AES.AddRoundKey(state,w,round,Nb);}
state=AES.SubBytes(state,Nb);state=AES.ShiftRows(state,Nb);state=AES.AddRoundKey(state,w,Nr,Nb);var output=new Array(4*Nb);for(var i=0;i<4*Nb;i++)output[i]=state[i%4][Math.floor(i/4)];return output;},SubBytes:function(s,Nb){for(var r=0;r<4;r++){for(var c=0;c<Nb;c++)s[r][c]=AES.Sbox[s[r][c]];}
return s;},ShiftRows:function(s,Nb){var t=new Array(4);for(var r=1;r<4;r++){for(var c=0;c<4;c++)t[c]=s[r][(c+r)%Nb];for(var c=0;c<4;c++)s[r][c]=t[c];}
return s;},MixColumns:function(s,Nb){for(var c=0;c<4;c++){var a=new Array(4);var b=new Array(4);for(var i=0;i<4;i++){a[i]=s[i][c];b[i]=s[i][c]&0x80?s[i][c]<<1^0x011b:s[i][c]<<1;}
s[0][c]=b[0]^a[1]^b[1]^a[2]^a[3];s[1][c]=a[0]^b[1]^a[2]^b[2]^a[3];s[2][c]=a[0]^a[1]^b[2]^a[3]^b[3];s[3][c]=a[0]^b[0]^a[1]^a[2]^b[3];}
return s;},AddRoundKey:function(state,w,rnd,Nb){for(var r=0;r<4;r++){for(var c=0;c<Nb;c++)state[r][c]^=w[rnd*4+c][r];}
return state;},KeyExpansion:function(key){var Nb=4;var Nk=key.length/4
var Nr=Nk+6;var w=new Array(Nb*(Nr+1));var temp=new Array(4);for(var i=0;i<Nk;i++){var r=[key[4*i],key[4*i+1],key[4*i+2],key[4*i+3]];w[i]=r;}
for(var i=Nk;i<(Nb*(Nr+1));i++){w[i]=new Array(4);for(var t=0;t<4;t++)temp[t]=w[i-1][t];if(i%Nk==0){temp=AES.SubWord(AES.RotWord(temp));for(var t=0;t<4;t++)temp[t]^=AES.Rcon[i/Nk][t];}else if(Nk>6&&i%Nk==4){temp=AES.SubWord(temp);}
for(var t=0;t<4;t++)w[i][t]=w[i-Nk][t]^temp[t];}
return w;},SubWord:function(w){for(var i=0;i<4;i++)w[i]=AES.Sbox[w[i]];return w;},RotWord:function(w){var tmp=w[0];for(var i=0;i<3;i++)w[i]=w[i+1];w[3]=tmp;return w;},Encrypt:function(plaintext,password,nBits){var blockSize=16;if(!(nBits==128||nBits==192||nBits==256))return'';plaintext=plaintext.encodeUTF8();password=password.encodeUTF8();var nBytes=nBits/8;var pwBytes=new Array(nBytes);for(var i=0;i<nBytes;i++){pwBytes[i]=isNaN(password.charCodeAt(i))?0:password.charCodeAt(i);}
var key=AES.Cipher(pwBytes,AES.KeyExpansion(pwBytes));key=key.concat(key.slice(0,nBytes-16));var counterBlock=new Array(blockSize);var nonce=(new Date()).getTime();var nonceSec=Math.floor(nonce/1000);var nonceMs=nonce%1000;for(var i=0;i<4;i++)counterBlock[i]=(nonceSec>>>i*8)&0xff;for(var i=0;i<4;i++)counterBlock[i+4]=nonceMs&0xff;var ctrTxt='';for(var i=0;i<8;i++)ctrTxt+=String.fromCharCode(counterBlock[i]);var keySchedule=AES.KeyExpansion(key);var blockCount=Math.ceil(plaintext.length/blockSize);var ciphertxt=new Array(blockCount);for(var b=0;b<blockCount;b++){for(var c=0;c<4;c++)counterBlock[15-c]=(b>>>c*8)&0xff;for(var c=0;c<4;c++)counterBlock[15-c-4]=(b/0x100000000>>>c*8)
var cipherCntr=AES.Cipher(counterBlock,keySchedule);var blockLength=b<blockCount-1?blockSize:(plaintext.length-1)%blockSize+1;var cipherChar=new Array(blockLength);for(var i=0;i<blockLength;i++){cipherChar[i]=cipherCntr[i]^plaintext.charCodeAt(b*blockSize+i);cipherChar[i]=String.fromCharCode(cipherChar[i]);}
ciphertxt[b]=cipherChar.join('');}
var ciphertext=ctrTxt+ciphertxt.join('');ciphertext=ciphertext.encodeBase64();return ciphertext;},Decrypt:function(ciphertext,password,nBits){var blockSize=16;if(!(nBits==128||nBits==192||nBits==256))return'';ciphertext=ciphertext.decodeBase64();password=password.encodeUTF8();var nBytes=nBits/8;var pwBytes=new Array(nBytes);for(var i=0;i<nBytes;i++){pwBytes[i]=isNaN(password.charCodeAt(i))?0:password.charCodeAt(i);}
var key=AES.Cipher(pwBytes,AES.KeyExpansion(pwBytes));key=key.concat(key.slice(0,nBytes-16));var counterBlock=new Array(8);ctrTxt=ciphertext.slice(0,8);for(var i=0;i<8;i++)counterBlock[i]=ctrTxt.charCodeAt(i);var keySchedule=AES.KeyExpansion(key);var nBlocks=Math.ceil((ciphertext.length-8)/blockSize);var ct=new Array(nBlocks);for(var b=0;b<nBlocks;b++)ct[b]=ciphertext.slice(8+b*blockSize,8+b*blockSize+blockSize);ciphertext=ct;var plaintxt=new Array(ciphertext.length);for(var b=0;b<nBlocks;b++){for(var c=0;c<4;c++)counterBlock[15-c]=((b)>>>c*8)&0xff;for(var c=0;c<4;c++)counterBlock[15-c-4]=(((b+1)/0x100000000-1)>>>c*8)&0xff;var cipherCntr=AES.Cipher(counterBlock,keySchedule);var plaintxtByte=new Array(ciphertext[b].length);for(var i=0;i<ciphertext[b].length;i++){plaintxtByte[i]=cipherCntr[i]^ciphertext[b].charCodeAt(i);plaintxtByte[i]=String.fromCharCode(plaintxtByte[i]);}
plaintxt[b]=plaintxtByte.join('');}
var plaintext=plaintxt.join('');plaintext=plaintext.decodeUTF8();return plaintext;}};

/** md5.js **/
var hexcase=1;var b64pad="";var chrsz=8;function hex_md5(s){return binl2hex(core_md5(str2binl(s),s.length*chrsz));}
function b64_md5(s){return binl2b64(core_md5(str2binl(s),s.length*chrsz));}
function str_md5(s){return binl2str(core_md5(str2binl(s),s.length*chrsz));}
function hex_hmac_md5(key,data){return binl2hex(core_hmac_md5(key,data));}
function b64_hmac_md5(key,data){return binl2b64(core_hmac_md5(key,data));}
function str_hmac_md5(key,data){return binl2str(core_hmac_md5(key,data));}
function md5_vm_test()
{return hex_md5("abc")=="900150983CD24FB0D6963F7D28E17F72";}
function core_md5(x,len)
{x[len>>5]|=0x80<<((len)%32);x[(((len+64)>>>9)<<4)+14]=len;var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878;for(var i=0;i<x.length;i+=16)
{var olda=a;var oldb=b;var oldc=c;var oldd=d;a=md5_ff(a,b,c,d,x[i+0],7,-680876936);d=md5_ff(d,a,b,c,x[i+1],12,-389564586);c=md5_ff(c,d,a,b,x[i+2],17,606105819);b=md5_ff(b,c,d,a,x[i+3],22,-1044525330);a=md5_ff(a,b,c,d,x[i+4],7,-176418897);d=md5_ff(d,a,b,c,x[i+5],12,1200080426);c=md5_ff(c,d,a,b,x[i+6],17,-1473231341);b=md5_ff(b,c,d,a,x[i+7],22,-45705983);a=md5_ff(a,b,c,d,x[i+8],7,1770035416);d=md5_ff(d,a,b,c,x[i+9],12,-1958414417);c=md5_ff(c,d,a,b,x[i+10],17,-42063);b=md5_ff(b,c,d,a,x[i+11],22,-1990404162);a=md5_ff(a,b,c,d,x[i+12],7,1804603682);d=md5_ff(d,a,b,c,x[i+13],12,-40341101);c=md5_ff(c,d,a,b,x[i+14],17,-1502002290);b=md5_ff(b,c,d,a,x[i+15],22,1236535329);a=md5_gg(a,b,c,d,x[i+1],5,-165796510);d=md5_gg(d,a,b,c,x[i+6],9,-1069501632);c=md5_gg(c,d,a,b,x[i+11],14,643717713);b=md5_gg(b,c,d,a,x[i+0],20,-373897302);a=md5_gg(a,b,c,d,x[i+5],5,-701558691);d=md5_gg(d,a,b,c,x[i+10],9,38016083);c=md5_gg(c,d,a,b,x[i+15],14,-660478335);b=md5_gg(b,c,d,a,x[i+4],20,-405537848);a=md5_gg(a,b,c,d,x[i+9],5,568446438);d=md5_gg(d,a,b,c,x[i+14],9,-1019803690);c=md5_gg(c,d,a,b,x[i+3],14,-187363961);b=md5_gg(b,c,d,a,x[i+8],20,1163531501);a=md5_gg(a,b,c,d,x[i+13],5,-1444681467);d=md5_gg(d,a,b,c,x[i+2],9,-51403784);c=md5_gg(c,d,a,b,x[i+7],14,1735328473);b=md5_gg(b,c,d,a,x[i+12],20,-1926607734);a=md5_hh(a,b,c,d,x[i+5],4,-378558);d=md5_hh(d,a,b,c,x[i+8],11,-2022574463);c=md5_hh(c,d,a,b,x[i+11],16,1839030562);b=md5_hh(b,c,d,a,x[i+14],23,-35309556);a=md5_hh(a,b,c,d,x[i+1],4,-1530992060);d=md5_hh(d,a,b,c,x[i+4],11,1272893353);c=md5_hh(c,d,a,b,x[i+7],16,-155497632);b=md5_hh(b,c,d,a,x[i+10],23,-1094730640);a=md5_hh(a,b,c,d,x[i+13],4,681279174);d=md5_hh(d,a,b,c,x[i+0],11,-358537222);c=md5_hh(c,d,a,b,x[i+3],16,-722521979);b=md5_hh(b,c,d,a,x[i+6],23,76029189);a=md5_hh(a,b,c,d,x[i+9],4,-640364487);d=md5_hh(d,a,b,c,x[i+12],11,-421815835);c=md5_hh(c,d,a,b,x[i+15],16,530742520);b=md5_hh(b,c,d,a,x[i+2],23,-995338651);a=md5_ii(a,b,c,d,x[i+0],6,-198630844);d=md5_ii(d,a,b,c,x[i+7],10,1126891415);c=md5_ii(c,d,a,b,x[i+14],15,-1416354905);b=md5_ii(b,c,d,a,x[i+5],21,-57434055);a=md5_ii(a,b,c,d,x[i+12],6,1700485571);d=md5_ii(d,a,b,c,x[i+3],10,-1894986606);c=md5_ii(c,d,a,b,x[i+10],15,-1051523);b=md5_ii(b,c,d,a,x[i+1],21,-2054922799);a=md5_ii(a,b,c,d,x[i+8],6,1873313359);d=md5_ii(d,a,b,c,x[i+15],10,-30611744);c=md5_ii(c,d,a,b,x[i+6],15,-1560198380);b=md5_ii(b,c,d,a,x[i+13],21,1309151649);a=md5_ii(a,b,c,d,x[i+4],6,-145523070);d=md5_ii(d,a,b,c,x[i+11],10,-1120210379);c=md5_ii(c,d,a,b,x[i+2],15,718787259);b=md5_ii(b,c,d,a,x[i+9],21,-343485551);a=safe_add(a,olda);b=safe_add(b,oldb);c=safe_add(c,oldc);d=safe_add(d,oldd);}
return Array(a,b,c,d);}
function md5_cmn(q,a,b,x,s,t)
{return safe_add(bit_rol(safe_add(safe_add(a,q),safe_add(x,t)),s),b);}
function md5_ff(a,b,c,d,x,s,t)
{return md5_cmn((b&c)|((~b)&d),a,b,x,s,t);}
function md5_gg(a,b,c,d,x,s,t)
{return md5_cmn((b&d)|(c&(~d)),a,b,x,s,t);}
function md5_hh(a,b,c,d,x,s,t)
{return md5_cmn(b^c^d,a,b,x,s,t);}
function md5_ii(a,b,c,d,x,s,t)
{return md5_cmn(c^(b|(~d)),a,b,x,s,t);}
function core_hmac_md5(key,data)
{var bkey=str2binl(key);if(bkey.length>16)bkey=core_md5(bkey,key.length*chrsz);var ipad=Array(16),opad=Array(16);for(var i=0;i<16;i++)
{ipad[i]=bkey[i]^0x36363636;opad[i]=bkey[i]^0x5C5C5C5C;}
var hash=core_md5(ipad.concat(str2binl(data)),512+data.length*chrsz);return core_md5(opad.concat(hash),512+128);}
function safe_add(x,y)
{var lsw=(x&0xFFFF)+(y&0xFFFF);var msw=(x>>16)+(y>>16)+(lsw>>16);return(msw<<16)|(lsw&0xFFFF);}
function bit_rol(num,cnt)
{return(num<<cnt)|(num>>>(32-cnt));}
function str2binl(str)
{var bin=Array();var mask=(1<<chrsz)-1;for(var i=0;i<str.length*chrsz;i+=chrsz)
bin[i>>5]|=(str.charCodeAt(i/chrsz)&mask)<<(i%32);return bin;}
function binl2str(bin)
{var str="";var mask=(1<<chrsz)-1;for(var i=0;i<bin.length*32;i+=chrsz)
str+=String.fromCharCode((bin[i>>5]>>>(i%32))&mask);return str;}
function binl2hex(binarray)
{var hex_tab=hexcase?"0123456789ABCDEF":"0123456789abcdef";var str="";for(var i=0;i<binarray.length*4;i++)
{str+=hex_tab.charAt((binarray[i>>2]>>((i%4)*8+4))&0xF)+
hex_tab.charAt((binarray[i>>2]>>((i%4)*8))&0xF);}
return str;}
function binl2b64(binarray)
{var tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var str="";for(var i=0;i<binarray.length*4;i+=3)
{var triplet=(((binarray[i>>2]>>8*(i%4))&0xFF)<<16)|(((binarray[i+1>>2]>>8*((i+1)%4))&0xFF)<<8)|((binarray[i+2>>2]>>8*((i+2)%4))&0xFF);for(var j=0;j<4;j++)
{if(i*8+j*6>binarray.length*32)str+=b64pad;else str+=tab.charAt((triplet>>6*(3-j))&0x3F);}}
return str;}

/** sha1.js **/
var hexcase=1;var b64pad="";var chrsz=8;function hex_sha1(s){return binb2hex(core_sha1(str2binb(s),s.length*chrsz));}
function b64_sha1(s){return binb2b64(core_sha1(str2binb(s),s.length*chrsz));}
function str_sha1(s){return binb2str(core_sha1(str2binb(s),s.length*chrsz));}
function hex_hmac_sha1(key,data){return binb2hex(core_hmac_sha1(key,data));}
function b64_hmac_sha1(key,data){return binb2b64(core_hmac_sha1(key,data));}
function str_hmac_sha1(key,data){return binb2str(core_hmac_sha1(key,data));}
function sha1_vm_test()
{return hex_sha1("abc")=="A9993E364706816ABA3E25717850C26C9CD0D89D";}
function core_sha1(x,len)
{x[len>>5]|=0x80<<(24-len%32);x[((len+64>>9)<<4)+15]=len;var w=Array(80);var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878;var e=-1009589776;for(var i=0;i<x.length;i+=16)
{var olda=a;var oldb=b;var oldc=c;var oldd=d;var olde=e;for(var j=0;j<80;j++)
{if(j<16)w[j]=x[i+j];else w[j]=rol(w[j-3]^w[j-8]^w[j-14]^w[j-16],1);var t=safe_add(safe_add(rol(a,5),sha1_ft(j,b,c,d)),safe_add(safe_add(e,w[j]),sha1_kt(j)));e=d;d=c;c=rol(b,30);b=a;a=t;}
a=safe_add(a,olda);b=safe_add(b,oldb);c=safe_add(c,oldc);d=safe_add(d,oldd);e=safe_add(e,olde);}
return Array(a,b,c,d,e);}
function sha1_ft(t,b,c,d)
{if(t<20)return(b&c)|((~b)&d);if(t<40)return b^c^d;if(t<60)return(b&c)|(b&d)|(c&d);return b^c^d;}
function sha1_kt(t)
{return(t<20)?1518500249:(t<40)?1859775393:(t<60)?-1894007588:-899497514;}
function core_hmac_sha1(key,data)
{var bkey=str2binb(key);if(bkey.length>16)bkey=core_sha1(bkey,key.length*chrsz);var ipad=Array(16),opad=Array(16);for(var i=0;i<16;i++)
{ipad[i]=bkey[i]^0x36363636;opad[i]=bkey[i]^0x5C5C5C5C;}
var hash=core_sha1(ipad.concat(str2binb(data)),512+data.length*chrsz);return core_sha1(opad.concat(hash),512+160);}
function safe_add(x,y)
{var lsw=(x&0xFFFF)+(y&0xFFFF);var msw=(x>>16)+(y>>16)+(lsw>>16);return(msw<<16)|(lsw&0xFFFF);}
function rol(num,cnt)
{return(num<<cnt)|(num>>>(32-cnt));}
function str2binb(str)
{var bin=Array();var mask=(1<<chrsz)-1;for(var i=0;i<str.length*chrsz;i+=chrsz)
bin[i>>5]|=(str.charCodeAt(i/chrsz)&mask)<<(32-chrsz-i%32);return bin;}
function binb2str(bin)
{var str="";var mask=(1<<chrsz)-1;for(var i=0;i<bin.length*32;i+=chrsz)
str+=String.fromCharCode((bin[i>>5]>>>(32-chrsz-i%32))&mask);return str;}
function binb2hex(binarray)
{var hex_tab=hexcase?"0123456789ABCDEF":"0123456789abcdef";var str="";for(var i=0;i<binarray.length*4;i++)
{str+=hex_tab.charAt((binarray[i>>2]>>((3-i%4)*8+4))&0xF)+
hex_tab.charAt((binarray[i>>2]>>((3-i%4)*8))&0xF);}
return str;}
function binb2b64(binarray)
{var tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var str="";for(var i=0;i<binarray.length*4;i+=3)
{var triplet=(((binarray[i>>2]>>8*(3-i%4))&0xFF)<<16)|(((binarray[i+1>>2]>>8*(3-(i+1)%4))&0xFF)<<8)|((binarray[i+2>>2]>>8*(3-(i+2)%4))&0xFF);for(var j=0;j<4;j++)
{if(i*8+j*6>binarray.length*32)str+=b64pad;else str+=tab.charAt((triplet>>6*(3-j))&0x3F);}}
return str;}

/** flash.js **/
function flash(width,height,swfpath,flashvars){var flash_tag="";if(!flashvars)
flashvars="";flash_tag='<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';flash_tag+='codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" ';flash_tag+='WIDTH="'+width+'" HEIGHT="'+height+'" >';flash_tag+='<param name="wmode" value="transparent">';flash_tag+='<param name="movie" value="'+swfpath+'">';flash_tag+='<param name="quality" value="high">';flash_tag+='<param name="flashvars" value="'+flashvars+'">';flash_tag+='<embed src="'+swfpath+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" ';flash_tag+='type="application/x-shockwave-flash"  WMODE="transparent" WIDTH="'+width+'" HEIGHT="'+height+'" flashvars="'+flashvars+'"></embed></object>'
document.write(flash_tag);}

/** util.js **/
function hxj_IsNull(v){if(v==null)
return true;if(typeof v=="undefined")
return true;if(typeof v=="string"){if(v.length<=0)
return true;if(v=="undefined")
return true;if(v=="null")
return true;if(v=="none")
return true;}
return false;}
function hxj_IsTrue(v){if(hxj_IsNull(v))
return false;v=v+"";v=v.toLowerCase();if(v=="true"||v=="yes"||v=="y"){return true;}
if(hxj_ParseInt(v)>0)
return true;return false;}
function hxj_SafeValue(v,def){if(hxj_IsNull(v))
return def;return v;}
function hxj_LowerCase(v){if(v)return v.toLowerCase();return _TN_;}
function hxj_UpperCase(v){if(v)return v.toUpperCase();return _TN_;}
function hxj_MakePixel(px){px=(!hxj_IsNull(px)&&!isNaN(px))?px+="px":px;return px;}
function hxj_MakePercent(pc){pc=(!hxj_IsNull(px)&&!isNaN(pc))?pc+="%":pc;return pc;}
function hxj_ParseInt(v,radix){v=parseInt(v,radix?radix:10);return(!isNaN(v))?v:0;}
function hxj_ReduceString(v,nMaxSize){if(v.length>nMaxSize){v=v.substring(0,nMaxSize-3);v+="...";}
return v;}
function hxj_SplitStringMap(v,sep){var map=new hxjMap();if(!hxj_IsNull(v)){var it=v.split(sep);for(var i=0;i<it.length;i++){var n=it[i].indexOf('=');var skey;var sval;if(n!=-1){skey=it[i].substring(0,n);sval=hxj_Unescape(it[i].substring(n+1));}
else{skey=it[i].replace(/^(\s+|\')|(\s+|\')$/g,'');sval=it[i];}
map.put(skey,sval);}}
return map;}
function hxj_MakeKey(){var key="";var ts=Date.now()-s_dt2000+"";ts=hxj_ParseInt(ts.substring(0,9))+(++s_uuid);for(var i=5;i>=0;i--){var val=((ts>>i*5)&0x1F);if(val!=0||key.length>0){val=s_conv32map[val];key+=val;}}
return key.padRight(6,'V');}
function hxj_ParseArgument(obj,dom){var args=dom.getAttribute("rel");if(args!=null){var it=args.split(";");for(var a=0;a<it.length;a++){var sp=it[a].indexOf("=");if(sp!=-1){var name=hxj_LowerCase(it[a].slice(0,sp));var value=hxj_Unescape(it[a].slice(sp+1));obj[name]=value;}}}}
function hxj_Unescape(val){return decodeURIComponent(val).replaceAll("+"," ");}
function hxj_GetCookie(name){var nIdx=document.cookie.indexOf(name+"=");if(nIdx!=-1){var nStart=nIdx+name.length+1;var nEnd=document.cookie.indexOf(";",nStart);if(nEnd==-1)
nEnd=document.cookie.length;return hxj_Unescape(document.cookie.substring(nStart,nEnd));}
return"";}
function hxj_SetCookie(name,value,expire){var strExpire="";if(expire!=null){var exdate=new Date();exdate.setDate(exdate.getDate()+expire);strExpire=";expires="+exdate.toGMTString();}
document.cookie=name+"="+encodeURIComponent(value)+strExpire;}
function hxj_AvoidSpam(linkobj,email){if(linkobj.innerHTML.indexOf("[at]")!=-1){linkobj.innerHTML=email.replace("[at]","@");return false;}
else{linkobj.href="mailto:"+email.replace("[at]","@");linkobj.title="Send a email";return true;}}
function hxj_GetOffsetTop(obj){return obj?obj.offsetTop+hxj_GetOffsetTop(obj.offsetParent):0;}
function hxj_GetOffsetLeft(obj){return obj?obj.offsetLeft+hxj_GetOffsetLeft(obj.offsetParent):0;}
function hxj_MoveObject(obj,x,y,cx,cy){var os=obj.style;os.position="absolute";if(_oB.isOpera){if(x!=null)os.left=x;if(y!=null)os.top=y;if(cx>0)os.pixelWidth=cx;if(cy>0)os.pixelHeight=cy;}
else{if(x!=null)os.left=hxj_MakePixel(x);if(y!=null)os.top=hxj_MakePixel(y);if(cx>0)os.width=hxj_MakePixel(cx);if(cy>0)os.height=hxj_MakePixel(cy);}
if(cx>0||cy>0){var tblNode=hxj_FindNode(obj,"table");if(tblNode){if(cx>0)tblNode.style.width="100%";if(cy>0)tblNode.style.height="100%";}}}
function hxj_GetObjectRect(obj){if (hxj_IsNull(obj)) return new hxjRect(0, 0, 0, 0); var os=obj.style;var cx=obj.offsetWidth;var cy=obj.offsetHeight;var x=0;var y=0;if(_oB.isOpera){cx=os.pixelWidth;cy=os.pixelHeight;}
for(;obj;obj=obj.offsetParent){x+=obj.offsetLeft;y+=obj.offsetTop;}
if(x<0&&hxj_ParseInt(os.left)>0)
x=hxj_ParseInt(os.left);if(y<0&&hxj_ParseInt(os.top)>0)
y=hxj_ParseInt(os.top);return new hxjRect(x,y,x+cx,y+cy);}
function hxj_CreateOverlay(){var oOverlay=_oD.createElement("IFRAME");oOverlay.style.display='block';oOverlay.style.visibility='hidden';oOverlay.style.position="absolute";oOverlay.style.top='0';oOverlay.style.left='0';oOverlay.style.filter='alpha(opacity=0)';oOverlay.style.opacity='0.0';oOverlay.border=0;oOverlay.frameBorder=0;oOverlay.scrolling="no";oOverlay.marginWidth=0;oOverlay.marginHeight=0;oOverlay.src="about:blank";_oD.body.appendChild(oOverlay);return oOverlay;}
function hxj_ShowObject(objTarget,bShow){if(!objTarget.oFixFrame){objTarget.oFixFrame=hxj_CreateOverlay();}
if(bShow){var rcCP=hxj_GetObjectRect(objTarget);hxj_MoveObject(objTarget.oFixFrame,rcCP.left,rcCP.top,rcCP.Width(),rcCP.Height());objTarget.oFixFrame.style.visibility="visible";objTarget.oFixFrame.style.zIndex=++g_zindex;objTarget.style.zIndex=++g_zindex;objTarget.style.visibility="visible";}
else{objTarget.style.visibility="hidden";objTarget.oFixFrame.style.visibility="hidden";objTarget.style.left="-999px";objTarget.oFixFrame.style.left="-999px";}}
function hxj_AdjustPosition(objTarget,objBase,nOffset,bHorz){var szWin=hxj_GetWindowSize();var rcBase=hxj_GetObjectRect(objBase);var rcCP=hxj_GetObjectRect(objTarget);if(bHorz){rcBase.OffsetRect(rcBase.Width()+nOffset,0);if((rcBase.bottom+rcCP.Height()+nOffset)>szWin.cy){if((rcBase.top+nOffset)>szWin.cy)
rcBase.OffsetRect(0,-((rcBase.top+nOffset)-szWin.cy));rcBase.OffsetRect(0,-(rcCP.Height()-rcBase.Height()));}}
else{rcBase.OffsetRect(0,rcBase.Height()+nOffset);if((rcBase.left+rcCP.Width()+nOffset)>szWin.cx){if(rcBase.right<rcCP.Width()){rcBase.left=(szWin.cx/2-rcCP.Width()/2);rcBase.right=rcCP.Width();}
else{rcBase.OffsetRect(-(rcCP.Width()-rcBase.Width()),0);}}}
hxj_MoveObject(objTarget,rcBase.left,rcBase.top,null,null);}
function hxj_GetWindowSize(win,doc){if(!win)win=self;if(!doc)doc=document;try{var x,y;if(win.innerHeight)
{x=win.innerWidth;y=win.innerHeight;}
else if(doc.documentElement&&doc.documentElement.clientHeight)
{x=doc.documentElement.clientWidth;y=doc.documentElement.clientHeight;}
else if(doc.body)
{x=doc.body.clientWidth;y=doc.body.clientHeight;}
return new hxjSize(x,y);}
catch(e){return null;}}
function hxj_GetPageSize(doc){if(!doc)doc=document;try{var test1=doc.body.scrollHeight;var test2=doc.body.offsetHeight
var x,y;if(test1>=test2)
{x=doc.body.scrollWidth;y=doc.body.scrollHeight;}
else
{x=doc.body.offsetWidth;y=doc.body.offsetHeight;}
return new hxjSize(x,y);}
catch(e){return null;}}
function hxj_GetScrollXY(){var scrOfX=0,scrOfY=0;if(typeof(window.pageYOffset)=='number'){scrOfY=window.pageYOffset;scrOfX=window.pageXOffset;}
else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){scrOfY=document.documentElement.scrollTop;scrOfX=document.documentElement.scrollLeft;}
else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){scrOfY=document.body.scrollTop;scrOfX=document.body.scrollLeft;}
return new hxjPoint(scrOfX,scrOfY);}
function hxj_CharFilter(e,pattern){if(!e)e=window.event;var KeyCode=(e.which)?e.which:e.keyCode;if(!pattern.test(String.fromCharCode(KeyCode))){switch(KeyCode){case 9:case 13:case 8:case 46:case 190:case 35:case 36:case 37:case 39:case 99:case 118:return true;}
if(pattern.test(String.fromCharCode(KeyCode))){return true;}
if(typeof e.stopPropagation=='function'){e.stopPropagation();}
else{e.cancelBubble=true;}
return false;}
return true;}
function hxj_DigitsOnly(e){return hxj_CharFilter(e,/\d|-/);}
function hxj_HexDigitsOnly(e){return hxj_CharFilter(e,/\d|[A-F]/gi);}
function hxj_AlphaDigitsOnly(e){return hxj_CharFilter(e,/\d|[A-Z]/gi);}
function hxj_AlphabeticOnly(e){return hxj_CharFilter(e,/[A-Z]/gi);}
function hxj_CalcByte(objContent,nMaxLen){var nCurCount=nCountAdd=0;var strContent=objContent.value;var nContentLen=strContent.length;var nReserve;for(var i=0;i<nContentLen;i++){var chCurr=strContent.charAt(i);if(chCurr=='\n'){if(chPrev!='\r')
nCountAdd++;}
chPrev=chCurr;nCurCount++;}
nCurCount+=nCountAdd;if(nCurCount>nMaxLen){nReserve=nCurCount-nMaxLen;nCurCount=nMaxLen;alert("Maximum allowed byte has been reached. "+nReserve+" bytes will be truncated!");strContent=strContent.substring(0,nMaxLen-1);objContent.value=strContent;}
return nCurCount;}
function hxj_GetCheckCount(objForm){var nCount=0;if(objForm!=null){var inputs=objForm.getElementsByTagName("input");for(var i=0;i<inputs.length;i++){if(inputs[i].checked==true){nCount++;}}}
return nCount;}
function hxj_ToggleCheckValue(objForm,check){if(objForm!=null){var inputs=objForm.getElementsByTagName("input");for(var i=0;i<inputs.length;i++){var inptype=inputs[i].type.toLowerCase();if((inptype=="checkbox"||inptype=="radio")&&!inputs[i].disabled)
inputs[i].checked=check;}}}
function hxj_GetCheckValue(objForm){if(objForm!=null){var objchk=hxj_GetCheckObject(objForm);if(objchk!=null)
return objchk.value;}
return null;}
function hxj_GetCheckObject(objForm){if(objForm!=null){var inputs=objForm.getElementsByTagName("input");for(var i=0;i<inputs.length;i++){if(inputs[i].checked==true){return inputs[i];}}}
return null;}
function hxj_GetCheckElementCount(objForm){var nCount=0;if(objForm!=null){var inputs=objForm.getElementsByTagName("input");for(var i=0;i<inputs.length;i++){var inptype=inputs[i].type.toLowerCase();if(inptype=="checkbox"||inptype=="radio"){nCount++;}}}
return nCount;}
function hxj_SetCheckValue(objForm,value,state){if(objForm!=null){var inputs=objForm.getElementsByTagName("input");for(var i=0;i<inputs.length;i++){var inptype=inputs[i].type.toLowerCase();if(inptype=="checkbox"||inptype=="radio"){if(inputs[i].value==value){inputs[i].checked=state;break;}}}}}
function hxj_ToggleElement(v,check){var div=hxj_FindObject(v);if(div!=null){if(typeof check=="undefined"){if(div.style.display=="block"){div.style.display="none";}
else{div.style.display="block";}}
else{div.style.display=check?"block":"none";}}}
function hxj_ToggleTree(linkobj,treeid){var divnode=hxj_FindObject(treeid);var imgnode=linkobj.firstChild;if(divnode.style.display=="none"){divnode.style.display="block";imgnode.src=_SVR_+"/images/icon_minus.gif";}
else{divnode.style.display="none";imgnode.src=_SVR_+"/images/icon_plus.gif";}}
function hxj_AccodianElement(v,count,curr){for(var i=1;i<=count;i++){var div=hxj_FindObject(v+"_"+i);if(div!=null){div.style.display=(i==curr)?"block":"none";}}}
function hxj_SelectElement(obj,v){var div=hxj_FindObject(v);if(div!=null){if(div.selectObj!=null)
div.selectObj.style.border="";obj.style.border="1px solid #AA003A";div.selectObj=obj;}}
function hxj_OpenWindow(url,name,width,height,isresize,isscroll){if(hxj_IsNull(name))
name="hxjwin";if(hxj_IsNull(width))
width=600;if(hxj_IsNull(height))
height=440;if(hxj_IsNull(isresize))
isresize=1;if(hxj_IsNull(isscroll))
isscroll=0;try{openwin.close();}catch(e){}
var x=hxj_ParseInt(screen.width)/2-width/2;var y=hxj_ParseInt(screen.height)/2-height/2;openwin=window.open(url,name,'location=no,toolbar=0,menubar=0,status=0,scrollbars='+isscroll+',resizable='+isresize+',left='+x+',top='+y+',width='+width+',height='+height);openwin.focus();}
var g_overlay=null;function hxj_ShowOverlay(show){if(g_overlay==null){var objLoadingImage=_oD.createElement("img");objLoadingImage.src=_SVR_+"/jslib/lightbox/image/f_loading.gif";objLoadingImage.style.position='absolute';_oD.body.appendChild(objLoadingImage);g_overlay=hxj_CreateOverlay();g_overlay.style.filter='alpha(opacity=40)';g_overlay.style.opacity='0.4';g_overlay.style.backgroundColor="#464646";g_overlay.LoadingImage=objLoadingImage;}
if(show){var pageSize=hxj_GetPageSize();var winSize=hxj_GetWindowSize();var ptScroll=hxj_GetScrollXY();var x=max(30,winSize.cx/2-62);var y=max(30,winSize.cy/2-60);x-=ptScroll.x;y+=ptScroll.y;g_overlay.style.width=hxj_MakePixel(pageSize.cx);g_overlay.style.height=hxj_MakePixel(pageSize.cy);g_overlay.style.zIndex=++g_zindex;g_overlay.style.display='block';g_overlay.LoadingImage.style.top=hxj_MakePixel(y);g_overlay.LoadingImage.style.left=hxj_MakePixel(x);g_overlay.LoadingImage.style.zIndex=++g_zindex;g_overlay.LoadingImage.style.display='block';}
else{g_overlay.LoadingImage.style.display='none';g_overlay.style.display='none';}}
function hxj_ExecuteAjax(url,urlparam,isxml,isalert,isdebug){var ajax=new hxjAjax(false);var result=null;hxj_ShowOverlay(true);if(ajax.openURL("POST",url,urlparam)){if(isxml){var xmldom=ajax.response(true);if(xmldom!=null&&xmldom.getElementsByTagName("RESULT_CODE").length>0){result=xmldom;}
else{if(isalert){alert(isdebug?ajax.response():"500 Fail to execute command!!");}}}
else{result=ajax.response();}}
else if(isalert){alert(isdebug?ajax.response():"Fail to open url!!");}
window.setTimeout(function(){hxj_ShowOverlay(false)},750);return result;}
function hxj_BuildParamByForm(frm,sepChar,incHidden,filters){var strGen=new hxjStringBuilder();var arrInput=frm.getElementsByTagName("input");var arrTextArea=frm.getElementsByTagName("textarea");var arrSelect=frm.getElementsByTagName("select");if(hxj_IsNull(sepChar))
sepChar="&";if(hxj_IsNull(incHidden))
incHidden=true;if(hxj_IsNull(filters))
filters=[];for(var i=0;i<arrInput.length;i++){var inptype=arrInput[i].type.toLowerCase();var noparam=hxj_ParseInt(arrInput[i].getAttribute("noparam"));if(inptype=="submit"||inptype=="button"||inptype=="image"){continue;}
else if(inptype=="checkbox"){if(!arrInput[i].checked)
continue;}
else if(inptype=="radio"){if(!arrInput[i].checked)
continue;}
else if(!incHidden&&inptype=="hidden"){continue;}
if(!noparam&&!hxj_IsNull(arrInput[i].name)){var ismatch=false;for(argname in filters){if(filters[argname]==arrInput[i].name){ismatch=true;break;}}
if(!ismatch){if(strGen.size()>0)
strGen.append(sepChar);strGen.append(arrInput[i].name);strGen.append("=");strGen.append(encodeURIComponent(arrInput[i].value));}}}
for(i=0;i<arrTextArea.length;i++){var noparam=hxj_ParseInt(arrTextArea[i].getAttribute("noparam"));if(!noparam&&!hxj_IsNull(arrTextArea[i].name)){if(strGen.size()>0)
strGen.append(sepChar);strGen.append(arrTextArea[i].name);strGen.append("=");strGen.append(encodeURIComponent(arrTextArea[i].value));}}
for(i=0;i<arrSelect.length;i++){var noparam=hxj_ParseInt(arrSelect[i].getAttribute("noparam"));if(!noparam&&!hxj_IsNull(arrSelect[i].name)){if(strGen.size()>0)
strGen.append(sepChar);strGen.append(arrSelect[i].name);strGen.append("=");if(arrSelect[i].selectedIndex>=0){strGen.append(encodeURIComponent(arrSelect[i].options[arrSelect[i].selectedIndex].value));}}}
return strGen.toString();}
function hxj_PrevElement(node,names){var namesAr=names.split(',');while((node=node.previousSibling)!=null){for(var i=0;i<namesAr.length;i++){if(node.nodeName.toLowerCase()==namesAr[i].toLowerCase())
return node;}}
return null;}
function hxj_NextElement(node,names){var namesAr=names.split(',');while((node=node.nextSibling)!=null){for(var i=0;i<namesAr.length;i++){if(node.nodeName.toLowerCase()==namesAr[i].toLowerCase())
return node;}}
return null;}
function hxj_RemoveRow(trNode){var tblNode=hxj_FindParent(trNode,"table");for(var i=0;i<tblNode.rows.length;i++){var row=tblNode.rows[i];if(row==trNode){tblNode.deleteRow(i);break;}}}
function _hxj_DoResize(objChild,contentWidth,nCount){if(!nCount)nCount=0;if(nCount<10){if(!objChild.offsetWidth||!objChild.offsetHeight){setTimeout(function(){_hxj_DoResize(objChild,contentWidth,++nCount)},200);return;}}
if(objChild.offsetWidth>contentWidth){objChild.setAttribute("width", contentWidth); objChild.removeAttribute("height"); if(_oB.isOpera){objChild.style.pixelWidth=contentWidth;}
else{objChild.style.width=hxj_MakePixel(contentWidth);}}
objChild.style.visibility="visible";}
function hxj_ResizeToParent(objChild,bWidth,nCount){var objParent=objChild.parentNode;var dummy=_oD.createElement("div");dummy.style.height="1px";dummy.style.clear="both";objParent.appendChild(dummy);var calcWidth=dummy.offsetWidth;objParent.removeChild(dummy);if(!calcWidth){if(!nCount)nCount=0;if(nCount<10){setTimeout(function(){hxj_ResizeToParent(objChild,bWidth,++nCount)},200);return;}
calcWidth=200;}
_hxj_DoResize(objChild, calcWidth, 0);}
function hxj_ResizeImage(imgObj,maxwidth,maxheight,nCount){var objParent=imgObj.parentNode;var nParentDepth=0;if(hxj_IsNull(nCount))
nCount=0;if(++nCount<10){for(;objParent;objParent=objParent.parentNode){if(objParent.offsetWidth>0||objParent.offsetHeight>0){break;}
if(++nParentDepth>=3){window.setTimeout(function(){hxj_ResizeImage(imgObj,maxwidth,maxheight,nCount);},500);return;}}}
if(!maxwidth)
maxwidth=objParent.offsetWidth;if(!maxheight)
maxheight=objParent.offsetHeight;if(imgObj.offsetWidth>maxwidth||imgObj.offsetHeight>maxheight){if(imgObj.offsetWidth*maxheight>maxwidth*imgObj.offsetHeight){maxheight=(imgObj.offsetHeight*maxwidth)/imgObj.offsetWidth;}
else{maxwidth=(imgObj.offsetWidth*maxheight)/imgObj.offsetHeight;}
if(maxwidth>0&&maxheight>0){maxwidth=maxwidth-(hxj_ParseInt(objParent.style.paddingLeft)+hxj_ParseInt(objParent.style.paddingRight)+2);maxheight=maxheight-(hxj_ParseInt(objParent.style.paddingBottom)+hxj_ParseInt(objParent.style.paddingTop)+2);if(_oB.isOpera){imgObj.style.pixelWidth=maxwidth;imgObj.style.pixelHeight=maxheight;}
else{imgObj.style.width=hxj_MakePixel(maxwidth);imgObj.style.height=hxj_MakePixel(maxheight);}}}
imgObj.style.visibility="visible";}
function hxj_GetImageSize(imgObj,maxwidth,maxheight){if(imgObj.width>maxwidth||imgObj.height>maxheight){if(imgObj.width*maxheight>imgObj.height*maxwidth){maxheight=hxj_ParseInt((imgObj.height*maxwidth)/imgObj.width);}
else{maxwidth=hxj_ParseInt((imgObj.width*maxheight)/imgObj.height);}}
else{maxwidth=imgObj.width;maxheight=imgObj.height;}
return new hxjSize(maxwidth,maxheight);}
function hxj_FadeIn(element,opacity){var reduce_opacity_by=10;var rate=50;opacity+=reduce_opacity_by;if(opacity>100)
opacity=100;if(element.style.visibility!="visible")
element.style.visibility="visible";element.style.filter='alpha(opacity='+opacity+')';element.style.opacity=opacity/100;if(opacity<100){window.setTimeout(function(){hxj_FadeIn(element,opacity);},rate);}
else{if(typeof element.onfadein=='function')
element.onfadein();}}
function hxj_FadeOut(element,opacity){var reduce_opacity_by=10;var rate=50;opacity-=reduce_opacity_by;if(opacity<0)
opacity=0;element.style.filter='alpha(opacity='+opacity+')';element.style.opacity=opacity/100;if(opacity>0){window.setTimeout(function(){hxj_FadeOut(element,opacity);},rate);}
else{element.style.opacity=0;element.style.visibility="hidden";if(typeof element.onfadeout=='function')
element.onfadeout();}}
function hxj_ScrollOut(element,bWestside){var reduce_by=15;var rate=50;if(bWestside){if((element.offsetWidth+element.offsetLeft)>0){element.style.left=hxj_MakePixel(element.offsetLeft-reduce_by);window.setTimeout(function(){hxj_ScrollOut(element,bWestside);},rate);}
else{element.style.visibility="hidden";}}
else{if(element.offsetLeft<element.offsetParent.offsetWidth){element.style.left=hxj_MakePixel(element.offsetLeft+reduce_by);window.setTimeout(function(){hxj_ScrollOut(element,bWestside);},rate);}
else{element.style.visibility="hidden";}}}
function hxj_ScrollIn(element,xstop,bWestside){var reduce_by=15;var rate=50;if(bWestside){if(element.offsetLeft>xstop){if(element.offsetLeft-xstop<=reduce_by)
reduce_by=5;reduce_by=element.offsetLeft-reduce_by;if(reduce_by<xstop)
reduce_by=xstop;element.style.left=hxj_MakePixel(reduce_by);window.setTimeout(function(){hxj_ScrollIn(element,xstop,bWestside);},rate);}}
else{if(element.offsetLeft<xstop){if(element.offsetLeft+xstop>reduce_by)
reduce_by=5;reduce_by=element.offsetLeft+reduce_by;if(reduce_by>xstop)
reduce_by=xstop;element.style.left=hxj_MakePixel(reduce_by);window.setTimeout(function(){hxj_ScrollIn(element,xstop,bWestside);},rate);}}}
function hxj_CancelEvent(e){if(!e)e=window.event;if(typeof e.stopPropagation=='function'){e.stopPropagation();}
else{e.cancelBubble=true;}
return false;}
function hxj_ResizeIFrame(ifrm){var doc,winSize,pageSize;try{var win=ifrm.contentWindow;if(win==null)
win=ifrm;doc=win.document;winSize=hxj_GetWindowSize(win,doc);pageSize=hxj_GetPageSize(doc);}
catch(e){winSize=hxj_GetWindowSize();pageSize=hxj_GetPageSize();}
finally{if(winSize!=null&&pageSize!=null){if(winSize.cx<pageSize.cx){ifrm.style.width=hxj_MakePixel(pageSize.cx+20);}
if(winSize.cy<pageSize.cy){ifrm.style.height=hxj_MakePixel(pageSize.cy+20);}}}}
function hxj_GetContentType(val){var fileExt=val.substring(val.lastIndexOf("."));var conttype="unknown";switch(fileExt.toLowerCase()){case".avi":case".wm":case".wmv":case".wmx":case".wmd":case".wmp":case".wmz":case".wvx":case".wpl":case".mpeg":case".mpe":case".mpg":case".mpv2":case".mp2v":case".mp4":case".m1v":case".m2v":case".m4v":case".asf":case".asx":case".divx":conttype="video";break;case".swf":case".flv":conttype="flash";break;case".mov":case".mqv":conttype="quicktime";break;case".cda":case".mid":case".mp1":case".mp2":case".mp3":case".mpa":case".mpga":case".wav":case".wax":case".wma":conttype="audio";break;case".bmp":case".gif":case".jbg":case".jpe":case".jpg":case".jpeg":case".tiff":case".tif":case".pcd":case".pcx":case".pct":case".pbm":case".pgm":case".png":case".tga":case".emf":case".wmf":conttype="image";break;}
return conttype;}
/** balloon.js **/
var JS_BALLOON=true;var imagesDir=_SVR_+"/jslib/balloon/image/";var g_balloon=null;function hxjBalloon(){this.autoHideInterval=4000;this.autoHideInterval2=1000;this.showFilter="progid:DXImageTransform.Microsoft.Fade(Overlap=1.00)";this.hideFilter="progid:DXImageTransform.Microsoft.Fade(Overlap=1.00)";this.balloonDIV=_oD.createElement("DIV");this.balloonDIV.style.position="absolute";this.balloonDIV.style.display="block";this.balloonDIV.style.visibility="hidden";this.balloonDIV.style.width="200px";_oD.body.appendChild(this.balloonDIV);this.show=function(evt,args){var szWin=hxj_GetWindowSize();var ptScroll=hxj_GetScrollXY();var evtobj=window.event?window.event:evt;var strBalloon=this._makeBalloon(args);var direction="";if(!hxj_IsNull(args.width))
this.balloonDIV.style.width=hxj_MakePixel(args.width);var x=evtobj.clientX;var y=evtobj.clientY;x-=ptScroll.x;y+=ptScroll.y;this.balloonDIV.style.left=x;this.balloonDIV.style.top=y;this.balloonDIV.innerHTML=strBalloon;if(y-(this.balloonDIV.offsetHeight+6)>ptScroll.y){direction='S';y-=(this.balloonDIV.offsetHeight+6);}
else{direction='N';y+=8;}
if(szWin.cx+ptScroll.x<x+this.balloonDIV.offsetWidth+15){direction+='W';x-=(this.balloonDIV.offsetWidth-15);}
else{direction+='E';x-=15;}
this.balloonDIV.style.left=hxj_MakePixel(x);this.balloonDIV.style.top=hxj_MakePixel(y);this._initBalloon(direction);if(_oB.isIE){this.balloonDIV.style.filter=this.showFilter+' '+this.hideFilter;this.balloonDIV.filters(0).Apply();hxj_ShowObject(this.balloonDIV,true);this.balloonDIV.filters(0).Play();}
else{hxj_ShowObject(this.balloonDIV,true);}
this._setTimer(this.autoHideInterval);}
this.hide=function(){if(_oB.isIE){this.balloonDIV.filters(1).Apply();hxj_ShowObject(this.balloonDIV,false);this.balloonDIV.filters(1).Play();}
else{hxj_ShowObject(this.balloonDIV,false);}}
this.findElement=function(tag,name){var arrElm=this.balloonDIV.getElementsByTagName(tag);for(var i=0;i<arrElm.length;i++){if(arrElm[i].id==name)
return arrElm[i];if(arrElm[i].name==name)
return arrElm[i];}
return null;}
this._makeBalloon=function(args){var strGen=new hxjStringBuilder();var icon="";var title="";var message="";var clssName="";var footer="";if(!hxj_IsNull(args.title))
title=args.title;if(!hxj_IsNull(args.message)){message=args.message;}
else if(!hxj_IsNull(args.target)){var target=hxj_FindObject(args.target);message=target.innerHTML;clssName=target.className;}
if(!hxj_IsNull(args.icon)){icon=args.icon;switch(icon){case'Exclaim':icon=imagesDir+'exclaim.ico';break;case'Stop':icon=imagesDir+'stop.ico';break;case'Help':icon=imagesDir+'help.ico';break;default:icon=imagesDir+'info.ico';}}
if(!hxj_IsNull(args.footer))
footer=args.footer;if(!hxj_IsNull(args.showCloseBox)){this.showCloseBox=args.showCloseBox;}
else{this.showCloseBox=true;}
if(!hxj_IsNull(args.autoHide)){this.autoHide=eval(args.autoHide);}
else{this.autoHide=true;}
var iconVisible=(icon!='')?"block":"none";var closeVisible=(this.showCloseBox)?"block":"none";var footerVisible=(footer!='')?true:false;var headerVisible=true;if(title==""&&iconVisible=="none"&&closeVisible=="none"){headerVisible=false;}
strGen.append('<table border="0" width="100%" cellpadding="0" cellspacing="0" style="table-layout:fixed;border-collapse:collapse" class="'+clssName+'">\r\n');strGen.append('<tr height="18">\r\n');strGen.append('  <td width="8"></td>\r\n');strGen.append('  <td id="arrowNE" width="67" style="font-size:1px;border-bottom:1px solid #9F9F9E;">&nbsp;</td>\r\n');strGen.append('  <td style="font-size:1px;border-bottom:1px solid #9F9F9F;">&nbsp;</td>\r\n');strGen.append('  <td id="arrowNW" width="67" style="font-size:1px;border-bottom:1px solid #9F9F9E;">&nbsp;</td>\r\n');strGen.append('  <td width="8"></td>\r\n');strGen.append('</tr>\r\n');strGen.append('<tr height="8">\r\n');strGen.append(' <td width="8" height="8" style="font-size:1px;">\r\n');strGen.append('    <img border="0" src="'+imagesDir+'cLeftTop.gif" width="8" height="8"/>\r\n');strGen.append(' </td>\r\n');strGen.append(' <td colspan="3" height="8" style="font-size:1px;background-color: #FFFFEA"></td>\r\n');strGen.append(' <td align="right" width="8" height="8" style="font-size:1px;">\r\n');strGen.append('    <img border="0" src="'+imagesDir+'cRightTop.gif" width="8" height="8"/>\r\n');strGen.append(' </td>\r\n');strGen.append('</tr>\r\n');strGen.append('<tr>\r\n');strGen.append('  <td valign=top colspan="5" style="padding:1px 4px;border-left:1px solid #9F9F9E; border-right:1px solid #9F9F9E; background-color: #FFFFEA">\r\n');strGen.append('  <table border="0" width="100%" cellpadding="0" cellspacing="0" style="table-layout:fixed;cursor:default;border-collapse: collapse; ">\r\n');if(headerVisible){strGen.append('  <tr height="20" valign="top">\r\n');strGen.append('     <td id="BIcon" width="24" align="left" style="font-size:1px;padding-left:2px;padding-right:4px;"><img src="'+icon+'" style="display:'+iconVisible+'"/></td>\r\n');strGen.append('        <td id="BTitle" UNSELECTABLE="on" align="left" style="font-weight:bold;">'+title+'</td>\r\n');strGen.append('        <td id="BClose" width="18" align="right" style="font-size:1px;padding-right:4px;"><img src="'+imagesDir+'close.jpg" style="display:'+closeVisible+'"  onmouseover="this.src=\''+imagesDir+'closeActive.jpg\'" onmouseout="this.src=\''+imagesDir+'close.jpg\'" onmouseup="this.src=\''+imagesDir+'closeActive.jpg\'" onmousedown="this.src=\''+imagesDir+'closeDown.jpg\'" title="Close"/>&nbsp;</td>\r\n');strGen.append('    </tr>\r\n');}
strGen.append('    <tr>\r\n');strGen.append('     <td id="BBody" UNSELECTABLE="on" colspan="3">'+message+'</td>\r\n');strGen.append('    </tr>\r\n');if(footerVisible){strGen.append('    <tr>\r\n');strGen.append('        <td id="BFooter" UNSELECTABLE="on" colspan="3">'+footer+'</td>\r\n');strGen.append('    </tr>\r\n');}
strGen.append('  </table>\r\n');strGen.append(' </td>\r\n');strGen.append('</tr>\r\n');strGen.append('<tr height="8">\r\n');strGen.append(' <td width="8" height="8" style="font-size:1px;">\r\n');strGen.append('    <img border="0" src="'+imagesDir+'cLeftBottom.gif" width="8" height="8"/>\r\n');strGen.append(' </td>\r\n');strGen.append(' <td colspan="3" height="8" style="font-size:1px;background-color: #FFFFEA"></td>\r\n');strGen.append(' <td align="right" width="8" height="8" style="font-size:1px;">\r\n');strGen.append('    <img border="0" src="'+imagesDir+'cRightBottom.gif" width="8" height="8"/>\r\n');strGen.append(' </td>\r\n');strGen.append('</tr>\r\n');strGen.append('<tr height="18">\r\n');strGen.append('   <td width="8"></td>\r\n');strGen.append('   <td id="arrowSE" width="67" style="font-size:1px;border-top:1px solid #9F9F9E;">&nbsp;</td>\r\n');strGen.append('   <td style="font-size:1px;border-top:1px solid #9F9F9F;">&nbsp;</td>\r\n');strGen.append('   <td id="arrowSW" width="67" style="font-size:1px;border-top:1px solid #9F9F9E;">&nbsp;</td>\r\n');strGen.append('   <td width="8"></td>\r\n');strGen.append('</tr>\r\n');strGen.append('</table>\r\n');return strGen.toString();}
this._initBalloon=function(direction){var objTD=hxj_FindObject("arrow"+direction);var objClose=hxj_FindObject("BClose");switch(direction){case'SE':objTD.style.borderTop="none";objTD.innerHTML='<img border="0" src="'+imagesDir+'aSouthEast.gif" width="67" height="18"/>';break;case'NE':objTD.style.borderBottom="none";objTD.innerHTML='<img border="0" src="'+imagesDir+'aNorthEast.gif" width="67" height="18"/>';break;case'SW':objTD.style.borderTop="none";objTD.innerHTML='<img border="0" src="'+imagesDir+'aSouthWest.gif" width="67" height="18"/>';break;case'NW':objTD.style.borderBottom="none";objTD.innerHTML='<img border="0" src="'+imagesDir+'aNorthWest.gif" width="67" height="18"/>';break;}
if(objClose)
objClose.onclick=function(){g_balloon.hide();}}
this._setTimer=function(waitsec){if(this.autoHide){this._clearTimer();this._timerID=window.setTimeout("g_balloon.hide()",waitsec);}}
this._clearTimer=function(){window.clearTimeout(this._timerID);}}
function initBalloon(){g_balloon=new hxjBalloon();g_balloon.balloonDIV.onmouseover=function(){g_balloon._clearTimer();}
g_balloon.balloonDIV.onmouseout=function(){g_balloon._setTimer(g_balloon.autoHideInterval2);}}

/** dragdrop.js **/
var DomDrag={obj:null,init:function(o,oRoot,oContent,minX,maxX,minY,maxY,bSwapHorzRef,bSwapVertRef,fXMapper,fYMapper)
{o.onmousedown=DomDrag.start;o.hmode=bSwapHorzRef?false:true;o.vmode=bSwapVertRef?false:true;o.root=oRoot&&oRoot!=null?oRoot:o;o.content=oContent;o.minX=typeof minX!='undefined'?minX:null;o.minY=typeof minY!='undefined'?minY:null;o.maxX=typeof maxX!='undefined'?maxX:null;o.maxY=typeof maxY!='undefined'?maxY:null;o.xMapper=fXMapper?fXMapper:null;o.yMapper=fYMapper?fYMapper:null;o.root.onDomDragStart=new Function();o.root.onDomDragEnd=new Function();o.root.onDomDrag=new Function();},start:function(e)
{var o=DomDrag.obj=this;e=DomDrag.fixE(e);var y=parseInt(o.vmode?o.root.style.top:o.root.style.bottom);var x=parseInt(o.hmode?o.root.style.left:o.root.style.right);o.root.onDomDragStart(x,y);if(o.content!=null)
o.content.style.visibility="hidden";o.lastMouseX=e.clientX;o.lastMouseY=e.clientY;if(o.hmode){if(o.minX!=null)o.minMouseX=e.clientX-x+o.minX;if(o.maxX!=null)o.maxMouseX=o.minMouseX+o.maxX-o.minX;}else{if(o.minX!=null)o.maxMouseX=-o.minX+e.clientX+x;if(o.maxX!=null)o.minMouseX=-o.maxX+e.clientX+x;}
if(o.vmode){if(o.minY!=null)o.minMouseY=e.clientY-y+o.minY;if(o.maxY!=null)o.maxMouseY=o.minMouseY+o.maxY-o.minY;}else{if(o.minY!=null)o.maxMouseY=-o.minY+e.clientY+y;if(o.maxY!=null)o.minMouseY=-o.maxY+e.clientY+y;}
document.onmousemove=DomDrag.drag;document.onmouseup=DomDrag.end;return false;},drag:function(e)
{e=DomDrag.fixE(e);var o=DomDrag.obj;var ey=e.clientY;var ex=e.clientX;var y=parseInt(o.vmode?o.root.style.top:o.root.style.bottom);var x=parseInt(o.hmode?o.root.style.left:o.root.style.right);var nx,ny;if(o.minX!=null)ex=o.hmode?Math.max(ex,o.minMouseX):Math.min(ex,o.maxMouseX);if(o.maxX!=null)ex=o.hmode?Math.min(ex,o.maxMouseX):Math.max(ex,o.minMouseX);if(o.minY!=null)ey=o.vmode?Math.max(ey,o.minMouseY):Math.min(ey,o.maxMouseY);if(o.maxY!=null)ey=o.vmode?Math.min(ey,o.maxMouseY):Math.max(ey,o.minMouseY);nx=x+((ex-o.lastMouseX)*(o.hmode?1:-1));ny=y+((ey-o.lastMouseY)*(o.vmode?1:-1));if(o.xMapper)nx=o.xMapper(y)
else if(o.yMapper)ny=o.yMapper(x)
if(nx<=0||ny<=0)
return false;DomDrag.obj.root.style[o.hmode?"left":"right"]=nx+"px";DomDrag.obj.root.style[o.vmode?"top":"bottom"]=ny+"px";DomDrag.obj.lastMouseX=ex;DomDrag.obj.lastMouseY=ey;DomDrag.obj.root.onDomDrag(nx,ny);return false;},end:function()
{document.onmousemove=null;document.onmouseup=null;if(DomDrag.obj.content!=null)
DomDrag.obj.content.style.visibility="visible";DomDrag.obj.root.onDomDragEnd(parseInt(DomDrag.obj.root.style[DomDrag.obj.hmode?"left":"right"]),parseInt(DomDrag.obj.root.style[DomDrag.obj.vmode?"top":"bottom"]));DomDrag.obj=null;},fixE:function(e)
{if(typeof e=='undefined')e=window.event;if(typeof e.layerX=='undefined')e.layerX=e.offsetX;if(typeof e.layerY=='undefined')e.layerY=e.offsetY;return e;}};var Coordinates={ORIGIN:new Coordinate(0,0),northwestPosition:function(element){var x=parseInt(element.style.left);var y=parseInt(element.style.top);x=isNaN(x)?0:x;y=isNaN(y)?0:y;return new Coordinate(x,y);},southeastPosition:function(element){return Coordinates.northwestPosition(element).plus(new Coordinate(element.offsetWidth,element.offsetHeight));},northwestOffset:function(element,isRecursive){var x=element.offsetLeft;var y=element.offsetTop;if(!isRecursive)
return new Coordinate(x,y);var obj=element.offsetParent;while(obj){x+=obj.offsetLeft;y+=obj.offsetTop;obj=obj.offsetParent;}
return new Coordinate(x,y);},southeastOffset:function(element,isRecursive){return Coordinates.northwestOffset(element,isRecursive).plus(new Coordinate(element.offsetWidth,element.offsetHeight));},centerOffset:function(northwest,southeast){var x=northwest.x+((southeast.x-northwest.x)/2);var y=northwest.y+((southeast.y-northwest.y)/2);return new Coordinate(x,y);},overlapOffset:function(nw,se,targetnw,targetse,findContainer){if(findContainer!=null)
return Coordinates.overlapOffset2(nw,se,targetnw,targetse);if(nw.inside(targetnw,targetse))
return true;if(se.inside(targetnw,targetse))
return true;var ne=new Coordinate(se.x,nw.y);if(ne.inside(targetnw,targetse))
return true;var sw=new Coordinate(nw.x,se.y);if(sw.inside(targetnw,targetse))
return true;return false;},overlapOffset2:function(nw,se,targetnw,targetse){if(nw.inside(targetnw,targetse))
return true;var ct=new Coordinate(nw.x,nw.y+((se.y-nw.y)/2));if(ct.inside(targetnw,targetse))
return true;var sw=new Coordinate(nw.x,se.y);if(sw.inside(targetnw,targetse))
return true;return false;},fixEvent:function(event){event.windowCoordinate=new Coordinate(event.clientX,event.clientY);}};function Coordinate(x,y){this.x=x;this.y=y;}
Coordinate.prototype.toString=function(){return"("+this.x+","+this.y+")";}
Coordinate.prototype.plus=function(that){return new Coordinate(this.x+that.x,this.y+that.y);}
Coordinate.prototype.minus=function(that){return new Coordinate(this.x-that.x,this.y-that.y);}
Coordinate.prototype.distance=function(that){var deltaX=this.x-that.x;var deltaY=this.y-that.y;return Math.sqrt(Math.pow(deltaX,2)+Math.pow(deltaY,2));}
Coordinate.prototype.max=function(that){var x=Math.max(this.x,that.x);var y=Math.max(this.y,that.y);return new Coordinate(x,y);}
Coordinate.prototype.constrain=function(min,max){if(min.x>max.x||min.y>max.y)return this;var x=this.x;var y=this.y;if(min.x!=null)x=Math.max(x,min.x);if(max.x!=null)x=Math.min(x,max.x);if(min.y!=null)y=Math.max(y,min.y);if(max.y!=null)y=Math.min(y,max.y);return new Coordinate(x,y);}
Coordinate.prototype.reposition=function(element){element.style["top"]=this.y+"px";element.style["left"]=this.x+"px";}
Coordinate.prototype.equals=function(that){if(this==that)return true;if(!that||that==null)return false;return this.x==that.x&&this.y==that.y;}
Coordinate.prototype.inside=function(northwest,southeast){if((this.x>=northwest.x)&&(this.x<=southeast.x)&&(this.y>=northwest.y)&&(this.y<=southeast.y)){return true;}
return false;}
var DragDrop={firstContainer:null,lastContainer:null,dummyContainer:null,makeListContainer:function(list){if(list.isinit)
return;if(this.firstContainer==null){this.firstContainer=this.lastContainer=list;list.previousContainer=null;list.nextContainer=null;}
else{list.previousContainer=this.lastContainer;list.nextContainer=null;this.lastContainer.nextContainer=list;this.lastContainer=list;}
if(this.dummyContainer==null){this.dummyContainer=document.createElement("UL");this.dummyContainer.style.width="200px";this.dummyContainer.className="sortable";this.dummyContainer.onItemOver=new Function();this.dummyContainer.onItemOut=new Function();this.dummyContainer.onDragOver=new Function();this.dummyContainer.onDragOut=new Function();this.dummyContainer.onDragEnd=new Function();document.body.appendChild(this.dummyContainer);}
list.onItemOver=new Function();list.onItemOut=new Function();list.onDragOver=new Function();list.onDragOut=new Function();list.onDragEnd=new Function();list.isSwaped=false;list.isAcceptOthers=true;if(!hxj_IsNull(list.getAttribute("acceptOthers")))
list.isAcceptOthers=eval(list.getAttribute("acceptOthers"));var items=list.childNodes;for(var i=0;i<items.length;i++){if(items[i].nodeName.toLowerCase()=="li"){DragDrop.makeItemDragable(items[i]);items[i].hasgrip=eval(list.getAttribute("hasgrip"));if(!hxj_IsNull(list.getAttribute("hasctrl")))
items[i].hasctrl=eval(list.getAttribute("hasctrl"));if(!hxj_IsNull(list.getAttribute("hasfilter")))
items[i].hasfilter=eval(list.getAttribute("hasfilter"));if(!hxj_IsNull(list.getAttribute("dropInner")))
items[i].isCanDropInner=eval(list.getAttribute("dropInner"));}}
list.isinit=true;},makeItemDragable:function(item){Drag.makeDraggable(item);item.setDragThreshold(5);item.isOutside=false;item.hasgrip=false;item.hasctrl=true;item.hasfilter=true;item.isCanDropInner=true;item.onItemOver=DragDrop.onItemOver;item.onItemOut=DragDrop.onItemOut;item.onDragStart=DragDrop.onDragStart;item.onDrag=DragDrop.onDrag;item.onDragEnd=DragDrop.onDragEnd;},calcCoordinateOffset:function(){var container=DragDrop.firstContainer;while(container!=null){container.northwest=Coordinates.northwestOffset(container,true);container.southeast=Coordinates.southeastOffset(container,true);if((container.southeast.y-container.northwest.y)<10){container.southeast.y+=10;}
else{container.southeast.y+=20;}
container=container.nextContainer;}},hideChild:function(item){item.oldBorder=item.style.border;item.style.border="1px solid #696969";item.oldBgColor=item.style.backgroundColor;item.style.backgroundColor="#A6A6A6";item.style.height="30px";var children=item.childNodes;for(var i=0;i<children.length;i++){var cnode=children[i];if(cnode.className!="grip"&&cnode.style!=null&&cnode.tagName.toLowerCase()!="style"){cnode.style.display="none";}}},showChild:function(item){var fixedwidth=hxj_ParseInt(item.getAttribute("fixedwidth"));item.style.width=(fixedwidth>0)?hxj_MakePixel(fixedwidth):"100%";item.style.height="auto";item.style.border=item.oldBorder;item.style.backgroundColor=item.oldBgColor;item.minimized=false;var children=item.childNodes;for(var i=0;i<children.length;i++){var cnode=children[i];if(cnode.className!="grip"&&cnode.style!=null&&cnode.tagName.toLowerCase()!="style"){cnode.style.display="block";}}},onItemOver:function(item){this.parentNode.onItemOver(item);},onItemOut:function(item){this.parentNode.onItemOut(item);},onDragStart:function(nwPosition,sePosition,nwOffset,seOffset){this.oldParent=this.parentNode;this.nextNode=this.nextSibling;this.isOutside=false;if(this.hasgrip){this.style.width="200px";if(!this.minimized){DragDrop.hideChild(this);}}
this.parentNode.isSwaped=false;this.parentNode.onDragOver();DragDrop.calcCoordinateOffset();},onDrag:function(nwPosition,sePosition,nwOffset,seOffset){var centerOffset=Coordinates.centerOffset(nwOffset,seOffset);var xoffset=(centerOffset.x-nwOffset.x)/2;var yoffset=(centerOffset.y-nwOffset.y)/2;var calcNwOffset=new Coordinate(centerOffset.x-xoffset,centerOffset.y-yoffset);var calcSeOffset=new Coordinate(centerOffset.x+xoffset,centerOffset.y+yoffset);var isOutside=this.isOutside;var isSwaped=false;var isDropInner=false;if(isOutside||!Coordinates.overlapOffset(calcNwOffset,calcSeOffset,this.parentNode.northwest,this.parentNode.southeast)){this.parentNode.onDragOut();this.isOutside=true;var findContainer=null;var container=DragDrop.firstContainer;while(container!=null){if(container!=this.parentNode&&Coordinates.overlapOffset(calcNwOffset,calcSeOffset,container.northwest,container.southeast,findContainer)){if(!container.isAcceptOthers){if(this.originalParent!=container){container=container.nextContainer;continue;}}
if(!hxj_FindParentByHandle(container,this)){findContainer=container;}}
container=container.nextContainer;}
if(findContainer!=null){findContainer.onDragOver();this.isOutside=false;this.parentNode.removeChild(this);this.originalParent=null;findContainer.appendChild(this);findContainer.isSwaped=isSwaped=true;DragDrop.calcCoordinateOffset();}}
else if(this.isCanDropInner){if(_oB.isIE)
nwOffset.x-=40;var uls=this.parentNode.getElementsByTagName("ul");for(var i=0;i<uls.length;i++){var container=uls[i];if(container.getAttribute("rel")=="dragdrop"){if(!hxj_FindParentByHandle(container,this)&&Coordinates.overlapOffset2(nwOffset,seOffset,container.northwest,container.southeast)){container.onDragOver();this.parentNode.onDragOut();this.parentNode.removeChild(this);container.appendChild(this);container.isSwaped=isSwaped=true;isDropInner=true;DragDrop.calcCoordinateOffset();break;}}}}
if(this.isOutside){if(!isOutside){this.originalParent=this.parentNode;this.parentNode.removeChild(this);DragDrop.dummyContainer.appendChild(this);DragDrop.calcCoordinateOffset();}
return;}
if(!isSwaped){var item=this;var next=DragUtils.nextItem(item);while(next!=null&&this.offsetTop>=next.offsetTop+2){item=next;next=DragUtils.nextItem(item);}
if(this!=item){DragUtils.swap(item,this);return;}
var item=this;var previous=DragUtils.previousItem(item);while(previous!=null&&this.offsetTop<=previous.offsetTop-2){item=previous;previous=DragUtils.previousItem(item);}
if(this!=item){DragUtils.swap(this,item);return;}}
return isDropInner;},onDragEnd:function(nwPosition,sePosition,nwOffset,seOffset){if(this.isOutside){this.parentNode.removeChild(this);this.oldParent.insertBefore(this,this.nextNode);this.oldParent.isSwaped=false;}
this.style["top"]="0px";this.style["left"]="0px";if(this.hasgrip){DragDrop.showChild(this);}
this.parentNode.onDragOut();this.parentNode.onDragEnd(this);}};var DragUtils={swap:function(item1,item2){var parent=item1.parentNode;parent.removeChild(item1);parent.insertBefore(item1,item2);parent.isSwaped=true;item1.style["top"]="0px";item1.style["left"]="0px";},nextItem:function(item){var sibling=item.nextSibling;while(sibling!=null){if(sibling.nodeName==item.nodeName)return sibling;sibling=sibling.nextSibling;}
return null;},previousItem:function(item){var sibling=item.previousSibling;while(sibling!=null){if(sibling.nodeName==item.nodeName)return sibling;sibling=sibling.previousSibling;}
return null;}};var Drag={BIG_Z_INDEX:10000,group:null,isDragging:false,makeDraggable:function(group){group.handle=group;group.handle.group=group;group.minX=null;group.minY=null;group.maxX=null;group.maxY=null;group.threshold=0;group.thresholdY=0;group.thresholdX=0;group.onItemOver=new Function();group.onItemOut=new Function();group.onDragStart=new Function();group.onDragEnd=new Function();group.onDrag=new Function();group.setDragHandle=Drag.setDragHandle;group.setDragThreshold=Drag.setDragThreshold;group.setDragThresholdX=Drag.setDragThresholdX;group.setDragThresholdY=Drag.setDragThresholdY;group.constrain=Drag.constrain;group.constrainVertical=Drag.constrainVertical;group.constrainHorizontal=Drag.constrainHorizontal;group.onmouseover=Drag.onMouseOver;group.onmouseout=Drag.onMouseLeave;group.onmousedown=Drag.onMouseDown;},constrainVertical:function(){var nwOffset=Coordinates.northwestOffset(this,true);this.minX=nwOffset.x;this.maxX=nwOffset.x;},constrainHorizontal:function(){var nwOffset=Coordinates.northwestOffset(this,true);this.minY=nwOffset.y;this.maxY=nwOffset.y;},constrain:function(nwPosition,sePosition){this.minX=nwPosition.x;this.minY=nwPosition.y;this.maxX=sePosition.x;this.maxY=sePosition.y;},setDragHandle:function(handle){if(handle&&handle!=null)
this.handle=handle;else
this.handle=this;this.handle.group=this;this.onmousedown=null;this.handle.onmousedown=Drag.onMouseDown;},setDragThreshold:function(threshold){if(isNaN(parseInt(threshold)))return;this.threshold=threshold;},setDragThresholdX:function(threshold){if(isNaN(parseInt(threshold)))return;this.thresholdX=threshold;},setDragThresholdY:function(threshold){if(isNaN(parseInt(threshold)))return;this.thresholdY=threshold;},onMouseOver:function(event){var group=this.group;event=Drag.fixEvent(event);group.onItemOver(this);},onMouseLeave:function(event){var group=this.group;event=Drag.fixEvent(event);group.onItemOut(this);},onMouseDown:function(event){event=Drag.fixEvent(event);Drag.group=this.group;if(event.target.nodeName.toUpperCase()=="INPUT"){return true;}
if(this.hasgrip){if(event.target.className.toLowerCase()!="grip"){if(typeof event.stopPropagation=='function'){event.stopPropagation();}
else{event.cancelBubble=true;}
return false;}}
else if(this.hasfilter){if(event.target.getAttribute("rel")=="nodrag"||event.target.nodeName.toUpperCase()=="A"||event.target.parentNode.nodeName.toUpperCase()=="A"){if(typeof event.stopPropagation=='function'){event.stopPropagation();}
else{event.cancelBubble=true;}
return false;}}
if(this.hasctrl&&!event.ctrlKey){if(typeof event.stopPropagation=='function'){event.stopPropagation();}
else{event.cancelBubble=true;}
if(this.minimized){DragDrop.showChild(this);}
return false;}
var group=this.group;var mouse=event.windowCoordinate;var nwOffset=Coordinates.northwestOffset(group,true);var nwPosition=Coordinates.northwestPosition(group);var sePosition=Coordinates.southeastPosition(group);var seOffset=Coordinates.southeastOffset(group,true);group.originalOpacity=group.style.opacity;group.originalZIndex=group.style.zIndex;group.initialWindowCoordinate=mouse;group.dragCoordinate=mouse;Drag.showStatus(mouse,nwPosition,sePosition,nwOffset,seOffset);group.onDragStart(nwPosition,sePosition,nwOffset,seOffset);if(group.minX!=null)
group.minMouseX=mouse.x-nwPosition.x+
group.minX-nwOffset.x;if(group.maxX!=null)
group.maxMouseX=group.minMouseX+group.maxX-group.minX;if(group.minY!=null)
group.minMouseY=mouse.y-nwPosition.y+
group.minY-nwOffset.y;if(group.maxY!=null)
group.maxMouseY=group.minMouseY+group.maxY-group.minY;group.mouseMin=new Coordinate(group.minMouseX,group.minMouseY);group.mouseMax=new Coordinate(group.maxMouseX,group.maxMouseY);document.onmousemove=Drag.onMouseMove;document.onmouseup=Drag.onMouseUp;if(typeof event.stopPropagation=='function'){event.stopPropagation();}
else{event.cancelBubble=true;}
return false;},showStatus:function(mouse,nwPosition,sePosition,nwOffset,seOffset){},onMouseMove:function(event){event=Drag.fixEvent(event);var group=Drag.group;var mouse=event.windowCoordinate;var nwOffset=Coordinates.northwestOffset(group,true);var nwPosition=Coordinates.northwestPosition(group);var sePosition=Coordinates.southeastPosition(group);var seOffset=Coordinates.southeastOffset(group,true);Drag.showStatus(mouse,nwPosition,sePosition,nwOffset,seOffset);if(!Drag.isDragging){if(group.threshold>0){var distance=group.initialWindowCoordinate.distance(mouse);if(distance<group.threshold)return true;}else if(group.thresholdY>0){var deltaY=Math.abs(group.initialWindowCoordinate.y-mouse.y);if(deltaY<group.thresholdY)return true;}else if(group.thresholdX>0){var deltaX=Math.abs(group.initialWindowCoordinate.x-mouse.x);if(deltaX<group.thresholdX)return true;}
Drag.isDragging=true;group.style["zIndex"]=Drag.BIG_Z_INDEX;group.style["opacity"]=0.75;}
var adjusted=mouse.constrain(group.mouseMin,group.mouseMax);nwPosition=nwPosition.plus(adjusted.minus(group.dragCoordinate));nwPosition.reposition(group);group.dragCoordinate=adjusted;var offsetBefore=Coordinates.northwestOffset(group,true);var isDropInner=group.onDrag(nwPosition,sePosition,nwOffset,seOffset);var offsetAfter=Coordinates.northwestOffset(group,true);if(!offsetBefore.equals(offsetAfter)){var errorDelta=offsetBefore.minus(offsetAfter);var nwPosition=Coordinates.northwestPosition(group);nwPosition=nwPosition.plus(errorDelta);nwPosition.reposition(group);}
if(typeof event.stopPropagation=='function'){event.stopPropagation();}
else{event.cancelBubble=true;}
return false;},onMouseUp:function(event){event=Drag.fixEvent(event);var group=Drag.group;var mouse=event.windowCoordinate;var nwOffset=Coordinates.northwestOffset(group,true);var nwPosition=Coordinates.northwestPosition(group);var sePosition=Coordinates.southeastPosition(group);var seOffset=Coordinates.southeastOffset(group,true);document.onmousemove=null;document.onmouseup=null;group.onDragEnd(nwPosition,sePosition,nwOffset,seOffset);if(Drag.isDragging){group.style["zIndex"]=group.originalZIndex;group.style["opacity"]=group.originalOpacity;}
Drag.group=null;Drag.isDragging=false;if(typeof event.stopPropagation=='function'){event.stopPropagation();}
else{event.cancelBubble=true;}
return false;},fixEvent:function(event){if(typeof event=='undefined')event=window.event;if(event.srcElement)event.target=event.srcElement;if(event.which)event.keyCode=event.which;if(event.keyCode==17)event.ctrlKey=true;if(event.keyCode==18)event.altKey=true;Coordinates.fixEvent(event);return event;}};

/** gallery.js **/
var JS_IMGGALLERY=true;var g_GalleryImageDir=_SVR_+"/jslib/imggallery/image/";function hxjImageGallery(){this.getCaption=function(){return hxj_FindObject(this.id+'_Caption_ID');}
this.getImage=function(){return hxj_FindObject(this.id+'_Image_ID');}
this.getImageLink=function(){return hxj_FindObject(this.id+'_Image_Link');}
this.getImageHolder=function(){return hxj_FindObject(this.id+'_Image_Holder');}
this.getGalleryHolder=function(){return hxj_FindObject(this.id+'_Gallery_Holder');}
this.getNavButton=function(){return hxj_FindObject(this.id+'_Image_Nav');}
this.init=function(gallery,id){var defWidth=420;var defHeight=300;this.id=id;this.objName=this.id+'_Object';this.imageIndex=-1;this.bIsResume=false;this.slideEffect="fade";this.currentImage=null;this.interval=6000;this.imagePreloader=new Array();this.galleryWidth=hxj_ParseInt(gallery.style.width);this.galleryHeight=hxj_ParseInt(gallery.style.height);this.galleryAlign=gallery.parentNode.style.textAlign;this.galleryBgcolor=gallery.style.backgroundColor;this.galleryOffset=hxj_ParseInt(hxj_SafeValue(gallery.getAttribute("goffset"),0));this.thumbnailWidth=hxj_ParseInt(hxj_SafeValue(gallery.getAttribute("tnwidth"),131));this.thumbnailHeight=hxj_ParseInt(hxj_SafeValue(gallery.getAttribute("tnheight"),131));this.slideStyle=hxj_ParseInt(gallery.getAttribute("slidestyle"));this.hasNavBtn=hxj_IsTrue(gallery.getAttribute("hasnavbtn"));this.hasLightbox=hxj_IsTrue(gallery.getAttribute("haslightbox"));this.hasBorder=hxj_IsTrue(gallery.getAttribute("gborder"));this.noimgresize=hxj_IsTrue(gallery.getAttribute("noimgresize"));this.args=unescape(gallery.getAttribute("descref"));this.mainBgImage=gallery.getAttribute("mainbgimg");this.mainLinkText=gallery.getAttribute("bglinktext");this.mainLinkURL=gallery.getAttribute("bgtargeturl");this.mainOpenNew=hxj_IsTrue(gallery.getAttribute("bgopennew"));if(this.galleryWidth<=0){if(gallery.parentNode.offsetWidth>0){this.galleryWidth=gallery.parentNode.offsetWidth;}
else{this.galleryWidth=defWidth;}}
else if(gallery.parentNode.offsetWidth>0){if(this.galleryWidth>gallery.parentNode.offsetWidth)
this.galleryWidth=gallery.parentNode.offsetWidth;}
if(this.galleryHeight<=0)
this.galleryHeight=defHeight;if(this.hasBorder)
this.galleryOffset+=6;if(hxj_IsNull(this.galleryBgcolor))
this.galleryBgcolor="#4F4F4F";if(hxj_IsNull(this.galleryAlign))
this.galleryAlign="center";if(this.slideStyle==1){this.slideEffect="scroll";this.galleryWidth+=10;this.galleryHeight+=10;this.interval=3500;}
if(this.args!=null){var it=this.args.split("##");for(var a=0;a<it.length;a++){it[a]=it[a].trim();if(it[a].length>0){var imgPreloader=new Image();var sp=it[a].split("|");if(sp.length>=5){imgPreloader.imgName=sp[0].trim();imgPreloader.imgCaption=sp[1].trim();imgPreloader.imgUrl=sp[2].trim();imgPreloader.targetUrl=hxj_SafeValue(sp[3],"");imgPreloader.isOpenNew=hxj_IsTrue(sp[4]);if(!hxj_IsNull(imgPreloader.imgName)&&hxj_IsNull(imgPreloader.imgCaption)){var n=imgPreloader.imgName.indexOf('.');imgPreloader.imgCaption=imgPreloader.imgName.substring(0,n);}}
else{imgPreloader.imgName="";imgPreloader.imgCaption="";imgPreloader.imgUrl=it[a].trim();imgPreloader.targetUrl="";imgPreloader.isOpenNew=false;}
imgPreloader.gallery=this;this.imagePreloader[this.imagePreloader.length]=imgPreloader;}}}
var oDivObj=_oD.createElement("div");oDivObj.id=this.id+"_Gallery_ID";oDivObj.style.position="relative";oDivObj.style.overflow="hidden";oDivObj.style.width=hxj_MakePixel(this.galleryWidth);oDivObj.innerHTML=this._drawGallery();gallery.parentNode.replaceChild(oDivObj,gallery);eval('window.setTimeout(this.id + "_Object.OnChangeImage(true)", 10)');}
this.resumeSlide=function(bStop){if(bStop){var gholder=this.getGalleryHolder();if(this.timerID>0){window.clearTimeout(this.timerID);this.timerID=0;}
this.bIsResume=true;if(this.getNavButton())
this.getNavButton().style.visibility="visible";if(!hxj_IsNull(this.currentImage.targetUrl)){var linkNode=this.getImageLink();gholder.style.cursor="pointer";linkNode.action=this.currentImage.targetUrl;if(this.currentImage.isOpenNew){linkNode.target="newwin";}
else{linkNode.target="";}
gholder.onclick=function(){linkNode.submit();}}
else if(this.hasLightbox){var imgNode=this.currentImage.imgNode;gholder.style.cursor="pointer";gholder.onclick=function(){showLightbox(imgNode);}}
else{gholder.style.cursor="default";gholder.onclick=function(){};}}
else{if(this.getNavButton())
this.getNavButton().style.visibility="hidden";this.timerID=eval('window.setTimeout(this.id + "_Object.OnChangeImage(true)", 1000)');this.bIsResume=false;}}
this.playEffect=function(imgObj,bNext){var captionNode=this.getCaption();var imgNode=imgObj.imgNode;if(this.slideEffect=="fade"){imgNode.style.left=imgNode.xpos;imgNode.style.top=imgNode.ypos;if(this.currentImage!=null){hxj_FadeOut(this.currentImage.imgNode,10);hxj_FadeIn(imgNode,50);}
else{this.getImage().style.display="none";imgNode.style.visibility="visible";}}
else if(this.slideEffect=="scroll"){if(this.currentImage!=null){var imgHolder=this.getImageHolder();var rcHolder=hxj_GetObjectRect(imgHolder);if(bNext){imgNode.style.left=hxj_MakePixel(rcHolder.Width());}
else{imgNode.style.left="-"+hxj_MakePixel(imgNode.offsetWidth);}
imgNode.style.visibility="visible";hxj_ScrollOut(this.currentImage.imgNode,bNext);hxj_ScrollIn(imgNode,imgNode.xpos,bNext);}
else{this.getImage().style.display="none";imgNode.style.visibility="visible";}}
this.currentImage=imgObj;if(!this.bIsResume)
this.timerID=window.setTimeout(this.id+"_Object.OnChangeImage(true)",this.interval);if(captionNode!=null)
captionNode.innerHTML=imgObj.imgCaption;}
this.showImage=function(nIndex,bNext){var imgPreloader=this.imagePreloader[nIndex];var gallery=this;imgPreloader.onload=function(){var imgHolder=gallery.getImageHolder();var imgNode=_oD.createElement("img");var rcHolder=hxj_GetObjectRect(imgHolder);var ptCenter=rcHolder.CenterPoint();var cx=0;var cy=0;if(gallery.slideStyle==1){if(gallery.noimgresize){cx=gallery.thumbnailWidth;cy=gallery.thumbnailHeight;}
else{var size=hxj_GetImageSize(imgPreloader,gallery.thumbnailWidth,gallery.thumbnailHeight);cx=size.cx;cy=size.cy;}}
else{if(gallery.noimgresize){cx=gallery.galleryWidth;cy=gallery.galleryHeight;}
else{var size=hxj_GetImageSize(imgPreloader,gallery.galleryWidth,gallery.galleryHeight);cx=size.cx;cy=size.cy;}}
imgNode.xpos=ptCenter.x-rcHolder.left-(cx/2);imgNode.ypos=ptCenter.y-rcHolder.top-(cy/2);imgNode.style.position="absolute";imgNode.style.zIndex=2;imgNode.style.visibility="hidden";imgNode.style.left=hxj_MakePixel(imgNode.xpos);imgNode.style.top=hxj_MakePixel(imgNode.ypos);if(_oB.isOpera){imgNode.style.pixelWidth=cx;imgNode.style.pixelHeight=cy;}
else{imgNode.style.width=hxj_MakePixel(cx);imgNode.style.height=hxj_MakePixel(cy);}
imgNode.src=imgPreloader.imgUrl;imgNode.title=imgPreloader.imgCaption;imgHolder.appendChild(imgNode);imgPreloader.imgNode=imgNode;gallery.playEffect(imgPreloader,bNext);imgPreloader.onload=function(){};}
if(hxj_IsNull(imgPreloader.imgNode)){imgPreloader.src=imgPreloader.imgUrl;}
else{gallery.playEffect(imgPreloader,bNext);}}
this.OnChangeImage=function(bNext){var currIdx=this.imageIndex;if(this.timerID>0){window.clearTimeout(this.timerID);this.timerID=0;}
if(bNext){if(++this.imageIndex>=this.imagePreloader.length)
this.imageIndex=0;}
else{if(--this.imageIndex<0)
this.imageIndex=this.imagePreloader.length-1;}
if(this.imageIndex!=currIdx)
this.showImage(this.imageIndex,bNext);}
this._drawGallery=function(){var strGen=new hxjStringBuilder();strGen.append(' <table width="100%" border="0" cellpadding="0" cellspacing="0" style="table-layout:fixed;border-collapse:collapse;">\r\n');strGen.append(' <tr height="'+this.galleryHeight+'">\r\n');strGen.append('  <td valign="top">\r\n');if(this.slideStyle==1){var maxBgWidth=this.galleryWidth-10;var maxBgHeight=this.galleryHeight-10;strGen.append('  <div style="position:relative;margin-top:10px;margin-right:10px;">\r\n');strGen.append('      <img src="'+this.mainBgImage+'" border="0" style="visibility:hidden;" onload="hxj_ResizeImage(this, '+maxBgWidth+', '+maxBgHeight+');"/>\r\n');if(!hxj_IsNull(this.mainLinkText)&&!hxj_IsNull(this.mainLinkURL)){strGen.append('  <a href="'+this.mainLinkURL+'" style="position:absolute;z-index:2;display:block;top:10px;left:10px;font-weight:bold;color:#8F7B59;" ');if(this.mainOpenNew)
strGen.append(' target="newwin"');strGen.append('>'+this.mainLinkText+'</a>\r\n');}
if(this.hasBorder){strGen.append('  <div style="position:absolute;z-index:1;top:0px;left:0px;width:'+(maxBgWidth-this.galleryOffset)+'px;height:'+(maxBgHeight-this.galleryOffset)+'px;border:'+(this.galleryOffset/2)+'px solid #202020;opacity:0.4;filter:alpha(opacity=40);"></div>\r\n');}
strGen.append('  </div>\r\n');strGen.append('  <div id="'+this.id+'_Gallery_Holder" style="position:absolute;z-index:3;overflow:hidden;top:0px;right:0px;width:'+this.thumbnailWidth+'px;height:'+this.thumbnailHeight+'px;" onmouseover="'+this.id+'_Object.resumeSlide(true);" onmouseout="'+this.id+'_Object.resumeSlide(false);">\r\n');strGen.append('         <table width="100%" border="0" cellpadding="0" cellspacing="0" style="table-layout:fixed;border-collapse:collapse;">\r\n');strGen.append('         <tr height="'+this.thumbnailHeight+'">\r\n');strGen.append('             <td id="'+this.id+'_Image_Holder" align="center" valign="middle" style="background:'+this.galleryBgcolor+';">\r\n');strGen.append('              <img id="'+this.id+'_Image_ID" src="'+_SVR_+'/images/loading.gif" border="0" />\r\n');strGen.append('             </td>\r\n');strGen.append('         </tr>\r\n');strGen.append('         </table>\r\n');if(this.hasBorder){strGen.append('  <div style="position:absolute;z-index:4;border:'+(this.galleryOffset/2)+'px solid #202020;opacity:0.4;filter:alpha(opacity=40);top:0px;right:0px;width:'+(this.thumbnailWidth-this.galleryOffset)+'px;height:'+(this.thumbnailHeight-this.galleryOffset)+'px;"></div>\r\n');}
if(this.hasNavBtn){strGen.append('  <div id="'+this.id+'_Image_Nav" style="position:absolute;z-index:5;text-align:right;right:0px;bottom:4px;width:60px;padding:4px;visibility:hidden;" onclick="return hxj_CancelEvent(event);">\r\n');strGen.append('   <div style="float:left;text-align:left;line-height:22px;" id="'+this.id+'_Caption_ID"></div>\r\n');strGen.append('   <img src="'+g_GalleryImageDir+'left.gif" border="0" title="Previous" style="cursor:pointer;" onclick="'+this.id+'_Object.OnChangeImage(false);"/>&nbsp;&nbsp;&nbsp;\r\n');strGen.append('   <img src="'+g_GalleryImageDir+'right.gif" border="0" title="Next" style="cursor:pointer;" onclick="'+this.id+'_Object.OnChangeImage(true);"/>&nbsp;\r\n');strGen.append('  </div>\r\n');}
strGen.append('     </div>\r\n');}
else{strGen.append('  <div id="'+this.id+'_Gallery_Holder" style="position:absolute;z-index:1;top:0px;right:0px;width:'+this.galleryWidth+'px;height:'+this.galleryHeight+'px;" onmouseover="'+this.id+'_Object.resumeSlide(true);" onmouseout="'+this.id+'_Object.resumeSlide(false);">\r\n');strGen.append('         <table width="100%" border="0" cellpadding="0" cellspacing="0" style="table-layout:fixed;border-collapse:collapse;">\r\n');strGen.append('         <tr height="'+this.galleryHeight+'">\r\n');strGen.append('             <td id="'+this.id+'_Image_Holder" align="center" valign="middle" style="background:'+this.galleryBgcolor+';">\r\n');strGen.append('           <img id="'+this.id+'_Image_ID" src="'+_SVR_+'/images/loading.gif" border="0" />\r\n');strGen.append('             </td>\r\n');strGen.append('         </tr>\r\n');strGen.append('         </table>\r\n');if(this.hasBorder){strGen.append('  <div style="position:absolute;z-index:3;border:'+(this.galleryOffset/2)+'px solid #202020;opacity:0.4;filter:alpha(opacity=40);top:0px;right:0px;width:'+(this.galleryWidth-this.galleryOffset)+'px;height:'+(this.galleryHeight-this.galleryOffset)+'px;"></div>\r\n');}
if(this.hasNavBtn){strGen.append('  <div id="'+this.id+'_Image_Nav" style="position:absolute;z-index:4;text-align:right;right:0px;bottom:6px;padding:4px;visibility:hidden;" onclick="return hxj_CancelEvent(event);">\r\n');strGen.append('      <div style="float:left;text-align:left;line-height:22px;background:#CFCFCF;margin-right:4px;padding:0 2px;opacity:0.6;" id="'+this.id+'_Caption_ID"></div>\r\n');strGen.append('   <img src="'+g_GalleryImageDir+'left.gif" border="0" title="Previous" style="cursor:pointer;" onclick="'+this.id+'_Object.OnChangeImage(false);"/>&nbsp;&nbsp;&nbsp;&nbsp;\r\n');strGen.append('   <img src="'+g_GalleryImageDir+'right.gif" border="0" title="Next" style="cursor:pointer;" onclick="'+this.id+'_Object.OnChangeImage(true);"/>&nbsp;\r\n');strGen.append('  </div>\r\n');}
strGen.append('     </div>\r\n');}
strGen.append('     </td>\r\n');strGen.append(' </tr>\r\n');strGen.append(' </table>\r\n');strGen.append(' <form id="'+this.id+'_Image_Link" action="" style="display:none;"></form>\r\n');return strGen.toString();}}
function initGallery(){var images=document.getElementsByTagName("img");var arrImgs=new hxjArray();for(var i=0;i<images.length;i++){var imgobj=images[i];if(imgobj.className=="ssGallery")
arrImgs.push(imgobj);}
for(var i=0;i<arrImgs.length;i++){var imgobj=arrImgs[i];var galleryId="gallery"+(i+1);eval(galleryId+"_Object = new hxjImageGallery()");eval(galleryId+"_Object.init(imgobj, galleryId)");}}

/** jpopup.js **/
var JS_POPUP=true;var g_oDummyFrame=null;var g_imageDir=_SVR_+"/jslib/jpopup/image/";function hxjPopup(div){this.id=div.id;this.oDiv=div;this.oDiv.jpopup=this;this.hasclosebtn=true;this.hasoverlay=true;this.isMinimized=false;this.titleBarID=this.id+'_TITLE_BAR';this.titleID=this.id+'_TITLE';this.contentID=this.id+'_CONTENT';this.getTitleBar=function(){return hxj_FindObject(this.titleBarID);}
this.getTitle=function(){return hxj_FindObject(this.titleID);}
this.getContent=function(){return hxj_FindObject(this.contentID);}
this.init=function(args){if(!args)
args=this.oDiv.getAttribute("rel");if(args!=null){var it=args.split(";");for(var a=0;a<it.length;a++){var sp=it[a].indexOf("=");if(sp!=-1){var value=it[a].slice(sp+1);var name=it[a].slice(0,sp);this[name]=value;}}}
if(hxj_IsNull(this.bgcolor))
this.bgcolor="#FFFFFF";if(!hxj_IsNull(this.hasclosebtn))
this.hasclosebtn=eval(this.hasclosebtn);if(!hxj_IsNull(this.hasoverlay))
this.hasoverlay=eval(this.hasoverlay);if(hxj_IsNull(this.height))
this.height=this.width;this.oDiv.style.position="absolute";this.oDiv.style.display='block';this.oDiv.style.visibility='hidden';this.oDiv.style.width=hxj_MakePixel(this.width);var strGen=new hxjStringBuilder();strGen.append("<table border=0 cellspacing=0 cellpadding=0 width='100%'>\r\n");strGen.append("<tr height='28'>\r\n");strGen.append(" <td width='8' style='font-size:1px;background:url("+g_imageDir+"lt.gif) no-repeat;' ></td>\r\n");strGen.append(" <td id='"+this.titleBarID+"' style='background:url("+g_imageDir+"title_bg.gif) repeat-x;' \r\n");strGen.append("  onselect='return false;' onselectstart='return false;' >");strGen.append("  <table border=0 cellspacing=0 cellpadding=0 width='100%' height='100%'>\r\n");strGen.append("  <tr>\r\n");strGen.append("   <td id='"+this.titleID+"' style='font-size:12px;font-family:arial;font-weight:bold;color:#FFFFFF;cursor:move;'>"+this.title+"</td>\r\n");if(this.hasclosebtn){strGen.append("   <td width='26' valign='top'>\r\n");strGen.append("    <div style='float:right;width:26px;height:18px;font-size:1px;background:url("+g_imageDir+"min.gif) -26px 0px no-repeat;' onmouseover='this.style.backgroundPosition=\"-52px 0px\";' onmouseout='this.style.backgroundPosition=\"-26px 0px\";' onclick='"+this.id+"_Object.OnMinimize();' title='Minimize'>&nbsp;</div>\r\n");strGen.append("   </td>\r\n");strGen.append("   <td width='43' valign='top'>\r\n");strGen.append("    <div style='float:right;width:43px;height:18px;font-size:1px;background:url("+g_imageDir+"close.gif) -43px 0px no-repeat;' onmouseover='this.style.backgroundPosition=\"-86px 0px\";' onmouseout='this.style.backgroundPosition=\"-43px 0px\";' onclick='"+this.id+"_Object.OnClose();' title='Close'>&nbsp;</div>\r\n");strGen.append("   </td>\r\n");}
else{strGen.append("   <td width='26' valign='top'>\r\n");strGen.append("    <div style='float:right;width:26px;height:18px;font-size:1px;background:url("+g_imageDir+"min2.gif) -26px 0px no-repeat;' onmouseover='this.style.backgroundPosition=\"0px 0px\";' onmouseout='this.style.backgroundPosition=\"-26px 0px\";' onclick='"+this.id+"_Object.OnMinimize();' title='Minimize'>&nbsp;</div>\r\n");strGen.append("   </td>\r\n");}
strGen.append("  </tr>\r\n");strGen.append("  </table>\r\n");strGen.append(" </td>\r\n");strGen.append(" <td width='8' style='font-size:1px;background:url("+g_imageDir+"rt.gif) no-repeat;' ></td>\r\n");strGen.append("</tr>\r\n");strGen.append("<tr height='100%'>\r\n");strGen.append(" <td width='8' style='font-size:1px;background:url("+g_imageDir+"border-01.gif) repeat-y;' ></td>\r\n");strGen.append(" <td style='background:#FFFFFF;padding:4px;'>\r\n");strGen.append("  <div id='"+this.contentID+"'>\r\n");strGen.append(this.oDiv.innerHTML);strGen.append("  </div>\r\n");strGen.append(" </td>\r\n");strGen.append(" <td width='8' style='font-size:1px;background:url("+g_imageDir+"border-01.gif) repeat-y;' ></td>\r\n");strGen.append("</tr>\r\n");strGen.append("<tr height='28'>\r\n");strGen.append(" <td width='8' style='font-size:1px;background:url("+g_imageDir+"lb.gif) no-repeat;' ></td>\r\n");strGen.append(" <td style='font-size:1px;background:url("+g_imageDir+"border-02.gif) repeat-x;' ></td>\r\n");strGen.append(" <td width='8' style='font-size:1px;background:url("+g_imageDir+"rb.gif) no-repeat;' ></td>\r\n");strGen.append("</tr>\r\n");strGen.append("</table>\r\n");this.oDiv.innerHTML=strGen.toString();DomDrag.init(this.getTitleBar(),this.oDiv,this.getContent());}
this.show=function(){var winSize=hxj_GetWindowSize();var pageSize=hxj_GetPageSize();var ptScroll=hxj_GetScrollXY();var x=this.left;var y=this.top;if(x==null)
x=max(10,winSize.cx/2-this.width/2);if(y==null)
y=max(30,winSize.cy/2-this.height/2-100);x-=ptScroll.x;y+=ptScroll.y;var rand=Math.random()+"";var hash=hxj_ParseInt(rand.substring(4))%3;if(hash==1){x+=20;y+=30;}
else if(hash==2){x-=20;y-=30;}
if(this.hasoverlay){if(!this.oOverlay){this.oOverlay=hxj_CreateOverlay();}
this.oOverlay.style.width=hxj_MakePixel(pageSize.cx);this.oOverlay.style.height=hxj_MakePixel(pageSize.cy);this.oOverlay.style.visibility='visible';this.oOverlay.style.zIndex=++g_zindex;this.oOverlay.focus();}
this.oDiv.style.left=hxj_MakePixel(x);this.oDiv.style.top=hxj_MakePixel(y);this.oDiv.style.visibility='visible';this.oDiv.style.zIndex=++g_zindex;this.oDiv.scrollIntoView(false);this.getContent().style.visibility="visible";var func=eval(this.onShow);if(func)
func(this);}
this.close=function(){var func=eval(this.onClose);if(func){if(!func(this))
return;}
this.oDiv.style.visibility='hidden';this.oDiv.style.top='-999px';this.oDiv.style.left='-999px';if(this.hasoverlay&&this.oOverlay){this.oOverlay.style.visibility='hidden';this.oOverlay.style.zIndex=-999;}}
this.findElement=function(tag,name){var arrElm=this.getContent().getElementsByTagName(tag);for(var i=0;i<arrElm.length;i++){if(arrElm[i].id==name||arrElm[i].name==name){return arrElm[i];}}
return null;}
this.setTitle=function(title){this.getTitle().innerHTML="&nbsp;"+title;}
this.setContent=function(html){this.getContent().innerHTML=html;}
this.setSize=function(cx,cy){hxj_MoveObject(this.oDiv,null,null,cx,cy);}
this.OnClose=function(){this.close();}
this.OnMinimize=function(){if(this.isMinimized){this.getContent().style.visibility="visible";this.oDiv.style.height=hxj_MakePixel(this.height);}
else{this.getContent().style.visibility="hidden";this.oDiv.style.height="22px";}
this.isMinimized=!this.isMinimized;}}
function _fix_IEBug(){var doc=null;if(g_oDummyFrame.contentWindow!=null){doc=g_oDummyFrame.contentWindow.document;}
else{doc=document.frames[g_oDummyFrame.id].document;}
doc.open();doc.write("");doc.close();}
function showPopup(divid,param){var div=hxj_FindObject(divid);if(div&&div.jpopup){if(param!=null){if(!hxj_IsNull(param.url)){var dom=hxj_ExecuteAjax(param.url,param.urlparam,false);if(dom!=null)
div.jpopup.setContent(dom);}
if(!hxj_IsNull(param.title)){div.jpopup.setTitle(param.title);}
if(typeof param.init=='function'){var initparam=param.initparam;if(!initparam)
initparam={};if(!param.init(div.jpopup,initparam))
return null;}}
div.jpopup.show();return div.jpopup;}}
function closePopup(divid){var div=hxj_FindObject(divid);if(div&&div.jpopup)
div.jpopup.close();}
function getPopup(divid){var div=hxj_FindObject(divid);if(div!=null)
return div.jpopup;return null;}

/** lightbox.js **/
var JS_LIGHTBOX=true;var g_lboxImageDir=_SVR_+"/jslib/lightbox/image/";function getPageScroll(){var yScroll;if(self.pageYOffset){yScroll=self.pageYOffset;}else if(document.documentElement&&document.documentElement.scrollTop){yScroll=document.documentElement.scrollTop;}else if(document.body){yScroll=document.body.scrollTop;}
arrayPageScroll=new Array('',yScroll)
return arrayPageScroll;}
function getPageSize(){var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=document.body.scrollWidth;yScroll=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;}
var windowWidth,windowHeight;if(self.innerHeight){windowWidth=self.innerWidth;windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;}
if(yScroll<windowHeight){pageHeight=windowHeight;}else{pageHeight=yScroll;}
if(xScroll<windowWidth){pageWidth=windowWidth;}else{pageWidth=xScroll;}
arrayPageSize=new Array(pageWidth,pageHeight,windowWidth,windowHeight)
return arrayPageSize;}
function pause(numberMillis){var now=new Date();var exitTime=now.getTime()+numberMillis;while(true){now=new Date();if(now.getTime()>exitTime)
return;}}
function getKey(e){if(e==null){keycode=event.keyCode;}else{keycode=e.which;}
key=String.fromCharCode(keycode).toLowerCase();if(key=='x'){hideLightbox();}}
function listenKey(){document.onkeypress=getKey;}
function showLightbox(objLink)
{var objOverlay=document.getElementById('overlay');var objLightbox=document.getElementById('lightbox');var objImage=document.getElementById('lightboxImage');var objLoadingImage=document.getElementById('loadingImage');var objLightboxDetails=document.getElementById('lightboxDetails');var objLightboxTitle=document.getElementById('lightboxTitle');var objLightboxDesc=document.getElementById('lightboxDescription');var objCaption=document.getElementById('lightboxCaption');var arrayPageSize=getPageSize();var arrayPageScroll=getPageScroll();if(objLoadingImage){objLoadingImage.style.top=(arrayPageScroll[1]+((arrayPageSize[3]-35-objLoadingImage.height)/2)+'px');objLoadingImage.style.left=(((arrayPageSize[0]-20-objLoadingImage.width)/2)+'px');objLoadingImage.style.display='block';}
objOverlay.style.height=(arrayPageSize[1]+'px');objOverlay.style.display='block';imgPreload=new Image();imgPreload.onload=function(){objImage.src=(objLink.src!=null)?objLink.src:objLink.href;var imgwidth=imgPreload.width;if(objLink.getAttribute('desc'))
imgwidth+=255;var lightboxTop=arrayPageScroll[1]+((arrayPageSize[3]-35-imgPreload.height)/2);var lightboxLeft=((arrayPageSize[0]-20-imgwidth)/2);objLightbox.style.top=(lightboxTop<0)?"0px":lightboxTop+"px";objLightbox.style.left=(lightboxLeft<0)?"0px":lightboxLeft+"px";objLightbox.style.width=imgwidth+'px';if(objLink.getAttribute('desc')){objLightboxTitle.style.display='none';objLightboxDetails.style.display='block';if(objLink.getAttribute('title')){objCaption.style.display='block';objCaption.innerHTML=hxj_Unescape(objLink.getAttribute('title'));}
else{objCaption.style.display='none';}
objLightboxDesc.innerHTML=hxj_Unescape(objLink.getAttribute('desc'));}
else{objLightboxDetails.style.display='none';objLightboxTitle.style.width=imgPreload.width+'px';if(objLink.getAttribute('title')){objLightboxTitle.style.display='block';objLightboxTitle.innerHTML=hxj_Unescape(objLink.getAttribute('title'));}
else{objLightboxTitle.style.display='none';}}
if(navigator.appVersion.indexOf("MSIE")!=-1){pause(250);}
if(objLoadingImage){objLoadingImage.style.display='none';}
selects=document.getElementsByTagName("select");for(i=0;i!=selects.length;i++){selects[i].style.visibility="hidden";}
objLightbox.style.display='block';arrayPageSize=getPageSize();objOverlay.style.height=(arrayPageSize[1])+'px';return false;}
imgPreload.src=(objLink.src!=null)?objLink.src:objLink.href;}
function hideLightbox()
{objOverlay=document.getElementById('overlay');objLightbox=document.getElementById('lightbox');objOverlay.style.display='none';objLightbox.style.display='none';selects=document.getElementsByTagName("select");for(i=0;i!=selects.length;i++){selects[i].style.visibility="visible";}
document.onkeypress='';}
function initLightbox()
{var objBody=document.getElementsByTagName("body").item(0);var objOverlay=document.createElement("div");objOverlay.setAttribute('id','overlay');objOverlay.onclick=function(){hideLightbox();return false;}
objOverlay.style.display='none';objOverlay.style.position='absolute';objOverlay.style.top='0';objOverlay.style.left='0';objOverlay.style.zIndex='90';objOverlay.style.width='100%';if(_oB.isIE6dn){objOverlay.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+g_lboxImageDir+"f_overlay.png', sizingMethod='scale')";}
else{objOverlay.style.backgroundImage="url("+g_lboxImageDir+"f_overlay.png)";}
objBody.insertBefore(objOverlay,objBody.firstChild);var arrayPageSize=getPageSize();var arrayPageScroll=getPageScroll();var imgPreloader=new Image();imgPreloader.onload=function(){var objLoadingImageLink=document.createElement("a");objLoadingImageLink.setAttribute('href','#');objLoadingImageLink.onclick=function(){hideLightbox();return false;}
objOverlay.appendChild(objLoadingImageLink);var objLoadingImage=document.createElement("img");objLoadingImage.src=g_lboxImageDir+"f_loading.gif";objLoadingImage.setAttribute('id','loadingImage');objLoadingImage.style.position='absolute';objLoadingImage.style.zIndex='150';objLoadingImageLink.appendChild(objLoadingImage);imgPreloader.onload=function(){};return false;}
imgPreloader.src=g_lboxImageDir+"f_loading.gif";var objLightbox=document.createElement("div");objLightbox.setAttribute('id','lightbox');objLightbox.style.display='none';objLightbox.style.position='absolute';objLightbox.style.zIndex='100';objBody.insertBefore(objLightbox,objOverlay.nextSibling);var objLink=document.createElement("a");objLink.setAttribute('href','#');objLink.setAttribute('title','Click to close');objLink.onclick=function(){hideLightbox();return false;}
objLightbox.appendChild(objLink);var imgPreloadCloseButton=new Image();imgPreloadCloseButton.onload=function(){var objCloseButton=document.createElement("img");objCloseButton.src=g_lboxImageDir+"f_close.gif";objCloseButton.setAttribute('id','closeButton');objCloseButton.style.position='absolute';objCloseButton.style.zIndex='200';objLink.appendChild(objCloseButton);return false;}
imgPreloadCloseButton.src=g_lboxImageDir+"f_close.gif";var objImage=document.createElement("img");objImage.setAttribute('id','lightboxImage');objImage.style.border="1px solid #DFDFDF";objLink.appendChild(objImage);var objLightboxDetails=document.createElement("div");objLightboxDetails.setAttribute('id','lightboxDetails');objLightboxDetails.style.display='none';objLightbox.appendChild(objLightboxDetails);var objCaption=document.createElement("div");objCaption.setAttribute('id','lightboxCaption');objLightboxDetails.appendChild(objCaption);var objDesc=document.createElement("div");objDesc.setAttribute('id','lightboxDescription');objLightboxDetails.appendChild(objDesc);var objKeyboardMsg=document.createElement("div");objKeyboardMsg.setAttribute('id','keyboardMsg');objLightboxDetails.appendChild(objKeyboardMsg);var objLightboxTitle=document.createElement("div");objLightboxTitle.setAttribute('id','lightboxTitle');objLightboxTitle.style.clear="both";objLightbox.appendChild(objLightboxTitle);}

/** navmenu.js **/
var JS_NAVMENU=true;var _tid=0;var _ulid=0;function navmenuMouseOver(){if(_tid)
_oW.clearTimeout(_tid);if(this.ul!=null){if(this.ul.id!=_ulid){navmenuHide();}
if(this.ul.className=="sub"){this.ul.style.display="block";}}}
function navmenuMouseOut(){if(this.ul!=null&&this.ul.className=="sub"){_tid=_oW.setTimeout("navmenuHide()",100);_ulid=this.ul.id;}}
function navmenuHide(){var ul=hxj_FindObject(_ulid);if(ul!=null)
ul.style.display="none";}
function findLink(anchors){var nIndex=-1;var nIndex2=-1;for(var i=0;i<anchors.length;i++){var hrefs=anchors[i].href;if(location.href.charAt(location.href.length-1)=="/"&&hrefs.charAt(hrefs.length-1)!='/'){hrefs=hrefs+"/";}
if(hrefs==location.href){nIndex=i;}
else if(nIndex==-1){var pathname=anchors[i].pathname;if(location.pathname.charAt(0)=="/"&&pathname.charAt(0)!='/'){pathname="/"+pathname;}
if(pathname==location.pathname){if(location.search.length>0){var param1=anchors[i].search.substr(1);var param2=location.search.substr(1);if(param1.compare(param2,param1.length)==0){nIndex=i;}
else{nIndex2=i;}}
else{nIndex2=i;}}}}
if(nIndex==-1)
nIndex=nIndex2;return nIndex;}
function initNavMemu(){var menus=document.getElementsByTagName("ul");for(var m=0;m<menus.length;m++){if(menus[m].className!="navmenu")
continue;var links=menus[m].getElementsByTagName("a");var nIndexA=-1;if((nIndexA=findLink(links))!=-1){menus[m].style.display="block";var otitle=hxj_FindObject("module_title");if(otitle)
otitle.innerHTML=menus[m].title;var li=hxj_FindParent(links[nIndexA],"li");if(li){var ul=hxj_FindParent(li,"ul");if(ul){if(ul.className=="sub"){ul.style.display="block";var navli=hxj_FindParent(li,"li");if(navli){navli.className="current";}}
else{var subul=hxj_FindChild(li,"ul");if(subul)
subul.style.display="block";}}
li.className="current";}
break;}}}

/** picker.js **/
var JS_PICKER=true;var g_PickerImageDir=_SVR_+"/jslib/picker/image/";var g_PickerHideWait=1000;var g_arrColors={"Col0":["000000","993300","333300","003300","003366","000080","480048","333333"],"Col1":["800000","FF6600","808000","225A20","008080","0000FF","6B006B","595959"],"Col2":["FF0000","FF9900","99CC00","339966","33CCCC","3366FF","800080","999999"],"Col3":["FF00FF","FFCC00","FFFF00","00FF00","00FFFF","00CCFF","A07AC6","C0C0C0"],"Col4":["FF99CC","FFCC99","FFFF99","CCFFCC","CCFFFF","99CCFF","CCBCDB","FFFFFF"]};var g_arrFonts=["Verdana","Arial","Century Gothic","Comic Sans MS","Courier New","Georgia","Impact","MS Sans Serif","Tahoma","Times New Roman","Trebuchet MS","Forte","Papyrus","Rockwell Extra Bold","Script MT Bold"];var g_arrFontSizes=[9,10,11,12,14,18,24,36];var g_arrCharmap=[['&nbsp;','&#160;',true,'no-break space'],['&amp;','&#38;',true,'ampersand'],['&quot;','&#34;',true,'quotation mark'],['&cent;','&#162;',true,'cent sign'],['&euro;','&#8364;',true,'euro sign'],['&pound;','&#163;',true,'pound sign'],['&yen;','&#165;',true,'yen sign'],['&copy;','&#169;',true,'copyright sign'],['&reg;','&#174;',true,'registered sign'],['&trade;','&#8482;',true,'trade mark sign'],['&permil;','&#8240;',true,'per mille sign'],['&micro;','&#181;',true,'micro sign'],['&middot;','&#183;',true,'middle dot'],['&bull;','&#8226;',true,'bullet'],['&hellip;','&#8230;',true,'three dot leader'],['&prime;','&#8242;',true,'minutes / feet'],['&Prime;','&#8243;',true,'seconds / inches'],['&sect;','&#167;',true,'section sign'],['&para;','&#182;',true,'paragraph sign'],['&szlig;','&#223;',true,'sharp s / ess-zed'],['&lsaquo;','&#8249;',true,'single left-pointing angle quotation mark'],['&rsaquo;','&#8250;',true,'single right-pointing angle quotation mark'],['&laquo;','&#171;',true,'left pointing guillemet'],['&raquo;','&#187;',true,'right pointing guillemet'],['&lsquo;','&#8216;',true,'left single quotation mark'],['&rsquo;','&#8217;',true,'right single quotation mark'],['&ldquo;','&#8220;',true,'left double quotation mark'],['&rdquo;','&#8221;',true,'right double quotation mark'],['&sbquo;','&#8218;',true,'single low-9 quotation mark'],['&bdquo;','&#8222;',true,'double low-9 quotation mark'],['&lt;','&#60;',true,'less-than sign'],['&gt;','&#62;',true,'greater-than sign'],['&le;','&#8804;',true,'less-than or equal to'],['&ge;','&#8805;',true,'greater-than or equal to'],['&ndash;','&#8211;',true,'en dash'],['&mdash;','&#8212;',true,'em dash'],['&macr;','&#175;',true,'macron'],['&oline;','&#8254;',true,'overline'],['&curren;','&#164;',true,'currency sign'],['&brvbar;','&#166;',true,'broken bar'],['&uml;','&#168;',true,'diaeresis'],['&iexcl;','&#161;',true,'inverted exclamation mark'],['&iquest;','&#191;',true,'turned question mark'],['&circ;','&#710;',true,'circumflex accent'],['&tilde;','&#732;',true,'small tilde'],['&deg;','&#176;',true,'degree sign'],['&minus;','&#8722;',true,'minus sign'],['&plusmn;','&#177;',true,'plus-minus sign'],['&divide;','&#247;',true,'division sign'],['&frasl;','&#8260;',true,'fraction slash'],['&times;','&#215;',true,'multiplication sign'],['&sup1;','&#185;',true,'superscript one'],['&sup2;','&#178;',true,'superscript two'],['&sup3;','&#179;',true,'superscript three'],['&frac14;','&#188;',true,'fraction one quarter'],['&frac12;','&#189;',true,'fraction one half'],['&frac34;','&#190;',true,'fraction three quarters'],['&fnof;','&#402;',true,'function / florin'],['&int;','&#8747;',true,'integral'],['&sum;','&#8721;',true,'n-ary sumation'],['&infin;','&#8734;',true,'infinity'],['&radic;','&#8730;',true,'square root'],['&sim;','&#8764;',false,'similar to'],['&cong;','&#8773;',false,'approximately equal to'],['&asymp;','&#8776;',true,'almost equal to'],['&ne;','&#8800;',true,'not equal to'],['&equiv;','&#8801;',true,'identical to'],['&isin;','&#8712;',false,'element of'],['&notin;','&#8713;',false,'not an element of'],['&ni;','&#8715;',false,'contains as member'],['&prod;','&#8719;',true,'n-ary product'],['&and;','&#8743;',false,'logical and'],['&or;','&#8744;',false,'logical or'],['&not;','&#172;',true,'not sign'],['&cap;','&#8745;',true,'intersection'],['&cup;','&#8746;',false,'union'],['&part;','&#8706;',true,'partial differential'],['&forall;','&#8704;',false,'for all'],['&exist;','&#8707;',false,'there exists'],['&empty;','&#8709;',false,'diameter'],['&nabla;','&#8711;',false,'backward difference'],['&lowast;','&#8727;',false,'asterisk operator'],['&prop;','&#8733;',false,'proportional to'],['&ang;','&#8736;',false,'angle'],['&acute;','&#180;',true,'acute accent'],['&cedil;','&#184;',true,'cedilla'],['&ordf;','&#170;',true,'feminine ordinal indicator'],['&ordm;','&#186;',true,'masculine ordinal indicator'],['&dagger;','&#8224;',true,'dagger'],['&Dagger;','&#8225;',true,'double dagger'],['&Agrave;','&#192;',true,'A - grave'],['&Aacute;','&#193;',true,'A - acute'],['&Acirc;','&#194;',true,'A - circumflex'],['&Atilde;','&#195;',true,'A - tilde'],['&Auml;','&#196;',true,'A - diaeresis'],['&Aring;','&#197;',true,'A - ring above'],['&AElig;','&#198;',true,'ligature AE'],['&Ccedil;','&#199;',true,'C - cedilla'],['&Egrave;','&#200;',true,'E - grave'],['&Eacute;','&#201;',true,'E - acute'],['&Ecirc;','&#202;',true,'E - circumflex'],['&Euml;','&#203;',true,'E - diaeresis'],['&Igrave;','&#204;',true,'I - grave'],['&Iacute;','&#205;',true,'I - acute'],['&Icirc;','&#206;',true,'I - circumflex'],['&Iuml;','&#207;',true,'I - diaeresis'],['&ETH;','&#208;',true,'ETH'],['&Ntilde;','&#209;',true,'N - tilde'],['&Ograve;','&#210;',true,'O - grave'],['&Oacute;','&#211;',true,'O - acute'],['&Ocirc;','&#212;',true,'O - circumflex'],['&Otilde;','&#213;',true,'O - tilde'],['&Ouml;','&#214;',true,'O - diaeresis'],['&Oslash;','&#216;',true,'O - slash'],['&OElig;','&#338;',true,'ligature OE'],['&Scaron;','&#352;',true,'S - caron'],['&Ugrave;','&#217;',true,'U - grave'],['&Uacute;','&#218;',true,'U - acute'],['&Ucirc;','&#219;',true,'U - circumflex'],['&Uuml;','&#220;',true,'U - diaeresis'],['&Yacute;','&#221;',true,'Y - acute'],['&Yuml;','&#376;',true,'Y - diaeresis'],['&THORN;','&#222;',true,'THORN'],['&agrave;','&#224;',true,'a - grave'],['&aacute;','&#225;',true,'a - acute'],['&acirc;','&#226;',true,'a - circumflex'],['&atilde;','&#227;',true,'a - tilde'],['&auml;','&#228;',true,'a - diaeresis'],['&aring;','&#229;',true,'a - ring above'],['&aelig;','&#230;',true,'ligature ae'],['&ccedil;','&#231;',true,'c - cedilla'],['&egrave;','&#232;',true,'e - grave'],['&eacute;','&#233;',true,'e - acute'],['&ecirc;','&#234;',true,'e - circumflex'],['&euml;','&#235;',true,'e - diaeresis'],['&igrave;','&#236;',true,'i - grave'],['&iacute;','&#237;',true,'i - acute'],['&icirc;','&#238;',true,'i - circumflex'],['&iuml;','&#239;',true,'i - diaeresis'],['&eth;','&#240;',true,'eth'],['&ntilde;','&#241;',true,'n - tilde'],['&ograve;','&#242;',true,'o - grave'],['&oacute;','&#243;',true,'o - acute'],['&ocirc;','&#244;',true,'o - circumflex'],['&otilde;','&#245;',true,'o - tilde'],['&ouml;','&#246;',true,'o - diaeresis'],['&oslash;','&#248;',true,'o slash'],['&oelig;','&#339;',true,'ligature oe'],['&scaron;','&#353;',true,'s - caron'],['&ugrave;','&#249;',true,'u - grave'],['&uacute;','&#250;',true,'u - acute'],['&ucirc;','&#251;',true,'u - circumflex'],['&uuml;','&#252;',true,'u - diaeresis'],['&yacute;','&#253;',true,'y - acute'],['&thorn;','&#254;',true,'thorn'],['&yuml;','&#255;',true,'y - diaeresis'],['&Alpha;','&#913;',true,'Alpha'],['&Beta;','&#914;',true,'Beta'],['&Gamma;','&#915;',true,'Gamma'],['&Delta;','&#916;',true,'Delta'],['&Epsilon;','&#917;',true,'Epsilon'],['&Zeta;','&#918;',true,'Zeta'],['&Eta;','&#919;',true,'Eta'],['&Theta;','&#920;',true,'Theta'],['&Iota;','&#921;',true,'Iota'],['&Kappa;','&#922;',true,'Kappa'],['&Lambda;','&#923;',true,'Lambda'],['&Mu;','&#924;',true,'Mu'],['&Nu;','&#925;',true,'Nu'],['&Xi;','&#926;',true,'Xi'],['&Omicron;','&#927;',true,'Omicron'],['&Pi;','&#928;',true,'Pi'],['&Rho;','&#929;',true,'Rho'],['&Sigma;','&#931;',true,'Sigma'],['&Tau;','&#932;',true,'Tau'],['&Upsilon;','&#933;',true,'Upsilon'],['&Phi;','&#934;',true,'Phi'],['&Chi;','&#935;',true,'Chi'],['&Psi;','&#936;',true,'Psi'],['&Omega;','&#937;',true,'Omega'],['&alpha;','&#945;',true,'alpha'],['&beta;','&#946;',true,'beta'],['&gamma;','&#947;',true,'gamma'],['&delta;','&#948;',true,'delta'],['&epsilon;','&#949;',true,'epsilon'],['&zeta;','&#950;',true,'zeta'],['&eta;','&#951;',true,'eta'],['&theta;','&#952;',true,'theta'],['&iota;','&#953;',true,'iota'],['&kappa;','&#954;',true,'kappa'],['&lambda;','&#955;',true,'lambda'],['&mu;','&#956;',true,'mu'],['&nu;','&#957;',true,'nu'],['&xi;','&#958;',true,'xi'],['&omicron;','&#959;',true,'omicron'],['&pi;','&#960;',true,'pi'],['&rho;','&#961;',true,'rho'],['&sigmaf;','&#962;',true,'final sigma'],['&sigma;','&#963;',true,'sigma'],['&tau;','&#964;',true,'tau'],['&upsilon;','&#965;',true,'upsilon'],['&phi;','&#966;',true,'phi'],['&chi;','&#967;',true,'chi'],['&psi;','&#968;',true,'psi'],['&omega;','&#969;',true,'omega'],['&alefsym;','&#8501;',false,'alef symbol'],['&piv;','&#982;',false,'pi symbol'],['&real;','&#8476;',false,'real part symbol'],['&thetasym;','&#977;',false,'theta symbol'],['&upsih;','&#978;',false,'upsilon - hook symbol'],['&weierp;','&#8472;',false,'Weierstrass p'],['&image;','&#8465;',false,'imaginary part'],['&larr;','&#8592;',true,'leftwards arrow'],['&uarr;','&#8593;',true,'upwards arrow'],['&rarr;','&#8594;',true,'rightwards arrow'],['&darr;','&#8595;',true,'downwards arrow'],['&harr;','&#8596;',true,'left right arrow'],['&crarr;','&#8629;',false,'carriage return'],['&lArr;','&#8656;',false,'leftwards double arrow'],['&uArr;','&#8657;',false,'upwards double arrow'],['&rArr;','&#8658;',false,'rightwards double arrow'],['&dArr;','&#8659;',false,'downwards double arrow'],['&hArr;','&#8660;',false,'left right double arrow'],['&there4;','&#8756;',false,'therefore'],['&sub;','&#8834;',false,'subset of'],['&sup;','&#8835;',false,'superset of'],['&nsub;','&#8836;',false,'not a subset of'],['&sube;','&#8838;',false,'subset of or equal to'],['&supe;','&#8839;',false,'superset of or equal to'],['&oplus;','&#8853;',false,'circled plus'],['&otimes;','&#8855;',false,'circled times'],['&perp;','&#8869;',false,'perpendicular'],['&sdot;','&#8901;',false,'dot operator'],['&lceil;','&#8968;',false,'left ceiling'],['&rceil;','&#8969;',false,'right ceiling'],['&lfloor;','&#8970;',false,'left floor'],['&rfloor;','&#8971;',false,'right floor'],['&lang;','&#9001;',false,'left-pointing angle bracket'],['&rang;','&#9002;',false,'right-pointing angle bracket'],['&loz;','&#9674;',true,'lozenge'],['&spades;','&#9824;',false,'black spade suit'],['&clubs;','&#9827;',true,'black club suit'],['&hearts;','&#9829;',true,'black heart suit'],['&diams;','&#9830;',true,'black diamond suit'],['&ensp;','&#8194;',false,'en space'],['&emsp;','&#8195;',false,'em space'],['&thinsp;','&#8201;',false,'thin space'],['&zwnj;','&#8204;',false,'zero width non-joiner'],['&zwj;','&#8205;',false,'zero width joiner'],['&lrm;','&#8206;',false,'left-to-right mark'],['&rlm;','&#8207;',false,'right-to-left mark'],['&shy;','&#173;',false,'soft hyphen']];function hxjPicker(pickerid){this.timerID=0;this.isautohide=true;this.isalwaysvisible=false;if(pickerid!=null)
this.id=pickerid;this.init=function(domobj){var args=domobj.getAttribute("rel");if(args!=null){var it=args.split(";");for(var a=0;a<it.length;a++){var sp=it[a].indexOf("=");if(sp!=-1){var name=it[a].slice(0,sp);var value=it[a].slice(sp+1);this[name]=decodeURIComponent(value);}}}
this.id=domobj.id;if(hxj_IsNull(this.id))
this.id=this.fieldname;if(hxj_IsNull(this.title))
this.title="";if(!hxj_IsNull(this.isautohide))
this.isautohide=eval(this.isautohide);if(!hxj_IsNull(this.isalwaysvisible))
this.isalwaysvisible=eval(this.isalwaysvisible);if(hxj_IsNull(this.initvalue))
this.initvalue="";if(!eval(this.hascontent))
domobj.innerHTML=this._drawPicker();var selector=hxj_FindObject(this.id+'_Select_ID');if(selector!=null){selector.parentNode.removeChild(selector);}}
this.setValue=function(val){if(this._setValue){val=this._setValue(val);}
else{if(this.getDisplay())
this.getDisplay().innerHTML=val;if(this.getField())
this.getField().value=val;}
return val;}
this.getValue=function(){if(this.getField())
return this.getField().value;if(this.getDisplay())
return this.getDisplay().innerHTML;return"";}
this.show=function(target,cmdid){var selector=this.getSelector();if(!selector){var div=_oD.createElement("DIV");div.innerHTML=this._drawSelector();_oD.body.insertBefore(div,_oD.body.firstChild);selector=this.getSelector();}
if(selector.style.visibility=="visible"){this.hide();}
else{selector.style.zIndex=(this.zindex)?this.zindex:"999";if(this._prepareShow)
this._prepareShow();hxj_AdjustPosition(selector,target?target:this.getPicker(),2,false);hxj_ShowObject(selector,true);this.cmdid=cmdid;}
self.status='';}
this.hide=function(){this.handleTimer(false);hxj_ShowObject(this.getSelector(),false);self.status='';}
this.handleTimer=function(bSetTimer){if(this.isalwaysvisible)
return;var selector=this.getSelector();if(selector!=null&&selector.style.visibility=="visible"){if(this.timerID>0){window.clearTimeout(this.timerID);this.timerID=0;}
if(bSetTimer&&this.isautohide){this.timerID=eval('window.setTimeout(\''+this.id+'_Object.hide()\','+g_PickerHideWait+')');}}}
this.getPicker=function(){return hxj_FindObject(this.id+'_Picker_ID');}
this.getSelector=function(){return hxj_FindObject(this.id+'_Select_ID');}
this.getDisplay=function(){return hxj_FindObject(this.id+'_Value_ID');}
this.getField=function(){return hxj_FindObject(this.fieldname);}
this.onSelect=function(val){val=this.setValue(val);if(this.callback){if(this.callback.func){this.callback.func(this,val);}
else{var func=eval(this.callback);func(this,val);}}
if(!this.isalwaysvisible&&this.getSelector())
this.hide();}
this.onMouseOver=function(){if(this.onbgimage)
this.getPicker().style.background=this.onbgimage;if(this.onborder)
this.getPicker().style.border=this.onborder;if(this.isautohide)
this.handleTimer(false);}
this.onMouseOut=function(){if(this.onbgimage)
this.getPicker().style.background=this.bgimage;if(this.onborder)
this.getPicker().style.border=this.border;if(this.isautohide)
this.handleTimer(true);}}
function hxjFontPicker(){INHERIT_CLASS(this,new hxjPicker());this._drawStyle=function(){var strGen="";if(!this.bgimage)
this.bgimage="url("+g_PickerImageDir+"pickerBG.gif) no-repeat";strGen=('background:'+this.bgimage+';');if(this.width)
strGen+=('width:'+hxj_MakePixel(this.width)+';');if(this.height)
strGen+=('height:'+hxj_MakePixel(this.height)+';');return strGen;}
this._drawPicker=function(){var strGen=new hxjStringBuilder();strGen.append('<div id="'+this.id+'_Picker_ID" class="fontpicker" title="'+this.title+'" unselectable="on" onclick="'+this.id+'_Object.show();return hxj_CancelEvent(event);" onmouseover="'+this.id+'_Object.onMouseOver();" onmouseout="'+this.id+'_Object.onMouseOut();" style="'+this._drawStyle()+'">\r\n');if(!eval(this.novalue)){strGen.append(' <div class="fontPickerVal" id="'+this.id+'_Value_ID">\r\n');strGen.append(this.initvalue?this.initvalue:'Select Font');strGen.append(' </div>\r\n');}
if(this.fieldname)
strGen.append('<input name="'+this.fieldname+'" id="'+this.fieldname+'" value="'+this.initvalue+'" type="hidden">\r\n');strGen.append('</div>\r\n');return strGen.toString();}
this._drawSelector=function(){var strGen=new hxjStringBuilder();strGen.append('<div id="'+this.id+'_Select_ID" class="fontDropDown" unselectable="on" onMouseOver="'+this.id+'_Object.handleTimer(false);" onMouseOut="'+this.id+'_Object.handleTimer(true);">\r\n');strGen.append(' <table border=0 cellpadding=1 width="100%" height="100%" unselectable="on" onmousedown="return false;">\r\n');for(var i=0;i<g_arrFonts.length;i++){strGen.append(' <tr height=14>\r\n');strGen.append('  <td unselectable="on" style="padding-left:3px;border:1px solid #D8D8E0;font-size:10pt;font-family:'+g_arrFonts[i]+';" onMouseOver="this.style.borderColor=\'#316AC5\';this.style.backgroundColor=\'#DFF1FF\'" onMouseOut="this.style.borderColor=\'#D8D8E0\';this.style.backgroundColor=\'#FFFFFF\'" onClick="'+this.id+'_Object.onSelect(\''+g_arrFonts[i]+'\');" unselectable="on">'+g_arrFonts[i]+'</td>\r\n');strGen.append(' </tr>\r\n');}
strGen.append(' </table>\r\n');strGen.append('</div>\r\n');return strGen.toString();}}
function hxjFontSizePicker(){INHERIT_CLASS(this,new hxjPicker());this._drawStyle=function(){var strGen="";if(!this.bgimage)
this.bgimage="url("+g_PickerImageDir+"fsizeBG.gif) no-repeat";strGen=('background:'+this.bgimage+';');if(this.width)
strGen+=('width:'+hxj_MakePixel(this.width)+';');if(this.height)
strGen+=('height:'+hxj_MakePixel(this.height)+';');return strGen;}
this._drawPicker=function(){var strGen=new hxjStringBuilder();strGen.append('<div id="'+this.id+'_Picker_ID" class="fsizepicker" title="'+this.title+'" unselectable="on" onclick="'+this.id+'_Object.show();return hxj_CancelEvent(event);" onmouseover="'+this.id+'_Object.onMouseOver();" onmouseout="'+this.id+'_Object.onMouseOut();" style="'+this._drawStyle()+'">\r\n');if(!eval(this.novalue)){strGen.append(' <div class="fsizePickerVal" id="'+this.id+'_Value_ID">\r\n');strGen.append(this.initvalue)?this.initvalue:'Size';strGen.append(' </div>\r\n');}
if(this.fieldname)
strGen.append('<input name="'+this.fieldname+'" id="'+this.fieldname+'" value="'+this.initvalue+'" type="hidden">\r\n');strGen.append('</div>\r\n');return strGen.toString();}
this._drawSelector=function(){var strGen=new hxjStringBuilder();strGen.append('<div id="'+this.id+'_Select_ID" class="fontDropDown" unselectable="on" onMouseOver="'+this.id+'_Object.handleTimer(false);" onMouseOut="'+this.id+'_Object.handleTimer(true);">\r\n');strGen.append(' <table border=0 cellpadding=1 width=100% height=100% unselectable="on" onmousedown="return false;">\r\n');for(var i=0;i<g_arrFontSizes.length;i++){strGen.append(' <tr height=24>\r\n');strGen.append('  <td unselectable="on" style="border:1px solid #D8D8E0;" onMouseOver="this.style.borderColor=\'#316AC5\';this.style.backgroundColor=\'#DFF1FF\'" onMouseOut="this.style.borderColor=\'#D8D8E0\';this.style.backgroundColor=\'#FFFFFF\'" onClick="'+this.id+'_Object.onSelect(\''+i+'\');" unselectable="on"><font face="arial" size="'+i+'" unselectable="on">'+g_arrFontSizes[i]+' pt</font></td>\r\n');strGen.append(' </tr>\r\n');}
strGen.append(' </table>\r\n');strGen.append('</div>\r\n');return strGen.toString();}}
function hxjImagePicker(){INHERIT_CLASS(this,new hxjPicker());this._setValue=function(val){if(this.getDisplay())
this.getDisplay().src=val;this.getField().value=val;return val;}
this._drawStyle=function(){var strGen="";if(!this.bgimage)
this.bgimage="url("+g_PickerImageDir+"pickerBG.gif) no-repeat";strGen=('background:'+this.bgimage+';');if(this.width)
strGen+=('width:'+hxj_MakePixel(this.width)+';');if(this.height)
strGen+=('height:'+hxj_MakePixel(this.height)+';');return strGen;}
this._drawPicker=function(){var strGen=new hxjStringBuilder();var initImage=this.initvalue;if(hxj_IsNull(initImage))
initImage=g_PickerImageDir+'blank.gif';if(!this.imagewidth)
this.imagewidth=150;if(!this.imageheight)
this.imageheight=70;strGen.append('<div id="'+this.id+'_Picker_ID" class="imagepicker" title="'+this.title+'" unselectable="on" onclick="'+this.id+'_Object.show();return hxj_CancelEvent(event);" onmouseover="'+this.id+'_Object.onMouseOver();" onmouseout="'+this.id+'_Object.onMouseOut();" style="'+this._drawStyle()+'">\r\n');if(!eval(this.novalue)){strGen.append(' <img class="imagePickerVal" id="'+this.id+'_Value_ID" src="'+initImage+'" align="absmiddle"/>');}
if(this.fieldname)
strGen.append('<input name="'+this.fieldname+'" id="'+this.fieldname+'" value="'+this.initvalue+'" type="hidden">\r\n');strGen.append('</div>\r\n');return strGen.toString();}
this._drawSelector=function(){var strGen=new hxjStringBuilder();var divide=eval(this.divide);if(!divide||divide<=0)
divide=3;strGen.append('<div id="'+this.id+'_Select_ID" class="imageDropDown" style="width:'+((this.imagewidth*divide)+(2*divide)+40)+'px;" unselectable="on" onMouseOver="'+this.id+'_Object.handleTimer(false);" onMouseOut="'+this.id+'_Object.handleTimer(true);">\r\n');strGen.append(' <table border=0 cellpadding=1 height="100%" unselectable="on" onmousedown="return false;">\r\n');strGen.append(' <tr>\r\n');var arrImages=eval(this.imagearray);for(var i=0;i<arrImages.length;i++){if(((i%divide)==0)&&(i>0)){strGen.append('</tr>\r\n');strGen.append('<tr>\r\n');}
var imgsrc=arrImages[i];var imgtitle="";if(imgsrc==""){imgsrc=g_PickerImageDir+'blank.gif';}
else{var arrVal=imgsrc.split(";");imgsrc=arrVal[0];if(arrVal.length>1)
imgtitle=arrVal[1];}
strGen.append(' <td align="center" width="'+this.imagewidth+'" height="'+this.imageheight+'" unselectable="on" style="border:1px solid #D8D8E0;" onMouseOver="this.style.borderColor=\'#316AC5\';this.style.backgroundColor=\'#DFF1FF\'" onMouseOut="this.style.borderColor=\'#D8D8E0\';this.style.backgroundColor=\'#FFFFFF\'" onClick="'+this.id+'_Object.onSelect(\''+imgsrc+'\')">');strGen.append('  <img src="'+imgsrc+'" alt="'+imgtitle+'" title="'+imgtitle+'" unselectable="on" align=absmiddle onLoad="hxj_ResizeImage(this, '+this.imagewidth+', '+this.imageheight+');"/>');strGen.append(' </td>');}
strGen.append(' </tr>\r\n');strGen.append(' </table>\r\n');strGen.append('</div>\r\n');return strGen.toString();}}
function hxjObjectPicker(){INHERIT_CLASS(this,new hxjPicker());this._drawStyle=function(){var strGen="";if(!this.bgimage)
this.bgimage="url("+g_PickerImageDir+"pickerBG.gif) no-repeat";strGen=('background:'+this.bgimage+';');if(this.bgwidth)
strGen+=('width:'+hxj_MakePixel(this.bgwidth)+';');if(this.bgheight)
strGen+=('height:'+hxj_MakePixel(this.bgheight)+';');strGen+="cursor:pointer;";return strGen;}
this._drawPicker=function(){var strGen=new hxjStringBuilder();strGen.append('<div id="'+this.id+'_Picker_ID" title="'+this.title+'" unselectable="on" onclick="'+this.id+'_Object.show();return hxj_CancelEvent(event);" onmouseover="'+this.id+'_Object.onMouseOver();" onmouseout="'+this.id+'_Object.onMouseOut();" style="'+this._drawStyle()+'">\r\n');strGen.append('</div>\r\n');return strGen.toString();}
this._drawSelector=function(){var strGen=new hxjStringBuilder();strGen.append('<div id="'+this.id+'_Select_ID" class="valueDropDown" style="width:'+hxj_MakePixel(this.width)+';height:'+(hxj_IsNull(this.height)?"auto":hxj_MakePixel(this.height))+';" unselectable="on" onMouseOver="'+this.id+'_Object.handleTimer(false);" onMouseOut="'+this.id+'_Object.handleTimer(true);">\r\n');strGen.append('</div>\r\n');return strGen.toString();}
this.getSelector=function(){var selector=hxj_FindObject(this.id+'_Select_ID');if(selector==null){var div=_oD.createElement("DIV");var target=hxj_FindObject(this.targetid);div.innerHTML=this._drawSelector();_oD.body.insertBefore(div,_oD.body.firstChild);selector=hxj_FindObject(this.id+'_Select_ID');selector.appendChild(target);target.style.display="block";}
return selector;}}
function hxjValuePicker(){INHERIT_CLASS(this,new hxjPicker());this._setValue=function(val){var fieldNode=this.getField();if(val=="directinput"){fieldNode.readOnly=false;val="Please enter your own value here...";}
else{fieldNode.readOnly=true;}
fieldNode.value=val;fieldNode.focus();fieldNode.select();return val;}
this._drawPicker=function(){var strGen=new hxjStringBuilder();if(hxj_IsNull(this.initvalue))
this.initvalue="";if(hxj_IsNull(this.readonly)){this.readonly=false;}
else{this.readonly=eval(this.readonly);}
if(hxj_IsNull(this.hasDirect)){this.hasDirect=false;}
else{this.hasDirect=eval(this.hasDirect);}
if(hxj_IsNull(this.width)){this.width=200;}
else{this.width=hxj_ParseInt(this.width);}
strGen.append('<div id="'+this.id+'_Picker_ID" unselectable="on" style="width:'+hxj_MakePixel(this.width)+';height:18px;border:1px solid #BFBFBF;padding:1px;">\r\n');if(this.readonly){strGen.append(' <input name="'+this.fieldname+'" id="'+this.fieldname+'" value="'+this.initvalue+'" type="text" readonly="readonly" style="float:left;border:none;padding:0px auto;margin:0px auto;width:'+hxj_MakePixel(this.width-20)+';" onclick="'+this.id+'_Object.show();this.focus();return hxj_CancelEvent(event);" onblur="'+this.id+'_Object.hide();">\r\n');}
else{strGen.append(' <input name="'+this.fieldname+'" id="'+this.fieldname+'" value="'+this.initvalue+'" type="text" style="float:left;border:none;padding:0px auto;margin:0px auto;width:'+hxj_MakePixel(this.width-20)+';" onclick="'+this.id+'_Object.show();this.focus();return hxj_CancelEvent(event);" onblur="'+this.id+'_Object.hide();">\r\n');}
strGen.append(' <img src="'+g_PickerImageDir+'pushdown.gif" style="float:right;" onclick="'+this.id+'_Object.show();return hxj_CancelEvent(event);" onmouseover="'+this.id+'_Object.onMouseOver();" onmouseout="'+this.id+'_Object.onMouseOut();"/>\r\n');strGen.append('</div>\r\n');return strGen.toString();}
this._drawSelector=function(){var strGen=new hxjStringBuilder();strGen.append('<div id="'+this.id+'_Select_ID" class="valueDropDown" style="width:'+hxj_MakePixel(this.width)+';height:auto;" unselectable="on" onMouseOver="'+this.id+'_Object.handleTimer(false);" onMouseOut="'+this.id+'_Object.handleTimer(true);">\r\n');strGen.append(' <div unselectable="on" style="width:'+hxj_MakePixel(this.width)+';height:'+(hxj_IsNull(this.height)?"auto":hxj_MakePixel(this.height))+';overflow:auto;overflow-x: hidden;overflow-y:auto;">\r\n');strGen.append(' <table border=0 cellpadding="1" width="100%" height="100%" unselectable="on" onmousedown="return false;">\r\n');var arrValues=eval(this.valuearray);for(var i=0;i<arrValues.length;i++){strGen.append(' <tr>\r\n');strGen.append('  <td align="left" style="color:#696969;" unselectable="on" onMouseOver="this.style.color=\'#FFFFFF\';this.style.backgroundColor=\'#364B8E\'" onMouseOut="this.style.color=\'#696969\';this.style.backgroundColor=\'#FFFFFF\'" onClick="'+this.id+'_Object.onSelect(\''+arrValues[i].replaceAll("\'","\\\'")+'\');">');strGen.append(arrValues[i]);strGen.append('     </td>\r\n');strGen.append(' </tr>\r\n');}
strGen.append(' </table>\r\n');strGen.append(' </div>\r\n');if(this.hasDirect){strGen.append(' <table border=0 cellpadding="2" width="100%" unselectable="on" onmousedown="return false;">\r\n');strGen.append(' <tr height="20">\r\n');strGen.append('     <td style="color:#FF3939;font-weight:bold;border-top:1px solid #CFCFCF;" align="left" unselectable="on" onMouseOver="this.style.backgroundColor=\'#364B8E\'" onMouseOut="this.style.backgroundColor=\'#FFFFFF\'" onClick="'+this.id+'_Object.onSelect(\'directinput\');">');strGen.append('Direct Input');strGen.append('     </td>\r\n');strGen.append(' </tr>\r\n');strGen.append(' </table>\r\n');}
strGen.append('</div>\r\n');return strGen.toString();}}
function hxjColorUtil(){this._HexValue=function(val){var rgbpattern=/rgb\s*\(\s*(\d+),\s*(\d+),\s*(\d+)\)/i;var result=val.match(rgbpattern);if(result!=null){val=this._RGBToHex(result[1],result[2],result[3]);}
if(val.substr(0,1)!="#")
val="#"+val;return val;}
this._HSVToRGB=function(H,S,V){var F,P,Q,T,R,G,B;var rgb=new Array();H=H/360;S=S/100;V=V/100;if(S<=0){V=Math.round(V*255);rgb['red']=V;rgb['green']=V;rgb['blue']=V;return rgb;}else{if(H>=1.0){H=0;}
H=6*H;F=H-Math.floor(H);P=Math.round(255*V*(1.0-S));Q=Math.round(255*V*(1.0-(S*F)));T=Math.round(255*V*(1.0-(S*(1.0-F))));V=Math.round(255*V);switch(Math.floor(H)){case 0:R=V;G=T;B=P;break;case 1:R=Q;G=V;B=P;break;case 2:R=P;G=V;B=T;break;case 3:R=P;G=Q;B=V;break;case 4:R=T;G=P;B=V;break;case 5:R=V;G=P;B=Q;break;}
rgb['red']=R;rgb['green']=G;rgb['blue']=B;return rgb;}}
this._RGBToHex=function(R,G,B){return(this._toHex(R)+this._toHex(G)+this._toHex(B));}
this._toHex=function(N){if(N==null)
return"00";N=parseInt(N);if(N==0||isNaN(N))
return"00";N=Math.max(0,N);N=Math.min(N,255);N=Math.round(N);return"0123456789ABCDEF".charAt((N-N%16)/16)+"0123456789ABCDEF".charAt(N%16);}
this._HexToRGB=function(H){var hexR,hexG,hexB;var rgb=new Array();if(H.substr(0,1)=="#")
H=H.substr(1);hexR=H.substr(0,2);rgb['red']=parseInt((hexR).substring(0,2),16);hexG=H.substr(2,2);rgb['green']=parseInt((hexG).substring(0,2),16);hexB=H.substr(4,2);rgb['blue']=parseInt((hexB).substring(0,2),16);return rgb;}
this._RGBToHSV=function(R,G,B){var hsv=new Array();var max=Math.max(R,G,B);var min=Math.min(R,G,B);var delta=max-min;var S,H,V;V=Math.round((max/255)*100);if(max!=0){S=Math.round(delta/max*100);}
else{S=0;}
if(S==0){H=0;}
else{if(R==max){H=(G-B)/delta;}else if(G==max){H=2+(B-R)/delta;}else if(B==max){H=4+(R-G)/delta;}
H=Math.round(H*60);if(H>360){H=360;}
if(H<0){H+=360;}}
hsv['hue']=H;hsv['sat']=S;hsv['val']=V;return hsv;}
this._AdjustContrast=function(rgb,ratio){var finalRatio=ratio/0.5;var finalR=(255-(255-rgb["red"])*finalRatio);var finalG=(255-(255-rgb["green"])*finalRatio);var finalB=(255-(255-rgb["blue"])*finalRatio);if(finalR<0)finalR=0;if(finalG<0)finalG=0;if(finalB<0)finalB=0;return"#"+this._RGBToHex(finalR,finalG,finalB);}}
function hxjColorPicker(pickerid){INHERIT_CLASS(this,new hxjPicker(pickerid));INHERIT_CLASS(this,new hxjColorUtil());this.getHex=function(){return hxj_FindObject(this.id+'_Hex_ID');}
this.getPrevColor=function(){return hxj_FindObject(this.id+'_Preview_ID');}
this.getDisplay2=function(){return hxj_FindObject(this.id+'_Value2_ID');}
this._getAlphaImage=function(imgsrc){if(_oB.isIE){return'filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale, src='+g_PickerImageDir+imgsrc+');';}
else{return'background: url('+g_PickerImageDir+imgsrc+') no-repeat;';}}
this._getHexValue=function(val){var rgbpattern=/rgb\s*\(\s*(\d+),\s*(\d+),\s*(\d+)\)/i;var result=val.match(rgbpattern);if(result!=null){val=this._RGBToHex(result[1],result[2],result[3]);}
return val;}
this._setValue=function(val){var innerValue=this._getHexValue(val);if(!eval(this.novalue)){if(hxj_IsNull(innerValue)){innerValue="#C0C0C0";}
else if(innerValue.charAt(0)!="#"){if(innerValue.toLowerCase()=="transparent"){innerValue="";}
else if(innerValue!="auto"){innerValue="#"+innerValue;}}
if(this.getDisplay())
this.getDisplay().style.background=innerValue;if(this.getDisplay2())
this.getDisplay2().innerHTML=innerValue;if(this.fieldname){if(innerValue==""){this.getField().value="transparent";}
else{this.getField().value=innerValue;}}}
return innerValue;}
this._drawStyle=function(){var strGen="";if(!eval(this.novalue)){if(!this.bgimage)
this.bgimage="url("+g_PickerImageDir+"pickerBG.gif) no-repeat";}
else{this.bgimage="url("+g_PickerImageDir+this.bgimgPrefix+".gif) no-repeat";this.onbgimage="url("+g_PickerImageDir+this.bgimgPrefix+"_on.gif) no-repeat";if(!this.border)
this.border="1px none transparent";this.onborder="1px solid #999999";strGen+=('border:'+this.border+';');}
strGen=('background:'+this.bgimage+';');if(this.width)
strGen+=('width:'+hxj_MakePixel(this.width)+';');if(this.height)
strGen+=('height:'+hxj_MakePixel(this.height)+';');return strGen;}
this._drawPicker=function(){var strGen=new hxjStringBuilder();if(!this.initvalue||this.initvalue.length<=0){this.initvalue="#FFEEEE";}
else if(this.initvalue.charAt(0)!="#"){if(this.initvalue.toLowerCase()!="transparent")
this.initvalue="#"+this.initvalue;}
if(!this.fieldname)
this.fieldname=this.id+"_field";if(!eval(this.novalue)){var innerValue=this.initvalue;if(innerValue.toLowerCase()=="transparent"){innerValue="";}
strGen.append('<div id="'+this.id+'_Picker_ID" class="color2picker" title="'+this.title+'" unselectable="on" onclick="'+this.id+'_Object.show();return hxj_CancelEvent(event);" onmouseover="'+this.id+'_Object.onMouseOver();" onmouseout="'+this.id+'_Object.onMouseOut();" style="'+this._drawStyle()+'">\r\n');strGen.append(' <div class="color2PickerVal" id="'+this.id+'_Value_ID" unselectable="on" style="background:'+this.initvalue+';">\r\n');strGen.append('  <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">\r\n');strGen.append('  <tr>\r\n');strGen.append('   <td class="color2PickerVal2" id="'+this.id+'_Value2_ID" unselectable="on" style="'+this._getAlphaImage('colorexBG.png')+'">'+innerValue+'</td>\r\n');strGen.append('  </tr>\r\n');strGen.append('  </table>\r\n');strGen.append(' </div>\r\n');strGen.append(' <input type="hidden" name="'+this.fieldname+'" id="'+this.fieldname+'" value="'+this.initvalue+'">\r\n');strGen.append('</div>\r\n');}
else{strGen.append('<div id="'+this.id+'_Picker_ID" class="colorpicker" title="'+this.title+'" unselectable="on" onclick="'+this.id+'_Object.show();return hxj_CancelEvent(event);" onmouseover="'+this.id+'_Object.onMouseOver();" onmouseout="'+this.id+'_Object.onMouseOut();" style="'+this._drawStyle()+'">\r\n');strGen.append('<input name="'+this.fieldname+'" id="'+this.fieldname+'" value="'+this.initvalue+'" type="hidden">\r\n');strGen.append('</div>\r\n');}
return strGen.toString();}
this._drawSelector=function(){var strGen=new hxjStringBuilder();var selectorHeight="";if(!eval(this.nohex))
selectorHeight="height:128px;";strGen.append('<div id="'+this.id+'_Select_ID" class="colorDropDown" style="'+selectorHeight+'" unselectable="on" onMouseOver="'+this.id+'_Object.handleTimer(false);" onMouseOut="'+this.id+'_Object.handleTimer(true);">\r\n');strGen.append(' <table border=0 cellpadding=0 cellspacing=0 style="padding:2px" unselectable="on" onmousedown="return false;">\r\n');strGen.append(' <tr><td>\r\n');strGen.append('  <table border=0 cellpadding=0 cellspacing=0 unselectable="on" onmousedown="return false;">\r\n');for(var i=0;i<5;i++){var colorObj=g_arrColors["Col"+i];strGen.append(' <tr height=12">\r\n');for(var j=0;j<8;j++){strGen.append('  <td align=center valign=middle unselectable="on">\r\n');strGen.append('   <div class="colorBoxOut" unselectable="on" onMouseOver="this.className=\'colorBoxOver\'" onMouseOut="this.className=\'colorBoxOut\'">\r\n');strGen.append('    <div class="colorBox" style="background-color:#'+colorObj[j]+';" onClick="'+this.id+'_Object.onSelect(\''+colorObj[j]+'\');" unselectable="on"><div>\r\n');strGen.append('   </div>\r\n');strGen.append('  </td>\r\n');}
strGen.append(' </tr>\r\n');}
if(eval(this.hasauto)){strGen.append('  <tr height=12">\r\n');strGen.append('   <td colspan="8" align="center" valign=middle unselectable="on" style="border-top:1px solid #BFBFBF;">\r\n');strGen.append('    <div class="colorAutoOut" unselectable="on" onMouseOver="this.className=\'colorAutoOver\'" onMouseOut="this.className=\'colorAutoOut\'" onClick="'+this.id+'_Object.onAutoColor();">Auto colors</div>\r\n');strGen.append('   </td>\r\n');strGen.append('  </tr>\r\n');}
strGen.append('  </table>\r\n');strGen.append(' </td></tr>\r\n');strGen.append(' </table>\r\n');if(!eval(this.nohex)){strGen.append(' <div unselectable="on" style="position:absolute;left:0px;top:96px;width:100%;border-top:1px solid #BFBFBF;">\r\n');strGen.append('  <table border=0 width="100%" cellpadding=3 cellspacing=0 unselectable="on">\r\n');strGen.append('  <tr>\r\n');strGen.append('   <td width="18" unselectable="on"><div id="'+this.id+'_Preview_ID" title="Preview color" class="colorPreview" unselectable="on"></div></td>\r\n');strGen.append('   <td unselectable="on">#<input type="text" id="'+this.id+'_Hex_ID" class="color2Hex" value="'+this.initvalue+'" maxlength="6" onKeyPress="return hxj_HexDigitsOnly(event);" onChange="'+this.id+'_Object._updateColor(this.value);"></td>');strGen.append('   <td align="right" unselectable="on"><input type="button" class="button" style="width:46px;" value="Apply" onclick="'+this.id+'_Object.onSelect('+this.id+'_Object.getHex().value)" />\r\n');strGen.append('  </tr>\r\n');strGen.append('  </table>\r\n');strGen.append(' </div>\r\n');}
strGen.append('</div>\r\n');return strGen.toString();}
this.onAutoColor=function(){this.onSelect("auto");}
this._prepareShow=function(){if(!eval(this.nohex)){if(this.getField()!=null){this._updateColor(this.getField().value);}
else{this.getPrevColor().style.backgroundColor="#FFFFFF";this.getHex().value="";}}}
this._updateColor=function(hex){hex=this._getHexValue(hex);if(hex.charAt(0)!="#")
hex="#"+hex;this.getPrevColor().style.backgroundColor=hex;this.getHex().value=hex.substr(1);}
this._XToS=function(dotX){return(dotX/1.5);}
this._YToV=function(dotY){return(100-(dotY/1.5));}
this._SToX=function(S){return S*1.5;}
this._VToY=function(V){return(-V+100)*1.5;}
this._HToY=function(H){return(H/360)*150;}
this._YToH=function(sliderY){return(sliderY/150)*360;}}
function hxjColorPickerEx(){INHERIT_CLASS(this,new hxjColorPicker());this.getSat=function(){return hxj_FindObject(this.id+'_SatContainer');}
this.getHue=function(){return hxj_FindObject(this.id+'_HueContainer');}
this.getCurrentColor=function(){return hxj_FindObject(this.id+'_Current_ID');}
this.getGS=function(idx){return hxj_FindObject('gs_'+this.id+'_'+idx);}
this._drawSelector=function(){var strGen=new hxjStringBuilder();strGen.append('<div id="'+this.id+'_Select_ID" class="color2DropDown" unselectable="on" onMouseOver="'+this.id+'_Object.handleTimer(false);" onMouseOut="'+this.id+'_Object.handleTimer(true);">\r\n');strGen.append(' <table border=0 cellpadding=2 cellspacing=0 width=100% height=100% unselectable="on" onmousedown="return false;">\r\n');strGen.append(' <tr height="180" valign="top"><td unselectable="on">\r\n');strGen.append('  <fieldset unselectable="on">\r\n');strGen.append('   <legend class="titleH4" unselectable="on">&nbsp;Color picker&nbsp;</legend>\r\n');strGen.append('   <div style="padding-left:4px;" unselectable="on">\r\n');strGen.append('    <img id="'+this.id+'_SatContainer" class="color2Sat" unselectable="on" src="'+g_PickerImageDir+'colors.jpg" unselectable="on" onclick="'+this.id+'_Object._computeColor(event)" onMouseDown="'+this.id+'_Object.isMouseDown=true;" onMouseup="'+this.id+'_Object.isMouseDown=false;" onmousemove="if ('+this.id+'_Object.isMouseDown && '+this.id+'_Object.isMouseOver) '+this.id+'_Object._computeColor(event); return false;" onmouseover="'+this.id+'_Object.isMouseOver=true;" onmouseout="'+this.id+'_Object.isMouseOver=false;" />\r\n');strGen.append('    <div id="'+this.id+'_HueContainer" class="color2Hue" unselectable="on"></div>\r\n');strGen.append('    <div style="clear: both"></div>\r\n');strGen.append('   </div>\r\n');strGen.append('  </fieldset>\r\n');strGen.append(' </td></tr>\r\n');strGen.append(' </table>\r\n');strGen.append(' <div unselectable="on" style="position:absolute;top:190px;left:2px;width:98%;">\r\n');strGen.append('  <table border=0 cellpadding=2 cellspacing=0 width=100% unselectable="on">\r\n');strGen.append('  <tr>\r\n');strGen.append('   <td width="120" unselectable="on">Color:&nbsp;#<input type="text" id="'+this.id+'_Hex_ID" class="color2Hex" value="'+this.initvalue+'" maxlength="6" onKeyPress="return hxj_HexDigitsOnly(event);" onChange="'+this.id+'_Object._updateColor(this.value);"></td>');strGen.append('   <td width="36" unselectable="on"><div id="'+this.id+'_Preview_ID" title="Previous color" class="color2Preview" unselectable="on"></div></td>\r\n');strGen.append('   <td width="36" unselectable="on"><div id="'+this.id+'_Current_ID" title="Current color" class="color2Preview" unselectable="on"></div></td>\r\n');strGen.append('   <td align="right" unselectable="on"><input type="button" class="button" value="Apply" onclick="'+this.id+'_Object.onSelect('+this.id+'_Object.getHex().value)" />\r\n');strGen.append('  </tr>\r\n');strGen.append('  </table>\r\n');strGen.append(' </div>\r\n');strGen.append('</div>\r\n');return strGen.toString();}
this._prepareShow=function(){if(!this.getHue().isinit){var strGen=new hxjStringBuilder();for(var i=0;i<50;i++){strGen.append('<div id="gs_'+this.id+'_'+i+'" style="background-color:#000000; width:15px; height:3px; border-style:none; border-width:0px;"');strGen.append(' onclick="'+this.id+'_Object._updateColor(this.style.backgroundColor, true)"');strGen.append(' onmousedown="'+this.id+'_Object.isMouseDown = true; return false;"');strGen.append(' onmouseup="'+this.id+'_Object.isMouseDown = false;"');strGen.append(' onmousemove="if ('+this.id+'_Object.isMouseDown && '+this.id+'_Object.isMouseOver) '+this.id+'_Object._updateColor(this.style.backgroundColor, true); return false;"');strGen.append(' onmouseover="'+this.id+'_Object.isMouseOver = true;"');strGen.append(' onmouseout="'+this.id+'_Object.isMouseOver = false;">');strGen.append('</div>\r\n');}
this.getHue().innerHTML=strGen.toString();this.getHue().isinit=true;}
var fieldNode=this.getField();var hex=this._getHexValue(fieldNode!=null?fieldNode.value:this.initvalue);this.getPrevColor().style.backgroundColor=hex;this._updateColor(hex);}
this._updateHue=function(r,g,b){var i,finalCoef,finalR,finalG,finalB,color;var partDetail=25;for(i=0;i<50;i++){if((i>=0)&&(i<partDetail)){finalCoef=i/partDetail;finalR=this._toHex(255-(255-r)*finalCoef);finalG=this._toHex(255-(255-g)*finalCoef);finalB=this._toHex(255-(255-b)*finalCoef);}
else{finalCoef=2-i/partDetail;finalR=this._toHex(r*finalCoef);finalG=this._toHex(g*finalCoef);finalB=this._toHex(b*finalCoef);}
color=finalR+finalG+finalB;this.getGS(i).style.backgroundColor='#'+color;}}
this._updateColor=function(hex,nohue){hex=this._getHexValue(hex);if(hex.charAt(0)!="#")
hex="#"+hex;this.getCurrentColor().style.backgroundColor=hex;this.getHex().value=hex.substr(1);if(!nohue){var rgb=this._HexToRGB(this.getHex().value);this._updateHue(rgb["red"],rgb["green"],rgb["blue"]);}}
this._computeColor=function(e){var x,y,partWidth,imHeight,r,g,b,coef,i,finalCoef,finalR,finalG,finalB;var partDetail=25;if(!e.target)
e.target=e.srcElement;if(e.offsetX||e.offsetY){x=e.offsetX;y=e.offsetY;}
else{var rect=hxj_GetObjectRect(e.target);x=e.pageX-rect.left;y=e.pageY-rect.top;}
partWidth=this.getSat().width/6;imHeight=this.getSat().height;r=(x>=0)*(x<partWidth)*255+(x>=partWidth)*(x<2*partWidth)*(2*255-x*255/partWidth)+(x>=4*partWidth)*(x<5*partWidth)*(-4*255+x*255/partWidth)+(x>=5*partWidth)*(x<6*partWidth)*255;g=(x>=0)*(x<partWidth)*(x*255/partWidth)+(x>=partWidth)*(x<3*partWidth)*255+(x>=3*partWidth)*(x<4*partWidth)*(4*255-x*255/partWidth);b=(x>=2*partWidth)*(x<3*partWidth)*(-2*255+x*255/partWidth)+(x>=3*partWidth)*(x<5*partWidth)*255+(x>=5*partWidth)*(x<6*partWidth)*(6*255-x*255/partWidth);coef=(imHeight-y)/imHeight;r=128+(r-128)*coef;g=128+(g-128)*coef;b=128+(b-128)*coef;this._updateColor(this._RGBToHex(r,g,b));this._updateHue(r,g,b);}}
function hxjMonthPicker(){INHERIT_CLASS(this,new hxjPicker());this._setValue=function(val){var temp=new Date(this.displayed.getFullYear(),val,"01");if(this.getDisplay())
this.getDisplay().innerHTML=temp.toFormat("y");if(this.getField())
this.getField().value=temp.toFormat("x");return temp;}
this._drawStyle=function(){var strGen="";if(!this.bgimage)
this.bgimage="url("+g_PickerImageDir+"selectBG.gif) no-repeat";strGen=('background:'+this.bgimage+';');if(this.width)
strGen+=('width:'+hxj_MakePixel(this.width)+';');if(this.height)
strGen+=('height:'+hxj_MakePixel(this.height)+';');return strGen;}
this._drawPicker=function(){var strGen=new hxjStringBuilder();this.today=new Date();if(this.initvalue){this.initvalue=new Date(this.initvalue);}
else{this.initvalue=this.today;}
this.cellwidth=eval(this.cellwidth);if(!this.cellwidth||this.cellwidth<=0)
this.cellwidth=70;this.cellheight=eval(this.cellheight);if(!this.cellheight||this.cellheight<=0)
this.cellheight=20;strGen.append('<div id="'+this.id+'_Picker_ID" class="monthpicker" title="'+this.title+'" unselectable="on" onclick="'+this.id+'_Object.show();return hxj_CancelEvent(event);" onmouseover="'+this.id+'_Object.onMouseOver();" onmouseout="'+this.id+'_Object.onMouseOut();" style="'+this._drawStyle()+'">\r\n');if(!eval(this.novalue)){strGen.append(' <div class="monthPickerVal" id="'+this.id+'_Value_ID" unselectable="on">\r\n');strGen.append(this.initvalue.toFormat("y"));strGen.append(' </div>\r\n');}
if(this.fieldname)
strGen.append('<input name="'+this.fieldname+'" id="'+this.fieldname+'" value="'+this.initvalue.toFormat("x")+'" type="hidden">\r\n');strGen.append('</div>\r\n');return strGen.toString();}
this._drawSelector=function(){var strGen=new hxjStringBuilder();strGen.append('<div id="'+this.id+'_Select_ID" class="monthDropDown" unselectable="on" onMouseOver="'+this.id+'_Object.handleTimer(false);" onMouseOut="'+this.id+'_Object.handleTimer(true);">\r\n');strGen.append(' <table border=0 cellpadding=1 cellspacing=0 width="'+(this.cellwidth*3)+' unselectable="on" onmousedown="return false;"">\r\n');strGen.append(' <tr height="20" style="background-color:buttonface;">');strGen.append('  <td style="cursor:default;border:1px solid buttonface;" align="center" unselectable="on" onClick="'+this.id+'_Object._goPrev()" onMouseDown="this.style.border=\'1px inset buttonface\'" onMouseUp="this.style.border=\'1px outset buttonface\'" onMouseOver="this.style.border=\'1px outset buttonface\'" onMouseOut="this.style.border=\'1px solid buttonface\'" title="Show Previous Year"><img src="'+g_PickerImageDir+'prev.gif"/></td>');strGen.append('     <td id="'+this.id+'_Current_ID" style="cursor:pointer;border:1px solid buttonface;" align="center" class="dateInput" unselectable="on" colspan="5" onClick="'+this.id+'_Object._goToday()" title="Show Current Year">'+this.initvalue.toFormat("y")+'</td>');strGen.append('     <td style="cursor:default;border:1px solid buttonface;" align="center" unselectable="on" onClick="'+this.id+'_Object._goNext()" onMouseDown="this.style.border=\'1px inset buttonface\'" onMouseUp="this.style.border=\'1px outset buttonface\'" onMouseOver="this.style.border=\'1px outset buttonface\'" onMouseOut="this.style.border=\'1px solid buttonface\'" title="Show Next Year"><img src="'+g_PickerImageDir+'next.gif"/></td>');strGen.append(' </tr>\r\n');strGen.append(' </table>');strGen.append(' <div style="padding-top:1px" id="'+this.id+'_MonthTable_ID"></div>');strGen.append('</div>\r\n');return strGen.toString();}
this._prepareShow=function(){if(this.getField()){this.initvalue=new Date(this.getField().value);this.displayed=new Date(this.getField().value);}
else{this.displayed=new Date(this.initvalue.toFormat("x"));}
this._setDisplayMonths(this._buildCalendar(this.displayed.toFormat("x")));}
this._goToday=function(){this._setDisplayMonths(this._buildCalendar());}
this._goPrev=function(){this.displayed.addYears(-1);this._setDisplayMonths(this._buildCalendar(this.displayed.toFormat("x")));}
this._goNext=function(){this.displayed.addYears(1);this._setDisplayMonths(this._buildCalendar(this.displayed.toFormat("x")));}
this._setDisplayYear=function(year){var obj=hxj_FindObject(this.id+'_Current_ID');if(obj)
obj.innerHTML=year;}
this._setDisplayMonths=function(str){var obj=hxj_FindObject(this.id+'_MonthTable_ID');if(obj)
obj.innerHTML=str;}
this._buildCalendar=function(cal){this.displayed=(cal)?new Date(cal):new Date(this.today.toFormat("x"));this._setDisplayYear(this.displayed.toFormat("YYYY"));var strGen=new hxjStringBuilder();strGen.append('<table width="'+(this.cellwidth*3)+'" cellspacing="1" cellpadding="1" border="1" style="cursor:default;border:1px solid #DFDFDF;border-collapse:collapse;" unselectable="on" onmousedown="return false;">\r\n');for(var j=0;j<4;j++){strGen.append('<tr>\r\n');for(var i=0;i<3;i++){var strTextStyle='color:black;'
var strBackColor='white';var nMonth=(j*3)+i;if((this.today.getMonth()==nMonth)&&(this.displayed.getFullYear()==this.today.getFullYear())){strTextStyle='color:white;font-weight:bold;border:1px solid darkred;padding:0px;';strBackColor='lightgrey';}
else if((this.initvalue.getMonth()==nMonth)&&(this.displayed.getFullYear()==this.initvalue.getFullYear())){strTextStyle='font-weight:bold;';strBackColor='lightgrey';}
strGen.append('<td align="center" class="dateInput" unselectable="on" style="cursor:default;height:'+this.cellheight+'px;width:'+this.cellwidth+'px;'+strTextStyle+';background-color:'+strBackColor+'" onClick="'+this.id+'_Object.onSelect('+nMonth+')" onMouseOver="this.style.backgroundColor=\'lightgrey\';" onMouseOut="this.style.backgroundColor=\''+strBackColor+'\';">'+fullmonthname[nMonth]+'</td>\r\n');}
strGen.append('</tr>\r\n');}
strGen.append('</table>\r\n');return strGen.toString();}}
function hxjDatePicker(){INHERIT_CLASS(this,new hxjPicker());this._setValue=function(val){var regObject=new RegExp("([^/]+)/([^/]+)/(.+)");var result=regObject.exec(val);var temp=null;if(result!=null){temp=new Date(result[3],hxj_ParseInt(result[1])-1,hxj_ParseInt(result[2]));}
else{temp=new Date(this.displayed.getFullYear(),this.displayed.getMonth(),val);}
val=temp.toFormat("dd");if(this.getField())
this.getField().value=val;return temp;}
this._drawStyle=function(){var strGen="";if(!this.bgimage)
this.bgimage="url("+g_PickerImageDir+"selectBG.gif) no-repeat";strGen=('background:'+this.bgimage+';');if(this.width)
strGen+=('width:'+hxj_MakePixel(this.width)+';');if(this.height)
strGen+=('height:'+hxj_MakePixel(this.height)+';');return strGen;}
this._drawPicker=function(){var strGen=new hxjStringBuilder();this.today=new Date();if(this.initvalue){this.initvalue=new Date(this.initvalue);}
else{this.initvalue=this.today;}
if(!this.fieldname)
this.fieldname="F_"+this.id;this.cellwidth=eval(this.cellwidth);if(!this.cellwidth||this.cellwidth<=0)
this.cellwidth=18;this.cellheight=eval(this.cellheight);if(!this.cellheight||this.cellheight<=0)
this.cellheight=16;strGen.append('<div id="'+this.id+'_Picker_ID" class="datepicker" title="'+this.title+'" unselectable="on" onclick="'+this.id+'_Object.show();return hxj_CancelEvent(event);" onmouseover="'+this.id+'_Object.onMouseOver();" onmouseout="'+this.id+'_Object.onMouseOut();" style="'+this._drawStyle()+'">\r\n');if(!eval(this.novalue)){strGen.append(' <div class="datePickerVal" id="'+this.id+'_Value_ID" unselectable="on">\r\n');strGen.append('<input name="'+this.fieldname+'" id="'+this.fieldname+'" value="'+this.initvalue.toFormat("dd")+'" type="text" style="margin:0;padding-top:2px;width:68px;height:14px;border:none;background:transparent;">\r\n');strGen.append(' </div>\r\n');}
strGen.append('</div>\r\n');return strGen.toString();}
this._drawSelector=function(){var strGen=new hxjStringBuilder();strGen.append('<div id="'+this.id+'_Select_ID" class="dateDropDown" unselectable="on" onMouseOver="'+this.id+'_Object.handleTimer(false);" onMouseOut="'+this.id+'_Object.handleTimer(true);">\r\n');strGen.append(' <table border=0 cellpadding=1 cellspacing=0 width="'+(this.cellwidth*7)+' unselectable="on" onmousedown="return false;"">\r\n');strGen.append('    <tr style="background-color:buttonface;">');strGen.append('     <td style="cursor:default" align="center" class="dateInput" style="height:'+this.cellheight+'px" unselectable="on" onClick="'+this.id+'_Object._goPrev()" onMouseDown="this.style.border=\'1px inset buttonface\'" onMouseUp="this.style.border=\'1px outset buttonface\'" onMouseOver="this.style.border=\'1px outset buttonface\'" onMouseOut="this.style.border=\'1px solid buttonface\'" title="Show Previous Month"><img src="'+g_PickerImageDir+'prev.gif"/></td>');strGen.append('        <td id="'+this.id+'_Current_ID" style="cursor:pointer" align="center" class="dateInput" unselectable="on" style="height:'+this.cellheight+'px" colspan="5" onClick="'+this.id+'_Object._goToday()" title="Show Current Month">'+this.initvalue.toFormat("y")+'</td>');strGen.append('        <td style="cursor:default" align="center" class="dateInput" style="height:'+this.cellheight+'px" unselectable="on" onClick="'+this.id+'_Object._goNext()" onMouseDown="this.style.border=\'1px inset buttonface\'" onMouseUp="this.style.border=\'1px outset buttonface\'" onMouseOver="this.style.border=\'1px outset buttonface\'" onMouseOut="this.style.border=\'1px solid buttonface\'" title="Show Next Month"><img src="'+g_PickerImageDir+'next.gif"/></td>');strGen.append(' </tr>\r\n');strGen.append(' <tr>\r\n');for(var w=0;w<7;w++)
strGen.append('  <td align="center" class="dateInput" unselectable="on" style="height:'+this.cellheight+'px;width:'+this.cellwidth+'px;font-weight:bold;border-top:1px solid dimgray;border-bottom:1px solid dimgray;">'+weekdays[w]+'</td>');strGen.append(' </tr>');strGen.append('    </table>');strGen.append('    <span id="'+this.id+'_DayTable_ID"></span>');strGen.append('</div>\r\n');return strGen.toString();}
this._prepareShow=function(){if(this.getField()){this.initvalue=new Date(this.getField().value);this.displayed=new Date(this.getField().value);}
else{this.displayed=new Date(this.initvalue.toFormat("dd"));}
this._setDisplayDays(this._buildCalendar(this.displayed.toFormat("x")));}
this._goToday=function(){this._setDisplayDays(this._buildCalendar());}
this._goPrev=function(){this.displayed.addDays(-10);this._setDisplayDays(this._buildCalendar(this.displayed.toFormat("x")));}
this._goNext=function(){this.displayed.addDays(40);this._setDisplayDays(this._buildCalendar(this.displayed.toFormat("x")));}
this._setDisplayMonth=function(month){var obj=hxj_FindObject(this.id+'_Current_ID');if(obj)
obj.innerHTML=month;}
this._setDisplayDays=function(str){var obj=hxj_FindObject(this.id+'_DayTable_ID');if(obj)
obj.innerHTML=str;}
this._buildCalendar=function(cal){this.displayed=(cal)?new Date(cal):new Date(this.today.toFormat("x"));this._setDisplayMonth(this.displayed.toFormat("y"));var nFirstDayIndex=this.displayed.getDay();var nDayCount=this.displayed.dayCount();var nRows=5;if((nDayCount==31)&&(nFirstDayIndex>4)){nRows=6;}
else if((nDayCount==30)&&(nFirstDayIndex==6)){nRows=6;}
else if((nDayCount==28)&&(nFirstDayIndex==0)){nRows=4;}
var strGen=new hxjStringBuilder();strGen.append('<table width="'+(this.cellwidth*7)+'" cellspacing="0" cellpadding="2" style="cursor:default" unselectable="on" onmousedown="return false;">\r\n');for(var j=0;j<nRows;j++){strGen.append('<tr>\r\n');for(var i=1;i<=7;i++){var nDay=(j*7)+(i-nFirstDayIndex);if((nDay>=1)&&(nDay<=nDayCount)){var strTextStyle='color:black;'
var strBackColor='white';if((this.today.getDate()==nDay)&&(this.displayed.toFormat("yy")==this.today.toFormat("yy"))){strTextStyle='color:white;font-weight:bold;border:1px solid darkred;padding:0px;';strBackColor='lightgrey';}
else if((this.initvalue.getDate()==nDay)&&(this.displayed.toFormat("yy")==this.initvalue.toFormat("yy"))){strTextStyle='font-weight:bold;';strBackColor='lightgrey';}
strGen.append('<td align="center" class="dateInput" unselectable="on" style="cursor:default;height:'+this.cellheight+'px;width:'+this.cellwidth+'px;'+strTextStyle+';background-color:'+strBackColor+'" onClick="'+this.id+'_Object.onSelect('+nDay+')" onMouseOver="this.style.backgroundColor=\'lightgrey\';" onMouseOut="this.style.backgroundColor=\''+strBackColor+'\';">'+nDay+'</td>\r\n');}
else{strGen.append('<td class="dateInput" unselectable="on" style="height:'+this.cellheight+'px">&nbsp;</td>\r\n');}}
strGen.append('</tr>\r\n');}
strGen.append('</table>\r\n');return strGen.toString();}}
function hxjTimePicker(){INHERIT_CLASS(this,new hxjPicker());this.getHour=function(){return hxj_FindObject(this.id+'_HOUR_ID');}
this.getMinute=function(){return hxj_FindObject(this.id+'_MIN_ID');}
this.getTT=function(){return hxj_FindObject(this.id+'_TT_ID');}
this._drawPicker=function(){var strGen=new hxjStringBuilder();if(this.initvalue){this.initvalue=new Date("01/01/2001 "+this.initvalue);}
else{this.initvalue=new Date();}
var nOverMin=this.initvalue.getMinutes()%15;if(nOverMin>0){this.minutes=hxj_ParseInt(this.initvalue.getMinutes()/15)*15+15;}
else{this.minutes=this.initvalue.getMinutes();}
if(this.minutes>=60)
this.minutes=0;this.hours=""+((this.initvalue.getHours()>12)?this.initvalue.getHours()-12:this.initvalue.getHours());this.minutes=""+this.minutes;this.tt=(this.initvalue.getHours()>=12)?"PM":"AM";if(this.fieldname)
strGen.append('<input name="'+this.fieldname+'" id="'+this.fieldname+'" value="'+this.hours.padLeft(2,"0")+":"+this.minutes.padLeft(2,"0")+" "+this.tt+'" type="hidden">\r\n');strGen.append('<table class="timepicker" border=0 cellpadding=0 cellspacing=0 style="border-collapse:collapse;" unselectable="on" onmousedown="return false;">\r\n');strGen.append('<tr height="20">\r\n');strGen.append(' <td width="2" align="center"><img src="'+g_PickerImageDir+'blank.gif"/></td>\r\n');strGen.append(' <td id="'+this.id+'_HOUR_ID" unselectable="on" style="width:15px;" align="center" onmouseover="'+this.id+'_Object._hover(this, true);" onmouseout="'+this.id+'_Object._hover(this, false);" onclick="'+this.id+'_Object._hilight(this);">'+this.hours.padLeft(2,"0")+'</td>\r\n');strGen.append(' <td width="4" align="center">:</td>\r\n');strGen.append(' <td id="'+this.id+'_MIN_ID" unselectable="on" style="width:15px;" align="center" onmouseover="'+this.id+'_Object._hover(this, true);" onmouseout="'+this.id+'_Object._hover(this, false);" onclick="'+this.id+'_Object._hilight(this);">'+this.minutes.padLeft(2,"0")+'</td>\r\n');strGen.append(' <td width="4" align="center"><img src="'+g_PickerImageDir+'blank.gif"/></td>\r\n');strGen.append(' <td id="'+this.id+'_TT_ID" unselectable="on" style="width:15px;" align="center" onmouseover="'+this.id+'_Object._hover(this, true);" onmouseout="'+this.id+'_Object._hover(this, false);" onclick="'+this.id+'_Object._hilight(this);">'+this.tt+'</td>\r\n');strGen.append(' <td><img src="'+g_PickerImageDir+'blank.gif"/></td>\r\n');strGen.append(' <td width="20" align="right">\r\n');strGen.append('  <table border=0 width="100%" height="20" cellpadding=0 cellspacing=0 unselectable="on" onmousedown="return false;" style="border-left:1px solid #BFBFBF;border-collapse:collapse;">\r\n');strGen.append('  <tr>\r\n');strGen.append('   <td unselectable="on" onMouseDown="'+this.id+'_Object._selectMouse(this, true);" onMouseUp="'+this.id+'_Object._unselectMouse(this, true);" style="border-bottom:1px solid #BFBFBF;height:8px;font-size:1px;line-height:1px;background:url('+g_PickerImageDir+'arrowup.gif) no-repeat;">&nbsp;</td>\r\n');strGen.append('  </tr>\r\n');strGen.append('  <tr>\r\n');strGen.append('   <td unselectable="on" onMouseDown="'+this.id+'_Object._selectMouse(this, false);" onMouseUp="'+this.id+'_Object._unselectMouse(this, false);" style="height:8px;font-size:1px;line-height:1px;background:url('+g_PickerImageDir+'arrowdown.gif) no-repeat;">&nbsp;</td>\r\n');strGen.append('  </tr>\r\n');strGen.append('  </table>\r\n');strGen.append(' </td>\r\n');strGen.append('</tr>\r\n');strGen.append('</table>\r\n');return strGen.toString();}
this._drawSelector=function(){return"";}
this._hover=function(tdobj,bHover){if(this._currentTD!=tdobj)
tdobj.style.background=(bHover)?"#C9D7F1":"none";}
this._hilight=function(tdobj){if(this._currentTD)
this._currentTD.style.background="none";tdobj.style.background="#8BAADF";this._currentTD=tdobj;}
this._selectMouse=function(btnobj,bUpArrow){if(!this._currentTD)
this._hilight(this.getHour());btnobj.style.border="1px inset #BFBFBF";this._bUpArrow=bUpArrow;this._pickTime();}
this._unselectMouse=function(btnobj,bUpArrow){btnobj.style.border="1px solid #BFBFBF";if(this._xtimerID){window.clearTimeout(this._xtimerID);this._xtimerID=null;}
this.onSelect(this.hours.padLeft(2,"0")+":"+this.minutes.padLeft(2,"0")+" "+this.tt);}
this._pickTime=function(){var val=this._currentTD.innerHTML;if(this._currentTD.id==this.id+'_HOUR_ID'){val=hxj_ParseInt(val);if(this._bUpArrow){if(++val>12){this.tt=(this.tt=="AM")?"PM":"AM";this.getTT().innerHTML=this.tt;val=1;}}
else{if(--val<1){this.tt=(this.tt=="AM")?"PM":"AM";this.getTT().innerHTML=this.tt;val=12;}}
this.hours=""+val;this._currentTD.innerHTML=this.hours.padLeft(2,"0");}
else if(this._currentTD.id==this.id+'_MIN_ID'){val=hxj_ParseInt(val);if(this._bUpArrow){val+=15;if(val>=60)
val=0;}
else{val-=15;if(val<0)
val=45;}
this.minutes=""+val;this._currentTD.innerHTML=this.minutes.padLeft(2,"0");}
else if(this._currentTD.id==this.id+'_TT_ID'){this.tt=(val=="AM")?"PM":"AM";this._currentTD.innerHTML=this.tt;if(this.tt=="AM"&&this.hours=="12"){this.hours="00";this.getHour().innerHTML=this.hours;}
else if(this.tt=="PM"&&this.hours=="00"){this.hours="12";this.getHour().innerHTML=this.hours;}}
this._xtimerID=eval('window.setTimeout(\''+this.id+'_Object._pickTime()\',300)');}}
function hxjCharmapPicker(pickerid){INHERIT_CLASS(this,new hxjPicker(pickerid));this._drawStyle=function(){var strGen="";this.bgimage="url("+g_PickerImageDir+"charmap.gif) no-repeat";this.onbgimage="url("+g_PickerImageDir+"charmap_on.gif) no-repeat";if(!this.border)
this.border="0px solid transparent";this.onborder="1px solid #999999";strGen=('background:'+this.bgimage+';');strGen+=('border:'+this.border+';');if(this.width)
strGen+=('width:'+hxj_MakePixel(this.width)+';');if(this.height)
strGen+=('height:'+hxj_MakePixel(this.height)+';');return strGen;}
this._drawPicker=function(){var strGen=new hxjStringBuilder();strGen.append('<div id="'+this.id+'_Picker_ID" class="charmappicker" title="'+this.title+'" unselectable="on" onclick="'+this.id+'_Object.show();return hxj_CancelEvent(event);" onmouseover="'+this.id+'_Object.onMouseOver();" onmouseout="'+this.id+'_Object.onMouseOut();" style="'+this._drawStyle()+'">\r\n');if(this.fieldname)
strGen.append('<input name="'+this.fieldname+'" id="'+this.fieldname+'" value="'+this.initvalue+'" type="hidden">\r\n');strGen.append('</div>\r\n');return strGen.toString();}
this._drawSelector=function(){var strGen=new hxjStringBuilder();var charsPerRow=20,tdWidth=20,tdHeight=20;var cols=-1;strGen.append('<div id="'+this.id+'_Select_ID" class="charmapDropDown" unselectable="on" onMouseOver="'+this.id+'_Object.handleTimer(false);" onMouseOut="'+this.id+'_Object.handleTimer(true);">\r\n');strGen.append(' <table border=0 cellpadding=0 cellspacing=1 width="'+(charsPerRow*tdWidth)+'" unselectable="on" onmousedown="return false;">\r\n');strGen.append(' <tr height="'+tdHeight+'">\r\n');for(var i=0;i<g_arrCharmap.length;i++){if(g_arrCharmap[i][2]==true){cols++;strGen.append('<td unselectable="on" width="'+tdWidth+'" height="'+tdHeight+'" style="border:1px solid #AAAAAA;color:#000000;text-align:center;"');strGen.append(' onmouseover="this.style.background=\'#CCCCCC\';"');strGen.append(' onmouseout="this.style.background=\'#FFFFFF\';" nowrap="nowrap"');strGen.append(' onclick="'+this.id+'_Object.onSelect(\''+g_arrCharmap[i][0]+'\');"');strGen.append(' title="'+g_arrCharmap[i][3]+'">\r\n');strGen.append(g_arrCharmap[i][1]);strGen.append('</td>\r\n');if((cols+1)%charsPerRow==0)
strGen.append('</tr><tr height="'+tdHeight+'">\r\n');}}
if(cols%charsPerRow>0){var padd=charsPerRow-(cols%charsPerRow);for(var i=0;i<padd-1;i++)
strGen.append('<td width="'+tdWidth+'" height="'+tdHeight+'" style="border:1px solid #AAAAAA;color:#000000;text-align:center;">&nbsp;</td>\r\n');}
strGen.append(' </tr>\r\n');strGen.append(' </table>\r\n');strGen.append('</div>\r\n');return strGen.toString();}}
function getPicker(id){try{return eval(id+"_Object");}catch(ex){}}
function showPicker(obj,target){if(typeof obj=="string"){obj=hxj_FindObject(obj);}
var picker=eval(obj.id+"_Object");if(picker!=null){if(!obj.issetevent){obj.oldmouseover=obj.onmouseover;obj.oldmouseout=obj.onmouseout;obj.onmouseover=function(){picker.onMouseOver();if(obj.oldmouseover)obj.oldmouseover();}
obj.onmouseout=function(){picker.onMouseOut();if(obj.oldmouseout)obj.oldmouseout();}
obj.issetevent=true;}
picker.show(target?target:obj);}}
function initPicker(divs){if(hxj_IsNull(divs))
return;for(var i=0;i<divs.length;i++){var div=divs[i];var pickerType=div.getAttribute("picker");switch(pickerType){case"font":eval(div.id+"_Object = new hxjFontPicker()");break;case"fontsize":eval(div.id+"_Object = new hxjFontSizePicker()");break;case"image":eval(div.id+"_Object = new hxjImagePicker()");break;case"value":eval(div.id+"_Object = new hxjValuePicker()");break;case"color":eval(div.id+"_Object = new hxjColorPicker()");break;case"colorex":eval(div.id+"_Object = new hxjColorPickerEx()");break;case"month":eval(div.id+"_Object = new hxjMonthPicker()");break;case"date":eval(div.id+"_Object = new hxjDatePicker()");break;case"time":eval(div.id+"_Object = new hxjTimePicker()");break;case"charmap":eval(div.id+"_Object = new hxjCharmapPicker()");break;case"object":eval(div.id+"_Object = new hxjObjectPicker()");break;default:continue;}
var picker=eval(div.id+"_Object");if(picker!=null){picker.init(div);div.picker=picker;}}}

/** popupmenu.js **/
var JS_POPUPMENU=true;var _menuMap=new hxjMap();var _menuArray=new hxjArray();var _menuitemMap=new hxjMap();var _menuActive=null;var _menuTid=0;var _openDelay=10;var _closeDelay=350;var _TB_="<table border=0 cellpadding=0 cellspacing=0 style='padding:0px;'";function _hxjMenu_MIover(obj,itemid){var oMI=_menuitemMap[itemid];if(_menuTid)
_oW.clearTimeout(_menuTid);if(oMI.onimage)hxj_FindObject("img"+oMI.itemid).src=oMI.onimage;if(oMI.submenu&&oMI.onsubimage)hxj_FindObject("simg"+oMI.itemid).src=oMI.onsubimage;if(oMI.onbgcolor)obj.style.backgroundColor=oMI.onbgcolor;if(oMI.onbgimage)obj.style.backgroundImage="url("+oMI.onbgimage+")";if(oMI.ontxtcolor)obj.style.color=oMI.ontxtcolor;if(oMI.ontxtDecoration)obj.style.textDecoration=oMI.ontxtDecoration;if(oMI.onfont){obj.style.font=oMI.onfont;}
else{if(oMI.onfontfamily)obj.style.fontFamily=oMI.onfontfamily;if(oMI.onfontstyle)obj.style.fontStyle=oMI.onfontstyle;if(oMI.onfontsize)obj.style.fontSize=oMI.onfontsize;if(oMI.onfontweight)obj.style.fontWeight=oMI.onfontweight;}
if(oMI.onitemborder){obj.style.border=oMI.onitemborder;if(oMI.image||(oMI.submenu&&oMI.subimage)){obj.style.padding="0px 0px";}
else{obj.style.padding=(oMI.padding-1)+"px "+(oMI.padding-1)+"px";}}
if(oMI.menu.arrSubMenus!=null)
_hxjMenu_HideSubmenu(oMI.menu.arrSubMenus);if(oMI.submenu&&!oMI.collapse){var oSM=_menuMap[oMI.submenu];if(oSM){var oMS=oMI.menu.menustyle;var rcRect=hxj_GetObjectRect(obj);oSM._AdjustPosition(oMS.orientation,rcRect,2);oSM._ShowMenu(true);}}}
function _hxjMenu_MIout(obj,itemid){var oMI=_menuitemMap[itemid];if(oMI.status)_oW.status=_TN_;if(oMI.onimage)hxj_FindObject("img"+oMI.itemid).src=oMI.image;if(oMI.submenu&&oMI.onsubimage)hxj_FindObject("simg"+oMI.itemid).src=oMI.subimage;if(oMI.onbgcolor)obj.style.backgroundColor=(oMI.bgcolor)?oMI.bgcolor:_TS_;if(oMI.onbgimage)obj.style.backgroundImage=(oMI.bgimage)?"url("+oMI.bgimage+")":_NN_;if(oMI.ontxtcolor)obj.style.color=(oMI.txtcolor)?oMI.txtcolor:_TN_;if(oMI.ontxtDecoration)obj.style.textDecoration=(oMI.txtDecoration)?oMI.txtDecoration:_NN_;if(oMI.onfont){obj.style.font=(oMI.font)?oMI.font:_TN_;}
else{if(oMI.onfontfamily)obj.style.fontFamily=(oMI.fontfamily)?oMI.fontfamily:_TN_;if(oMI.onfontstyle)obj.style.fontStyle=(oMI.fontstyle)?oMI.fontstyle:"normal";if(oMI.onfontsize)obj.style.fontSize=(oMI.fontsize)?oMI.fontsize:"8pt";if(oMI.onfontweight)obj.style.fontWeight=(oMI.fontweight)?oMI.fontweight:"normal";}
if(oMI.onitemborder){obj.style.border=(oMI.itemborder)?oMI.itemborder:_NN_;if(oMI.image||(oMI.submenu&&oMI.subimage)){obj.style.padding="1px 1px";}
else{obj.style.padding=oMI.padding+"px "+oMI.padding+"px";}}}
function _hxjMenu_MIclick(obj,itemid){var oMI=_menuitemMap[itemid];if(!oMI.url||document.onclick!=null){_oW.status=_JV_;}
else{var win=(oMI.target)?_oW.frames[oMI.target]:_oW;if(win){win.location.href=oMI.url;}
else{var _ww=_oW.open(oMI.url,oMI.target,(oMI.targetfeatures)?oMI.targetfeatures:"");_ww.focus();}
_hxjMenu_HideAll();}}
function _hxjMenu_MouseOut(){_menuTid=_oW.setTimeout("_hxjMenu_HideAll()",_closeDelay);}
function _hxjMenu_HideAll(){if(_menuActive!=null){if(_menuActive.arrSubMenus!=null)
_hxjMenu_HideSubmenu(_menuActive.arrSubMenus);_menuActive._ShowMenu(false);_menuActive=null;}
else{for(var i=0;i<_menuArray.length;i++){var menu=_menuArray[i];if(!menu.menustyle.alwaysvisible){if(menu.arrSubMenus!=null)
_hxjMenu_HideSubmenu(menu.arrSubMenus);menu._ShowMenu(false);}}}}
function _hxjMenu_HideSubmenu(arrSubMenu){for(var i=0;i<arrSubMenu.length;i++){var submenu=_menuMap[arrSubMenu[i]];if(submenu!=null&&submenu.div.style.visibility!="hidden"){if(submenu.arrSubMenus!=null)
_hxjMenu_HideSubmenu(submenu.arrSubMenus);submenu._ShowMenu(false);}}}
var _ENUM_MS={alwaysvisible:0,itemwidth:1,itemheight:2,openstyle:4,opendelay:5,closedelay:6,divides:9,separatorall:10,separatorcolor:11,separatorsize:12,separatorwidth:13,separatorheight:14,separatorpadding:15,separatoralign:16,separatorvalign:17,separatorimage:18,highlightcolor:19,highlightbgcolor:20,highlightbgimage:21,highlightfont:22,highlightborder:23,openonclick:24,clickcolor:25,clickbgcolor:26,clickimage:27,clicksubimage:28,clickbgimage:29,clickborder:30,clickfont:31,headercolor:32,headerbgcolor:33,headerborder:34,headerfont:35,headerbgimage:36,image:37,onimage:38,imagepadding:39,imageborder:40,imageonborder:41,imagealign:42,imagevalign:43,imagewidth:44,imageheight:45,subimage:46,onsubimage:47,subimagepadding:48,subimageborder:49,subimageonborder:50,subimagealign:51,subimagevalign:52,subimagewidth:53,subimageheight:54,visitedcolor:55,itemborder:56,onitemborder:57,menubgimage:58,menuclass:59,textclass:60,itemclass:61,onitemclass:62,separatorclass:63,capitalize:64,ontextclass:65};function hxjMenuStyle(sID){INHERIT_CLASS(this,new hxjStyle());for(var item in _ENUM_MS)
this[item]=null;this.Init=function(){if(this.built)
return;if(_oB.isIE5x){if(!this.cursor)this.cursor="hand";if(!_oB.isIE&&this.cursor=="hand")this.cursor="pointer";if(!this.padding||this.padding<=0)this.padding=1;if(!this.margin)this.margin=0;if(!this.width&&this.itemwidth)this.width=this.itemwidth;if(!this.position)this.position="absolute";if(this.position=="fixed"&&!_oB.isNS)this.position="absolute";if(this.overflow=="scroll")this.overflow="auto";}
else{this.base.Init.call(this);}
if(this.visitedcolor){var vC=this.visitedcolor;var oC=this.txtcolor;if(!oC)oC="#000000";if(!vC)vC="#ff0000";var oVst=hxj_FindObject(sID);if(oVst){oVst.innerHTML=".ss_"+sID+":link{color:"+oC+"}.ss_"+sID+":visited{color:"+vC+"}";}
else{_oD.write("<style id='"+sID+"'>.ss_"+sID+":link{color:"+oC+"}.ss_"+sID+":visited{color:"+vC+"}</style>");}}
if(!this.opendelay)this.opendelay=_openDelay;if(!this.closedelay)this.closedelay=_closeDelay;if(this.closedelay<_closeDelay)this.closedelay=_closeDelay;if(!this.position&&!this.alwaysvisible&&_oB.isNS)this.position="fixed";if(!this.separatorcolor)this.separatorcolor=this.txtcolor;if(!this.separatorsize&&this.separatorall)this.separatorsize=1;if(!this.separatorpadding)this.separatorpadding=1;if(this.orientation=="horizontal"){this.orientation=1;if(this.separatorwidth)this.separatorsize=this.separatorwidth;if(this.itemheight)this.height=this.itemheight;}
else{this.orientation=0;if(this.separatorheight)this.separatorsize=this.separatorheight;if(this.itemwidth)this.width=this.itemwidth;}
this.built=1;}}
var _ENUM_MI={menu:0,text:1,url:2,submenu:3,status:4,type:5,target:6,targetfeatures:7,itemwidth:8,itemheight:9,image:10,onimage:11,imageurl:12,imageborder:14,title:15,itemborder:16,onitemborder:17,subimage:18,onsubimage:19,subimageborder:20,state:21,itemid:22,collapse:23};function hxjMenuItem(alink,oMenuStyle){INHERIT_CLASS(this,new hxjStyle());for(var item in _ENUM_MI)
this[item]=null;for(var item in oMenuStyle)
this[item]=oMenuStyle[item];this["url"]=alink.href;this["text"]=alink.innerHTML;this["target"]=alink.target;hxj_ParseArgument(this,alink);if(this.collapse){this.subimage=null;this.onsubimage=null;}}
function hxjMenu(div){this.Create=function(div){div.menu=this;this.div=div;this.menuid=div.id;this.arrSubMenus=null;this.arrMenuItems=new hxjArray();this.menustyle=eval(div.getAttribute("menustyle"));if(!this.menustyle){this.menustyle=div.menustyle;if(!this.menustyle)
this.menustyle=new hxjMenuStyle(div.id);}
this.menustyle.Init();var alinks=div.getElementsByTagName("a");for(var i=0;i<alinks.length;i++){if(alinks[i].parentNode!=div)
continue;var oMI=new hxjMenuItem(alinks[i],this.menustyle);if(oMI!=null){oMI.menu=this;oMI.itemid=this.menuid+"_"+i;if(oMI.submenu){if(!this.arrSubMenus)
this.arrSubMenus=new hxjArray();this.arrSubMenus.push(oMI.submenu);}
this.arrMenuItems.push(oMI);_menuitemMap[oMI.itemid]=oMI;}}
if(this.menustyle.left){div.style.left=hxj_MakePixel(this.menustyle.left);}
else if(!this.menustyle.alwaysvisible){div.style.left="-999px";}
if(this.menustyle.top){div.style.top=hxj_MakePixel(this.menustyle.top);}
else if(!this.menustyle.alwaysvisible){div.style.top="-999px";}
if(this.menustyle.width)
div.style.width=hxj_MakePixel(this.menustyle.width);if(this.menustyle.height)
div.style.height=hxj_MakePixel(this.menustyle.height);if(this.menustyle.position)
div.style.position=this.menustyle.position;if(this.menustyle.high3dcolor&&this.menustyle.low3dcolor){div.style.borderBottomColor=this.menustyle.high3dcolor;div.style.borderRightColor=this.menustyle.high3dcolor;div.style.borderTopColor=this.menustyle.low3dcolor;div.style.borderLeftColor=this.menustyle.low3dcolor;}
if(this.menustyle.margin){div.style.padding=hxj_MakePixel(this.menustyle.margin);}
else{if(this.menustyle.alwaysvisible){div.style.padding="1px 0";}
else{div.style.padding="1px";}}
if(this.menustyle.bgcolor)
div.style.backgroundColor=this.menustyle.bgcolor;if(this.menustyle.bgimage)
div.style.backgroundImage="url("+this.menustyle.bgimage+")";if(this.menustyle.border){div.style.border=this.menustyle.border;}
else if(!this.menustyle.alwaysvisible&&!div.style.border){div.style.border="1px solid #666666";}
div.style.display="block";div.innerHTML=this._drawMenu();if(this.menustyle.menuclass)
div.className=this.menustyle.menuclass;div.onmouseout=_hxjMenu_MouseOut;div.onmouseover=function(){if(_menuTid)_oW.clearTimeout(_menuTid);}
if(this.menustyle.alwaysvisible){div.style.visibility="visible";if(this.menustyle.zindex)
div.style.zIndex=this.menustyle.zIndex;}
else{div.style.zIndex=(this.menustyle.zindex)?this.menustyle.zindex:"901";}
if(div.style.position=="absolute"){div.parentNode.removeChild(div);_oD.body.insertBefore(div,_oD.body.firstChild);}
_menuMap[this.menuid]=this;_menuArray.push(this);}
this._ShowMenu=function(bShow){var bApply=false;if(this.div.filters){var sFlt=(bShow)?this.menustyle.onfilter:this.menustyle.filter;if(sFlt){var iedf="FILTER:";if(this.div.filters[0])
this.div.filters[0].stop();sFlt=sFlt.split(";");for(var i=0;i<sFlt.length;i++){iedf+=" progid:DXImageTransform.Microsoft."+sFlt[i];if(_oB.isIE55)
break;}
this.div.style.filter=iedf;if(this.div.filters[0]){this.div.filters[0].apply();hxj_ShowObject(this.div,bShow);this.div.filters[0].play();bApply=true;}}}
if(!bApply)
hxj_ShowObject(this.div,bShow);}
this._AdjustPosition=function(bHorz,rcBase,nOffset){var szWin=hxj_GetWindowSize();var ptScroll=hxj_GetScrollXY();var rcMenu=hxj_GetObjectRect(this.div);var cx=null,cy=null;if(this.menustyle.minwidth&&this.menustyle.minwidth>rcMenu.Width()){cx=this.menustyle.minwidth;rcMenu.right=rcMenu.left+cx;}
if(this.menustyle.maxwidth&&this.menustyle.maxwidth<rcMenu.Width()){cx=this.menustyle.maxwidth;rcMenu.right=rcMenu.left+cx;}
if(this.menustyle.minheight&&this.menustyle.minheight>rcMenu.Height()){cy=this.menustyle.minheight;rcMenu.bottom=rcMenu.top+cy;}
if(this.menustyle.maxheight&&this.menustyle.maxheight<rcMenu.Height()){cy=this.menustyle.maxheight;rcMenu.bottom=rcMenu.top+cy;}
if(bHorz){rcBase.OffsetRect(0,rcBase.Height()+nOffset);if(rcBase.Width()>rcMenu.Width()){rcMenu.right=rcMenu.left+rcBase.Width();cx=rcMenu.Width();}
if((rcBase.left+rcMenu.Width()+nOffset)>szWin.cx+ptScroll.x){if((rcBase.right+nOffset)>szWin.cx)
rcBase.OffsetRect(-((rcBase.right+nOffset)-szWin.cx),0);rcBase.OffsetRect(-(rcMenu.Width()-rcBase.Width()),0);}}
else{if((rcBase.right+rcMenu.Width()+nOffset)>szWin.cx){if(rcMenu.Width()>rcBase.left){var xpd=(rcBase.right+rcMenu.Width()+nOffset)-szWin.cx;rcBase.left=rcBase.right-xpd;rcBase.right=szWin.cx;}
else{rcBase.OffsetRect(-(rcMenu.Width()+(nOffset/2)),0);}}
else{if(_oB.isSafari){rcBase.OffsetRect(rcBase.Width()-nOffset,0);}
else{rcBase.OffsetRect(rcBase.Width()+nOffset,0);}}}
if(!this.menustyle.orientation){var objHeight=(rcBase.top-ptScroll.y)+this.div.offsetHeight;if(!bHorz&&(objHeight>szWin.cy)){rcBase.OffsetRect(0,szWin.cy-(objHeight+nOffset));if(rcBase.top<nOffset)
rcBase.top=nOffset;}
if(this.menustyle.overflow=="auto"){if(this.div.offsetHeight>szWin.cy){if(this.div.style.overflowX){this.div.style.overflowX="visible";this.div.style.overflowY="auto";}
else{this.div.style.overflow="auto";}
cx=rcMenu.Width()+20;cy=szWin.cy-20;if(!_oB.isIE)
cy-=4;}
else if((this.div.scrollHeight>this.div.offsetHeight)&&(this.div.scrollHeight<szWin.cy)){cx=this.div.clientWidth;cy=this.div.scrollHeight;}}}
hxj_MoveObject(this.div,rcBase.left,rcBase.top,cx,cy);}
this._drawMenu=function(){var strGen=new hxjStringBuilder();var oMS=this.menustyle;if(this.arrMenuItems.length>0){strGen.append(_TB_);strGen.append((oMS.align)?(" align="+oMS.align):_TN_);strGen.append((oMS.height)?(" height="+oMS.height):_TN_);if(oMS.orientation){if(oMS.itemwidth=="100%"){oMS.itemwidth=Math.ceil(100/this.arrMenuItems.length)+"%";strGen.append(" width='100%'");}
if(oMS.divides>1)this.rwC=Math.ceil(this.arrMenuItems.length/oMS.divides);this.rwT=this.rwC;}
else{if(hxj_ParseInt(oMS.itemwidth)>0||hxj_ParseInt(oMS.width)>0){strGen.append(" width='100%'");}}
strGen.append(" id='tbl"+this.menuid+"'>\r\n");strGen.append("<tr>\r\n");for(var i=0;i<this.arrMenuItems.length;i++){strGen.append(this._drawMenuItem(i,this.arrMenuItems[i]));}
strGen.append("</tr>\r\n");strGen.append("</table>\r\n");this.built=1;}
return strGen.toString();}
this._drawMenuItem=function(i,oMI){var strGen=new hxjStringBuilder();var oMS=this.menustyle;if(oMS.itemwidth)
oMI.itemwidth=oMS.itemwidth;if(!oMS.orientation&&i>0)
strGen.append("</tr>\r\n<tr>\r\n");if(oMI.type=="separator"){if(i+1<this.arrMenuItems.length)
strGen.append(this._drawSeparator());}
else{var sLink=this._drawMenuLink(oMI);var dividespan=0;if(oMS.orientation&&this.rwC>1){if(i+1==this.rwT&&i+1<this.arrMenuItems.length){strGen.append("</tr>\r\n<tr>\r\n");this.rwT=this.rwT+this.rwC;if(this.rwT>this.arrMenuItems.length){dividespan=this.rwT-this.arrMenuItems.length;if(oMS.separatorall)
dividespan=(dividespan*2)+1;}}}
strGen.append("<td id='el"+oMI.itemid+"' unselectable='on'");strGen.append(" onmouseover='_hxjMenu_MIover(this, \""+oMI.itemid+"\")' ");strGen.append(" onmouseout='_hxjMenu_MIout(this, \""+oMI.itemid+"\")' ");strGen.append(" onclick='_hxjMenu_MIclick(this, \""+oMI.itemid+"\")' ");strGen.append((dividespan>0)?(" colspan="+dividespan):_TN_);strGen.append((oMI.itemwidth)?(" width="+oMI.itemwidth):((oMI.maxwidth)?_TN_:" nowrap"));strGen.append((oMI.align)?(" align="+oMI.align):_TN_);strGen.append((oMI.valign)?(" valign="+oMI.align):_TN_);strGen.append(" style='");strGen.append(";padding:"+((oMI.padding)?hxj_MakePixel(oMI.padding):((oMI.itemborder)?"1px":"0px")));strGen.append((oMI.itemborder)?(";border:"+oMI.itemborder):_TN_);strGen.append((oMI.itemwidth)?(";width:"+oMI.itemwidth):_TN_);strGen.append((oMI.itemheight)?(";height:"+oMI.itemheight):_TN_);strGen.append(";cursor:"+((oMI.url)?oMI.cursor:"default"));if(oMI.menubgimage){strGen.append(";background-image:url("+oMI.menubgimage+")");}
else{strGen.append((oMI.bgcolor)?(";background-color:"+oMI.bgcolor):_TN_);}
strGen.append("' ");strGen.append(">\r\n");if(oMI.image||(oMI.submenu&&oMI.subimage)){strGen.append(_TB_);strGen.append(" width='100%' height='100%'>\r\n");strGen.append("<tr>\r\n");if(oMI.image){strGen.append("<td id='_img"+oMI.itemid+"' unselectable='on'");strGen.append((oMS.imagealign)?(" align="+oMS.imagealign):_TN_);strGen.append((oMS.imagevalign)?(" valign="+oMS.imagevalign):_TN_);strGen.append((oMS.imagewidth)?(" width="+hxj_MakePixel(oMS.imagewidth)):_TN_);strGen.append((oMS.imagepadding)?(" style='padding:"+hxj_MakePixel(oMS.imagepadding)+"'"):_TN_);strGen.append(">\r\n");strGen.append((oMI.imageurl)?("<a href='"+oMI.imageurl+"' unselectable='on'>\r\n"):_TN_);strGen.append("<img id='img"+oMI.itemid+"' unselectable='on'");strGen.append(" border="+((oMI.imageborder)?oMI.imageborder:"0"));strGen.append((oMI.title)?(" alt='"+oMI.title+"'"):_TN_);strGen.append((oMS.imagewidth)?(" width="+hxj_MakePixel(oMS.imagewidth)):_TN_);strGen.append((oMS.imageheight)?(" height="+hxj_MakePixel(oMS.imageheight)):_TN_);strGen.append(" style='display:block' ");strGen.append(" src='"+oMI.image+"'/>\r\n");strGen.append((oMI.imageurl)?"</a>\r\n":_TN_);strGen.append("</td>\r\n");}
strGen.append("<td width=100% unselectable='on' ");strGen.append((oMS.maxwidth)?_TN_:" nowrap");strGen.append((oMS.align)?(" align="+oMS.align):_TN_);strGen.append((oMS.valign)?(" valign="+oMS.valign):_TN_);strGen.append(">\r\n");strGen.append(sLink);strGen.append("</td>\r\n");if(oMI.submenu&&oMI.subimage){strGen.append("<td id='_simg"+oMI.itemid+"' unselectable='on'");strGen.append((oMS.subimagealign)?(" align="+oMS.subimagealign):_TN_);strGen.append((oMS.subimagevalign)?(" valign="+oMS.subimagevalign):_TN_);strGen.append((oMS.subimagewidth)?(" width="+hxj_MakePixel(oMS.subimagewidth)):_TN_);strGen.append((oMS.subimagepadding)?(" style='padding:"+hxj_MakePixel(oMS.subimagepadding)+"'"):_TN_);strGen.append(">\r\n");strGen.append("<img id='simg"+oMI.itemid+"' unselectable='on'");strGen.append(" border="+((oMI.subimageborder)?oMI.subimageborder:"0"));strGen.append((oMS.subimagewidth)?(" width="+hxj_MakePixel(oMS.subimagewidth)):_TN_);strGen.append((oMS.subimageheight)?(" height="+hxj_MakePixel(oMS.subimageheight)):_TN_);strGen.append(" style='display:block' ");strGen.append(" src='"+oMI.subimage+"'/>\r\n");strGen.append("</td>\r\n");}
strGen.append("</tr>\r\n");strGen.append("</table>\r\n");}
else{strGen.append(sLink);}
strGen.append("</td>\r\n");if((oMI.submenu&&oMI.collapse)||(oMS.separatorall&&(i+1<this.arrMenuItems.length))){if(!oMS.orientation)
strGen.append("</tr>\r\n<tr>\r\n");strGen.append(this._drawSeparator());}
if(oMI.submenu&&oMI.collapse){var div=hxj_FindObject(oMI.submenu);if(div.menu==null){var oSubMenu=new hxjMenu();if(oSubMenu!=null)
oSubMenu.Create(div);}
strGen.append("</tr>\r\n<tr><td style='padding:1px;' class='"+div.menu.menustyle.menuclass+"'>\r\n");strGen.append(div.innerHTML);strGen.append("</td>\r\n");if(oMS.separatorall&&(i+1<this.arrMenuItems.length)){if(!oMS.orientation)
strGen.append("</tr>\r\n<tr>\r\n");strGen.append(this._drawSeparator());}}}
return strGen.toString();}
this._drawMenuLink=function(oMI){var strGen=new hxjStringBuilder();var oMS=this.menustyle;strGen.append("<div id='lnk"+oMI.itemid+"' unselectable='on'");strGen.append(" href='"+((oMI.url)?oMI.url:_JV_)+"'");strGen.append((oMI.visitedcolor)?(" class='ss_"+oMS.itemid+"'"):_TN_);strGen.append(" style='border:none;background:transparent;display:block");strGen.append((oMI.txtcolor)?(";color:"+oMI.txtcolor):_TN_);if(oMI.font){strGen.append(";font:"+oMI.font);}
else{strGen.append((oMI.fontfamily)?(";font-family:"+oMI.fontfamily):_TN_);strGen.append((oMI.fontsize)?(";font-size:"+oMI.fontSize):_TN_);strGen.append((oMI.fontstyle)?(";font-style:"+oMI.fontstyle):_TN_);strGen.append((oMI.fontweight)?(";font-weight:"+oMI.fontweight):_TN_);}
strGen.append((oMI.txtDecoration)?(";text-decoration:"+oMI.txtDecoration):_TN_);strGen.append((oMI.txtOverflow)?(";text-overflow:"+oMI.txtOverflow):_TN_);strGen.append((oMI.txtTransform)?(";text-transform:"+oMI.txtTransform):_TN_);strGen.append((oMI.txtAlign)?(";text-align:"+oMI.txtAlign):_TN_);strGen.append((oMI.letterSpacing)?(";letter-spacing:"+hxj_MakePixel(oMI.letterSpacing)):_TN_);strGen.append((oMI.lineHeight)?(";line-height:"+hxj_MakePixel(oMI.lineHeight)):_TN_);strGen.append((oMI.zoom)?(";zoom:"+hxj_MakePercent(oMI.zoom)):_TN_);strGen.append((oMI.rawcss)?(";"+oMI.rawcss):_TN_);strGen.append("' ");strGen.append(">"+oMI.text+"</div>\r\n");return strGen.toString();}
this._drawSeparator=function(){var strGen=new hxjStringBuilder();var oMS=this.menustyle;strGen.append("<td unselectable='on'");strGen.append(" align="+((oMS.separatoralign)?oMS.separatoralign:"center"));strGen.append(" valign="+((oMS.separatorvalign)?oMS.separatorvalign:"middle"));strGen.append(" style='font-size:1px;overflow:hidden;");strGen.append(";padding:"+((oMS.separatorpadding)?hxj_MakePixel(oMS.separatorpadding):"0px"));strGen.append("'>\r\n");strGen.append("<div style='padding:0px;");if(!_oB.isMac)
strGen.append(";overflow:hidden");if(oMS.separatorimage){strGen.append(";background-image:url("+oMS.separatorimage+")");}
else{strGen.append((oMS.separatorcolor)?(";background-color:"+oMS.separatorcolor):_TN_);}
if(oMS.orientation){strGen.append(";width:"+((oMS.separatorsize)?hxj_MakePixel(oMS.separatorsize):"1px"));strGen.append(";height:"+((oMS.separatorheight)?hxj_MakePixel(oMS.separatorheight):"12px;"));}
else{strGen.append(";width:"+((oMS.separatorwidth)?hxj_MakePixel(oMS.separatorwidth):"100%"));strGen.append(";height:"+((oMS.separatorsize)?hxj_MakePixel(oMS.separatorsize):"1px;"));}
strGen.append("' ");strGen.append("><img src='"+_SVR_+"/jslib/popupmenu/image/blank.gif' border='0'/></div>\r\n");strGen.append("</td>\r\n");return strGen.toString();}
if(div!=null)
this.Create(div);}
function showPopupMenu(baseobj,menuid,bHorz){var div=hxj_FindObject(menuid);if(div){var rcRect=hxj_GetObjectRect(baseobj);div.menu._AdjustPosition(bHorz,rcRect,2);div.menu._ShowMenu(true);_menuTid=_oW.setTimeout("_hxjMenu_HideAll()",2000);_menuActive=div.menu;}}
function initJsMenu(){var menus=document.getElementsByTagName("div");for(var m=0;m<menus.length;m++){var div=menus[m];if(div.className!="jsmenu")
continue;if(div.menu!=null)
continue;var oMenu=new hxjMenu();if(oMenu!=null)
oMenu.Create(div);}}

/** jsmenu.js **/
var JS_MENU=true;var MenuItem={makeMenuItem:function(div,alink){alink.onItemOver=new Function();alink.onItemOut=new Function();alink.onmouseover=MenuItem.onMouseOver;alink.onmouseout=MenuItem.onMouseOut;alink.isinit=true;alink.menu=div;if(!hxj_IsNull(alink.parentNode.getAttribute("menuid"))){alink.submenu=hxj_FindObject(alink.parentNode.getAttribute("menuid"));if(alink.submenu!=null){alink.submenu.style.position="absolute";alink.submenu.ishorzontal=hxj_ParseInt(div.getAttribute("ishorz"));div.submenus.push(alink.submenu);}}},onMouseOver:function(event){if(PopupMenu.menuTid){window.clearTimeout(PopupMenu.menuTid);PopupMenu.menuTid=0;}
if(this.menu.submenus.length>0)
PopupMenu.hideSubMenus(this.menu.submenus);if(this.submenu!=null){if(PopupMenu.adjustPosition(this.submenu,hxj_GetObjectRect(this),this.submenu.ishorzontal)){hxj_ShowObject(this.submenu,true);PopupMenu.adjustPosition(this.submenu,hxj_GetObjectRect(this),this.submenu.ishorzontal);}
hxj_ShowObject(this.submenu,true);}},onMouseOut:function(event){}};var PopupMenu={firstContainer:null,lastContainer:null,menuTid:0,makeMenuContainer:function(div){if(this.firstContainer==null){this.firstContainer=this.lastContainer=div;div.previousContainer=null;div.nextContainer=null;}
else{div.previousContainer=this.lastContainer;div.nextContainer=null;this.lastContainer.nextContainer=div;this.lastContainer=div;}
div.submenus=new hxjArray();div.isinit=true;div.onmouseover=PopupMenu.onMouseOver;div.onmouseout=PopupMenu.onMouseOut;var ulNode=hxj_FindChild(div,"ul");var items=hxj_GetChildNodes(ulNode,"li");if(items!=null){for(var i=0;i<items.length;i++){var childs=items[i].childNodes;for(var c=0;c<childs.length;c++){var cnode=childs[c];if(cnode.nodeName.toLowerCase()=="a"){MenuItem.makeMenuItem(div,cnode);}
else if(cnode.nodeName.toLowerCase()=="div"){PopupMenu.makeMenuContainer(cnode);}}}}
if(div.getAttribute("ispopup")=="1"){ulNode.style.display="none";ulNode.style.width="auto";ulNode.style.display="block";}
if(div.style.position=="absolute"||div.getAttribute("ispopup")=="1"){div.style.position="absolute";div.style.visibility="hidden";div.parentNode.removeChild(div);document.body.insertBefore(div,document.body.firstChild);}
else{div.style.visibility="visible";}},onMouseOver:function(event){if(PopupMenu.menuTid){window.clearTimeout(PopupMenu.menuTid);PopupMenu.menuTid=0;}},onMouseOut:function(event){PopupMenu.menuTid=window.setTimeout(function(){PopupMenu.hideMenuAll()},1000);},showPopupMenu:function(baseobj,menuid,bHorz){var menu=hxj_FindObject(menuid);if(menu){var rcRect=hxj_GetObjectRect(baseobj);PopupMenu.adjustPosition(menu,rcRect,bHorz);hxj_ShowObject(menu,true);PopupMenu.menuTid=window.setTimeout(function(){PopupMenu.hideMenuAll()},1000);}},hideSubMenus:function(arrMenus){for(var i=0;i<arrMenus.length;i++){var menu=arrMenus[i];if(menu!=null&&menu.style.visibility!="hidden"){if(menu.submenus.length>0)
PopupMenu.hideSubMenus(menu.submenus);hxj_ShowObject(menu,false);}}},hideMenuAll:function(){if(PopupMenu.menuTid){var container=PopupMenu.firstContainer;while(container!=null){PopupMenu.hideSubMenus(container.submenus);if(container.style.position=="absolute")
hxj_ShowObject(container,false);container=container.nextContainer;}}},adjustPosition:function(menu,rcBase,bHorz){var szWin=hxj_GetWindowSize();var ptScroll=hxj_GetScrollXY();var rcMenu=hxj_GetObjectRect(menu);var cx=null,cy=null;var nOffset=1;var bAdjusted=false;if(menu.style.minwidth&&menu.style.minwidth>rcMenu.Width()){cx=menu.style.minwidth;rcMenu.right=rcMenu.left+cx;}
if(menu.style.minheight&&menu.style.minheight>rcMenu.Height()){cy=menu.style.minheight;rcMenu.bottom=rcMenu.top+cy;}
if(bHorz){rcBase.OffsetRect(0,rcBase.Height()+nOffset);if(rcBase.Width()>rcMenu.Width()){rcMenu.right=rcMenu.left+rcBase.Width();cx=rcMenu.Width();}
if((rcBase.left+rcMenu.Width()+nOffset)>(szWin.cx+ptScroll.x)){if((rcBase.right+nOffset)>szWin.cx){rcBase.OffsetRect(-((rcBase.right+nOffset)-szWin.cx),0);}
rcBase.OffsetRect(-(rcMenu.Width()-rcBase.Width()),0);bAdjusted=true;}}
else{if((rcBase.right+rcMenu.Width()+nOffset)>szWin.cx){if(rcMenu.Width()>rcBase.left){var xpd=(rcBase.right+rcMenu.Width()+nOffset)-szWin.cx;rcBase.left=rcBase.right-xpd;rcBase.right=szWin.cx;}
else{rcBase.OffsetRect(-(rcMenu.Width()+nOffset),0);}
bAdjusted=true;}
else{if(_oB.isSafari&&_oB.isMac){rcBase.OffsetRect(rcBase.Width()-nOffset,0);}
else{rcBase.OffsetRect(rcBase.Width()+nOffset,0);}}}
var objHeight=(rcBase.top-ptScroll.y)+menu.offsetHeight;if(bHorz&&(objHeight>szWin.cy)){rcBase.OffsetRect(0,szWin.cy-(objHeight+nOffset));if(rcBase.top<nOffset)
rcBase.top=nOffset;}
if(menu.style.overflow=="auto"){if(menu.offsetHeight>szWin.cy){if(menu.style.overflowX){menu.style.overflowX="visible";menu.style.overflowY="auto";}
else{menu.style.overflow="auto";}
cx=rcMenu.Width()+20;cy=szWin.cy-20;if(!_oB.isIE)
cy-=4;}
else if((menu.scrollHeight>menu.offsetHeight)&&(menu.scrollHeight<szWin.cy)){cx=menu.clientWidth;cy=menu.scrollHeight;}}
hxj_MoveObject(menu,rcBase.left,rcBase.top,cx,cy);return bAdjusted;}};function initMenu(){var menus=document.getElementsByTagName("div");for(var m=0;m<menus.length;m++){var div=menus[m];if(!div.isinit&&div.getAttribute("rel")=="jsmenu"){PopupMenu.makeMenuContainer(div);}}}

/** rolling.js **/
var JS_ROLLING=true;function hxjRoller(){this.init=function(div){this.id=div.id;this.contents=new hxjArray();this.contentIdx=-1;this.offsetTop=0;this.rollerHeight=div.offsetHeight;var children=div.childNodes;for(var i=0;i<children.length;i++){if(children[i].nodeName.toLowerCase()=="div")
this.contents.push(children[i].innerHTML);}
div.style.position="relative";div.style.overflow="hidden";div.innerHTML="";var args=div.getAttribute("rel");if(args!=null){var it=args.split(";");for(var a=0;a<it.length;a++){var sp=it[a].indexOf("=");if(sp!=-1){var value=it[a].slice(sp+1);var name=it[a].slice(0,sp);this[name]=eval(value);}}}
if(!this.numofpage)
this.numofpage=1;if(!this.resumetime)
this.resumetime=7000;this.oDiv=_oD.createElement("div");this.oDiv.style.position="absolute";this.oDiv.style.display="block";this.oDiv.style.overflow="hidden";this.oDiv.style.left="0px";this.oDiv.style.top="0px";div.onmouseover=function(){this.isMouseOver=true;}
div.onmouseout=function(){this.isMouseOver=false;}
div.appendChild(this.oDiv);this._drawContent();this.rolling();}
this._drawContent=function(){var strGen=new hxjStringBuilder();for(var i=0;i<this.numofpage&&i<this.contents.length;i++){if(++this.contentIdx>=this.contents.length)
this.contentIdx=0;strGen.append(this.contents[this.contentIdx]);}
this.oDiv.innerHTML=strGen.toString();this.offsetHeight=this.oDiv.offsetHeight;if((this.offsetHeight%10)>0)
this.offsetHeight=this.offsetHeight+(10-(this.offsetHeight%10));}
this.rolling=function(){if(this.timerID>0){window.clearTimeout(this.timerID);this.timerID=0;}
if(this.offsetTop==0){this.oDiv.style.top="0px";if(this.oDiv.parentNode.isMouseOver){this.timerID=eval('window.setTimeout(\''+this.id+'_Object.rolling()\','+500+')');}
else{this.timerID=eval('window.setTimeout(\''+this.id+'_Object.rolling()\','+this.resumetime+')');this.offsetTop-=10;}}
else{if((this.offsetHeight+this.offsetTop)>0){this.oDiv.style.top=hxj_MakePixel(this.offsetTop);}
else{this.offsetTop=this.rollerHeight;this.oDiv.style.top=hxj_MakePixel(this.offsetTop);this._drawContent();}
this.timerID=eval('window.setTimeout(\''+this.id+'_Object.rolling()\','+130+')');this.offsetTop-=10;}}}

/** round.js **/
var JS_ROUND=true;function hxjRound(){this.init=function(domobj){var args=domobj.getAttribute("round");if(args!=null){var it=args.split(";");for(var a=0;a<it.length;a++){var sp=it[a].indexOf("=");if(sp!=-1){var name=it[a].slice(0,sp);var value=it[a].slice(sp+1);this[name]=value;}}}
this.box=domobj;this.topContainer=null;this.bottomContainer=null;this.contentDIV=null;this.masterCorners=new Array();if(hxj_IsNull(this.tl))
this.tl=6;if(hxj_IsNull(this.tr))
this.tr=6;if(hxj_IsNull(this.bl))
this.bl=6;if(hxj_IsNull(this.br))
this.br=6;if(hxj_IsNull(this.ti))
this.ti=0;if(hxj_IsNull(this.bi))
this.bi=0;if(hxj_IsNull(this.antiAlias)){this.antiAlias=true;}
else{this.antiAlias=eval(this.antiAlias);}
if(hxj_IsNull(this.autoPad)){this.autoPad=true;}
else{this.autoPad=eval(this.autoPad);}
var boxHeight=this._getStyle(this.box,"height","height");var boxWidth=this._getStyle(this.box,"width","width");var borderWidth=this._getStyle(this.box,"borderTopWidth","border-top-width");var borderColor=this._getStyle(this.box,"borderTopColor","border-top-color");var borderStyle=this._getStyle(this.box,"borderTopStyle","border-top-style");var boxColor=this._getStyle(this.box,"backgroundColor","background-color");var backgroundImage=this._getStyle(this.box,"backgroundImage","background-image");var boxPosition=this._getStyle(this.box,"position","position");var boxPadding=this._getStyle(this.box,"paddingTop","padding-top");var boxOverflow=this._getStyle(this.box,"overflow","overflow");this.boxHeight=parseInt(((boxHeight!=""&&boxHeight!="auto"&&boxHeight.indexOf("%")==-1)?boxHeight.substring(0,boxHeight.indexOf("px")):this.box.offsetHeight));this.boxWidth=parseInt(((boxWidth!=""&&boxWidth!="auto"&&boxWidth.indexOf("%")==-1)?boxWidth.substring(0,boxWidth.indexOf("px")):this.box.offsetWidth));this.borderWidth=parseInt(((borderWidth!=""&&borderWidth.indexOf("px")!==-1)?borderWidth.slice(0,borderWidth.indexOf("px")):0));this.boxColor=this._FormatColor(boxColor);this.boxPadding=parseInt(((boxPadding!=""&&boxPadding.indexOf("px")!==-1)?boxPadding.slice(0,boxPadding.indexOf("px")):0));this.borderColor=this._FormatColor(borderColor);this.borderString=this.borderWidth+"px "+borderStyle+" "+this.borderColor;this.backgroundImage=((backgroundImage!="none")?backgroundImage:"");this.boxOverflow=boxOverflow;this.boxContent=this.box.innerHTML;if(boxPosition!="absolute")
this.box.style.position="relative";this.box.style.padding="0px";this.box.style.overflow="visible";this.box.style.borderTopWidth="0px";this.box.style.borderBottomWidth="0px";if(_oB.isIE&&boxWidth=="auto"&&boxHeight=="auto")
this.box.style.width="100%";if(this.autoPad==true&&this.boxPadding>0)
this.box.innerHTML="";}
this.applyRounds=function(){var topMaxRadius,botMaxRadius;for(var t=0;t<2;t++){switch(t){case 0:if(this.tl||this.tr){var newMainContainer=document.createElement("DIV");newMainContainer.style.width=(_oB.isIE)?this.boxWidth+"px":"100%";newMainContainer.style.fontSize="1px";newMainContainer.style.overflow="hidden";newMainContainer.style.position="absolute";newMainContainer.style.paddingLeft=this.borderWidth+"px";newMainContainer.style.paddingRight=this.borderWidth+"px";topMaxRadius=Math.max(this.tl?this.tl:0,this.tr?this.tr:0);newMainContainer.style.height=topMaxRadius+"px";newMainContainer.style.top=0-topMaxRadius+"px";newMainContainer.style.left=0-this.borderWidth+"px";this.topContainer=this.box.appendChild(newMainContainer);}
break;case 1:if(this.bl||this.br){var newMainContainer=document.createElement("DIV");newMainContainer.style.width=(_oB.isIE)?this.boxWidth+"px":"100%";newMainContainer.style.fontSize="1px";newMainContainer.style.overflow="hidden";newMainContainer.style.position="absolute";newMainContainer.style.paddingLeft=this.borderWidth+"px";newMainContainer.style.paddingRight=this.borderWidth+"px";botMaxRadius=Math.max(this.bl?this.bl:0,this.br?this.br:0);newMainContainer.style.height=botMaxRadius+"px";newMainContainer.style.bottom=0-botMaxRadius+"px";newMainContainer.style.left=0-this.borderWidth+"px";this.bottomContainer=this.box.appendChild(newMainContainer);}
break;}}
var corners=["tr","tl","br","bl"];for(var i in corners){if(i>-1<4){var cc=corners[i];var newCorner;if(!this[cc]){if(((cc=="tr"||cc=="tl")&&this.topContainer!=null)||((cc=="br"||cc=="bl")&&this.bottomContainer!=null)){newCorner=document.createElement("DIV");newCorner.style.position="relative";newCorner.style.fontSize="1px";newCorner.style.overflow="hidden";if(this.backgroundImage==""){newCorner.style.backgroundColor=this.boxColor;}
else{newCorner.style.backgroundImage=this.backgroundImage;}
switch(cc){case"tl":newCorner.style.height=topMaxRadius-this.borderWidth+"px";newCorner.style.marginRight=this.tr-(this.borderWidth*2)+"px";newCorner.style.borderLeft=this.borderString;newCorner.style.borderTop=this.borderString;newCorner.style.left=-this.borderWidth+"px";break;case"tr":newCorner.style.height=topMaxRadius-this.borderWidth+"px";newCorner.style.marginLeft=this.tl-(this.borderWidth*2)+"px";newCorner.style.borderRight=this.borderString;newCorner.style.borderTop=this.borderString;newCorner.style.backgroundPosition="-"+(topMaxRadius+this.borderWidth)+"px 0px";newCorner.style.left=this.borderWidth+"px";break;case"bl":newCorner.style.height=botMaxRadius-this.borderWidth+"px";newCorner.style.marginRight=this.br-(this.borderWidth*2)+"px";newCorner.style.borderLeft=this.borderString;newCorner.style.borderBottom=this.borderString;newCorner.style.left=-this.borderWidth+"px";newCorner.style.backgroundPosition="-"+(this.borderWidth)+"px -"+(this.boxHeight+(botMaxRadius+this.borderWidth))+"px";break;case"br":newCorner.style.height=botMaxRadius-this.borderWidth+"px";newCorner.style.marginLeft=this.bl-(this.borderWidth*2)+"px";newCorner.style.borderRight=this.borderString;newCorner.style.borderBottom=this.borderString;newCorner.style.left=this.borderWidth+"px"
newCorner.style.backgroundPosition="-"+(botMaxRadius+this.borderWidth)+"px -"+(this.boxHeight+(botMaxRadius+this.borderWidth))+"px";break;}}}
else{if(this.masterCorners[this[cc]]){newCorner=this.masterCorners[this[cc]].cloneNode(true);}
else{newCorner=document.createElement("DIV");newCorner.style.height=this[cc]+"px";newCorner.style.width=this[cc]+"px";newCorner.style.position="absolute";newCorner.style.fontSize="1px";newCorner.style.overflow="hidden";var borderRadius=parseInt(this[cc]-this.borderWidth);for(var intx=0,j=this[cc];intx<j;intx++){var y1,y2,y3,y4;var outsideColor;if((intx+1)>=borderRadius){y1=-1;}
else{y1=(Math.floor(Math.sqrt(Math.pow(borderRadius,2)-Math.pow((intx+1),2)))-1);}
if(borderRadius!=j){if((intx)>=borderRadius){y2=-1;}
else{y2=Math.ceil(Math.sqrt(Math.pow(borderRadius,2)-Math.pow(intx,2)));}
if((intx+1)>=j){y3=-1;}
else{y3=(Math.floor(Math.sqrt(Math.pow(j,2)-Math.pow((intx+1),2)))-1);}}
if((intx)>=j){y4=-1;}
else{y4=Math.ceil(Math.sqrt(Math.pow(j,2)-Math.pow(intx,2)));}
if(y1>-1)
this.drawPixel(intx,0,this.boxColor,100,(y1+1),newCorner,-1,this[cc]);if(borderRadius!=j){for(var inty=(y1+1);inty<y2;inty++){if(this.antiAlias){if(this.backgroundImage!=""){var borderFract=(this._PixelFraction(intx,inty,borderRadius)*100);if(borderFract<30){this.drawPixel(intx,inty,this.borderColor,100,1,newCorner,0,this[cc]);}
else{this.drawPixel(intx,inty,this.borderColor,100,1,newCorner,-1,this[cc]);}}
else{var pixelcolor=this._BlendColor(this.boxColor,this.borderColor,this._PixelFraction(intx,inty,borderRadius));this.drawPixel(intx,inty,pixelcolor,100,1,newCorner,0,this[cc],cc);}}}
if(this.antiAlias){if(y3>=y2){if(y2==-1)y2=0;this.drawPixel(intx,y2,this.borderColor,100,(y3-y2+1),newCorner,0,0);}}
else{if(y3>=y1)
this.drawPixel(intx,(y1+1),this.borderColor,100,(y3-y1),newCorner,0,0);}
outsideColor=this.borderColor;}
else{outsideColor=this.boxColor;y3=y1;}
if(this.antiAlias){for(var inty=(y3+1);inty<y4;inty++){this.drawPixel(intx,inty,outsideColor,(this._PixelFraction(intx,inty,j)*100),1,newCorner,((this.borderWidth>0)?0:-1),this[cc]);}}}
this.masterCorners[this[cc]]=newCorner.cloneNode(true);}
if(cc!="br"){for(var t=0,k=newCorner.childNodes.length;t<k;t++){var pixelBar=newCorner.childNodes[t];var pixelBarTop=parseInt(pixelBar.style.top.substring(0,pixelBar.style.top.indexOf("px")));var pixelBarLeft=parseInt(pixelBar.style.left.substring(0,pixelBar.style.left.indexOf("px")));var pixelBarHeight=parseInt(pixelBar.style.height.substring(0,pixelBar.style.height.indexOf("px")));if(cc=="tl"||cc=="bl"){pixelBar.style.left=this[cc]-pixelBarLeft-1+"px";}
if(cc=="tr"||cc=="tl"){pixelBar.style.top=this[cc]-pixelBarHeight-pixelBarTop+"px";}
switch(cc){case"tr":pixelBar.style.backgroundPosition="-"+Math.abs((this.boxWidth-this[cc]+this.borderWidth)+pixelBarLeft)+"px -"+Math.abs(this[cc]-pixelBarHeight-pixelBarTop-this.borderWidth)+"px";break;case"tl":pixelBar.style.backgroundPosition="-"+Math.abs((this[cc]-pixelBarLeft-1)-this.borderWidth)+"px -"+Math.abs(this[cc]-pixelBarHeight-pixelBarTop-this.borderWidth)+"px";break;case"bl":pixelBar.style.backgroundPosition="-"+Math.abs((this[cc]-pixelBarLeft-1)-this.borderWidth)+"px -"+Math.abs((this.boxHeight+this[cc]+pixelBarTop)-this.borderWidth)+"px";break;}}}}
if(newCorner){switch(cc){case"tl":if(newCorner.style.position=="absolute")newCorner.style.top="0px";if(newCorner.style.position=="absolute")newCorner.style.left="0px";if(this.topContainer)this.topContainer.appendChild(newCorner);break;case"tr":if(newCorner.style.position=="absolute")newCorner.style.top="0px";if(newCorner.style.position=="absolute")newCorner.style.right="0px";if(this.topContainer)this.topContainer.appendChild(newCorner);break;case"bl":if(newCorner.style.position=="absolute")newCorner.style.bottom="0px";if(newCorner.style.position=="absolute")newCorner.style.left="0px";if(this.bottomContainer)this.bottomContainer.appendChild(newCorner);break;case"br":if(newCorner.style.position=="absolute")newCorner.style.bottom="0px";if(newCorner.style.position=="absolute")newCorner.style.right="0px";if(this.bottomContainer)this.bottomContainer.appendChild(newCorner);break;}}}}
var radiusDiff=new Array();radiusDiff["t"]=Math.abs(this.tl-this.tr)
radiusDiff["b"]=Math.abs(this.bl-this.br);for(z in radiusDiff){if(z=="t"||z=="b"){if(radiusDiff[z]){var smallerCornerType=((this[z+"l"]<this[z+"r"])?z+"l":z+"r");var newFiller=document.createElement("DIV");newFiller.style.height=radiusDiff[z]+"px";newFiller.style.width=this[smallerCornerType]+"px"
newFiller.style.position="absolute";newFiller.style.fontSize="1px";newFiller.style.overflow="hidden";newFiller.style.backgroundColor=this.boxColor;switch(smallerCornerType){case"tl":newFiller.style.bottom="0px";newFiller.style.left="0px";newFiller.style.borderLeft=this.borderString;this.topContainer.appendChild(newFiller);break;case"tr":newFiller.style.bottom="0px";newFiller.style.right="0px";newFiller.style.borderRight=this.borderString;this.topContainer.appendChild(newFiller);break;case"bl":newFiller.style.top="0px";newFiller.style.left="0px";newFiller.style.borderLeft=this.borderString;this.bottomContainer.appendChild(newFiller);break;case"br":newFiller.style.top="0px";newFiller.style.right="0px";newFiller.style.borderRight=this.borderString;this.bottomContainer.appendChild(newFiller);break;}}
var newFillerBar=document.createElement("DIV");newFillerBar.style.position="relative";newFillerBar.style.fontSize="1px";newFillerBar.style.overflow="hidden";newFillerBar.style.backgroundColor=this.boxColor;newFillerBar.style.backgroundImage=this.backgroundImage;switch(z){case"t":if(this.topContainer){if(this.tl&&this.tr){newFillerBar.style.height=((_oB.isIE?topMaxRadius:topMaxRadius-this.borderWidth)-this.ti)+"px";newFillerBar.style.marginLeft=this.tl-this.borderWidth+"px";newFillerBar.style.marginRight=this.tr-this.borderWidth+"px";newFillerBar.style.borderTop=this.borderString;newFillerBar.style.top=this.ti+"px";if(this.backgroundImage!="")
newFillerBar.style.backgroundPosition="-"+(topMaxRadius+this.borderWidth)+"px 0px";this.topContainer.appendChild(newFillerBar);}}
break;case"b":if(this.bottomContainer){if(this.bl&&this.br){newFillerBar.style.height=((_oB.isIE?botMaxRadius:botMaxRadius-this.borderWidth)-this.bi)+"px";newFillerBar.style.marginLeft=this.bl-this.borderWidth+"px";newFillerBar.style.marginRight=this.br-this.borderWidth+"px";newFillerBar.style.borderBottom=this.borderString;if(this.backgroundImage!="")
newFillerBar.style.backgroundPosition="-"+(botMaxRadius+this.borderWidth)+"px -"+(this.boxHeight+(topMaxRadius+this.borderWidth))+"px";this.bottomContainer.appendChild(newFillerBar);}}
break;}}}
if(this.autoPad==true&&this.boxPadding>0){var contentContainer=document.createElement("DIV");contentContainer.style.position="relative";contentContainer.innerHTML=this.boxContent;contentContainer.className="autoPadDiv";var topPadding=Math.abs(topMaxRadius-this.boxPadding);var botPadding=Math.abs(botMaxRadius-this.boxPadding);if(topMaxRadius<this.boxPadding)
contentContainer.style.paddingTop=topPadding+"px";if(botMaxRadius<this.boxPadding)
contentContainer.style.paddingBottom=botMaxRadius+"px";contentContainer.style.paddingLeft=this.boxPadding+"px";contentContainer.style.paddingRight=this.boxPadding+"px";if(hxj_IsNull(this.boxOverflow))
contentContainer.style.overflow=this.boxOverflow;this.contentDIV=this.box.appendChild(contentContainer);}}
this.drawPixel=function(intx,inty,color,transAmount,height,newCorner,image,cornerRadius){var pixel=document.createElement("DIV");pixel.style.height=height+"px";pixel.style.width="1px";pixel.style.position="absolute";pixel.style.fontSize="1px";pixel.style.overflow="hidden";var topMaxRadius=Math.max(this["tr"],this["tl"]);if(image==-1&&this.backgroundImage!=""){pixel.style.backgroundImage=this.backgroundImage;pixel.style.backgroundPosition="-"+(this.boxWidth-(cornerRadius-intx)+this.borderWidth)+"px -"+((this.boxHeight+topMaxRadius+inty)-this.borderWidth)+"px";}
else{pixel.style.backgroundColor=color;}
if(transAmount!=100)
this._SetOpacity(pixel,transAmount);pixel.style.top=inty+"px";pixel.style.left=intx+"px";newCorner.appendChild(pixel);}
this._BlendColor=function(Col1,Col2,Col1Fraction){var red1=parseInt(Col1.substr(1,2),16);var green1=parseInt(Col1.substr(3,2),16);var blue1=parseInt(Col1.substr(5,2),16);var red2=parseInt(Col2.substr(1,2),16);var green2=parseInt(Col2.substr(3,2),16);var blue2=parseInt(Col2.substr(5,2),16);if(Col1Fraction>1||Col1Fraction<0)
Col1Fraction=1;var endRed=Math.round((red1*Col1Fraction)+(red2*(1-Col1Fraction)));if(endRed>255)endRed=255;if(endRed<0)endRed=0;var endGreen=Math.round((green1*Col1Fraction)+(green2*(1-Col1Fraction)));if(endGreen>255)endGreen=255;if(endGreen<0)endGreen=0;var endBlue=Math.round((blue1*Col1Fraction)+(blue2*(1-Col1Fraction)));if(endBlue>255)endBlue=255;if(endBlue<0)endBlue=0;return"#"+this._IntToHex(endRed)+this._IntToHex(endGreen)+this._IntToHex(endBlue);}
this._IntToHex=function(strNum){base=strNum/16;rem=strNum%16;base=base-(rem/16);baseS=this._MakeHex(base);remS=this._MakeHex(rem);return baseS+''+remS;}
this._MakeHex=function(x){if((x>=0)&&(x<=9)){return x;}
else{switch(x){case 10:return"A";case 11:return"B";case 12:return"C";case 13:return"D";case 14:return"E";case 15:return"F";}}}
this._PixelFraction=function(x,y,r){var pixelfraction=0;var xvalues=new Array(1);var yvalues=new Array(1);var point=0;var whatsides="";var intersect=Math.sqrt((Math.pow(r,2)-Math.pow(x,2)));if((intersect>=y)&&(intersect<(y+1))){whatsides="Left";xvalues[point]=0;yvalues[point]=intersect-y;point=point+1;}
intersect=Math.sqrt((Math.pow(r,2)-Math.pow(y+1,2)));if((intersect>=x)&&(intersect<(x+1))){whatsides=whatsides+"Top";xvalues[point]=intersect-x;yvalues[point]=1;point=point+1;}
intersect=Math.sqrt((Math.pow(r,2)-Math.pow(x+1,2)));if((intersect>=y)&&(intersect<(y+1))){whatsides=whatsides+"Right";xvalues[point]=1;yvalues[point]=intersect-y;point=point+1;}
intersect=Math.sqrt((Math.pow(r,2)-Math.pow(y,2)));if((intersect>=x)&&(intersect<(x+1))){whatsides=whatsides+"Bottom";xvalues[point]=intersect-x;yvalues[point]=0;}
switch(whatsides){case"LeftRight":pixelfraction=Math.min(yvalues[0],yvalues[1])+((Math.max(yvalues[0],yvalues[1])-Math.min(yvalues[0],yvalues[1]))/2);break;case"TopRight":pixelfraction=1-(((1-xvalues[0])*(1-yvalues[1]))/2);break;case"TopBottom":pixelfraction=Math.min(xvalues[0],xvalues[1])+((Math.max(xvalues[0],xvalues[1])-Math.min(xvalues[0],xvalues[1]))/2);break;case"LeftBottom":pixelfraction=(yvalues[0]*xvalues[1])/2;break;default:pixelfraction=1;}
return pixelfraction;}
this._FormatColor=function(color){var returnColor="#ffffff";if(color!=""&&color!="transparent"){if(color.substr(0,3)=="rgb"){returnColor=this._Rgb2Hex(color);}
else if(color.length==4){returnColor="#"+color.substring(1,2)+color.substring(1,2)+color.substring(2,3)+color.substring(2,3)+color.substring(3,4)+color.substring(3,4);}
else{returnColor=color;}}
return returnColor;}
this._Rgb2Hex=function(rgbColor){try{var rgbArray=this._Rgb2Array(rgbColor);var red=parseInt(rgbArray[0]);var green=parseInt(rgbArray[1]);var blue=parseInt(rgbArray[2]);var hexColor="#"+this._IntToHex(red)+this._IntToHex(green)+this._IntToHex(blue);}
catch(e){alert("There was an error converting the RGB value to Hexadecimal in function Rgb2Hex");}
return hexColor;}
this._Rgb2Array=function(rgbColor){var rgbValues=rgbColor.substring(4,rgbColor.indexOf(")"));var rgbArray=rgbValues.split(", ");return rgbArray;}
this._SetOpacity=function(obj,opacity){opacity=(opacity==100)?99.999:opacity;if(_oB.isSafari&&obj.tagName.toUpperCase()!="IFRAME"){var rgbArray=this._Rgb2Array(obj.style.backgroundColor);var red=parseInt(rgbArray[0]);var green=parseInt(rgbArray[1]);var blue=parseInt(rgbArray[2]);obj.style.backgroundColor="rgba("+red+", "+green+", "+blue+", "+opacity/100+")";}
else if(typeof(obj.style.opacity)!="undefined"){obj.style.opacity=opacity/100;}
else if(typeof(obj.style.MozOpacity)!="undefined"){obj.style.MozOpacity=opacity/100;}
else if(typeof(obj.style.filter)!="undefined"){obj.style.filter="alpha(opacity:"+opacity+")";}
else if(typeof(obj.style.KHTMLOpacity)!="undefined"){obj.style.KHTMLOpacity=opacity/100;}}
this._getStyle=function(obj,property,propertyNS){var returnVal="";try{if(obj.currentStyle){returnVal=eval("obj.currentStyle."+property);}
else{var wasHidden=false;if(_oB.isSafari&&obj.style.display=="none"){obj.style.display="";wasHidden=true;}
returnVal=document.defaultView.getComputedStyle(obj,'').getPropertyValue(propertyNS);if(_oB.isSafari&&wasHidden){obj.style.display="none";}}}
catch(e){}
return returnVal;}}
function hxj_MakeRound(arrIds){for(var i=0;i<arrIds.length;i++){var objnode=hxj_FindObject(arrIds[i]);if(objnode!=null){var rounder=new hxjRound();rounder.init(objnode);rounder.applyRounds();}}}

/** swfupload.js **/
var JS_SWFUPLOAD=true;var SWFUpload;if(SWFUpload==undefined){SWFUpload=function(container,settings){this.initSWFUpload(container,settings);};}
SWFUpload.prototype.initSWFUpload=function(container,settings){try{this.customSettings={};this.settings=settings;this.eventQueue=[];this.movieName=container.id+"_SWFU";this.movieIndex=SWFUpload.movieCount++;this.movieElement=null;SWFUpload.instances[this.movieName]=this;this.initSettings();this.loadFlash(container);this.displayDebugInfo();}
catch(ex){delete SWFUpload.instances[this.movieName];throw ex;}};SWFUpload.instances={};SWFUpload.movieCount=0;SWFUpload.Console={};SWFUpload.QUEUE_ERROR={QUEUE_LIMIT_EXCEEDED:-100,FILE_EXCEEDS_SIZE_LIMIT:-110,ZERO_BYTE_FILE:-120,INVALID_FILETYPE:-130};SWFUpload.UPLOAD_ERROR={HTTP_ERROR:-200,MISSING_UPLOAD_URL:-210,IO_ERROR:-220,SECURITY_ERROR:-230,UPLOAD_LIMIT_EXCEEDED:-240,UPLOAD_FAILED:-250,SPECIFIED_FILE_ID_NOT_FOUND:-260,FILE_VALIDATION_FAILED:-270,FILE_CANCELLED:-280,UPLOAD_STOPPED:-290};SWFUpload.WINDOW_MODE={WINDOW:"window",TRANSPARENT:"transparent",OPAQUE:"opaque"};SWFUpload.completeURL=function(url){if(typeof(url)!=="string"||url.match(/^https?:\/\//i)||url.match(/^\//)){return url;}
var currentURL=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"");var indexSlash=window.location.pathname.lastIndexOf("/");if(indexSlash<=0){path="/";}else{path=window.location.pathname.substr(0,indexSlash)+"/";}
return path+url;};SWFUpload.prototype.initSettings=function(){this.ensureDefault=function(settingName,defaultValue){this.settings[settingName]=(this.settings[settingName]==undefined)?defaultValue:this.settings[settingName];};this.ensureDefaultFunc=function(settingName,defaultFunc){this.settings[settingName]=(this.settings[settingName]==undefined)?defaultFunc:eval(this.settings[settingName]);};this.ensureDefault("upload_url","");this.ensureDefault("upload_cookie",0);this.ensureDefault("assume_success_timeout",0);this.ensureDefault("file_post_name","Filedata");this.ensureDefault("post_params",{});this.ensureDefault("allowed_filetypes","*.*");this.ensureDefault("allowed_filetypes_description","All Files");this.ensureDefault("allowed_filesize",20480);this.ensureDefault("allowed_filecount",0);this.ensureDefault("allowed_queuelimit",0);this.ensureDefault("flash_path",_SVR_+"/jslib/swfupload/swfupload.swf?"+Math.random());this.ensureDefault("flash_color","#FFFFFF");this.ensureDefault("button_image_url","");this.ensureDefault("button_width",80);this.ensureDefault("button_height",22);this.ensureDefault("button_mode","overlay");this.ensureDefault("button_window_mode",SWFUpload.WINDOW_MODE.TRANSPARENT);this.ensureDefault("button_disabled",0);this.ensureDefault("custom_settings",{});this.settings.return_upload_start_handler=this.returnUploadStart;this.ensureDefaultFunc("swfupload_loaded_handler",this.flashLoadedHandler);this.ensureDefaultFunc("file_queued_handler",this.fileQueuedHandler);this.ensureDefaultFunc("file_uuid_handler",this.fileUuidHandler);this.ensureDefaultFunc("upload_start_handler",this.uploadStartHandler);this.ensureDefaultFunc("upload_progress_handler",this.uploadProgressHandler);this.ensureDefaultFunc("upload_error_handler",this.uploadErrorHandler);this.ensureDefaultFunc("upload_success_handler",this.uploadSuccessHandler);this.ensureDefaultFunc("upload_complete_handler",null);this.ensureDefaultFunc("upload_finish_handler",this.uploadFinishHandler);this.ensureDefaultFunc("debug_handler",this.debugMessage);this.settings.debug_enabled=hxj_IsTrue(this.settings.debug_enabled);this.settings.auto_upload=hxj_IsTrue(this.settings.auto_upload);this.customSettings=this.settings.custom_settings;var suffix=(this.movieIndex>0)?("_"+this.movieIndex):"";if(this.customSettings.progressTargetId==undefined){this.customSettings.progressTargetId="TBL_Progress"+suffix;this.customSettings.progressNameId="progress_name"+suffix;this.customSettings.progressRateId="progress_rate"+suffix;this.customSettings.progressId="progress"+suffix;}
if(this.customSettings.browseButtonId==undefined){this.customSettings.browseButtonId="browse"+suffix;}
delete this.ensureDefault;delete this.ensureDefaultFunc;};SWFUpload.prototype.loadFlash=function(container){var tempParent;if(document.getElementById(this.movieName)!==null){throw"ID "+this.movieName+" is already in use. The Flash Object could not be added";}
tempParent=document.createElement("div");tempParent.innerHTML=this.getFlashHTML();container.parentNode.replaceChild(tempParent.firstChild,container);if(window[this.movieName]==undefined){window[this.movieName]=this.getMovieElement();}};SWFUpload.prototype.getFlashHTML=function(){var css="cursor:pointer;";if(this.settings.button_mode=="overlay"){css="position:absolute;";}
return['<object id="',this.movieName,'" style="',css,'" type="application/x-shockwave-flash" data="',this.settings.flash_path,'" width="',this.settings.button_width,'" height="',this.settings.button_height,'" class="swfupload">','<param name="wmode" value="',this.settings.button_window_mode,'" />','<param name="movie" value="',this.settings.flash_path,'" />','<param name="quality" value="high" />','<param name="menu" value="false" />','<param name="allowScriptAccess" value="always" />','<param name="flashvars" value="'+this.getFlashVars()+'" />','</object>'].join("");};SWFUpload.prototype.getFlashVars=function(){var paramString=this.buildParamString();return["movieName=",encodeURIComponent(this.movieName),"&amp;uploadURL=",encodeURIComponent(this.settings.upload_url),"&amp;autoUpload=",encodeURIComponent(this.settings.auto_upload),"&amp;assumeSuccessTimeout=",encodeURIComponent(this.settings.assume_success_timeout),"&amp;params=",encodeURIComponent(paramString),"&amp;filePostName=",encodeURIComponent(this.settings.file_post_name),"&amp;fileTypes=",encodeURIComponent(this.settings.allowed_filetypes),"&amp;fileTypesDescription=",encodeURIComponent(this.settings.allowed_filetypes_description),"&amp;fileSizeLimit=",encodeURIComponent(this.settings.allowed_filesize),"&amp;fileCountLimit=",encodeURIComponent(this.settings.allowed_filecount),"&amp;fileQueueLimit=",encodeURIComponent(this.settings.allowed_queuelimit),"&amp;debugEnabled=",encodeURIComponent(this.settings.debug_enabled),"&amp;buttonImageURL=",encodeURIComponent(this.settings.button_image_url),"&amp;buttonWidth=",encodeURIComponent(this.settings.button_width),"&amp;buttonHeight=",encodeURIComponent(this.settings.button_height),"&amp;buttonDisabled=",encodeURIComponent(this.settings.button_disabled)].join("");};SWFUpload.prototype.getMovieElement=function(){if(this.movieElement==undefined){this.movieElement=document.getElementById(this.movieName);}
if(this.movieElement===null){throw"Could not find Flash element";}
return this.movieElement;};SWFUpload.prototype.buildParamString=function(){var postParams=this.settings.post_params;var paramStringPairs=[];if(hxj_IsTrue(this.settings.upload_cookie)){var it=document.cookie.split(";");for(var i=0;i<it.length;i++){paramStringPairs.push(it[i].trim());}}
if(typeof(postParams)==="object"){for(var name in postParams){if(postParams.hasOwnProperty(name)){paramStringPairs.push(encodeURIComponent(name.toString())+"="+encodeURIComponent(postParams[name].toString()));}}}
return paramStringPairs.join("&amp;");};SWFUpload.prototype.destroy=function(){try{this.cancelUpload(null,false);var movieElement=this.getMovieElement();if(movieElement&&typeof(movieElement.CallFunction)==="unknown"){for(var i in movieElement){try{if(typeof(movieElement[i])==="function"){movieElement[i]=null;}}
catch(ex1){}}
try{movieElement.parentNode.removeChild(movieElement);}
catch(ex){}}
window[this.movieName]=null;SWFUpload.instances[this.movieName]=null;delete SWFUpload.instances[this.movieName];this.movieElement=null;this.settings=null;this.customSettings=null;this.eventQueue=null;this.movieName=null;return true;}
catch(ex2){return false;}};SWFUpload.prototype.displayDebugInfo=function(){this.debug(["---SWFUpload Instance Info---\n","Version: ",SWFUpload.version,"\n","Movie Name: ",this.movieName,"\n","Settings:\n","\t","upload_url:               ",this.settings.upload_url,"\n","\t","flash_url:                ",this.settings.flash_path,"\n","\t","assume_success_timeout:   ",this.settings.assume_success_timeout,"\n","\t","file_post_name:           ",this.settings.file_post_name,"\n","\t","post_params:              ",this.settings.post_params.toString(),"\n","\t","file_types:               ",this.settings.allowed_filetypes,"\n","\t","file_types_description:   ",this.settings.allowed_filetypes_description,"\n","\t","file_size_limit:          ",this.settings.allowed_filesize,"\n","\t","file_count_limit:         ",this.settings.allowed_filecount,"\n","\t","file_queue_limit:         ",this.settings.file_queue_limit,"\n","\t","debug_enabled:            ",this.settings.debug_enabled.toString(),"\n","\t","button_image_url:         ",this.settings.button_image_url.toString(),"\n","\t","button_width:             ",this.settings.button_width.toString(),"\n","\t","button_height:            ",this.settings.button_height.toString(),"\n","\t","button_disabled:          ",this.settings.button_disabled.toString(),"\n","\t","custom_settings:          ",this.settings.custom_settings.toString(),"\n","Event Handlers:\n","\t","swfupload_loaded_handler assigned:  ",(typeof this.settings.swfupload_loaded_handler==="function").toString(),"\n","\t","file_queued_handler assigned:       ",(typeof this.settings.file_queued_handler==="function").toString(),"\n","\t","upload_start_handler assigned:      ",(typeof this.settings.upload_start_handler==="function").toString(),"\n","\t","upload_progress_handler assigned:   ",(typeof this.settings.upload_progress_handler==="function").toString(),"\n","\t","upload_error_handler assigned:      ",(typeof this.settings.upload_error_handler==="function").toString(),"\n","\t","upload_success_handler assigned:    ",(typeof this.settings.upload_success_handler==="function").toString(),"\n","\t","upload_complete_handler assigned:   ",(typeof this.settings.upload_complete_handler==="function").toString(),"\n","\t","upload_finish_handler assigned:   ",(typeof this.settings.upload_finish_handler==="function").toString(),"\n","\t","debug_handler assigned:             ",(typeof this.settings.debug_handler==="function").toString(),"\n"].join(""));};SWFUpload.prototype.callFlash=function(functionName,argumentArray){argumentArray=argumentArray||[];var movieElement=this.getMovieElement();var returnValue,returnString;try{returnString=movieElement.CallFunction('<invoke name="'+functionName+'" returntype="javascript">'+__flash__argumentsToXML(argumentArray,0)+'</invoke>');returnValue=eval(returnString);}
catch(ex){throw"Call to "+functionName+" failed: "+ex.message;}
if(returnValue!=undefined&&typeof returnValue.post==="object"){returnValue=this.unescapeFilePostParams(returnValue);}
return returnValue;};SWFUpload.prototype.startUpload=function(){this.callFlash("StartUpload");};SWFUpload.prototype.cancelUpload=function(){this.callFlash("CancelUpload");};SWFUpload.prototype.setOption=function(optname,optval){this.callFlash("SetOption",[optname,optval]);}
SWFUpload.prototype.setFileID=function(fileid){this.callFlash("SetFileID",[fileid]);}
SWFUpload.prototype.setPostParams=function(param_string){var it=param_string.split("&");for(var i=0;i<it.length;i++){var sp=it[i].indexOf("=");if(sp!=-1){var key=it[i].slice(0,sp);var val=it[i].slice(sp+1);this.settings.post_params[key]=val;}}
var paramString=this.buildParamString();this.callFlash("SetPostParams",[paramString]);}
SWFUpload.prototype.setButtonImageURL=function(buttonImageURL){this.callFlash("SetButtonImageURL",[buttonImageURL]);}
SWFUpload.prototype.setButtonDisabled=function(isDisabled){this.callFlash("SetButtonDisabled",[isDisabled]);}
SWFUpload.prototype.setEventHandler=function(evtName,handler){this.settings[evtName]=handler;}
SWFUpload.prototype.queueEvent=function(handlerName,argumentArray){if(argumentArray==undefined){argumentArray=[];}
else if(!(argumentArray instanceof Array)){argumentArray=[argumentArray];}
if(typeof this.settings[handlerName]==="function"){var self=this;this.eventQueue.push(function(){this.settings[handlerName].apply(this,argumentArray);});setTimeout(function(){self.executeNextEvent();},0);}};SWFUpload.prototype.executeNextEvent=function(){var f=this.eventQueue?this.eventQueue.shift():null;if(typeof(f)==="function"){f.apply(this);}};SWFUpload.prototype.unescapeFilePostParams=function(file){var reg=/[$]([0-9a-f]{4})/i;var unescapedPost={};var uk;if(file!=undefined){for(var k in file.post){if(file.post.hasOwnProperty(k)){uk=k;var match;while((match=reg.exec(uk))!==null){uk=uk.replace(match[0],String.fromCharCode(parseInt("0x"+match[1],16)));}
unescapedPost[uk]=file.post[k];}}
file.post=unescapedPost;}
return file;};SWFUpload.prototype.testExternalInterface=function(){try{return this.callFlash("TestExternalInterface");}
catch(ex){return false;}};SWFUpload.prototype.flashReady=function(){var movieElement=this.getMovieElement();if(!movieElement){this.debug("Flash called back ready but the flash movie can't be found.");return;}
this.cleanUp(movieElement);this.queueEvent("swfupload_loaded_handler");};SWFUpload.prototype.cleanUp=function(movieElement){try{if(this.movieElement&&typeof(movieElement.CallFunction)==="unknown"){this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");for(var key in movieElement){try{if(typeof(movieElement[key])==="function"){movieElement[key]=null;}}
catch(ex){}}}}
catch(ex1){}
window["__flash__removeCallback"]=function(instance,name){try{if(instance){instance[name]=null;}}
catch(flashEx){}};};SWFUpload.prototype.fileQueued=function(file){file=this.unescapeFilePostParams(file);this.queueEvent("file_queued_handler",file);};SWFUpload.prototype.uploadStart=function(file){file=this.unescapeFilePostParams(file);this.queueEvent("return_upload_start_handler",file);};SWFUpload.prototype.uploadProgress=function(file,bytesComplete,bytesTotal){file=this.unescapeFilePostParams(file);this.queueEvent("upload_progress_handler",[file,bytesComplete,bytesTotal]);};SWFUpload.prototype.uploadError=function(file,errorCode,message){file=this.unescapeFilePostParams(file);this.queueEvent("upload_error_handler",[file,errorCode,message]);};SWFUpload.prototype.uploadSuccess=function(file,serverData,responseReceived){file=this.unescapeFilePostParams(file);this.queueEvent("upload_success_handler",[file,serverData,responseReceived]);this.queueEvent("upload_complete_handler",file);};SWFUpload.prototype.uploadFinish=function(file){file=this.unescapeFilePostParams(file);this.queueEvent("upload_finish_handler",file);};SWFUpload.prototype.debug=function(message){this.queueEvent("debug_handler",message);};SWFUpload.prototype.returnUploadStart=function(file){var file_id;if(typeof this.settings.file_uuid_handler==="function"){file_id=this.settings.file_uuid_handler.call(this);}
else if(this.settings.file_uuid_handler!=undefined){throw"file_uuid_handler must be a function";}
if(typeof this.settings.upload_start_handler==="function"){this.settings.upload_start_handler.call(this,file);}
else if(this.settings.upload_start_handler!=undefined){throw"upload_start_handler must be a function";}
if(file_id===undefined){file_id="";}
this.debug("Flash called returnUploadStart: file_id="+file_id);this.callFlash("ReturnUploadStart",[file_id]);};SWFUpload.prototype.fileUuidHandler=function(){var fileid="";try{if(hxj_IsTrue(this.settings.has_file_uuid)&&!hxj_IsNull(this.settings.file_uuid)){return this.settings.file_uuid;}
var xmldom=hxj_ExecuteAjax(g_virtualPath+"/getUniqKey.do","",true,true);if(xmldom!=null){fileid=xmldom.getElementsByTagName("UNIQUE_KEY")[0].childNodes[0].nodeValue;if(hxj_IsTrue(this.settings.has_file_uuid))
this.settings.file_uuid=fileid;}}
catch(ex){this.debug(ex);}
return fileid;}
SWFUpload.prototype.flashLoadedHandler=function(){var btnBrowse=hxj_FindObject(this.customSettings.browseButtonId);if(btnBrowse!=null){btnBrowse.disabled=false;btnBrowse.value="Upload";}
this.debug("Flash called loaed ready.");}
SWFUpload.prototype.fileQueuedHandler=function(file){}
SWFUpload.prototype.uploadStartHandler=function(file){try{var tblnode=hxj_FindObject(this.customSettings.progressTargetId);if(tblnode!=null)
tblnode.style.display="block";hxj_SetInnerHTML(this.customSettings.progressNameId,file.name);hxj_SetInnerHTML(this.customSettings.progressRateId,"0%");}
catch(ex){}
return true;}
SWFUpload.prototype.uploadProgressHandler=function(file,bytesLoaded,bytesTotal){try{var percent=Math.ceil((bytesLoaded/bytesTotal)*100);var progress=hxj_FindObject(this.customSettings.progressId);if(progress!=null)
progress.style.width=percent+"%";hxj_SetInnerHTML(this.customSettings.progressRateId,percent+"%");}
catch(ex){this.debug(ex);}}
SWFUpload.prototype.uploadSuccessHandler=function(file,serverData){try{if(!hxj_IsTrue(this.customSettings.visible_progress)){var tblnode=hxj_FindObject(this.customSettings.progressTargetId);if(tblnode!=null)
tblnode.style.display="none";}
hxj_SetInnerHTML(this.customSettings.progressRateId,"100%");}
catch(ex){this.debug(ex);}}
SWFUpload.prototype.uploadFinishHandler=function(file){try{this.startUpload();}
catch(ex){this.debug(ex);}}
SWFUpload.prototype.uploadErrorHandler=function(file,errorCode,message){try{switch(errorCode){case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:alert("Upload Error: "+message);this.debug("Error Code: HTTP Error, File name: "+file.name+", Message: "+message);break;case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:alert("Configuration Error");this.debug("Error Code: No backend file, File name: "+file.name+", Message: "+message);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:alert("Upload Failed: "+message);this.debug("Error Code: Upload Failed, File name: "+file.name+", File size: "+file.size+", Message: "+message);break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:alert("Server (IO) Error");this.debug("Error Code: IO Error, File name: "+file.name+", Message: "+message);break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:alert("Security Error: "+message);this.debug("Error Code: Security Error, File name: "+file.name+", Message: "+message);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:alert("Upload limit exceeded: "+file.name);this.debug("Error Code: Upload Limit Exceeded, File name: "+file.name+", File size: "+file.size+", Message: "+message);break;case SWFUpload.UPLOAD_ERROR.SPECIFIED_FILE_ID_NOT_FOUND:alert("File not found: "+file.name);this.debug("Error Code: The file was not found, File name: "+file.name+", File size: "+file.size+", Message: "+message);break;case SWFUpload.UPLOAD_ERROR.FILE_VALIDATION_FAILED:alert("Failed Validation.  Upload skipped.");this.debug("Error Code: File Validation Failed, File name: "+file.name+", File size: "+file.size+", Message: "+message);break;case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:break;case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:alert("File is too big: "+file.name);this.debug("Error Code: File too big, File name: "+file.name+", File size: "+file.size+", Message: "+message);break;case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:alert("Cannot upload Zero Byte files: "+file.name);this.debug("Error Code: Zero byte file, File name: "+file.name+", File size: "+file.size+", Message: "+message);break;case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:alert("Invalid File Type: "+file.name);this.debug("Error Code: Invalid File Type, File name: "+file.name+", File size: "+file.size+", Message: "+message);break;case SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED:alert("You have selected too many files.  "+(message>1?"You may only add "+message+" more files":"You cannot add any more files."));break;default:alert("Unhandled Error: "+error_code+", File name: "+file.name);this.debug("Error Code: "+errorCode+", File name: "+file.name+", File size: "+file.size+", Message: "+message);break;}}
catch(ex){this.debug(ex);}}
SWFUpload.prototype.debugMessage=function(message){if(this.settings.debug_enabled){var exceptionMessage,exceptionValues=[];if(typeof message==="object"&&typeof message.name==="string"&&typeof message.message==="string"){for(var key in message){if(message.hasOwnProperty(key)){exceptionValues.push(key+": "+message[key]);}}
exceptionMessage=exceptionValues.join("\n")||"";exceptionValues=exceptionMessage.split("\n");exceptionMessage="EXCEPTION: "+exceptionValues.join("\nEXCEPTION: ");SWFUpload.Console.writeLine(exceptionMessage);}
else{SWFUpload.Console.writeLine(message);}}};SWFUpload.Console.writeLine=function(message){var console,documentForm;try{console=document.getElementById("SWFUpload_Console");if(!console){documentForm=document.createElement("form");document.getElementsByTagName("body")[0].appendChild(documentForm);console=document.createElement("textarea");console.id="SWFUpload_Console";console.style.fontFamily="monospace";console.setAttribute("wrap","off");console.wrap="off";console.style.overflow="auto";console.style.width="700px";console.style.height="350px";console.style.margin="5px";documentForm.appendChild(console);}
console.value+=message+"\n";console.scrollTop=console.scrollHeight-console.clientHeight;}
catch(ex){alert("Exception: "+ex.name+" Message: "+ex.message);}};function initSWFUpload(){var container=hxj_FindObject("swfupload");for(var i=1;container!=null;i++){var settings=eval(container.getAttribute("settings"));var swfu=new SWFUpload(container,settings?settings:swfu_settings);container=hxj_FindObject("swfupload_"+i);}}

/** tabber.js **/
var JS_TABBER=true;function hxjTabber(){this.classMain="tabber";this.classTab="tabbertab";this.classTabDefault="tabbertabdefault";this.classTabHide="tabbertabhide";this.classTabNav="tabmenu";this.classTabActive="current";this.removeTitle=true;this.REclassMain=new RegExp('\\b'+this.classMain,'gi');this.REclassTab=new RegExp('\\b'+this.classTab,'gi');this.REclassTabDefault=new RegExp('\\b'+this.classTabDefault+'\\b','gi');this.REclassTabHide=new RegExp('\\b'+this.classTabHide+'\\b','gi');this.tabs=new Array();this.init=function(domobj){var DOM_tbl,DOM_tr,DOM_td1,DOM_td2;var defaultTab=0;var args=domobj.getAttribute("rel");if(args!=null){var it=args.split(";");for(var a=0;a<it.length;a++){var sp=it[a].indexOf("=");if(sp!=-1){var value=it[a].slice(sp+1);var name=it[a].slice(0,sp);this[name]=decodeURIComponent(value);}}}
var DOM_ul=document.createElement("ul");DOM_ul.className=this.classTabNav;DOM_tbl=document.createElement("TABLE");DOM_tbl.cellSpacing=0;DOM_tbl.cellPadding=0;DOM_tbl.style.width="100%";DOM_tbl.style.borderCollapse="collapse";DOM_tbl.border=0;if(eval(this.vertical)){DOM_tbl.style.height="100%";DOM_tr=DOM_tbl.insertRow(0);DOM_td1=DOM_tr.insertCell(0);DOM_td2=DOM_tr.insertCell(1);if(this.tabwidth){DOM_td1.style.width=hxj_MakePixel(this.tabwidth);DOM_ul.style.width=hxj_MakePixel(this.tabwidth-1);}
else{DOM_td1.width="80";}}
else{DOM_tr=DOM_tbl.insertRow(0);DOM_td1=DOM_tr.insertCell(0);DOM_tr=DOM_tbl.insertRow(1);DOM_td2=DOM_tr.insertCell(0);}
if(this.classTD1)
DOM_td1.className=this.classTD1;if(this.classTD2)
DOM_td2.className=this.classTD2;DOM_td1.style.verticalAlign="top";DOM_td2.style.verticalAlign="top";DOM_td1.style.paddingTop="1px";DOM_td1.appendChild(DOM_ul);var tabdiv=[];var tagother=[];var childNodes=domobj.childNodes;for(var i=0,j=0,k=0;i<childNodes.length;i++){if(childNodes[i].className&&childNodes[i].className.match(this.REclassTab)){tabdiv[j++]=childNodes[i];}
else{tagother[k++]=childNodes[i];}}
for(var i=0;i<tabdiv.length;i++){var t=new Object();t.div=tabdiv[i];t.headingText=t.div.title;if(this.removeTitle)
t.div.title='';if(!t.headingText)
t.headingText="No Title"+(i+1);var h3node=hxj_FindNode(t.div,"h3");if(h3node!=null){t.headingText+=h3node.innerHTML;t.div.removeChild(h3node);}
DOM_td2.appendChild(t.div);var DOM_li=document.createElement("li");t.li=DOM_li;var DOM_a=document.createElement("a");DOM_a.href="javascript:void(null);";DOM_a.style.textTransform="capitalize";DOM_a.onclick=this.navClick;DOM_a.innerHTML=t.headingText;DOM_a.tabber=this;DOM_a.tabberIndex=this.tabs.length;DOM_li.appendChild(DOM_a);DOM_ul.appendChild(DOM_li);this.tabs[this.tabs.length]=t;if(t.div.className.match(this.REclassTabDefault))
defaultTab=this.tabs.length-1;}
for(var i=0;i<tagother.length;i++){DOM_td2.appendChild(tagother[i]);}
domobj.parentNode.replaceChild(DOM_tbl,domobj);this.tabShow(defaultTab);var onloadfunc=eval(this.onLoad);if(typeof onloadfunc=='function')
onloadfunc(this);domobj.style.display="block";}
this.navClick=function(event){var a=this;var self=a.tabber;a.blur();var onclickfunc=eval(self.onClick);if(typeof onclickfunc=='function'){if(!event)
event=window.event;if(!onclickfunc(self,a.tabberIndex,event))
return false;}
self.tabShow(a.tabberIndex);return false;}
this.tabHideAll=function(){for(var i=0;i<this.tabs.length;i++)
this.tabHide(i);}
this.tabHide=function(tabberIndex){if(!this.tabs[tabberIndex])
return false;var div=this.tabs[tabberIndex].div;if(!div.className.match(this.REclassTabHide))
div.className+=' '+this.classTabHide;this.navClearActive(tabberIndex);}
this.tabShow=function(tabberIndex){if(!this.tabs[tabberIndex])
return false;this.tabHideAll();var div=this.tabs[tabberIndex].div;div.className=div.className.replace(this.REclassTabHide,'');this.navSetActive(tabberIndex);if(!div.isInit){div.isInit=true;if(this.onTabInit){var func=eval(this.onTabInit);func(this,tabberIndex);}}
if(this.onTabDisplay){var func=eval(this.onTabDisplay);func(this,tabberIndex);}
return this;}
this.navSetActive=function(tabberIndex){this.tabs[tabberIndex].li.className=this.classTabActive;}
this.navClearActive=function(tabberIndex){this.tabs[tabberIndex].li.className='';}}
function initTabber(){var arrTabber=new hxjArray();var divs=document.getElementsByTagName("div");for(var i=0;i<divs.length;i++){if(divs[i].className=="tabber"){arrTabber.push(divs[i]);}}
for(var i=0;i<arrTabber.length;i++){var div=arrTabber[i];eval(div.id+"_Object = new hxjTabber()");eval(div.id+"_Object.init(div)");}}

/** wysiwyg.js **/
var JS_WYSIWYG=true;var g_MenuImageDir=_SVR_+"/jslib/popupmenu/image/";var g_WysiwygImageDir=_SVR_+"/jslib/wysiwyg/image/";var g_WysiwygPopupDir=_SVR_+"/jslib/wysiwyg/popup/";var g_activeEditor=null;var g_resizeEditor=null;function _hxjWE_parseImageSize(htmlvar){var widthString=new RegExp("width=[\"']?(\\w+)[\"']?","i").exec(htmlvar);var heightString=new RegExp("height=[\"']?(\\w+)[\"']?","i").exec(htmlvar);var width=420;var height=340;if(widthString){width=hxj_ParseInt(widthString[1]);}
if(heightString){height=hxj_ParseInt(heightString[1]);}
return" width='"+width+"' height='"+height+"' ";}
function _hxjWE_GetContentURL(fserver,fpath,val){var which=val.substr(0,val.indexOf(':'));var value=val.substr(val.indexOf(':')+1);var url="";if(which=="T"){url=fserver+"/files/temp/"+value;}
else{url=fserver+fpath+"/"+value;}
return url;}
function _hxjWE_GetContentIcon(val){var fileExt=val.substring(val.lastIndexOf("."));var iconimg="icon_file_unknown.gif";switch(fileExt.toLowerCase()){case".doc":iconimg="icon_file_doc.gif";break;case".xls":iconimg="icon_file_xls.gif";break;case".ppt":iconimg="icon_file_ppt.gif";break;case".pdf":iconimg="icon_file_pdf.gif";break;case".zip":case".rar":case".tar":case".gz":iconimg="icon_file_zip.gif";break;case".avi":case".wmv":case".wmx":case".mpeg":case".mpg":case".mp4":case".m4v":case".asf":case".asx":case".divx":iconimg="icon_file_movie.gif";break;case".swf":case".flv":iconimg="icon_file_swf.gif";break;case".mov":case".mqv":iconimg="icon_file_mov.gif";break;case".mp1":case".mp2":case".mp3":case".mpa":case".wav":case".wax":case".wma":iconimg="icon_file_mp3.gif";break;case".gif":iconimg="icon_file_gif.gif";break;case".jpg":iconimg="icon_file_jpg.gif";break;case".bmp":iconimg="icon_file_bmp.gif";break;case".png":case".tiff":case".tif":case".pcx":case".wmf":case".emf":iconimg="icon_file_image.gif";break;case".htm":case".html":iconimg="icon_file_htm.gif";break;case".txt":iconimg="icon_file_txt.gif";break;}
return"<img src='"+g_WysiwygImageDir+iconimg+"' border='0' align='absmiddle' />";}
function _hxjWE_GetContentHtml(value,text){var linkurl=_hxjWE_GetContentURL(value);var conttype=hxj_GetContentType(value);var width=420,height=340;switch(conttype){case"image":return"<img class='ssImage' src='"+linkurl+"' border='0' style='margin:1px;' descref='Inserted image by user' />";case"audio":width=360,height=40;case"video":case"flash":case"quicktime":return"<img class='ssObject' src='"+_SVR_+"/images/blank.gif' title='"+text+"' style='width:"+width+"px;height:"+height+"px;' descwhere='wysiwyg' descurl='"+encodeURIComponent(linkurl)+"' />";}
return _hxjWE_GetContentIcon(value)+"&nbsp;<a class='ssLink' href='"+linkurl+"' target='_new'>"+text+"</a>&nbsp;";}
function _hxjWE_UploadFile(fname,sname){var selnode=hxj_FindObject("SELECT_Files");if(selnode!=null)
selnode.options[selnode.options.length]=new Option(fname,"T:"+sname);}
function _hxjWE_DeleteFile(index){var selnode=hxj_FindObject("SELECT_Files");var delfiles=hxj_FindObject("DELETE_Files");if(selnode.options.length>index){var val=selnode.options[index].value;var which=val.substr(0,val.indexOf(':'));var value=val.substr(val.indexOf(':')+1);if(which=="S"){delfiles.value+=value;delfiles.value+=";";}
selnode.options[index]=null;}}
function _hxjWE_ActivateEditor(node){g_activeEditor=null;while(node!=null){if(node.className=="wysiwyg_holder"){g_activeEditor=node.wysiwyg;break;}
node=hxj_FindParent(node,"div");}
return g_activeEditor;}
function _hxjWE_FormatText(cmdid,val){if(g_activeEditor!=null)
g_activeEditor.formatText(cmdid,val);}
function _hxjWE_InsertHTML(html){if(g_activeEditor!=null)
g_activeEditor.insertHTML(html);}
function _hxjWE_PickerCallback(picker,val){_hxjWE_FormatText(picker.cmdid,val);}
function _hxjWE_ResizeHandler(evt){var event=window.event?window.event:evt;if(event.srcElement)
event.target=event.srcElement;switch(event.type){case"mousemove":if(g_resizeEditor!=null){var editor=g_resizeEditor.getEditor();var pageY=parseInt(event.clientY);if(event.target.tagName!="BODY"&&event.target.tagName!="HTML"){var ptScroll=hxj_GetScrollXY();pageY+=ptScroll.y;pageY-=hxj_GetOffsetTop(editor);}
try{editor.style.height=Math.min(2600,Math.max(g_resizeEditor.minHeight,pageY))+'px';}catch(e){}}
break;case"mousedown":g_resizeEditor=_hxjWE_ActivateEditor(event.target);if(g_resizeEditor!=null){g_resizeEditor.getEditor().style.visibility="hidden";if(typeof g_resizeEditor.onResizeEditor=='function')
g_resizeEditor.onResizeEditor(g_resizeEditor,true);if(typeof event.stopPropagation=='function'){event.stopPropagation();}
else{event.cancelBubble=true;}
return false;}
break;case"mouseup":if(g_resizeEditor!=null){if(typeof g_resizeEditor.onResizeEditor=='function')
g_resizeEditor.onResizeEditor(g_resizeEditor,false);g_resizeEditor.getEditor().style.visibility="visible";g_resizeEditor=null;}
break;case"selectstart":if(g_resizeEditor!=null){if(typeof event.stopPropagation=='function'){event.stopPropagation();}
else{event.cancelBubble=true;}
return false;}}
return true;}
function _hxjWE_SelectHandler(evt){var event=window.event?window.event:evt;if(_oB.isIE)
event.target=event.srcElement;if(event.target!=null){var editor=this.wysiwyg;if(!editor){var body=hxj_FindParent(event.target,"body");if(body!=null)
editor=body.wysiwyg;}
if(editor!=null){switch(event.type){case"click":editor.onSelectElement(editor,event.target);break;case"dblclick":var actnode=editor.getSelectedNode();if(actnode!=null){if(actnode.className=="ssGallery"){hxj_OpenWindow(g_virtualPath+'/tool/wysiwyg.do?task=imageGallery&wysiwyg='+editor.objName,'popup',560,480,0);}
else if(actnode.className=="ssImage"){if(editor.cmsmode){hxj_OpenWindow(g_virtualPath+'/tool/wysiwyg.do?task=selectImage&wysiwyg='+editor.objName,'popup',500,520,0);}
else{hxj_OpenWindow(g_virtualPath+'/tool/wysiwyg.do?task=insertImage&wysiwyg='+editor.objName,'popup',500,520,0);}}
else if(actnode.className=="ssObject"){if(editor.cmsmode){hxj_OpenWindow(g_virtualPath+'/tool/wysiwyg.do?task=selectObject&wysiwyg='+editor.objName,'popup',500,420,0);}
else{hxj_OpenWindow(g_virtualPath+'/tool/wysiwyg.do?task=insertObject&wysiwyg='+editor.objName,'popup',480,360,0);}}}
break;}}}
return true;}
function _hxjWE_AddRows(tdNode,trNode,rowspan){var doc=g_activeEditor.getDocument();tdNode.rowSpan=1;var trNext=hxj_NextElement(trNode,"TR");for(var i=1;i<rowspan&&trNext;i++){var newTD=doc.createElement("td");newTD.innerHTML="&nbsp;";if(_oB.isIE){trNext.insertBefore(newTD,trNext.cells(tdNode.cellIndex));}
else{trNext.insertBefore(newTD,trNext.cells[tdNode.cellIndex]);}
trNext=hxj_NextElement(trNext,"TR");}}
function hxjWysiwyg(){this.getEditor=function(){return hxj_FindObject(this.editorID);}
this.getWindow=function(){var editor=this.getEditor();var win=editor.contentWindow;if(win==null)
win=editor;return win;}
this.getDocument=function(){return this.getWindow().document;}
this.getField=function(){return hxj_FindObject(this.id);}
this.getSourceMode=function(){return hxj_FindObject(this.id+'_SourceMode_ID');}
this.getDesignMode=function(){return hxj_FindObject(this.id+'_DesignMode_ID');}
this.getSelection=function(){return _oB.isIE?this.getDocument().selection:this.getWindow().getSelection();}
this.getSelectionRange=function(){var sel=this.getSelection();var rng;try{if(sel)
rng=(sel.rangeCount>0)?sel.getRangeAt(0):(sel.createRange?sel.createRange():sel.getRangeAt(0));}
catch(ex){}
return rng;}
this.getSelectedNode=function(){var rng=this.getSelectionRange();if(!_oB.isIE){if(!rng)
return this.getDocument().documentElement;var el=rng.commonAncestorContainer;if(!rng.collapsed){if(rng.startContainer==rng.endContainer||rng.startContainer==rng.endContainer.parentNode){if(rng.startOffset-rng.endOffset<2){if(rng.startContainer.hasChildNodes())
el=rng.startContainer.childNodes[rng.startOffset];}}}
return el;}
return rng.item?rng.item(0):rng.parentElement();}
this.getSelectedTableNode=function(){var actnode=this.getSelectedNode();if(actnode!=null){if(actnode.nodeName=="TABLE"){tblNode=actnode;}
else{tblNode=hxj_FindParent(actnode,"TABLE");}}
return tblNode;}
this.getSelectedTDNode=function(){var actnode=this.getSelectedNode();var tdNode=null;if(actnode!=null){if(actnode.nodeName=="TD"||actnode.nodeName=="TH"){tdNode=actnode;}
else{tdNode=hxj_FindParent(actnode,"TD");if(tdNode==null)
tdNode=hxj_FindParent(actnode,"TH");}}
return tdNode;}
this.init=function(tbox){var oTxtObj=hxj_FindObject(tbox.id);var defWysiwygWidth=600;var defWysiwygHeight=150;hxj_ParseArgument(this,oTxtObj);this.id=tbox.id;this.initValue=tbox.value;this.objName=this.id+'_Object';this.editorID=this.id+'_Editor_ID';this.wysiwygWidth=(hxj_ParseInt(oTxtObj.style.width)>0)?oTxtObj.style.width:defWysiwygWidth;this.wysiwygHeight=(hxj_ParseInt(oTxtObj.style.height)>0)?oTxtObj.style.height:defWysiwygHeight;this.editorStyle=oTxtObj.getAttribute("editorStyle");this.onInitEditor=eval(this.onInitEditor);this.onResizeEditor=eval(this.onResizeEditor);this.onSelectElement=eval(this.onSelectElement);if(!this.minHeight)
this.minHeight=140;if(!this.fileserver)
this.fileserver=_SVR_;if(!this.imgserver)
this.imgserver=_SVR_;if(this.attachs)
this.attachs=eval(this.attachs);this.resize=(this.resize)?eval(this.resize):false;this.swfupload=(this.swfupload)?eval(this.swfupload):false;this.cmsmode=(this.cmsmode)?eval(this.cmsmode):false;this.widget=(this.widget)?eval(this.widget):false;var strGen=new hxjStringBuilder();strGen.append("<div>\r\n");strGen.append(this._drawToolbar());strGen.append('<table width="100%" cellpadding="0" cellspacing="0" border="0" style="background:#FFFFFF;">\r\n');strGen.append('<tr>\r\n');strGen.append(' <td valign="top" width="100%" style="border:1px solid #AFAFAF;">\r\n');strGen.append(' <iframe border="0" frameborder="0" id="'+this.editorID+'" width="100%" height="'+hxj_MakePixel(this.wysiwygHeight)+'"></iframe>\r\n');strGen.append(' </td>\r\n');strGen.append('</tr>\r\n');if(this.resize){strGen.append('<tr>\r\n');strGen.append(' <td unselectable="on" onselectstart="return false;" onmousedown="_hxjWE_ResizeHandler(event);" style="height:8px;background-color:#CCCCCC;background-image:url('+g_WysiwygImageDir+'resize_bar.gif);background-position:center top;background-repeat:no-repeat;cursor:n-resize;"></td>\r\n');strGen.append('</tr>\r\n');}
strGen.append('</table>\r\n');strGen.append('</div>\r\n');strGen.append('<input type="hidden" rel="wysiwyg" id="'+this.id+'" name="'+this.id+'" value="">\r\n');var oDivObj=_oD.createElement("div");oDivObj.wysiwyg=this;oDivObj.className="wysiwyg_holder";oDivObj.id=this.id+"_Wysiwyg_ID";oDivObj.style.width=hxj_MakePixel(this.wysiwygWidth);oDivObj.innerHTML=strGen.toString();oTxtObj.parentNode.replaceChild(oDivObj,oTxtObj);this.setEditMode(true);this.setHTML(this.initValue);var doc=this.getDocument();doc.wysiwyg=this;if(doc.body!=null)
doc.body.wysiwyg=this;if(typeof this.onSelectElement=='function'){hxj_AddEvent(doc,"onclick",_hxjWE_SelectHandler);}
hxj_AddEvent(doc,"ondblclick",_hxjWE_SelectHandler);if(typeof this.onInitEditor=='function')
this.onInitEditor(this);eval('window.setTimeout("'+this.id+'_Object.setEditMode(true)", 500)');}
this.repaint=function(){var doc=this.getDocument();doc.body.style.display='none';doc.execCommand('selectall',false,null);doc.body.style.display='block';}
this.setEditMode=function(mode){var doc=this.getDocument();try{if(mode==true){doc.designMode="on";}
else{doc.designMode="off";}}catch(excp){}}
this.html2ssml=function(val){var regObject=new RegExp("<object[^>]*>.+<\/object[^>]*>","i");while(result=regObject.exec(val)){var body=result[0];val=val.replaceAll(body,'<img class="ssObject" src="'+_SVR_+'/images/blank.gif"'+_hxjWE_parseImageSize(body,"string","css")+' descwhere="wysiwyg" descref="'+encodeURIComponent(body)+'"/>');}
var regEmbed=new RegExp("<embed[^>]*>.+<\/embed[^>]*>","i");while(result=regEmbed.exec(val)){var body=result[0];val=val.replaceAll(body,'<img class="ssObject" src="'+_SVR_+'/images/blank.gif"'+_hxjWE_parseImageSize(body,"string","css")+' descwhere="wysiwyg" descref="'+encodeURIComponent(body)+'"/>');}
return val.replace(/<br>/gi,"<br/>");}
this.getText=function(){var doc=this.getDocument();var text="";if(_oB.isIE){text=doc.body.innerText;}
else{var html=doc.body.ownerDocument.createRange();html.selectNodeContents(doc.body);text=html.toString();}
return text.trim();}
this.getHTML=function(){var doc=this.getDocument();var val="";if(this.isSourceMode){if(_oB.isIE){val=doc.body.innerText;}
else{var html=doc.body.ownerDocument.createRange();html.selectNodeContents(doc.body);val=html.toString();}}
else{val=doc.body.innerHTML;}
val=val.replace(/<P(.*?)>/gi,"<div $1>");val=val.replace(/<\/P>/gi,"</div>");val=val.replace(/<br>/gi,"<br/>");this.getField().value=val;return val;}
this.setHTML=function(html){var doc=this.getDocument();try{if(hxj_IsNull(html))
html="";doc.open();doc.write('<html><head>\r\n');doc.write('<link rel="stylesheet" type="text/css" href="'+_SVR_+'/jslib/wysiwyg/wysiwyg_edit.css" />');doc.write("<style>BODY, DIV, TD {font-size:8pt;font-family:Verdana,Arial,sans-serif;}</style>");doc.write("<style>P {margin-top:3px;margin-bottom:3px;margin-left:3;margin-right:3;white-space: -moz-pre-wrap;word-break:break-all;}</style>");doc.write('</head>\r\n');doc.write('<body style="'+this.editorStyle+'">\r\n');doc.write(this.html2ssml(html));doc.write('</body></html>\r\n');doc.close();}
catch(excp){}}
this.insertHTML=function(html){var win=this.getWindow();var doc=this.getDocument();win.focus();try{if(_oB.isIE){doc.selection.createRange().pasteHTML(html);}
else if(_oB.isSafari){html=html.replace(/</g,"[HXTAGOPEN]");html=html.replace(/>/g,"[HXTAGCLOSE]");doc.execCommand('InsertText',false,html);html=doc.body.innerHTML;html=html.replace(/\[HXTAGOPEN\]/g,'<');html=html.replace(/\[HXTAGCLOSE\]/g,'>');html=html.replace(/[\n\r]/ig,'');doc.body.innerHTML=html;}
else{doc.execCommand("insertHtml",false,html);}}
catch(ex){var sel=this.getSelectedNode();if(sel==null)
sel=doc.body;if(sel.insertAdjacentHTML!=null){sel.insertAdjacentHTML("beforeBegin",html);sel.parentNode.removeChild(sel);}}}
this.formatText=function(id,value){var isDisabled=false;g_activeEditor=this;if(this.isSourceMode){if(id!="ViewDesign"&&id!="New"&&id!="Save"&&id!="Open"){alert("You are in HTML Source Mode. This feature has been disabled.");return;}}
if(id=="FontSize"||id=="FontName"){if(id=="FontSize"&&_oB.isSafari){var fsizemap={"1":"xx-small","2":"x-small","3":"small","4":"medium","5":"large","6":"x-large","7":"xx-large"};value=fsizemap[value];}
this.execCommand(id,false,value);}
else if(id=="ForeColor"||id=="BackColor"){if(value=="auto"){var actnode=this.getSelectedNode();if(actnode.nodeName.toLowerCase()=="div"){if(id=="BackColor"){actnode.style.backgroundColor="";}
else{actnode.style.color="";}}
else{id="RemoveFormat";}
value="";}
else if(value!="transprent"&&value.charAt(0)!="#"){value="#"+value;}
if(id=="BackColor"){if(_oB.isFirefox)
id="hiliteColor";}
this.execCommand(id,false,value);}
else if(id=="BoxColor"){if(value=="auto")
value="transparent";this.execCommand(id,false,value);}
else if(id=="InsertTable"){hxj_OpenWindow(g_virtualPath+'/tool/wysiwyg.do?task=insertTable&wysiwyg='+this.objName,'popup',480,380,0);}
else if(id=="DeleteTable"){var tblNode=this.getSelectedTableNode();if(tblNode!=null){tblNode.parentNode.removeChild(tblNode);this.repaint();}}
else if(id=="PropTR"){var actnode=this.getSelectedNode();if(actnode!=null){if(actnode.nodeName=="TR"){trNode=actnode;}
else{trNode=hxj_FindParent(actnode,"TR");}
if(trNode!=null)
hxj_OpenWindow(g_virtualPath+'/tool/wysiwyg.do?task=tableRow&wysiwyg='+this.objName,'popup',460,380,0);}}
else if(id=="PropTD"){var tdNode=this.getSelectedTDNode();if(tdNode!=null)
hxj_OpenWindow(g_virtualPath+'/tool/wysiwyg.do?task=tableCell&wysiwyg='+this.objName,'popup',460,380,0);}
else if(id=="InsertTRBefore"||id=="InsertTRAfter"){var actnode=this.getSelectedNode();if(actnode!=null){if(actnode.nodeName=="TR"){trNode=actnode;}
else{trNode=hxj_FindParent(actnode,"TR");}
if(trNode!=null){var tblNode=hxj_FindParent(trNode,"TABLE");var offset=(id=="InsertTRBefore")?0:1;for(var i=0;i<tblNode.rows.length;i++){if(tblNode.rows[i]==trNode){var newNode=tblNode.insertRow(i+offset);newNode.height=(hxj_ParseInt(trNode.height)>0)?trNode.height:"20";for(var j=0;j<trNode.cells.length;j++){try{var cell=newNode.insertCell(j);cell.innerHTML="&nbsp;&nbsp;";}catch(e){}}
break;}}}}}
else if(id=="DeleteTR"){var actnode=this.getSelectedNode();if(actnode!=null){if(actnode.nodeName=="TR"){trNode=actnode;}
else{trNode=hxj_FindParent(actnode,"TR");}
if(trNode!=null){hxj_RemoveRow(trNode);var tblNode=hxj_FindParent(trNode,"TABLE");if(tblNode.rows.length<=0){tblNode.parentNode.removeChild(tblNode);this.repaint();}}}}
else if(id=="InsertTDBefore"||id=="InsertTDAfter"){var tdNode=this.getSelectedTDNode();if(tdNode!=null){var tblNode=hxj_FindParent(tdNode,"TABLE");var trNode=tdNode.parentNode;var offset=(id=="InsertTDBefore")?0:1;for(var i=0;i<trNode.cells.length;i++){if(trNode.cells[i]==tdNode){offset=i+offset;break;}}
for(var i=0;i<tblNode.rows.length;i++){try{var cell=tblNode.rows[i].insertCell(offset)
cell.innerHTML="&nbsp;&nbsp;";}
catch(e){}}}}
else if(id=="DeleteTD"){var tdNode=this.getSelectedTDNode();if(tdNode!=null){var tblNode=hxj_FindParent(tdNode,"TABLE");var trNode=tdNode.parentNode;var offset=0;for(var i=0;i<trNode.cells.length;i++){if(trNode.cells[i]==tdNode){offset=i;break;}}
for(var i=0;i<tblNode.rows.length;i++){try{tblNode.rows[i].deleteCell(offset);}catch(e){}}}}
else if(id=="SplitTD"){var tdNode=this.getSelectedTDNode();if(tdNode!=null){var colspan=hxj_ParseInt(tdNode.getAttribute("colspan"));var rowspan=hxj_ParseInt(tdNode.getAttribute("rowspan"));colspan=(colspan<=0)?1:colspan;rowspan=(rowspan<=0)?1:rowspan;if(colspan>1||rowspan>1){var trNode=hxj_FindParent(tdNode,"TR");var doc=this.getDocument();tdNode.colSpan=1;for(var i=1;i<colspan;i++){var newTD=doc.createElement("td");newTD.innerHTML="&nbsp;";trNode.insertBefore(newTD,hxj_NextElement(tdNode,"TD,TH"));if(rowspan>1)
_hxjWE_AddRows(newTD,trNode,rowspan);}
_hxjWE_AddRows(tdNode,trNode,rowspan);}}}
else if(id=="MergeTD"){var tdNode=this.getSelectedTDNode();if(tdNode!=null){hxj_OpenWindow(g_virtualPath+'/tool/wysiwyg.do?task=tableMerge&wysiwyg='+this.objName,'popup',240,180,0);}}
else if(id=="InsertLink"){if(this.cmsmode){hxj_OpenWindow(g_virtualPath+'/tool/wysiwyg.do?task=selectLink&wysiwyg='+this.objName+'&swfup='+this.swfupload,'popup',500,450,0);}
else{hxj_OpenWindow(g_virtualPath+'/tool/wysiwyg.do?task=insertLink&wysiwyg='+this.objName+'&swfup='+this.swfupload,'popup',500,450,0);}}
else if(id=="InsertImage"){var actnode=this.getSelectedNode();if(actnode!=null&&actnode.className=="ssGallery"){if(this.cmsmode){hxj_OpenWindow(g_virtualPath+'/tool/wysiwyg.do?task=imageGallery&wysiwyg='+this.objName+'&swfup='+this.swfupload,'popup',560,520,0);}
else{hxj_OpenWindow(g_virtualPath+'/tool/wysiwyg.do?task=insertGallery&wysiwyg='+this.objName+'&swfup='+this.swfupload,'popup',560,520,0);}}
else{if(this.cmsmode){hxj_OpenWindow(g_virtualPath+'/tool/wysiwyg.do?task=selectImage&wysiwyg='+this.objName+'&swfup='+this.swfupload,'popup',500,520,0);}
else{hxj_OpenWindow(g_virtualPath+'/tool/wysiwyg.do?task=insertImage&wysiwyg='+this.objName+'&swfup='+this.swfupload,'popup',500,520,0);}}}
else if(id=="InsertGallery"){if(this.cmsmode){hxj_OpenWindow(g_virtualPath+'/tool/wysiwyg.do?task=imageGallery&wysiwyg='+this.objName+'&swfup='+this.swfupload,'popup',580,480,0);}
else{hxj_OpenWindow(g_virtualPath+'/tool/wysiwyg.do?task=insertGallery&wysiwyg='+this.objName+'&swfup='+this.swfupload,'popup',580,480,0);}}
else if(id=="InsertObject"){if(this.cmsmode){hxj_OpenWindow(g_virtualPath+'/tool/wysiwyg.do?task=selectObject&wysiwyg='+this.objName+'&swfup='+this.swfupload,'popup',500,420,0);}
else{hxj_OpenWindow(g_virtualPath+'/tool/wysiwyg.do?task=insertObject&wysiwyg='+this.objName+'&swfup='+this.swfupload,'popup',500,420,0);}}
else if(id=="InsertTemplate"){hxj_OpenWindow(g_virtualPath+'/tool/wysiwyg.do?task=insertTemplate&wysiwyg='+this.objName,'popup',610,460,0);}
else if(id=="Charmap"){this.insertHTML(value);}
else if(id=="ViewSource"){this.viewSource();}
else if(id=="ViewDesign"){this.viewDesign();}
else if(id=="New"){this.newPage();}
else{this.execCommand(id,false,null);}}
this.execCommand=function(id,ui,val){var win=this.getWindow();var doc=this.getDocument();win.focus();if(id=="insertHtml"){this.insertHTML(val);}
else if(id=="insertLink"){var range=this.getSelectionRange();var hyperlink;var selText;if(_oB.isIE){selText=range.htmlText; if (hxj_IsNull(selText) && this.getSelection().type == "Control") {selText=range(0).outerHTML;}}
else{var dummyNode=document.createElement("div");dummyNode.appendChild(range.extractContents());selText=dummyNode.innerHTML;}
if(hxj_IsNull(selText))
selText=val;if(ui){hyperlink="<a href='"+val+"' target='_new'>"+selText+"</a>";}
else{hyperlink="<a href='"+val+"'>"+selText+"</a>";}
doc.execCommand("Unlink",false,"");this.insertHTML(hyperlink);}
else if(id=="Unlink"){var actnode=this.getSelectedNode();if(actnode!=null){var anode=null;if(actnode.nodeName=="A"){anode=actnode;}
else{anode=hxj_FindParent(actnode,"a");}
if(anode!=null){var dummyNode=doc.createElement("span");dummyNode.innerHTML=anode.innerHTML;anode.parentNode.replaceChild(dummyNode,anode);}}}
else if(id=="insertObject"){var actnode=this.getSelectedNode();var code="";var width=400;var height=300;if(ui){code=encodeURIComponent(val);if(actnode!=null&&actnode.className=="ssObject"){actnode.setAttribute("descurl",code);actnode.setAttribute("descref","");actnode.setAttribute("descwhere","wysiwyg");}
else{code="<div style='text-align:center;margin:4px;padding:2px;'><img class='ssObject' src='"+_SVR_+"/images/blank.gif' title='Inserted obejct by user' style='width:"+width+"px;height:"+height+"px;' descwhere='wysiwyg' descurl='"+code+"' /></div>";this.insertHTML(code);}}
else{code=encodeURIComponent(val);if(actnode!=null&&actnode.className=="ssObject"){actnode.setAttribute("descref",code);actnode.setAttribute("descurl","");actnode.setAttribute("descwhere","wysiwyg");}
else{code="<div style='text-align:center;margin:4px;padding:2px;'><img class='ssObject' src='"+_SVR_+"/images/blank.gif' title='Inserted obejct by user' style='width:"+width+"px;height:"+height+"px;' descwhere='wysiwyg' descref='"+code+"' /></div>";this.insertHTML(code);}}}
else if(id=="BoxColor"){var actnode=this.getSelectedNode();if(actnode!=null&&actnode.className!="ssColorBox"){actnode=hxj_FindParent(actnode,"div");}
if(actnode!=null&&actnode.className=="ssColorBox"){actnode.style.backgroundColor=val;}
else{var range=this.getSelectionRange();var value1="<div class='ssColorBox' style='padding: 10px; background-color:"+val+";'>";var value2="</div>";var html="";if(_oB.isIE){html=range.htmlText;}
else{var dummyNode=document.createElement("div");dummyNode.appendChild(range.extractContents());html=dummyNode.innerHTML;}
if(html.length<=0){alert("Please select text or area you want to insert the color box.");return;}
this.insertHTML(value1+html+value2);}}
else{doc.execCommand(id,ui,val);}
win.focus();}
this.viewSource=function(){var doc=this.getDocument();if(_oB.isIE){var iHTML=doc.body.innerHTML;doc.body.innerText=iHTML;}
else{var html=_oD.createTextNode(doc.body.innerHTML);doc.body.innerHTML="";doc.body.appendChild(html);}
doc.body.style.fontSize="";doc.body.style.fontFamily="";this.getSourceMode().style.display='none';this.getDesignMode().style.display='block';this.isSourceMode=true;}
this.viewDesign=function(){var doc=this.getDocument();var iText="";if(_oB.isIE){iText=doc.body.innerText;}
else{var html=doc.body.ownerDocument.createRange();html.selectNodeContents(doc.body);iText=html.toString();}
doc.body.innerHTML=this.html2ssml(iText);this.getSourceMode().style.display='block';this.getDesignMode().style.display='none';this.isSourceMode=false;}
this.newPage=function(){if(confirm("Data will be cleared. Are you sure you want to create a new Document?")){this.setHTML("<div>&nbsp;</div>");}}
this._drawToolbar=function(){var strGen=new hxjStringBuilder();strGen.append('<table width="100%" cellpadding="0" cellspacing="0" border="0" class="toolbar1" unselectable="on" onmousedown="return false;">\r\n');strGen.append('<tr>\r\n');strGen.append(' <td style="width: 6px;"><img src="'+g_WysiwygImageDir+'seperator2.gif" alt="" hspace="3"/></td>\r\n');strGen.append(' <td style="width: 22px;"><img src="'+g_WysiwygImageDir+'new.gif" border=0 unselectable="on" title="New" id="New" class="tbbutton" onClick="'+this.id+'_Object.formatText(this.id)" onmouseover="className=\'tbbuttonOver\'; this.src=\''+g_WysiwygImageDir+'new_on.gif\';" onmouseout="className=\'tbbutton\'; this.src=\''+g_WysiwygImageDir+'new.gif\';" unselectable="on" width="20" height="20"/></td>\r\n');strGen.append(' <td style="width: 22px;"><img src="'+g_WysiwygImageDir+'template.gif" border=0 unselectable="on" title="Insert Template" class="tbbutton" onClick="'+this.id+'_Object.formatText(\'InsertTemplate\')" onmouseover="className=\'tbbuttonOver\'; this.src=\''+g_WysiwygImageDir+'template.gif\';" onmouseout="className=\'tbbutton\'; this.src=\''+g_WysiwygImageDir+'template.gif\';" unselectable="on" width="20" height="20"/></td>\r\n');strGen.append(' <td style="width: 8px;" align="center"><img src="'+g_WysiwygImageDir+'seperator.gif" border=0 unselectable="on" width="2" height="18" hspace="2" unselectable="on"/></td>\r\n');strGen.append(' <td style="width: 64px;"><div class="tbFormat" unselectable="on" onmouseover="this.className=\'tbFormatOver\';" onmouseout="this.className=\'tbFormat\';" onclick="_hxjWE_ActivateEditor(this);showPopupMenu(this, \'FormatMenu_ID\', true)">Format</div></td>\r\n');strGen.append(' <td style="width: 22px;"><img src="'+g_WysiwygImageDir+'format_remove_on.gif" border=0 unselectable="on" title="Clear formatting" class="tbbutton" onClick="'+this.id+'_Object.formatText(\'RemoveFormat\')" onmouseover="className=\'tbbuttonOver\';" onmouseout="className=\'tbbutton\';" unselectable="on" width="20" height="20"/></td>\r\n');strGen.append(' <td style="width: 8px;" align="center"><img src="'+g_WysiwygImageDir+'seperator.gif" border=0 unselectable="on" width="2" height="18" hspace="2" unselectable="on"/></td>\r\n');strGen.append(' <td style="width: 22px;"><img src="'+g_WysiwygImageDir+'bold.gif" border=0 unselectable="on" title="Bold" class="tbbutton" onClick="'+this.id+'_Object.formatText(\'Bold\')" onmouseover="className=\'tbbuttonOver\'; this.src=\''+g_WysiwygImageDir+'bold_on.gif\';" onmouseout="className=\'tbbutton\'; this.src=\''+g_WysiwygImageDir+'bold.gif\';" unselectable="on" width="20" height="20"/></td>\r\n');strGen.append(' <td style="width: 22px;"><img src="'+g_WysiwygImageDir+'italics.gif" border=0 unselectable="on" title="Italic" class="tbbutton" onClick="'+this.id+'_Object.formatText(\'Italic\')" onmouseover="className=\'tbbuttonOver\'; this.src=\''+g_WysiwygImageDir+'italics_on.gif\';" onmouseout="className=\'tbbutton\'; this.src=\''+g_WysiwygImageDir+'italics.gif\';" unselectable="on" width="20" height="20"/></td>\r\n');strGen.append(' <td style="width: 22px;"><img src="'+g_WysiwygImageDir+'underline.gif" border=0 unselectable="on" title="Underline" class="tbbutton" onClick="'+this.id+'_Object.formatText(\'Underline\')" onmouseover="className=\'tbbuttonOver\'; this.src=\''+g_WysiwygImageDir+'underline_on.gif\';" onmouseout="className=\'tbbutton\'; this.src=\''+g_WysiwygImageDir+'underline.gif\';" unselectable="on" width="20" height="20"/></td>\r\n');strGen.append(' <td style="width: 8px;" align="center"><img src="'+g_WysiwygImageDir+'seperator.gif" border=0 unselectable="on" width="2" height="18" hspace="2" unselectable="on"/></td>\r\n');strGen.append(' <td style="width: 22px;"><img src="'+g_WysiwygImageDir+'forecolor.gif" border=0 unselectable="on" title="Select Text Color" class="tbbutton" onClick="_hxjWE_ActivateEditor(this);color_Object.show(this, \'ForeColor\');" onmouseover="className=\'tbbuttonOver\'; this.src=\''+g_WysiwygImageDir+'forecolor_on.gif\';" onmouseout="className=\'tbbutton\'; this.src=\''+g_WysiwygImageDir+'forecolor.gif\';" unselectable="on" width="20" height="20"/></td>\r\n');strGen.append(' <td style="width: 22px;"><img src="'+g_WysiwygImageDir+'backcolor.gif" border=0 unselectable="on" title="Select Highlight Color" class="tbbutton" onClick="_hxjWE_ActivateEditor(this);color_Object.show(this, \'BackColor\');" onmouseover="className=\'tbbuttonOver\'; this.src=\''+g_WysiwygImageDir+'backcolor_on.gif\';" onmouseout="className=\'tbbutton\'; this.src=\''+g_WysiwygImageDir+'backcolor.gif\';" unselectable="on" width="20" height="20"/></td>\r\n');strGen.append(' <td style="width: 22px;"><img src="'+g_WysiwygImageDir+'boxcolor.gif" border=0 unselectable="on" title="Insert ColorBox or Select Box Color" class="tbbutton" onClick="_hxjWE_ActivateEditor(this);color_Object.show(this, \'BoxColor\');" onmouseover="className=\'tbbuttonOver\'; this.src=\''+g_WysiwygImageDir+'boxcolor_on.gif\';" onmouseout="className=\'tbbutton\'; this.src=\''+g_WysiwygImageDir+'boxcolor.gif\';" unselectable="on" width="20" height="20"/></td>\r\n');strGen.append(' <td style="width: 22px;"><img src="'+g_WysiwygImageDir+'charmap.gif" border=0 unselectable="on" title="Insert Custom Char" class="tbbutton" onClick="_hxjWE_ActivateEditor(this);charmap_Object.show(this, \'Charmap\');" onmouseover="className=\'tbbuttonOver\'; this.src=\''+g_WysiwygImageDir+'charmap_on.gif\';" onmouseout="className=\'tbbutton\'; this.src=\''+g_WysiwygImageDir+'charmap.gif\';" unselectable="on" width="20" height="20"/></td>\r\n');strGen.append(' <td style="width: 8px;" align="center"><img src="'+g_WysiwygImageDir+'seperator.gif" border=0 unselectable="on" width="2" height="18" hspace="2" unselectable="on"/></td>\r\n');strGen.append(' <td style="width: 22px;"><img src="'+g_WysiwygImageDir+'insert_hyperlink.gif" border=0 unselectable="on" title="Insert or Edit Link" class="tbbutton" onClick="'+this.id+'_Object.formatText(\'InsertLink\')" onmouseover="className=\'tbbuttonOver\'; this.src=\''+g_WysiwygImageDir+'insert_hyperlink_on.gif\';" onmouseout="className=\'tbbutton\'; this.src=\''+g_WysiwygImageDir+'insert_hyperlink.gif\';" unselectable="on" width="20" height="20"/></td>\r\n');strGen.append(' <td style="width: 22px;"><img src="'+g_WysiwygImageDir+'insert_picture.gif" border=0 unselectable="on" title="Insert or Edit Image" class="tbbutton" onClick="'+this.id+'_Object.formatText(\'InsertImage\')" onmouseover="className=\'tbbuttonOver\'; this.src=\''+g_WysiwygImageDir+'insert_picture_on.gif\';" onmouseout="className=\'tbbutton\'; this.src=\''+g_WysiwygImageDir+'insert_picture.gif\';" unselectable="on" width="20" height="20"/></td>\r\n');if(this.cmsmode)
strGen.append(' <td style="width: 22px;"><img src="'+g_WysiwygImageDir+'insert_gallery.gif" border=0 unselectable="on" title="Insert or Edit Image Gallery" class="tbbutton" onClick="'+this.id+'_Object.formatText(\'InsertGallery\')" onmouseover="className=\'tbbuttonOver\'; this.src=\''+g_WysiwygImageDir+'insert_gallery_on.gif\';" onmouseout="className=\'tbbutton\'; this.src=\''+g_WysiwygImageDir+'insert_gallery.gif\';" unselectable="on" width="20" height="20"/></td>\r\n');strGen.append(' <td style="width: 22px;"><img src="'+g_WysiwygImageDir+'insert_object.gif" border=0 unselectable="on" title="Insert or Edit Object" class="tbbutton" onClick="'+this.id+'_Object.formatText(\'InsertObject\')" onmouseover="className=\'tbbuttonOver\'; this.src=\''+g_WysiwygImageDir+'insert_object_on.gif\';" onmouseout="className=\'tbbutton\'; this.src=\''+g_WysiwygImageDir+'insert_object.gif\';" unselectable="on" width="20" height="20"/></td>\r\n');strGen.append(' <td style="width: 22px;"><img src="'+g_WysiwygImageDir+'insert_table.gif" border=0 unselectable="on" title="Insert or Edit Table" id="'+this.id+'_TableMenu" class="tbbutton" onClick="'+this.id+'_Object.formatText(\'InsertTable\')" onmouseover="className=\'tbbuttonOver\'; this.src=\''+g_WysiwygImageDir+'insert_table_on.gif\';" onmouseout="className=\'tbbutton\'; this.src=\''+g_WysiwygImageDir+'insert_table.gif\';" unselectable="on" width="20" height="20"/></td>\r\n');strGen.append(' <td style="width: 10px;"><img src="'+g_WysiwygImageDir+'button_menu.gif" border=0 unselectable="on" title="Table Menu" id="TableMenu" class="tbdown" onClick="_hxjWE_ActivateEditor(this);showPopupMenu(hxj_FindObject(\''+this.id+'_TableMenu\'),\'TableMenu_ID\', true)" onmouseover="className=\'tbdownOver\';hxj_FindObject(\''+this.id+'_TableMenu\').className=\'tbbuttonOver\';" onmouseout="className=\'tbdown\';hxj_FindObject(\''+this.id+'_TableMenu\').className=\'tbbutton\';" unselectable="on" width="10" height="20"/></td>\r\n');strGen.append(' <td style="width: 8px;" align="center"><img src="'+g_WysiwygImageDir+'seperator.gif" border=0 unselectable="on" width="2" height="18" hspace="2" unselectable="on"/></td>\r\n');strGen.append(' <td style="width: 22px;"><img src="'+g_WysiwygImageDir+'list_unordered.gif" border=0 unselectable="on" title="unorderedlist" class="tbbutton" onClick="'+this.id+'_Object.formatText(\'InsertUnorderedList\')" onmouseover="className=\'tbbuttonOver\'; this.src=\''+g_WysiwygImageDir+'list_unordered_on.gif\';" onmouseout="className=\'tbbutton\'; this.src=\''+g_WysiwygImageDir+'list_unordered.gif\';" unselectable="on" width="20" height="20"/></td>\r\n');strGen.append(' <td style="width: 22px;"><img src="'+g_WysiwygImageDir+'list_ordered.gif" border=0 unselectable="on" title="orderedlist" class="tbbutton" onClick="'+this.id+'_Object.formatText(\'InsertOrderedList\')" onmouseover="className=\'tbbuttonOver\'; this.src=\''+g_WysiwygImageDir+'list_ordered_on.gif\';" onmouseout="className=\'tbbutton\'; this.src=\''+g_WysiwygImageDir+'list_ordered.gif\';" unselectable="on" width="20" height="20"/></td>\r\n');strGen.append(' <td style="width: 8px;" align="center"><img src="'+g_WysiwygImageDir+'seperator.gif" border=0 unselectable="on" width="2" height="18" hspace="2" unselectable="on"/></td>\r\n');strGen.append(' <td style="width: 22px;"><img src="'+g_WysiwygImageDir+'justify_center.gif" border=0 unselectable="on" title="JustifyCenter" id="'+this.id+'_Justify" class="tbbutton" onClick="'+this.id+'_Object.formatText(\'Justifycenter\')" onmouseover="className=\'tbbuttonOver\'; this.src=\''+g_WysiwygImageDir+'justify_center_on.gif\';" onmouseout="className=\'tbbutton\'; this.src=\''+g_WysiwygImageDir+'justify_center.gif\';" unselectable="on" width="20" height="20"/></td>\r\n');strGen.append(' <td style="width: 10px;"><img src="'+g_WysiwygImageDir+'button_menu.gif" border=0 unselectable="on" title="Align Menu" class="tbdown" onClick="_hxjWE_ActivateEditor(this);showPopupMenu(hxj_FindObject(\''+this.id+'_Justify\'),\'AlignMenu_ID\', true)" onmouseover="className=\'tbdownOver\';hxj_FindObject(\''+this.id+'_Justify\').className=\'tbbuttonOver\';" onmouseout="className=\'tbdown\';hxj_FindObject(\''+this.id+'_Justify\').className=\'tbbutton\';" unselectable="on" width="10" height="20"/></td>\r\n');if(this.widget){strGen.append(' <td style="width: 8px;" align="center"><img src="'+g_WysiwygImageDir+'seperator.gif" border=0 unselectable="on" width="2" height="18" hspace="2" unselectable="on"/></td>\r\n');strGen.append(' <td style="width: 60px;"><img src="'+g_WysiwygImageDir+'insert_widget.gif" border=0 unselectable="on" title="Insert or Edit Widget" class="tbWidget" onClick="'+this.id+'_Object.formatText(\'InsertWidget\')" onmouseover="className=\'tbWidgetOver\'; this.src=\''+g_WysiwygImageDir+'insert_widget_on.gif\';" onmouseout="className=\'tbWidget\'; this.src=\''+g_WysiwygImageDir+'insert_widget.gif\';" unselectable="on" width="58" height="20"/></td>\r\n');}
strGen.append(' <td style="width: 8px;" align="center"><img src="'+g_WysiwygImageDir+'seperator.gif" border=0 unselectable="on" width="2" height="18" hspace="2" unselectable="on"/></td>\r\n');strGen.append(' <td style="width: 22px;">\r\n');strGen.append('  <span id="'+this.id+'_SourceMode_ID" style="display:block"><img src="'+g_WysiwygImageDir+'view_source.gif" border=0 unselectable="on" title="ViewSource" id="ViewSource" class="tbbutton" onClick="'+this.id+'_Object.formatText(this.id);" onmouseover="className=\'tbbuttonOver\'; this.src=\''+g_WysiwygImageDir+'view_source_on.gif\';" onmouseout="className=\'tbbutton\'; this.src=\''+g_WysiwygImageDir+'view_source.gif\';" unselectable="on"  width="20" height="20"/></span>\r\n');strGen.append('  <span id="'+this.id+'_DesignMode_ID" style="display:none"><img src="'+g_WysiwygImageDir+'view_text.gif" border=0 unselectable="on" title="ViewDesign" id="ViewDesign" class="tbbutton" onClick="'+this.id+'_Object.formatText(this.id);" onmouseover="className=\'tbbuttonOver\'; this.src=\''+g_WysiwygImageDir+'view_text_on.gif\';" onmouseout="className=\'tbbutton\'; this.src=\''+g_WysiwygImageDir+'view_text.gif\';" unselectable="on"  width="20" height="20"/></span>\r\n');strGen.append(' </td>\r\n');strGen.append(' <td>&nbsp;</td>\r\n');strGen.append('</tr>\r\n');strGen.append('</table>\r\n');return strGen.toString();}}
function getWysiwyg(id){return eval(id+"_Object");}
function initWysiwyg(){var frms=document.getElementsByTagName("form");var bWysiwyg=false;for(var f=0;f<frms.length;f++){var tboxs=frms[f].getElementsByTagName("textarea");var arrWysiwyg=new hxjArray();for(var i=0;i<tboxs.length;i++){var tbox=tboxs[i];if(tbox.className=="wysiwyg"){tbox.parentForm=frms[f];arrWysiwyg.push(tbox);}}
if(arrWysiwyg.length>0){for(var i=0;i<arrWysiwyg.length;i++){var tbox=arrWysiwyg[i];if(tbox.id=="")
tbox.id=tbox.name;eval(tbox.id+"_Object = new hxjWysiwyg()");eval(tbox.id+"_Object.init(tbox)");}
frms[f].arrWysiwyg=arrWysiwyg;frms[f].oldonsubmit=frms[f].onsubmit;frms[f].onsubmit=function(){for(var i=0;i<this.arrWysiwyg.length;i++)
eval(this.arrWysiwyg[i].id+'_Object.getHTML()');if(this.oldonsubmit)
return this.oldonsubmit();}
bWysiwyg=true;}}
if(bWysiwyg){initWysiwygPickers();hxj_AddEvent(document,"onmouseup",_hxjWE_ResizeHandler);hxj_AddEvent(document,"onmousemove",_hxjWE_ResizeHandler);hxj_AddEvent(document,"onselectstart",_hxjWE_ResizeHandler);}}
function initWysiwygPickers(){if(!document.isInitWysiwyg){var oDivObj=_oD.createElement("div");var strGen=new hxjStringBuilder();strGen.append('<div id="FormatMenu_ID" class="jsmenu" menustyle="g_oXPDefaultMenuStyle">\r\n');strGen.append(' <a href="javascript:_hxjWE_FormatText(\'RemoveFormat\')" rel="image='+g_WysiwygImageDir+'format_remove_on.gif;">Clear formatting</a>\r\n');strGen.append(' <a href="#" rel="type=separator;"></a>\r\n');strGen.append(' <a href="javascript:_hxjWE_FormatText(\'Bold\')" rel="image='+g_WysiwygImageDir+'bold_on.gif;">Bold</a>\r\n');strGen.append(' <a href="javascript:_hxjWE_FormatText(\'Italic\')" rel="image='+g_WysiwygImageDir+'italics_on.gif;">Italic</a>\r\n');strGen.append(' <a href="javascript:_hxjWE_FormatText(\'Underline\')" rel="image='+g_WysiwygImageDir+'underline_on.gif;">Underline</a>\r\n');strGen.append(' <a href="javascript:_hxjWE_FormatText(\'Strikethrough\')" rel="image='+g_WysiwygImageDir+'strikethrough_on.gif;">Strikethrough</a>\r\n');strGen.append(' <a href="javascript:_hxjWE_FormatText(\'Superscript\')" rel="image='+g_WysiwygImageDir+'superscript_on.gif;">Superscript</a>\r\n');strGen.append(' <a href="#" rel="type=separator;"></a>\r\n');strGen.append(' <a href="#" rel="submenu=FontMenu_ID;">Font family</a>\r\n');strGen.append(' <a href="#" rel="submenu=FontSizeMenu_ID;">Font size</a>\r\n');strGen.append(' <a href="#" rel="type=separator;"></a>\r\n');strGen.append(' <a href="javascript:_hxjWE_FormatText(\'InsertUnorderedList\')" rel="image='+g_WysiwygImageDir+'list_unordered_on.gif;">Unordered list</a>\r\n');strGen.append(' <a href="javascript:_hxjWE_FormatText(\'InsertOrderedList\')" rel="image='+g_WysiwygImageDir+'list_ordered_on.gif;">Ordered list</a>\r\n');strGen.append(' <a href="#" rel="type=separator;"></a>\r\n');strGen.append(' <a href="#" rel="submenu=AlignMenu_ID;">Align</a>\r\n');strGen.append('</div>\r\n');strGen.append('<div id="FontMenu_ID" class="jsmenu" menustyle="g_oXPDefaultMenuStyle">\r\n');for(var i=0;i<g_arrFonts.length;i++){strGen.append(' <a href="javascript:_hxjWE_FormatText(\'FontName\', \''+g_arrFonts[i]+'\')" rel="fontfamily='+g_arrFonts[i]+';">'+g_arrFonts[i]+'</a>\r\n');}
strGen.append('</div>\r\n');strGen.append('<div id="FontSizeMenu_ID" class="jsmenu" menustyle="g_oXPDefaultMenuStyle">\r\n');for(var i=0;i<g_arrFontSizes.length;i++){strGen.append(' <a href="javascript:_hxjWE_FormatText(\'FontSize\', \''+i+'\')" rel="fontsize='+g_arrFontSizes[i]+'pt;">'+g_arrFontSizes[i]+' pt</a>\r\n');}
strGen.append('</div>\r\n');strGen.append('<div id="AlignMenu_ID" class="jsmenu" menustyle="g_oXPDefaultMenuStyle">\r\n');strGen.append(' <a href="javascript:_hxjWE_FormatText(\'Justifyleft\')" rel="image='+g_WysiwygImageDir+'justify_left_on.gif;">Justify left</a>\r\n');strGen.append(' <a href="javascript:_hxjWE_FormatText(\'Justifycenter\')" rel="image='+g_WysiwygImageDir+'justify_center_on.gif;">Justify center</a>\r\n');strGen.append(' <a href="javascript:_hxjWE_FormatText(\'Justifyright\')" rel="image='+g_WysiwygImageDir+'justify_right_on.gif;">Justify right</a>\r\n');strGen.append(' <a href="#" rel="type=separator;"></a>\r\n');strGen.append(' <a href="javascript:_hxjWE_FormatText(\'Outdent\')" rel="image='+g_WysiwygImageDir+'indent_left_on.gif;">Outdent</a>\r\n');strGen.append(' <a href="javascript:_hxjWE_FormatText(\'Indent\')" rel="image='+g_WysiwygImageDir+'indent_right_on.gif;">Indent</a>\r\n');strGen.append('</div>\r\n');strGen.append('<div id="TableMenu_ID" class="jsmenu" menustyle="g_oXPDefaultMenuStyle">\r\n');strGen.append(' <a href="javascript:_hxjWE_FormatText(\'PropTR\')" rel="image='+g_WysiwygImageDir+'table_row_props.gif;">Table row properties</a>\r\n');strGen.append(' <a href="javascript:_hxjWE_FormatText(\'PropTD\')" rel="image='+g_WysiwygImageDir+'table_cell_props.gif;">Table cell properties</a>\r\n');strGen.append(' <a href="#" rel="type=separator;"></a>\r\n');strGen.append(' <a href="javascript:_hxjWE_FormatText(\'InsertTRBefore\')" rel="image='+g_WysiwygImageDir+'table_insert_row_before.gif;">Insert row before</a>\r\n');strGen.append(' <a href="javascript:_hxjWE_FormatText(\'InsertTRAfter\')" rel="image='+g_WysiwygImageDir+'table_insert_row_after.gif;">Insert row after</a>\r\n');strGen.append(' <a href="javascript:_hxjWE_FormatText(\'DeleteTR\')" rel="image='+g_WysiwygImageDir+'table_delete_row.gif;">Delete row</a>\r\n');strGen.append(' <a href="#" rel="type=separator;"></a>\r\n');strGen.append(' <a href="javascript:_hxjWE_FormatText(\'InsertTDBefore\')" rel="image='+g_WysiwygImageDir+'table_insert_col_before.gif;">Insert column before</a>\r\n');strGen.append(' <a href="javascript:_hxjWE_FormatText(\'InsertTDAfter\')" rel="image='+g_WysiwygImageDir+'table_insert_col_after.gif;">Insert column after</a>\r\n');strGen.append(' <a href="javascript:_hxjWE_FormatText(\'DeleteTD\')" rel="image='+g_WysiwygImageDir+'table_delete_col.gif;">Delete column</a>\r\n');strGen.append(' <a href="#" rel="type=separator;"></a>\r\n');strGen.append(' <a href="javascript:_hxjWE_FormatText(\'SplitTD\')" rel="image='+g_WysiwygImageDir+'table_split_cells.gif;">Split merged table cells</a>\r\n');strGen.append(' <a href="javascript:_hxjWE_FormatText(\'MergeTD\')" rel="image='+g_WysiwygImageDir+'table_merge_cells.gif;">Merge table cells</a>\r\n');strGen.append(' <a href="#" rel="type=separator;"></a>\r\n');strGen.append(' <a href="javascript:_hxjWE_FormatText(\'DeleteTable\')" rel="image='+g_WysiwygImageDir+'table_delete.gif;">Delete table</a>\r\n');strGen.append('</div>\r\n');oDivObj.innerHTML=strGen.toString();_oD.body.appendChild(oDivObj);g_oFormatMenu=new hxjMenu(hxj_FindObject("FormatMenu_ID"));g_oAlignMenu=new hxjMenu(hxj_FindObject("AlignMenu_ID"));g_oFontMenu=new hxjMenu(hxj_FindObject("FontMenu_ID"));g_oFontSizeMenu=new hxjMenu(hxj_FindObject("FontSizeMenu_ID"));g_oTableMenu=new hxjMenu(hxj_FindObject("TableMenu_ID"));color_Object=new hxjColorPicker('color');color_Object.callback=_hxjWE_PickerCallback;color_Object.hasauto=true;color_Object.nohex=true;charmap_Object=new hxjCharmapPicker('charmap');charmap_Object.callback=_hxjWE_PickerCallback;document.isInitWysiwyg=true;}}
g_oXPDefaultMenuStyle=new hxjMenuStyle("defmxp");with(g_oXPDefaultMenuStyle){overflow="auto";minwidth=160;border="1px solid #8A867A";fontfamily="Verdana,Tahoma,Helvetica";fontsize="8pt";image=g_MenuImageDir+"xpblank.gif";imagepadding=2;bgimage=g_MenuImageDir+"winxp.gif";bgcolor="transparent";onbgcolor="#DFDFDF";txtcolor="#000000";ontxtcolor="#000000";onitemborder="1px solid #FFBF4F";rawcss="padding-left:2px";subimage=g_MenuImageDir+"arrow3_off.gif";onsubimage=g_MenuImageDir+"arrow3_on.gif";subimagepadding=3;separatorall=0;separatoralign="right";separatorcolor="#C2CCCF";separatorpadding=1;separatorwidth="85%";}

/** cmsobj.js **/
var JS_CMSOBJECT=true;function hxj_DrawWidget(widgetname,widgetid,query){if(hxj_IsNull(query)){query="q=";}
if(query.indexOf("cmd=")==-1){query+="&cmd=rander";}
var dom=hxj_ExecuteAjax(g_virtualPath+"/tool/index.do","widgetname="+widgetname+"&widgetid="+widgetid+"&"+query,false,true);if(dom!=null){var widgetnode=hxj_FindObject("WIDGET_"+widgetid);if(widgetnode!=null){widgetnode.innerHTML=dom;initPicker(widgetnode.getElementsByTagName("div"));}}}
function hxj_GetURL2ObjectCode(val,width,height){var myregexp=/\.(\w+)(\?.+)?$/im;var ext=myregexp.exec(val);var code="";ext=(ext!=null)?ext[1].toLowerCase():"";switch(ext){case"swf":code='<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+width+'" height="'+height+'">'+'<param name="allowScriptAccess" value="always" />'+'<param name="wmode" value="opaque"/>'+'<param name="movie" value="'+val+'"/>'+'<param name="autostart" value="0"/>'+'<param name="loop" value="1"/>'+'<embed src="'+val+'" type="application/x-shockwave-flash" wmode="opaque" width="'+width+'" height="'+height+'" autostart="false" loop="true" />'+'<\/object>';break;case"flv":code='<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+width+'" height="'+height+'">'+'<param name="allowScriptAccess" value="always" />'+'<param name="wmode" value="opaque"/>'+'<param name="movie" value="'+_SVR_+'/swf/jwflvplayer.swf"/>'+'<param name="flashvars" value="autostart=false&file='+val+'"/>'+'<embed src="'+_SVR_+'/swf/jwflvplayer.swf" flashvars="autostart=false&file='+val+'" type="application/x-shockwave-flash" wmode="transparent" width="'+width+'" height="'+height+'" controller=1 />'+'</object>';break;case"mov":code='<object type="video/quicktime" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="'+width+'" height="'+height+'">'+'<param name="src" value="'+val+'"/>'+'<param name="controller" value="1"/>'+'<param name="autoplay" value="0"/>'+'<embed src="'+val+'" type="video/quicktime" width="'+width+'" height="'+height+'" controller="1" autoplay="0" />'+'</object>';break;case"mp1":case"mp2":case"mp3":case"mpa":case"wav":case"wax":case"wma":width=360;height=40;default:code='<object type="application/x-mplayer2" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="'+width+'" height="'+height+'">'+'<param name="Filename" value="'+val+'"/>'+'<param name="AutoStart" value="0"/>'+'<param name="ShowStatusBar" value="1"/>'+'<embed src="'+val+'" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" width="'+width+'" height="'+height+'" autostart="0" showstatusbar="1" />'+'</object>';break;}
return code;}
function _hxj_Randering_EmbedURL(imgobj){var embedURL=unescape(imgobj.getAttribute("descurl"));var oDivObj=_oD.createElement("div");oDivObj.innerHTML="<img src='"+_SVR_+"/images/wait.gif' border='0' align='absmiddle' />&nbsp;Loading data...";imgobj.parentNode.replaceChild(oDivObj,imgobj);var dom=hxj_ExecuteAjax(embedURL,"",false);if(dom!=null)
oDivObj.innerHTML=dom;}
function _hxj_Randering_Widget(imgobj){var widgetName=imgobj.getAttribute("widget");var widgetId=imgobj.getAttribute("widgetid");var widgetArgs=imgobj.getAttribute("descref");var widgetWidth=hxj_ParseInt(imgobj.style.width);var parentStyle=imgobj.parentNode.style;var query=window.location.search.substring(1);var oDivObj=_oD.createElement("div");oDivObj.id="WIDGET_"+widgetId;if(!hxj_IsNull(parentStyle.styleFloat)||!hxj_IsNull(parentStyle.cssFloat)){if(widgetWidth<180)
widgetWidth=180;oDivObj.style.width=hxj_MakePixel(widgetWidth);}
oDivObj.innerHTML="<img src='"+_SVR_+"/images/wait.gif' border='0' align='absmiddle' />&nbsp;Loading data...";imgobj.parentNode.replaceChild(oDivObj,imgobj);hxj_DrawWidget(widgetName,widgetId,query);}
function _hxj_Randering_Object(imgobj){var url=unescape(imgobj.getAttribute("descurl")).replaceAll("+"," ");var code=unescape(imgobj.getAttribute("descref")).replaceAll("+"," ");var where=imgobj.getAttribute("descwhere");var width=(hxj_ParseInt(imgobj.width)>0)?imgobj.width:imgobj.offsetWidth;var height=(hxj_ParseInt(imgobj.height)>0)?imgobj.height:imgobj.offsetHeight;if(!width||width<=20)width=420;if(!height||height<=20)height=340;if(!hxj_IsNull(url)){var myregexp=/(www\.youtube\.com\/watch\?v=([\w\-]+)|www\.youtube\.com\/v\/([\w\-]+)|youtu\.be\/([\w\-]+))/i;var match=myregexp.exec(url);if(match!=null){var vid=match[2]?match[2]:(match[3]?match[3]:match[4]);if (width == 420) width="100%";where = "wysiwyg";code='<iframe width="'+width+'" height="'+height+'" src="http://www.youtube.com/embed/'+vid+'" frameborder="0"></iframe>';}
else{code=hxj_GetURL2ObjectCode(url,width,height);}}
else{var widthString=new RegExp("width=[\"']?\\w+[\"']?","i").exec(code);var heightString=new RegExp("height=[\"']?\\w+[\"']?","i").exec(code);if(widthString)
code=code.replaceAll(widthString[0],'width="'+width+'"');if(heightString)
code=code.replaceAll(heightString[0],'height="'+height+'"');}
var oDivObj=_oD.createElement("div");var oPnode=imgobj.parentNode;oDivObj.innerHTML=code;if(where!="wysiwyg"){oPnode.style.position="relative";oDivObj.style.position="absolute";oDivObj.style.top="0px";oDivObj.style.left="0px";oDivObj.style.bottom="0px";oDivObj.style.width="100%";oDivObj.style.textAlign=oPnode.style.textAlign;oDivObj.style.zIndex=1;imgobj.insertAdjacentElement("afterEnd",oDivObj);imgobj.style.border="none";}
else{oPnode.replaceChild(oDivObj,imgobj);}}

/** frontend.js **/
function doFontSmall(linkobj){if(hxj_GetCookie("fsize")!=""){hxj_SetCookie("fsize","",-60);linkobj.href=window.location.href;return true;}
return false;}
function doFontLarge(linkobj){if(hxj_GetCookie("fsize")==""){hxj_SetCookie("fsize","large");linkobj.href=window.location.href;return true;}
return false;}
function doSearchCalendar(widgetname,widgetid,query){var strGen1=new hxjStringBuilder(",");var strGen2=new hxjStringBuilder(",");var strFlt=new hxjStringBuilder("&");var divcatmap=hxj_FindObject("DIV_"+widgetid+"_CATMAP");var divevtmap=hxj_FindObject("DIV_"+widgetid+"_EVTMAP");var skeynode=hxj_FindObject("SKEY_"+widgetid);var skey=skeynode.value.trim();var fltcatid="";var fltevttype="";if(divcatmap!=null){var inputs=divcatmap.getElementsByTagName("input");for(var i=0,j=0;i<inputs.length;i++){if(inputs[i].checked==true)
strGen1.append(inputs[i].value);}
fltcatid=strGen1.toString();if(fltcatid.length<=0){alert("Please select one or more categories you want to customize.");return false;}}
if(divevtmap!=null){var inputs=divevtmap.getElementsByTagName("input");for(var i=0,j=0;i<inputs.length;i++){if(inputs[i].checked==true)
strGen2.append(inputs[i].value);}
fltevttype=strGen2.toString();if(fltevttype.length<=0){alert("Please select one or more type of events you want to customize.");return false;}}
eval("_search_"+widgetid+"_Object.hide()");if(!hxj_IsNull(fltcatid))
strFlt.append("fltcatid="+escape(fltcatid));if(!hxj_IsNull(fltevttype))
strFlt.append("fltevttype="+escape(fltevttype));if(!hxj_IsNull(skey))
strFlt.append("fltkey="+escape(skey));var fltcal=strFlt.toString();if(!hxj_IsNull(fltcal))
query=query+"&fltcal="+escape(fltcal);hxj_DrawWidget(widgetname,widgetid,query);return false;}
function doResetCalendar(widgetname,widgetid,query){eval("_search_"+widgetid+"_Object.hide()");hxj_DrawWidget(widgetname,widgetid,query);return false;}
function doCheckLinksPassword(frm){frm.catpwd.value=frm.catpwd.value.trim();if(frm.catpwd.value.length<=0){alert("Please enter a password.");frm.catpwd.focus();return false;}
if(frm.md5pwd.value!=hex_md5(frm.catpwd.value)){alert("Password does not match.");frm.catpwd.focus();return false;}
var map=hxj_SplitStringMap(hxj_GetCookie("passlr"),";");map.put(frm.categories.value,"1");hxj_SetCookie("passlr",map.toString(";"));if(frm.isformpost.value==""){var div=hxj_FindObject(frm.categories.value);var dispstyle=div.getAttribute("dispstyle");var dom=hxj_ExecuteAjax(g_virtualPath+"/tool/index.do?widgetname=rescabinet&cmd=rander","categories="+div.id+"&dispstyle="+dispstyle,false,true);if(dom!=null){div.innerHTML=dom;}
return false;}
return true;}
function doInitResourceTab(tabber,tabidx){var div=(tabidx!=-1)?tabber.tabs[tabidx].div:tabber;var dispstyle=hxj_SafeValue(div.getAttribute("dispstyle"),"");var hasicon=hxj_SafeValue(div.getAttribute("hasicon"),"");var dom=hxj_ExecuteAjax(g_virtualPath+"/tool/index.do?widgetname=rescabinet&cmd=rander","categories="+div.id+"&dispstyle="+dispstyle+"&hasicon="+hasicon,false,true);if(dom!=null){div.innerHTML=dom;}}
function doCheckFileCabinetPassword(frm){frm.catpwd.value=frm.catpwd.value.trim();if(frm.catpwd.value.length<=0){alert("Please enter a password.");frm.catpwd.focus();return false;}
if(frm.md5pwd.value!=hex_md5(frm.catpwd.value)){alert("Password does not match.");frm.catpwd.focus();return false;}
var map=hxj_SplitStringMap(hxj_GetCookie("passfm"),";");map.put(frm.categories.value,"1");hxj_SetCookie("passfm",map.toString(";"));if(frm.isformpost.value==""){var div=hxj_FindObject(frm.categories.value);var dispstyle=div.getAttribute("dispstyle");var dom=hxj_ExecuteAjax(g_virtualPath+"/tool/index.do?widgetname=filecabinet&cmd=rander","categories="+div.id+"&dispstyle="+dispstyle,false,true);if(dom!=null){div.innerHTML=dom;}
return false;}
return true;}
function doInitFileCabinetTab(tabber,tabidx){var div=(tabidx!=-1)?tabber.tabs[tabidx].div:tabber;var dispstyle=hxj_SafeValue(div.getAttribute("dispstyle"),"");var hasicon=hxj_SafeValue(div.getAttribute("hasicon"),"");var dom=hxj_ExecuteAjax(g_virtualPath+"/tool/index.do?widgetname=filecabinet&cmd=rander","categories="+div.id+"&dispstyle="+dispstyle+"&hasicon="+hasicon,false,true);if(dom!=null){div.innerHTML=dom;}}
function IsValidCardNo(sCardType,sCardNo){if(sCardType=="AMEX"){if(sCardNo.length!=15)
return false;}
else if(sCardType=="VISA"){if(sCardNo.length!=13&&sCardNo.length!=16){return false;}}
else{if(sCardNo.length!=16)
return false;}
if(sCardType=="AMEX"){var sPrefix=sCardNo.substring(0,2)
if(sPrefix!="37"&&sPrefix!="34"){return false;}}
else if(sCardType=="VISA"){var sPrefix=sCardNo.substring(0,1)
if(sPrefix!="4")
return false;}
else if(sCardType=="Master"){var nPrefix=parseInt(sCardNo.substring(0,2))
switch(nPrefix){case 36:case 51:case 52:case 53:case 54:case 55:break;default:return false;}}
else{var nPrefix=parseInt(sCardNo.substring(0,5))
switch(nPrefix){case 60110:case 60112:case 60113:case 60114:case 60119:break;default:nPrefix=parseInt(sCardNo.substring(0,6))
switch(nPrefix){case 601174:case 601177:case 601178:case 601179:break;default:nPrefix=parseInt(sCardNo.substring(0,3))
if(nPrefix!=650)
return false;}}}
var sRevCardNo="";var nCheck=0,nSum=0
for(var i=sCardNo.length-1;i>=0;i--){sRevCardNo+=sCardNo.charAt(i);}
for(var i=1;i<sRevCardNo.length;i++){if((i%2)==0){nCheck=parseInt(sRevCardNo.charAt(i))*1}
else{nCheck=parseInt(sRevCardNo.charAt(i))*2}
if(nCheck>=10){var sCheck=nCheck+"";nCheck=parseInt(sCheck.charAt(0))+parseInt(sCheck.charAt(1));}
nSum+=nCheck;}
nCheck=nSum%10;if(nCheck>0)
nCheck=10-nCheck;if(parseInt(sRevCardNo.charAt(0))!=nCheck)
return false;return true;}
function doChangePayMethod(itemid,method){var cardnode=hxj_FindObject(itemid+"_Payment_Card");var ponumnode=hxj_FindObject(itemid+"_Payment_PONum");var checknode=hxj_FindObject(itemid+"_Payment_MoneyOrder");var addrnode=hxj_FindObject(itemid+"_Payment_Address");cardnode.style.display="none";ponumnode.style.display="none";checknode.style.display="none";addrnode.style.display="none";switch(method){case"credit":cardnode.style.display="block";case"invoice":addrnode.style.display="block";break;case"check":checknode.style.display="block";break;case"ponum":ponumnode.style.display="block";break;}}
function doSubmitFormGen(objForm,catid){var inputs=objForm.getElementsByTagName("input");var arrCardNo=new hxjArray();for(var i=0;i<inputs.length;i++){var inp=inputs[i];var isrequired=inp.getAttribute("isrequired");var checkid=inp.getAttribute("checkhidden");var fieldname=inp.getAttribute("fieldname");var inptype=inp.type.toLowerCase();var checkval=true;if(inptype=="submit"||inptype=="button"||inptype=="image"||inptype=="hidden"){continue;}
if(hxj_IsNull(fieldname))
fieldname="value";if(!hxj_IsNull(checkid)){var checknode=hxj_FindObject(checkid);if(checknode!=null){if(checknode.style.display=="none")
checkval=false;}}
inp.value=inp.value.trim();if(checkval&&isrequired=="1"){if(inptype=="checkbox"||inptype=="radio"){var fieldid=inp.getAttribute("fieldid");var fieldobj=hxj_FindObject(fieldid);if(hxj_GetCheckCount(fieldobj)<=0){alert("Please choose a option");fieldobj.style.border="1px solid #6F1A1F";return false;}}
else if(inp.value.length<=0){alert("Please enter a "+fieldname);inp.focus();return false;}}
if(checkval&&inp.value.length>0){if(fieldname=="PhoneNo"){if(!_oV.IsPhone(inp.value)){alert("Please enter a valid "+fieldname);inp.focus();return false;}}
else if(fieldname=="Email"){if(!_oV.IsEmail(inp.value)){alert("Please enter a valid "+fieldname);inp.focus();return false;}}
else if(fieldname=="URL"){if(!_oV.IsURL(inp.value)){alert("Please enter a valid "+fieldname);inp.focus();return false;}}
else if(fieldname=="CardNo"){if(inp.value.length<13){alert("Please make sure your credit card number is correct.");inp.focus();return false;}
var cardtype=hxj_FindObject(inp.getAttribute("cardtypefield"));if(!IsValidCardNo(cardtype[cardtype.selectedIndex].value,inp.value)){alert("Your credit card number or type is invalid.\r\nPlease verify your information.");inp.focus();return false;}
arrCardNo.push(inp);}
else if(fieldname=="CardCVN"){var cardtype=hxj_FindObject(inp.getAttribute("cardtypefield"));if(cardtype[cardtype.selectedIndex].value=="AMEX"){if(inp.value.length!=4){alert("Please make sure your credit card verification number.\r\nThe number must be 4 digits.");inp.focus();return false;}}
else{if(inp.value.length!=3){alert("Please make sure your credit card verification number.\r\nThe number must be 3 digits.");inp.focus();return false;}}}}}
for(var i=0;i<arrCardNo.length;i++){var inp=arrCardNo[i];if(inp!=null){var inplast=hxj_FindObject(inp.name+"_last4");inplast.value="************"+inp.value.substring(inp.value.length-4);inp.value=AES.Encrypt(inp.value,objForm.formid.value,128);}}
if(hxj_IsNull(objForm.actionurl.value)){objForm.action=g_virtualPath+"/"+catid+"/formsubmit";}
else{objForm.action=objForm.actionurl.value;}
return true;}
function doSubmitPoll(frm,ownerid,widgetid){var ansid=hxj_GetCheckValue(frm);if(!ansid){alert('Please choose an answer first!');return false;}
var answer="";if(ansid=="other"){answer=frm.other.value.trim();if(answer.length<=0){alert('Please enter your own answer!');frm.other.focus();return false;}}
hxj_DrawWidget('poll',widgetid,'catid='+ownerid+'&cmd=vote&ansid='+ansid+'&answer='+escape(answer));return false;}
function doEnableAnonymousAlertBtn(btnid,checked){var sendbtn=hxj_FindObject(btnid);if(sendbtn!=null)
sendbtn.disabled=(checked==true)?false:true;}
function doSubmitAnonymousAlert(frm){frm.where.value=frm.where.value.trim();if(frm.where.value.length<=0){alert("Please enter a location.");frm.where.focus();return false;}
frm.acttime.value=frm.acttime.value.trim();if(frm.acttime.value.length<=0){alert("Please enter a Date/Time of Action.");frm.acttime.focus();return false;}
frm.content.value=frm.content.value.trim();if(frm.content.value.length<=0){alert("Please enter a description.");frm.content.focus();return false;}
if(frm.ispwd.value=="1"){frm.apwd.value=frm.apwd.value.trim();if(frm.apwd.value.length<=0){alert("Please enter a District Sending Password.");frm.apwd.focus();return false;}
if(frm.mdpwd.value!=hex_md5(frm.apwd.value)){alert("Password does not match! Please enter a District Sending Password again.");frm.apwd.focus();return false;}}
frm.action=g_virtualPath+"/tool/index.do?module=alerts&cmd=save";return true;}
function doSaveReunion(host_id){var frm=document.reunionForm;var content=getWysiwyg("content").getHTML();var selnode=hxj_FindObject("SELECT_Files");frm.title.value=frm.title.value.trim();if(frm.title.value.length<=0){alert("Please enter the title of the reunion.");frm.title.focus();return false;}
frm.clsyear.value=frm.clsyear.value.trim();if(frm.clsyear.value.length<=0){alert("Please enter the class of year.");frm.clsyear.focus();return false;}
frm.address.value=frm.address.value.trim();if(frm.address.value.length<=0){alert("Please enter the address of the location.");frm.address.focus();return false;}
frm.author.value=frm.author.value.trim();if(frm.author.value.length<=0){alert("Please enter the author.");frm.author.focus();return false;}
frm.authoremail.value=frm.authoremail.value.trim();frm.authoremail.value=frm.authoremail.value.toLowerCase();if(frm.authoremail.value.length<=0||!_oV.IsEmail(frm.authoremail.value)){alert("Email address is invalid format, please make sure email address.");frm.authoremail.focus();return false;}
frm.authorphone.value=frm.authorphone.value.trim();if(frm.authorphone.value.length<=0){alert("Please enter a phone number.");frm.authoremail.focus();return false;}
for(var i=0;i<selnode.options.length;i++){var text=selnode.options[i].text;var val=selnode.options[i].value;var which=val.substr(0,val.indexOf(':'));var value=val.substr(val.indexOf(':')+1);if(which=="T"){frm.save_files.value+=text;frm.save_files.value+=":";frm.save_files.value+=value;frm.save_files.value+=";";}}
frm.content.value=content.replaceAll("/temp/","/"+host_id+"/filestore/");frm.target="";frm.action=g_virtualPath+"/tool/index.do?module=alumni&task=reunion&cmd=save";frm.submit();}
function doSaveSubscribe(frm){if(frm.isrecvnews.checked==true){if(hxj_GetCheckCount(hxj_FindObject("DIV_RecvNews"))<=0){alert("Please select one or more categories you want to receive news or events.");return false;}}
if(frm.isrecvalert!=null&&frm.isrecvalert.checked==true){var alertdiv=hxj_FindObject("DIV_RecvAlert");if(hxj_GetCheckElementCount(alertdiv)>0&&hxj_GetCheckCount(alertdiv)<=0){alert("Please select one or more categories you want to receive emergency announcement.");return false;}
frm.ememail.value=frm.ememail.value.trim();frm.ememail.value=frm.ememail.value.toLowerCase();if(frm.ememail.value.length>0&&!_oV.IsEmail(frm.ememail.value)){alert("Email address is invalid format, please make sure email address.");return false;}
frm.emcell.value=frm.emcell.value.trim();if(frm.emcell.value.length>0&&!_oV.IsPhone(frm.emcell.value)){alert("Please enter a valid cell phone number and provider.");return false;}}
frm.action=g_virtualPath+"/tool/index.do?module=members&task=regist&cmd=subscribe";frm.submit();}
function doSearchStaffDir(frm,widgetid,page){if(page!=null)
frm.pgstaff.value=page;hxj_DrawWidget("staffsearch",widgetid,hxj_BuildParamByForm(frm,"&",true));return false;}
function doResetStaffDir(widgetid){var frm=hxj_FindObject("FORM_"+widgetid);frm.pgstaff.value=0;frm.skey.value="";if(frm.slocid!=null)
frm.slocid.selectedIndex=0;if(frm.sdepart!=null)
frm.sdepart.selectedIndex=0;if(frm.stitle!=null)
frm.stitle.selectedIndex=0;hxj_DrawWidget("staffsearch",widgetid,hxj_BuildParamByForm(frm,"&",true));return false;}
function doSearchMemberDir(frm,widgetid,page){if(page!=null)
frm.pgmember.value=page;hxj_DrawWidget("membersearch",widgetid,hxj_BuildParamByForm(frm,"&",true));return false;}
function doResetMemberDir(widgetid){var frm=hxj_FindObject("FORM_"+widgetid);frm.pgmember.value=0;frm.fname.value="";frm.lname.value="";if(frm.sgrpid!=null)
frm.sgrpid.selectedIndex=0;hxj_DrawWidget("membersearch",widgetid,hxj_BuildParamByForm(frm,"&",true));return false;}
function doSearchAlumniDir(frm,widgetid,page){if(page!=null)
frm.pgalumni.value=page;hxj_DrawWidget("alumnidir",widgetid,hxj_BuildParamByForm(frm,"&",true));return false;}
function doSaveAlumni(){var frm=document.alumniForm;if(frm.classyear.value.length<4){alert("Please enter the 4 digits year you graduated.");frm.classyear.focus();return false;}
frm.firstname.value=frm.firstname.value.trim();if(frm.firstname.value.length<=0){alert("Please enter a first name.");frm.firstname.focus();return false;}
frm.lastname.value=frm.lastname.value.trim();if(frm.lastname.value.length<=0){alert("Please enter a last name.");frm.lastname.focus();return false;}
frm.action=g_virtualPath+"/tool/index.do?module=alumni&cmd=save";frm.submit();}
function doToggleTree(linkobj,treeid){var divnode=hxj_FindObject(treeid);var imgnode=linkobj.firstChild;if(divnode.style.display=="none"){divnode.style.display="block";imgnode.src=_SVR_+"/images/icon_minus.gif";}
else{divnode.style.display="none";imgnode.src=_SVR_+"/images/icon_plus.gif";}}
function doToggleFileTreeWidget(linkobj,treeid,catid){var divnode=hxj_FindObject(treeid);var imgnode=linkobj.firstChild;if(divnode.style.display=="none"){divnode.style.display="block";imgnode.src=_SVR_+"/images/icon_minus.gif";if(!divnode.isloaded){var dom=hxj_ExecuteAjax(g_virtualPath+"/tool/index.do?widgetname=filetree&cmd=tree","catid="+catid,false,true);if(dom==null)
return false;divnode.innerHTML=dom;divnode.isloaded=true;}}
else{divnode.style.display="none";imgnode.src=_SVR_+"/images/icon_plus.gif";}}
function doCheckLoginForm(frm){frm.email.value=frm.email.value.trim();frm.passwd.value=frm.passwd.value.trim();if(frm.email.value.length<=0||!_oV.IsEmail(frm.email.value)){alert("Please enter a valid email address.");frm.email.focus();return false;}
if(frm.passwd.value==""){alert("Please enter the password.");frm.passwd.focus();return false;}
frm.email.value=frm.email.value.toLowerCase();frm.md5pwd.value=hex_md5(frm.passwd.value);frm.passwd.value="";frm.action=g_virtualPath+"/tool/index.do?module=members&task=login&cmd=logon";return true;}
function doCheckSignup(){var frm=document.loginForm;if(frm.email.value.length<=0||!_oV.IsEmail(frm.email.value)){alert("We will send you a email to help you register your information.\r\nPlease enter a valid email address.");frm.email.focus();return false;}
frm.email.value=frm.email.value.toLowerCase();frm.action=g_virtualPath+"/tool/index.do?module=members&task=regist&cmd=sendregist";frm.submit();return false;}
function doCheckPassword(frm){if(frm.email.value.length<=0||!_oV.IsEmail(frm.email.value)){alert("Please enter a valid email address.");frm.email.focus();return false;}
frm.email.value=frm.email.value.toLowerCase();frm.action=g_virtualPath+"/tool/index.do?module=members&task=regist&cmd=sendpasswd";frm.submit();return false;}
function doCheckOnlineGiving(frm){if(frm.donor_name.value.length<=0){alert("Please enter a donor's name.");frm.donor_name.focus();return false;}
if(frm.item_number.value.length<=0){alert("Please enter the reason of your contribution.");frm.item_number.focus();return false;}
if(frm.amount.value.length<=0){alert("Please enter the amount of your contribution.");frm.amount.focus();return false;}
frm.custom.value=escape("dn="+frm.donor_name.value);return true;}

/** myroom.js **/
function doNextCommentStep(frm){if(frm.passwd.value.length<=0){alert("Please enter your password.");frm.passwd.focus();return false;}
var param=hxj_BuildParamByForm(frm);var xmldom=hxj_ExecuteAjax(g_virtualPath+"/myroom/tool.do?task=comment&cmd=checkpwd",param,true,true);if(xmldom){var result=xmldom.getElementsByTagName("RESULT_CODE")[0].childNodes[0].nodeValue;if(result!="OK"){alert("Password does not match.");frm.passwd.focus();}
else{if(frm.mode.value=="D"){if(frm.from.value=="comment"){if(doDeleteComment(frm.cmtid.value))
closePopup("MyroomPopup");}
else{if(doDeleteDiscussion(frm.cmtid.value))
closePopup("MyroomPopup");}}
else{var dom=hxj_ExecuteAjax(g_virtualPath+'/myroom/tool.do?task=comment&cmd=edit',param,false);if(dom!=null){var jpopup=getPopup("MyroomPopup");jpopup.setTitle("Edit Comment");jpopup.setContent(dom);}}}}
return false;}
function doEditOrDeleteComment(from,mode,cmtid,authid){if(authid==""||g_memberid!=authid){showPopup('MyroomPopup',{title:'Ask a Password',url:g_virtualPath+'/myroom/tool.do?task=comment&cmd=ask',urlparam:'from='+from+'&mode='+mode+'&cmtid='+cmtid});}
else{if(mode=="D"){if(from=="comment"){doDeleteComment(cmtid);}
else{doDeleteDiscussion(cmtid);}}
else{showPopup('MyroomPopup',{title:'Edit Comment',url:g_virtualPath+'/myroom/tool.do?task=comment&cmd=edit',urlparam:'from='+from+'&mode=E&cmtid='+cmtid});}}}
function doSaveComment(frm,parentid){if(g_memberid==""){frm.name.value=frm.name.value.trim();frm.passwd.value=frm.passwd.value.trim();if(frm.name.value.length<=0){alert("Please enter a name");frm.name.focus();return false;}
if(frm.passwd.value.length<=0){alert("Please enter a password");frm.passwd.focus();return false;}}
frm.comment.value=frm.comment.value.trim();if(frm.comment.value.length<=0){alert("Please enter a comment");frm.comment.focus();return false;}
var param=hxj_BuildParamByForm(frm);var xmldom=hxj_ExecuteAjax(g_virtualPath+"/myroom/tool.do?task=comment&cmd=save&mrid="+g_myroomid+"&clsid="+g_myclassid+"&mid="+g_mymemberid+"&parentid="+parentid,param,true,true);if(xmldom){var result=xmldom.getElementsByTagName("RESULT_CODE")[0].childNodes[0].nodeValue;if(result!="OK"){alert("You can not add a comment, because your ip address or some words has been matched by owner's spam filter.");}
else{var cmtid,cmttime,nickname,myroomid;try{cmtid=xmldom.getElementsByTagName("CMTID")[0].childNodes[0].nodeValue;cmttime=xmldom.getElementsByTagName("CMTTIME")[0].childNodes[0].nodeValue;nickname=xmldom.getElementsByTagName("NICKNAME")[0].childNodes[0].nodeValue;myroomid=xmldom.getElementsByTagName("MYROOMID")[0].childNodes[0].nodeValue;}
catch(ex){}
var listnode=hxj_FindObject("DIV_CMTLIST_"+parentid);var countnode=hxj_FindObject("DIV_CMTCOUNT_"+parentid);var divnode=_oD.createElement('DIV');var strGen=new hxjStringBuilder();strGen.append('<div class="comment_title">\r\n');strGen.append(' <div class="comment_title_inner">\r\n');strGen.append('  <div class="title">\r\n');if(frm.secret.checked==false){if(!hxj_IsNull(myroomid)){strGen.append('<a href="'+g_virtualPath+'/myroom/'+myroomid+'" class="fontBold">'+nickname+'</a>');}
else{strGen.append('<span class="fontBold">'+nickname+'</span>');}}
strGen.append('   <span class="datetime">| '+cmttime+'</span>\r\n');strGen.append('  </div>\r\n');strGen.append('  <div class="option">::');strGen.append('   <a href="javascript:doEditOrDeleteComment(\'comment\', \'E\', \''+cmtid+'\', \''+g_memberid+'\')">Edit</a> | ');strGen.append('   <a href="javascript:doEditOrDeleteComment(\'comment\', \'D\', \''+cmtid+'\', \''+g_memberid+'\')">Delete</a>');strGen.append('  </div>\r\n');strGen.append(' </div>\r\n');strGen.append('</div>\r\n');strGen.append('<div class="comment_content">\r\n');strGen.append(' <p class="content">');if(frm.secret.checked==false){strGen.append(frm.comment.value.replaceAll("\n","<br>"));}
else{strGen.append('<span style="color:#FF3300;">This is a secret comment</span>');}
strGen.append('</p>\r\n');strGen.append('</div>\r\n');divnode.id="DIV_CMT_"+cmtid;divnode.className="comment_box";divnode.innerHTML=strGen.toString();listnode.appendChild(divnode);if(countnode!=null){countnode.innerHTML=hxj_ParseInt(countnode.innerHTML)+1;}
if(myroomid==""){frm.name.value="";frm.passwd.value="";}
frm.comment.value="";closePopup("MyroomPopup");return true;}}
return false;}
function doEditComment(frm){if(g_memberid==""){frm.name.value=frm.name.value.trim();frm.passwd.value=frm.passwd.value.trim();if(frm.name.value.length<=0){alert("Please enter a name");frm.name.focus();return false;}
if(frm.passwd.value.length<=0){alert("Please enter a password");frm.passwd.focus();return false;}}
frm.comment.value=frm.comment.value.trim();if(frm.comment.value.length<=0){alert("Please enter a comment");frm.comment.focus();return false;}
var param=hxj_BuildParamByForm(frm);var xmldom=hxj_ExecuteAjax(g_virtualPath+"/myroom/tool.do?task=comment&cmd=save&mrid="+g_myroomid+"&clsid="+g_myclassid+"&mid="+g_mymemberid,param,true,true);if(xmldom){var result=xmldom.getElementsByTagName("RESULT_CODE")[0].childNodes[0].nodeValue;if(result!="OK"){alert("You can not edit a comment, because your ip address or some words has been matched by owner's spam filter.");}
else{var cmtid,cmttime,nickname,myroomid;try{cmtid=xmldom.getElementsByTagName("CMTID")[0].childNodes[0].nodeValue;cmttime=xmldom.getElementsByTagName("CMTTIME")[0].childNodes[0].nodeValue;nickname=xmldom.getElementsByTagName("NICKNAME")[0].childNodes[0].nodeValue;myroomid=xmldom.getElementsByTagName("MYROOMID")[0].childNodes[0].nodeValue;}
catch(ex){}
var cmtnode=hxj_FindObject("DIV_CMT_"+cmtid);var strGen=new hxjStringBuilder();strGen.append('<div class="comment_title">\r\n');strGen.append(' <div class="comment_title_inner">\r\n');strGen.append('  <div class="title">\r\n');if(frm.secret.checked==false){if(!hxj_IsNull(myroomid)){strGen.append('<a href="'+g_virtualPath+'/myroom/'+myroomid+'" class="fontBold">'+nickname+'</a>');}
else{strGen.append('<span class="fontBold">'+nickname+'</span>');}}
strGen.append('   <span class="datetime">| '+cmttime+'</span>\r\n');strGen.append('  </div>\r\n');strGen.append('  <div class="option">::');strGen.append('   <a href="javascript:doEditOrDeleteComment(\'comment\', \'E\', \''+cmtid+'\', \''+g_memberid+'\')">Edit</a> | ');strGen.append('   <a href="javascript:doEditOrDeleteComment(\'comment\', \'D\', \''+cmtid+'\', \''+g_memberid+'\')">Delete</a>');strGen.append('  </div>\r\n');strGen.append(' </div>\r\n');strGen.append('</div>\r\n');strGen.append('<div class="comment_content">\r\n');strGen.append(' <p class="content">');if(frm.secret.checked==false){strGen.append(frm.comment.value.replaceAll("\n","<br>"));}
else{strGen.append('<span style="color:#FF3300;">This is a secret comment</span>');}
strGen.append('</p>\r\n');strGen.append('</div>\r\n');cmtnode.innerHTML=strGen.toString();closePopup("MyroomPopup");return true;}}
return false;}
function doDeleteComment(cmtid){if(confirm("Are you sure you want to delete this comment?")){var xmldom=hxj_ExecuteAjax(g_virtualPath+"/myroom/tool.do?task=comment&cmd=delete","cmtid="+cmtid,true,true);if(!xmldom)
return false;var cmtnode=hxj_FindObject("DIV_CMT_"+cmtid);var listnode=hxj_FindParent(cmtnode,"div");var countnode=hxj_FindObject("DIV_CMTCOUNT_"+listnode.getAttribute("postid"));if(countnode!=null){countnode.innerHTML=hxj_ParseInt(countnode.innerHTML)-1;}
listnode.removeChild(cmtnode);}
return true;}
function doReplyComment(cmtid){showPopup('MyroomPopup',{title:'Reply Comment',url:g_virtualPath+'/myroom/tool.do?task=comment&cmd=reply',urlparam:'mode=reply&parentid='+cmtid});}
function doSaveDiscussion(frm){if(g_memberid==""){frm.name.value=frm.name.value.trim();frm.passwd.value=frm.passwd.value.trim();if(frm.name.value.length<=0){alert("Please enter a name");frm.name.focus();return false;}
if(frm.passwd.value.length<=0){alert("Please enter a password");frm.passwd.focus();return false;}}
frm.comment.value=frm.comment.value.trim();if(frm.comment.value.length<=0){alert("Please enter a comment");frm.comment.focus();return false;}
var param=hxj_BuildParamByForm(frm);var xmldom=hxj_ExecuteAjax(g_virtualPath+"/myroom/tool.do?task=comment&cmd=save&parentid=board&mrid="+g_myroomid+"&clsid="+g_myclassid+"&mid="+g_mymemberid,param,true,true);if(xmldom){var result=xmldom.getElementsByTagName("RESULT_CODE")[0].childNodes[0].nodeValue;if(result!="OK"){alert("You can not leave a comment, because your ip address or some words has been matched by owner's spam filter.");}
else{var cmtid,cmttime,nickname,myroomid;try{cmtid=xmldom.getElementsByTagName("CMTID")[0].childNodes[0].nodeValue;cmttime=xmldom.getElementsByTagName("CMTTIME")[0].childNodes[0].nodeValue;nickname=xmldom.getElementsByTagName("NICKNAME")[0].childNodes[0].nodeValue;myroomid=xmldom.getElementsByTagName("MYROOMID")[0].childNodes[0].nodeValue;}
catch(ex){}
var listnode=hxj_FindObject("DIV_CONTENT_DISCUSSION");var divnode=_oD.createElement('DIV');var strGen=new hxjStringBuilder();strGen.append('<div id="DIV_DISCUSSION_'+cmtid+'" class="discussion_box">\r\n');strGen.append(' <div class="discussion_title">\r\n');strGen.append('  <div class="discussion_title_inner">\r\n');strGen.append('   <div class="title">\r\n');if(frm.secret.checked==false){if(!hxj_IsNull(myroomid)){strGen.append('<a href="'+g_virtualPath+'/myroom/'+myroomid+'" class="fontBold">'+nickname+'</a>');}
else{strGen.append('<span class="fontBold">'+nickname+'</span>');}}
strGen.append('    <span class="datetime">| '+cmttime+'</span>\r\n');strGen.append('   </div>\r\n');strGen.append('   <div class="option">::');strGen.append('    <a href="javascript:doEditOrDeleteComment(\'discussion\', \'E\', \''+cmtid+'\', \''+g_memberid+'\')">Edit</a> / ');strGen.append('    <a href="javascript:doEditOrDeleteComment(\'discussion\', \'D\', \''+cmtid+'\', \''+g_memberid+'\')">Delete</a> | ');strGen.append('    <a href="javascript:doReplyDiscussion(\''+cmtid+'\')">Reply</a>');strGen.append('   </div>\r\n');strGen.append('  </div>\r\n');strGen.append(' </div>\r\n');strGen.append(' <div class="discussion_content">\r\n');strGen.append('  <p class="content">');if(frm.secret.checked==false){strGen.append(frm.comment.value.replaceAll("\n","<br>"));}
else{strGen.append('<span style="color:#FF3300;">This is a secret comment</span>');}
strGen.append('  </p>\r\n');strGen.append(' </div>\r\n');strGen.append('</div>\r\n');strGen.append('<div id="DIV_CMTLIST_'+cmtid+'" class="comment_holder"></div>\r\n');divnode.id="DIV_DISCBLOCK_"+cmtid;divnode.className="discussion_holder";divnode.innerHTML=strGen.toString();listnode.insertBefore(divnode,listnode.firstChild);if(myroomid==""){frm.name.value="";frm.passwd.value="";}
frm.comment.value="";}}
return false;}
function doEditDiscussion(frm){if(g_memberid==""){frm.name.value=frm.name.value.trim();frm.passwd.value=frm.passwd.value.trim();if(frm.name.value.length<=0){alert("Please enter a name");frm.name.focus();return false;}
if(frm.passwd.value.length<=0){alert("Please enter a password");frm.passwd.focus();return false;}}
frm.comment.value=frm.comment.value.trim();if(frm.comment.value.length<=0){alert("Please enter a comment");frm.comment.focus();return false;}
var param=hxj_BuildParamByForm(frm);var xmldom=hxj_ExecuteAjax("/myroom/tool.do?task=comment&cmd=save&mrid="+g_myroomid+"&clsid="+g_myclassid+"&mid="+g_mymemberid,param,true,true);if(xmldom){var result=xmldom.getElementsByTagName("RESULT_CODE")[0].childNodes[0].nodeValue;if(result!="OK"){alert("You can not leave a comment, because your ip address or some words has been matched by owner's spam filter.");}
else{var cmtid,cmttime,nickname,myroomid;try{cmtid=xmldom.getElementsByTagName("CMTID")[0].childNodes[0].nodeValue;cmttime=xmldom.getElementsByTagName("CMTTIME")[0].childNodes[0].nodeValue;nickname=xmldom.getElementsByTagName("NICKNAME")[0].childNodes[0].nodeValue;myroomid=xmldom.getElementsByTagName("MYROOMID")[0].childNodes[0].nodeValue;}
catch(ex){}
var cmtnode=hxj_FindObject("DIV_DISCUSSION_"+cmtid);var strGen=new hxjStringBuilder();strGen.append(' <div class="discussion_title">\r\n');strGen.append('  <div class="discussion_title_inner">\r\n');strGen.append('   <div class="title">\r\n');if(frm.secret.checked==false){if(!hxj_IsNull(myroomid)){strGen.append('<a href="'+g_virtualPath+'/myroom/'+myroomid+'" class="fontBold">'+nickname+'</a>');}
else{strGen.append('<span class="fontBold">'+nickname+'</span>');}}
strGen.append('    <span class="datetime">| '+cmttime+'</span>\r\n');strGen.append('   </div>\r\n');strGen.append('   <div class="option">::');strGen.append('    <a href="javascript:doEditOrDeleteComment(\'discussion\', \'E\', \''+cmtid+'\', \''+g_memberid+'\')">Edit</a> / ');strGen.append('    <a href="javascript:doEditOrDeleteComment(\'discussion\', \'D\', \''+cmtid+'\', \''+g_memberid+'\')">Delete</a> | ');strGen.append('    <a href="javascript:doReplyDiscussion(\''+cmtid+'\')">Reply</a>');strGen.append('   </div>\r\n');strGen.append('  </div>\r\n');strGen.append(' </div>\r\n');strGen.append(' <div class="discussion_content">\r\n');strGen.append('  <p class="content">');if(frm.secret.checked==false){strGen.append(frm.comment.value.replaceAll("\n","<br>"));}
else{strGen.append('<span style="color:#FF3300;">This is a secret comment</span>');}
strGen.append('  </p>\r\n');strGen.append(' </div>\r\n');cmtnode.innerHTML=strGen.toString();closePopup("MyroomPopup");return true;}}
return false;}
function doDeleteDiscussion(cmtid){if(confirm("Are you sure you want to delete this comment?")){var xmldom=hxj_ExecuteAjax(g_virtualPath+"/myroom/tool.do?task=comment&cmd=delete","cmtid="+cmtid,true,true);if(!xmldom)
return false;var cmtnode=hxj_FindObject("DIV_DISCBLOCK_"+cmtid);var listnode=hxj_FindParent(cmtnode,"div");listnode.removeChild(cmtnode);}
return true;}
function doDeletePost(postid){if(confirm("Are you sure you really want delete this post?")){var xmldom=hxj_ExecuteAjax(g_virtualPath+"/myroom/owner.do?task=post&cmd=delete","postid="+postid,true,true);if(xmldom){var postnode=hxj_FindObject("DIV_POST_"+postid);var listnode=hxj_FindParent(postnode,"div");listnode.removeChild(postnode);}}}
function doChangePostStatus(postid,status){var retval=hxj_ExecuteAjax(g_virtualPath+"/myroom/owner.do?task=post&cmd=status","postid="+postid+"&status="+status,true,true);if(retval){var statnode=hxj_FindObject("AHREF_POST_"+postid);if(status=="P"){statnode.href="javascript:doChangePostStatus('"+postid+"', 'U')";statnode.innerHTML="Unpublish";}
else{statnode.href="javascript:doChangePostStatus('"+postid+"', 'P')";statnode.innerHTML="Publish";}}}
function doChangePostArchive(url){if(url!="")
window.location=url;}
function doCheckPostSearch(frm){frm.skey.value=frm.skey.value.trim();if(frm.skey.value.length<=0){alert("Please enter a search keyword.");frm.skey.focus();return false;}
frm.action=g_virtualPath+"/myroom/"+g_myroomid+"/"+g_myclassid;return true;}
function doCheckMyroomPassword(frm){frm.postpwd.value=frm.postpwd.value.trim();if(frm.postpwd.value.length<=0){alert("Please enter a password.");frm.postpwd.focus();return false;}
if(frm.md5pwd.value!=hex_md5(frm.postpwd.value)){alert("Password does not match.");frm.postpwd.focus();return false;}
var map=hxj_SplitStringMap(hxj_GetCookie("passmrs"),";");map.put(g_mymemberid,"1");hxj_SetCookie("passmrs",map.toString(";"));return true;}
function doObserverForAuth(evt){var event=hxj_FixEvent(evt);var isobserver=event.target.getAttribute("observer");if(hxj_ParseInt(isobserver)>0){if(!event.target.isobserver){if(confirm("Currently a login is required for you to leave comments.\r\nDo you want to login now?")){window.location=g_virtualPath+"/tool/index.do?task=login&returl="+g_virtualPath+"/myroom/"+g_myroomid+"/"+g_myclassid;}
else{window.focus();}
event.target.isobserver=true;}}}
function doInitMyRoomBody(){if(parent!=null&&typeof parent.doInitSkinVariable=="function"){parent.doInitSkinVariable(document);}
else if(window.location.search.match("/?preview=1")!=null){var pageSize=hxj_GetPageSize();var overlay=hxj_CreateOverlay();overlay.style.width=hxj_MakePixel(pageSize.cx);overlay.style.height=hxj_MakePixel(pageSize.cy);overlay.style.visibility='visible';overlay.style.zIndex=9;var divnode=_oD.createElement('DIV');divnode.style.position="absolute";divnode.style.top="20px";divnode.style.left="20px";divnode.style.padding="10px";divnode.style.width="120px";divnode.style.color="#712613";divnode.style.fontSize="120%";divnode.style.fontWeight="bold";divnode.style.border="1px solid #505050";divnode.style.backgroundColor="#F78484";divnode.style.zIndex=10;divnode.innerHTML="Preview Screen";document.body.appendChild(divnode);}
else if(window.location.href.match("postid=\\w+#\\w+")!=null){var qsParm=new Array();var query=window.location.search.substring(1);var parms=query.split('&');for(var i=0;i<parms.length;i++){var pos=parms[i].indexOf('=');if(pos>0){var key=parms[i].substring(0,pos);var val=parms[i].substring(pos+1);qsParm[key]=val;}}
hxj_ToggleElement("DIV_CMTBLOCK_"+qsParm["postid"]);}}
hxj_AddEvent(window,"onload",doInitMyRoomBody);

/** skineditor.js **/
function hxjSkinEditor(sheets){this.styleMap=new hxjMap();for(var i=0;i<sheets.length;i++){if(sheets[i].title.indexOf("skin_css")!=-1){var rules=(_oB.isIE)?sheets[i].rules:sheets[i].cssRules;for(var i=0;i<rules.length;i++){var selector=rules[i].selectorText.trim();var pattern=/((\.|#)[a-zA-Z][^,]+)+/g;var result=null;while((result=pattern.exec(selector))!=null){var name=result[1].trim();name=name.replaceAll(".","");name=name.replaceAll("#","");name=name.replaceAll(" ","_");name=name.toLowerCase();this.styleMap[name]=rules[i].style;}}}}
this.getStyle=function(name){name=name.replaceAll(".","");name=name.replaceAll("#","");name=name.replaceAll(" ","_");name=name.toLowerCase();return this.styleMap[name];}
this.setColor=function(name,value){this.setColorRef(name,name,value);}
this.setColorRef=function(name,refcls,value){var cstyle=this.getStyle(refcls);if(cstyle!=null){if(value.charAt(0)!="#"&&value.toLowerCase()!="transparent"){value="#"+value;}
var regex=/BgColor/i;if(regex.test(name)){if(!hxj_IsNull(cstyle.backgroundColor))
cstyle.backgroundColor=value;}
else{regex=/Border/i;if(regex.test(name)){cstyle.borderColor=value;}
else{cstyle.color=value;}}}}
this.setBgImage=function(name,value){var cstyle=this.getStyle(name);if(cstyle!=null){if(!hxj_IsNull(cstyle.backgroundImage))
cstyle.backgroundImage=value;}}
this.setFont=function(name,which,value){var cstyle=this.getStyle(name);if(cstyle!=null){if(which=="family"){cstyle.fontFamily=value;}
else if(which=="weight"){cstyle.fontWeight=value;}
else if(which=="style"){cstyle.fontStyle=value;}}}
this.setStyle=function(name,attb,value){var cstyle=this.getStyle(name);if(cstyle!=null){eval("cstyle."+attb+" = '"+value+"'");}}
this.changeStyle=function(objid,stylename,val){var objnode=hxj_FindObject(objid);if(objnode!=null){eval("objnode.style."+stylename+" = '"+val+"'");}}
this.changeAttribute=function(objid,attb,val){var objnode=hxj_FindObject(objid);if(objnode!=null){objnode.setAttribute(attb,val);}}}
var g_skinEditor=null;function hxjStyleSwitch(doc,title){this.csslink=null;this.doc=doc;this.findLink=function(title,cssid){var links=this.doc.getElementsByTagName("link");for(var i=0;i<links.length;i++){var a=links[i];if(a.getAttribute("rel").indexOf('style')!=-1){if(cssid!=null){if(a.href.indexOf(cssid+".css")!=-1){this.csslink=a;return true;}}
else if(a.getAttribute("title")==title){this.csslink=a;return true;}}}
return false;}
this.change=function(cssurl,buildurl,query){if(hxj_IsNull(buildurl)){if(cssurl.indexOf("?")!=-1){this.csslink.href=cssurl+"&rnd="+Math.random();}
else{this.csslink.href=cssurl+"?rnd="+Math.random();}}
else{var xmldom=hxj_ExecuteAjax(buildurl,query,true,true);if(xmldom!=null){if(cssurl.indexOf("?")!=-1){this.csslink.href=cssurl+"&rnd="+Math.random();}
else{this.csslink.href=cssurl+"?rnd="+Math.random();}}}}
if(!hxj_IsNull(title))
this.findLink(title);}
var g_styleSwitch=null;

/** initall.js **/
function initAll(doc){var arrRound=new hxjArray();var arrTabber=new hxjArray();var arrMenus=new hxjArray();var arrJsMenus=new hxjArray();var arrRolling=new hxjArray();if(!doc||!doc.getElementsByTagName){doc=document;}
if(typeof JS_CMSOBJECT!='undefined'||typeof JS_IMGGALLERY!='undefined'){var images=doc.getElementsByTagName("img");var arrImgs=new hxjArray();for(var i=0;i<images.length;i++){var imgobj=images[i];switch(imgobj.className){case"ssGallery":case"ssObject":case"ssEmbedURL":case"ssWidget":arrImgs.push(imgobj);break;default:if(hxj_IsTrue(imgobj.getAttribute("isresized")))
arrImgs.push(imgobj);break;}}
for(var i=0;i<arrImgs.length;i++){var imgobj=arrImgs[i];if(imgobj.className=="ssGallery"){var galleryId="gallery"+(i+1);eval(galleryId+"_Object = new hxjImageGallery()");eval(galleryId+"_Object.init(imgobj, galleryId)");}
else if(imgobj.className=="ssObject"){_hxj_Randering_Object(imgobj);}
else if(imgobj.className=="ssEmbedURL"){_hxj_Randering_EmbedURL(imgobj);}
else if(hxj_IsTrue(imgobj.getAttribute("isresized"))){hxj_ResizeToParent(imgobj,true);}
else if((typeof g_frontEnd!='undefined'&&g_frontEnd==true)&&imgobj.className=="ssWidget"){_hxj_Randering_Widget(imgobj);}}}
var divs=doc.getElementsByTagName("div");for(var i=0;i<divs.length;i++){var div=divs[i];if(typeof JS_TABBER!='undefined'){if(div.className=="tabber"){arrTabber.push(div);}}
if(typeof JS_ROLLING!='undefined'){if(div.className=="rolling"){arrRolling.push(div);}}
if(typeof JS_POPUP!='undefined'){if(div.className=="jpopup"){eval(div.id+"_Object = new hxjPopup(div)");eval(div.id+"_Object.init()");}}
if(typeof JS_PICKER!='undefined'){var picker=div.getAttribute("picker");if(!hxj_IsNull(picker)){if(picker=="font"){eval(div.id+"_Object = new hxjFontPicker()");}
else if(picker=="fontsize"){eval(div.id+"_Object = new hxjFontSizePicker()");}
else if(picker=="image"){eval(div.id+"_Object = new hxjImagePicker()");}
else if(picker=="value"){eval(div.id+"_Object = new hxjValuePicker()");}
else if(picker=="color"){eval(div.id+"_Object = new hxjColorPicker()");}
else if(picker=="colorex"){eval(div.id+"_Object = new hxjColorPickerEx()");}
else if(picker=="month"){eval(div.id+"_Object = new hxjMonthPicker()");}
else if(picker=="date"){eval(div.id+"_Object = new hxjDatePicker()");}
else if(picker=="time"){eval(div.id+"_Object = new hxjTimePicker()");}
else if(picker=="charmap"){eval(div.id+"_Object = new hxjCharmapPicker()");}
else if(picker=="object"){eval(div.id+"_Object = new hxjObjectPicker()");}
eval(div.id+"_Object.init(div)");}}
if(typeof JS_POPUPMENU!='undefined'){if(div.className=="jsmenu"&&div.menu==null){arrMenus.push(div);}}
if(typeof JS_MENU!='undefined'){if(!div.isinit&&div.getAttribute("rel")=="jsmenu"){arrJsMenus.push(div);}}
if(typeof JS_ROUND!='undefined'){if(!hxj_IsNull(div.getAttribute("round"))){var rounder=new hxjRound();rounder.init(div);arrRound.push(rounder);}}
if(div.getAttribute("rel")=="hover"){div.oldBgColor=div.style.backgroundColor;div.onmouseover=function(){this.style.backgroundColor='#ebfdd7';}
div.onmouseout=function(){this.style.backgroundColor=this.oldBgColor;}}
if(div.getAttribute("rel")=="opacity"){div.oldBgColor=div.style.backgroundColor;div.style.opacity=0.4;div.style.filter='alpha(opacity=50)';div.onmouseover=function(){this.style.backgroundColor='#ebfdd7';this.style.opacity=1;this.style.filter='alpha(opacity=100)';}
div.onmouseout=function(){this.style.backgroundColor=this.oldBgColor;this.style.opacity=0.4;this.style.filter='alpha(opacity=50)';}}
if(div.getAttribute("button")=="popup"){div.onmouseover=function(){this.className=this.className.replace('button_popup','button_popup_hover');}
div.onmouseout=function(){this.className=this.className.replace('button_popup_hover','button_popup');}}
else if(div.getAttribute("button")=="small"){div.onmouseover=function(){this.className=this.className.replace('button_small','button_small_hover');}
div.onmouseout=function(){this.className=this.className.replace('button_small_hover','button_small');}}
else if(div.getAttribute("button")=="big"){div.onmouseover=function(){this.className=this.className.replace('button_big','button_big_hover');}
div.onmouseout=function(){this.className=this.className.replace('button_big_hover','button_big');}}}
if(arrJsMenus.length>0){for(var i=0;i<arrJsMenus.length;i++){PopupMenu.makeMenuContainer(arrJsMenus[i]);}}
if(arrMenus.length>0){for(var i=0;i<arrMenus.length;i++){var oMenu=new hxjMenu();oMenu.Create(arrMenus[i]);}}
if(arrRound.length>0){for(var i=0;i<arrRound.length;i++){var rounder=arrRound[i];rounder.applyRounds();}}
if(arrTabber.length>0){for(var i=0;i<arrTabber.length;i++){var div=arrTabber[i];eval(div.id+"_Object = new hxjTabber()");eval(div.id+"_Object.init(div)");}}
if(arrRolling.length>0){for(var i=0;i<arrRolling.length;i++){var div=arrRolling[i];eval(div.id+"_Object = new hxjRoller()");eval(div.id+"_Object.init(div)");}}
if(typeof JS_WYSIWYG!='undefined')
initWysiwyg();if(typeof JS_SWFUPLOAD!='undefined')
initSWFUpload();if(typeof JS_BALLOON!='undefined')
initBalloon();if(typeof JS_LIGHTBOX!='undefined')
initLightbox();if(typeof JS_NAVMENU!='undefined')
initNavMemu();var tbls=doc.getElementsByTagName("table");for(var i=0;i<tbls.length;i++){var tbl=tbls[i];var trs=tbl.rows;if(tbl.getAttribute("rel")=="hover"){for(var j=0;j<trs.length;j++){var tr=trs[j];if(tr.getAttribute("rel")=="hover"){tr.onmouseover=function(){this.style.backgroundColor='#ebfdd7';}
tr.onmouseout=function(){this.style.backgroundColor='';}}}}
else if(typeof JS_POBOX!='undefined'&&tbl.getAttribute("rel")=="pobox"){for(var j=0,k=0;j<trs.length;j++){var tr=trs[j];var inps=tr.getElementsByTagName("input");var bItemRow=false;if(tr.getAttribute("rel")=="poitem"){tr.id=i+"POI"+(k++);bItemRow=true;}
for(var l=0;l<inps.length;l++){var inp=inps[l];if(bItemRow){if(inp.getAttribute("rel")=="poitem"){tr.onclick=function(){pobox_MouseClick(this);}
tr.onmouseover=function(){pobox_MouseOver(this);return false;}
tr.onmouseout=function(){pobox_MouseOut(this);return false;}
inp.value=k;}
else if(inp.type=="checkbox"){inp.onclick=function(){pobox_CheckboxChange(this);}}}
else{if(inp.type=="checkbox"){inp.onclick=function(){pobox_CheckboxToggle(this);}
inp.pobox=tbl;}}}}}}
if(typeof JS_POPUP!='undefined'){if(_oB.isIE&&!hxj_FindObject('DummyIF')){g_oDummyFrame=_oD.createElement("IFRAME");g_oDummyFrame.id='DummyIF';g_oDummyFrame.style.display='block';g_oDummyFrame.style.visibility='hidden';g_oDummyFrame.style.position="absolute";g_oDummyFrame.style.top='-999px';g_oDummyFrame.style.left='-999px';g_oDummyFrame.style.width='1px';g_oDummyFrame.style.height='1px';g_oDummyFrame.border=0;g_oDummyFrame.frameBorder=0;g_oDummyFrame.scrolling="no";g_oDummyFrame.marginWidth=0;g_oDummyFrame.marginHeight=0;g_oDummyFrame.src="about:blank";_oD.body.appendChild(g_oDummyFrame);}}
try{self.scrollTo(0,0);}catch(ex){}}
Event.domReady.add(function(){initAll(document);});//Style Sheet Switcher version 1.1 Oct 10th, 2006
//Author: Dynamic Drive: http://www.dynamicdrive.com
//Usage terms: http://www.dynamicdrive.com/notice.htm

function getCookie(Name) { 
    var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
    if (document.cookie.match(re)) //if cookie found
        return document.cookie.match(re)[0].split("=")[1]; //return its value
    return null;
}

function setCookie(name, value, days) {
    var expireDate = new Date();
    //set "expstring" to either future or past date, to set or delete cookie, respectively
    var expstring=(typeof days!="undefined")? expireDate.setDate(expireDate.getDate()+parseInt(days)) : expireDate.setDate(expireDate.getDate()-5);
    document.cookie = name+"="+value+"; expires="+expireDate.toGMTString()+"; path=/";
}

function deleteCookie(name){
    setCookie(name, "moot");
}

function setStylesheet(title, randomize){ //Main stylesheet switcher function. Second parameter if defined causes a random alternate stylesheet (including none) to be enabled
    var i, cacheobj, altsheets=[""];
    for(i=0; (cacheobj=document.getElementsByTagName("link")[i]); i++) {
        if(cacheobj.getAttribute("rel").toLowerCase()=="alternate stylesheet" && cacheobj.getAttribute("title")) { //if this is an alternate stylesheet with title
            cacheobj.disabled = true;
            altsheets.push(cacheobj); //store reference to alt stylesheets inside array
            if(cacheobj.getAttribute("title") == title) //enable alternate stylesheet with title that matches parameter
                cacheobj.disabled = false; //enable chosen style sheet
        }
    }
    
    if (typeof randomize!="undefined"){ //if second paramter is defined, randomly enable an alt style sheet (includes non)
        var randomnumber=Math.floor(Math.random()*altsheets.length);
        altsheets[randomnumber].disabled=false;
    }
    
    //if in "random" mode, return "title" of randomly enabled alt stylesheet
    return (typeof randomize!="undefined" && altsheets[randomnumber]!="")? altsheets[randomnumber].getAttribute("title") : "";
}

function chooseStyle(styletitle, days){ //Interface function to switch style sheets plus save "title" attr of selected stylesheet to cookie
    if (document.getElementById){
        setStylesheet(styletitle)
        setCookie("mystyle", styletitle, days)
    }
}

var selectedtitle=getCookie("mystyle")
if (document.getElementById && selectedtitle!=null) //load user chosen style sheet from cookie if there is one stored
    setStylesheet(selectedtitle);

