/*
==============================================================================
'代码版权说明
'=============================================================================
' 文件名: JFramework.js
' 版本:	  1.0
' 日期:   2006-12-22
' 作者:   笑咪咪
' 说明:
' 修改记录: 
'=============================================================================
' Copyright (C) 2006 zydn.net All rights reserved.
' Web: http://www.zydn.net
' Need help? Contact: www.zydn.net
'==============================================================================
*/	

function JFramework(){var strVersion="20061006";var loadedScripts={};this.getVersion=function(){return strVersion;}
this._createScriptId=function(strId){var strName="SCRIPT_",result="";if(strId.substring(0,strName.length)==strName)
result=strId;else
result=strName+strId;return result.toUpperCase();}
this.execScript=function(strScripts,strId,strLanguage){var strTemp=this._createScriptId(strId);if(strTemp in loadedScripts){return;}
if(JBrowser.agent!=JBrowser.InternetExplorer){strScripts=this._leachExegesis(strScripts);window.execScript(strScripts,strLanguage);loadedScripts[strTemp]=false;}else{this.addScriptElement(strScripts,strId,strLanguage);}}
this.addScriptElement=function(strScripts,strId,strLanguage){try{var strTemp=this._createScriptId(strId);if((strTemp in loadedScripts)&&window.document.getElementById(strTemp)){return;}
var objElement={};objElement.script=window.document.createElement("SCRIPT");objElement.script.type="text/"+strLanguage;objElement.script.language=strLanguage;objElement.script.text=strScripts;objElement.script.id=strTemp;window.document.body.appendChild(objElement.script);objElement=null;loadedScripts[strTemp]=true;}catch(Exception){}}
this.removeScriptElement=function(strId){var strTemp=this._createScriptId(strId);if(!(strTemp in loadedScripts)||(!window.document.getElementById(strTemp))){return;}
var objElement=window.document.getElementById(strTemp);if(objElement.nodeName!="SCRIPT")return;window.document.body.removeChild(objElement);objElement=null;delete loadedScripts[strTemp];}
this._leachExegesis=function(strScripts){var objReg=/\<\!\-\-/ig;strScripts=strScripts.replace(objReg,"");objReg=/\-\-\>/ig;strScripts=strScripts.replace(objReg,"");return strScripts;}
this._getScriptFileName=function(strUrl){var result=null;var intStartPos=strUrl.lastIndexOf("/");var intEndPos=strUrl.lastIndexOf(".");if(intStartPos==-1){intStartPos=0;}else{intStartPos++;}
if(intEndPos>-1){result=strUrl.substring(intStartPos,intEndPos);}
return result;}
this.loadScript=function(strUrl,strLanguage){var objAjax=new JAjax();var strName=this._getScriptFileName(strUrl);if(strName==null)return;var strCodes=objAjax.getText("get",strUrl,null,null);if(strCodes!=null){this.execScript(strCodes,strName,strLanguage);}
objAjax=null;}
this.loadScriptElement=function(strUrl,strLanguage){var objAjax=new JAjax();var strName=this._getScriptFileName(strUrl);if(strName==null)return;var strCodes=objAjax.getText("get",strUrl,null,null);if(strCodes!=null){this.addScriptElement(strCodes,strName,strLanguage);}
objAjax=null;}
this.isScriptElement=function(strId){strId=this._createScriptId(strId);return(strId in loadedScripts)&&(loadedScripts[strId])}
this.createObject=function(){function JObject(){this.className="JObject";this.base=null;this.extend=function(instance){var objTemp={};var strName=null;for(strName in this){objTemp[strName]=this[strName];}
for(strName in instance){this[strName]=instance[strName];}
for(strName in objTemp){this[strName]=objTemp[strName];}
objTemp=null;}
this.clone=function(){var cloneObj=new JObject();cloneObj.extend(this);return cloneObj;}
this.equals=function(equalsObj){var result=true;for(var method in equalsObj){if(this[method]!=equalsObj[method]){result=false;break;}}
return result;}
this.initialize.apply(this,arguments);}
return JObject;}}
var System=new JFramework();function isAlien(a){return isObject(a)&&typeof a.constructor!="function";}
function isArray(a){return isObject(a)&&a.constructor==Array;}
function isBoolean(a){return typeof a=="boolean";}
function isEmpty(obj){var i,v;if(isObject(obj)){for(i in obj){v=obj[i];if(isUndefined(v)&&isFunction(v)){return false;}}}
return true;}
function isFunction(a){return typeof a=="function";}
function isNumber(a){return typeof a=="number";}
function isObject(a){return(a&&typeof a=="object")||isFunction(a);}
function isString(a){return typeof a=="string";}
function isUndefined(a){return typeof a=="undefined";}
String.prototype.className="String";String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"");}
String.prototype.lTrim=function(){return this.replace(/^\s+/,"");}
String.prototype.rTrim=function(){return this.replace(/\s+$/,"");}
String.prototype.escapeHTML=function(){var str=this;str=str.replace(/\&amp\;/ig,"&");str=str.replace(/\&lt\;/ig,"<");str=str.replace(/\&gt\;/ig,">");str=str.replace(/\&apos\;/ig,"'");str=str.replace(/\&quot\;/ig,"\"");return str;}
String.prototype.unescapeHTML=function(){var str=this;str=str.replace(/\&/ig,"&amp;");str=str.replace(/\</ig,"&lt;");str=str.replace(/\>/ig,"&gt;");str=str.replace(/\'/ig,"&apos;");str=str.replace(/\"/ig,"&quot;");return str;}
String.prototype.toArray=function(){return this.split("");}
String.prototype.endsWith=function(suffix){return(this.substr(this.length-suffix.length)==suffix);}
String.prototype.startsWith=function(prefix){return(this.substr(0,prefix.length)==prefix);}
String.format=function(format,args){var result="";for(var i=0;;){var open=format.indexOf("{",i);var close=format.indexOf("}",i);if((open<0)&&(close<0)){result+=format.slice(i);break;}
if((close>0)&&((close<open)||(open<0))){if(format.charAt(close+1)!="}"){throw new Error(" 缺少 \"}\"");}
result+=format.slice(i,close+1);i=close+2;continue;}
result+=format.slice(i,open);i=open+1;if(format.charAt(i)=="{"){result+="{";i++;continue;}
if(close<0)throw new Error(" 缺少 \"{\"");var brace=format.slice(i,close).split(":");var argNumber=parseInt(brace[0])+1;if((brace.length>2)||isNaN(argNumber))throw new Error("stringFormatInvalid");var arg=arguments[argNumber];if(typeof(arg)=="undefined"||arg==null){arg="";}
result+=arg.toString();i=close+1;}
return result;}
String.prototype.isEmpty=function(){return this.trim().length>0?false:true;}
Array.prototype.className="Array";Array.prototype.add=Array.prototype.queue=function(item){this[this.length]=item;}
Array.prototype.addRange=function(items){this.push.apply(this,items);}
Array.prototype.clear=function(){this.length=0;}
Array.prototype.clone=function(){if(this.length==1){return[this[0]];}
else{return Array.apply(null,this);}}
Array.prototype.contains=Array.prototype.exists=function(item){return(this.indexOf(item)>=0);}
Array.prototype.dequeue=Array.prototype.shift;if(!isFunction(Array.prototype.indexOf)){Array.prototype.indexOf=function(item,start){if(typeof(item)=="undefined")return-1;var length=this.length;if(length!=0){start=start-0;if(isNaN(start)){start=0;}
else{if(isFinite(start)){start=start-(start%1);}
if(start<0){start=Math.max(0,length+start);}}
for(var i=start;i<length;i++){if(this[i]==item){return i;}}}
return-1;}}
Array.prototype.insert=function(index,item){this.splice(index,0,item);}
Array.prototype.remove=function(item){var index=this.indexOf(item);if(index>=0){this.splice(index,1);}
return(index>=0);}
Array.prototype.removeAt=function(index){this.splice(index,1);}
if(!isFunction(Array.prototype.pop)){Array.prototype.pop=function(){return this.splice(this.length-1,1)[0];}}
if(!isFunction(Array.prototype.push)){Array.prototype.push=function(){this.splice.apply(this,[this.length,0].concat(Array.prototype.slice.apply(arguments)));return this.length;}}
if(!isFunction(Array.prototype.shift)){Array.prototype.shift=function(){return this.splice(0,1)[0];}}
if(!isFunction(Array.prototype.splice)){Array.prototype.splice=function(s,d){var max=Math.max,min=Math.min,a=[],e,i=max(arguments.length-2,0),k=0,l=this.length,n,v,x;s=s||0;if(s<0){s+=l;}
s=max(min(s,l),0);d=max(min(isNumber(d)?d:l,l-s),0);v=i-d;n=l+v;while(k<d){e=this[s+k];if(!isUndefined(e)){a[k]=e;}
k+=1;}
x=l-s-d;if(v<0){k=s+i;while(x){this[k]=this[k-v];k+=1;x-=1;}
this.length=n;}else if(v>0){k=1;while(x){this[n-k]=this[l-k];k+=1;x-=1;}}
for(k=0;k<i;++k){this[s+k]=arguments[k+2];}
return a;}}
if(!isFunction(Array.prototype.unshift)){Array.prototype.unshift=function(){this.splice.apply(this,[0,0].concat(Array.prototype.slice.apply(arguments)));return this.length;}}
Array.parse=function(value){if(!value)return[];var v=eval(value);return v;}
Function.prototype.className="Function";Function.emptyFunction=Function.emptyMethod=function(){}
Function.createDelegate=function(instance,method){return function(){return method.apply(instance,arguments);}}
Function.createCallback=function(method,context){return function(){var l=arguments.length;if(l>0){var args=[];for(var i=0;i<l;i++){args[i]=arguments[i];}
args[l]=context;return method.apply(this,args);}
return method.call(this,context);}}
RegExp.prototype.className="RegExp";Number.prototype.className="Number";Number.parse=function(value){return parseFloat(value);}
Date.prototype.className="Date";Date.parse=function(strDate,pSeparator){var arrStrDate,arrStr,result,strSeparator;strSeparator=(pSeparator==null?"-":pSeparator)
arrStrDate=strDate.split(" ");arrStr=arrStrDate[0].split(strSeparator);var nYear=parseInt(arrStr[0],10);var nMonth=parseInt(arrStr[1],10)-1;var nDay=parseInt(arrStr[2],10);var nHour=0;var nMinute=0;var nSecond=0;if(arrStrDate[1]){arrStr=arrStrDate[1].split(":");nHour=parseInt(arrStr[0],10);nMinute=parseInt(arrStr[1],10);nSecond=parseInt(arrStr[2],10);}
result=new Date(nYear,nMonth,nDay,nHour,nMinute,nSecond);return result;}
Date.format=function(pDate,strPattern){if(pDate.className=="String"){pDate=Date.parse(pDate);}else if(pDate.className!="Date"){return null;}
var strResult=strPattern.toLowerCase();var temp=pDate.getHours();if(temp<10)temp="0"+temp;strResult=strResult.replace("hh",temp);temp=pDate.getMinutes();if(temp<10)temp="0"+temp;strResult=strResult.replace("mm",temp);temp=pDate.getSeconds();if(temp<10)temp="0"+temp;strResult=strResult.replace("ss",temp);strResult=strResult.replace("y",pDate.getYear());temp=pDate.getMonth()+1;if(temp<10)temp="0"+temp;strResult=strResult.replace("m",temp);temp=pDate.getDate();if(temp<10)temp="0"+temp;strResult=strResult.replace("d",temp);return strResult;}
Date.compare=function(leftDate,rightDate){if(leftDate.getTime()==rightDate.getTime())
return 0;else if(leftDate.getTime()<rightDate.getTime())
return-1;else
return 1;}
Date.isValidDate=function(strDate,pSeparator){var strSeparator=(pSeparator==null?"-":pSeparator);var objTempDate=Date.parse(strDate,strSeparator);var strPattern="y"+strSeparator+"m"+strSeparator+"d";var strTempDate=Date.format(objTempDate,strPattern);var arrParam=strDate.split(strSeparator);strDate=arrParam[0];if(arrParam[1].length<2)arrParam[1]="0"+arrParam[1];strDate=strDate+strSeparator+arrParam[1];if(arrParam[2].length<2)arrParam[2]="0"+arrParam[2];strDate=strDate+strSeparator+arrParam[2];return strDate==strTempDate;}
Date.addYear=function(objDate,intYear){objDate.setYear(objDate.getYear()+intYear);return objDate;}
Date.addMonth=function(objDate,intMonth){objDate.setMonth(objDate.getMonth()+intMonth);return objDate;}
Date.addDate=function(objDate,intDate){objDate.setDate(objDate.getDate()+intDate);return objDate;}
Date.addHours=function(objDate,intHours){objDate.setHours(objDate.getHours()+intHours);return objDate;}
Date.addMinutes=function(objDate,intMinutes){objDate.setMinutes(objDate.getMinutes()+intMinutes);return objDate;}
Date.addSeconds=function(objDate,intSeconds){objDate.setSeconds(objDate.getSeconds()+intSeconds);return objDate;}
Date.prototype.toChineseString=function(){return Date.format(this,"y-m-d hh:mm:ss");}
Date.prototype.dateString=function(){return Date.format(this,"y-m-d");}
Date.prototype.timeString=function(){return Date.format(this,"hh:mm:ss");}
Boolean.prototype.className="Boolean";Boolean.parse=function(value){if(value.className=="Boolean")
return value;var v=value.toLowerCase();if(v=="false")return false;if(v=="true")return true;return null;}
Object.prototype.className="Object";Error.prototype.className="Error";if(!window)this.window=this;var JBrowser={};JBrowser.InternetExplorer={};JBrowser.Firefox={};JBrowser.Safari={};JBrowser.Opera={};JBrowser.agent=null;JBrowser.hasDebuggerStatement=false;JBrowser.name=navigator.appName;JBrowser.version=parseFloat(navigator.appVersion);if(navigator.userAgent.indexOf(" MSIE ")>-1){JBrowser.agent=JBrowser.InternetExplorer;JBrowser.version=parseFloat(navigator.userAgent.match(/MSIE (\d+\.\d+)/)[1]);JBrowser.hasDebuggerStatement=true;}
else if(navigator.userAgent.indexOf(" Firefox/")>-1){JBrowser.agent=JBrowser.Firefox;JBrowser.version=parseFloat(navigator.userAgent.match(/ Firefox\/(\d+\.\d+)/)[1]);JBrowser.name="Firefox";JBrowser.hasDebuggerStatement=true;}
else if(navigator.userAgent.indexOf(" Safari/")>-1){JBrowser.agent=JBrowser.Safari;JBrowser.version=parseFloat(navigator.userAgent.match(/ Safari\/(\d+\.\d+)/)[1]);JBrowser.name="Safari";}
else if(navigator.userAgent.indexOf("Opera/")>-1){JBrowser.agent=JBrowser.Opera;}
var JHashtable=System.createObject();JHashtable.prototype.initialize=function(args){this.container={};this.length=-1;this.className="JHashtable";}
JHashtable.prototype.put=function(Key,Item){if(!this.exists(Key)){this.container[Key]=Item;this.length++;}}
JHashtable.prototype.replace=function(Key,Item){if(this.exists(Key)){this.container[Key]=Item;}}
JHashtable.prototype.get=function(Key){if(!this.exists(Key))
throw new Error("Key:"+Key+" not find");return this.container[Key];}
JHashtable.prototype.exists=function(Key){return Key in this.container;}
JHashtable.prototype.remove=function(Key){if(!this.exists[Key]){delete this.container[Key];this.length--;}}
JHashtable.prototype.removeAll=function(){for(var vari in this.container){delete this.container[vari];}
this.length=-1;}
JHashtable.prototype.toArray=function(){if(this.length<0)return null;var result=new Array(this.length);var i=0;for(var method in this.container){if(method!="className"){result[i]=this.container[method];i++;}}
return result;}
JHashtable.prototype.toString=function(){}
var JStringBuilder=System.createObject();JStringBuilder.prototype.initialize=function(initialText){this.className="JStringBuilder";this._parts=[];this.append(initialText)}
JStringBuilder.prototype.append=function(text){if(typeof(text)!=="undefined"&&text!==null){this._parts.push(text);}}
JStringBuilder.prototype.appendLine=function(text){this.append(text);this.append("\r\n");}
JStringBuilder.prototype.clear=function(){this._parts=[];}
JStringBuilder.prototype.isEmpty=function(){return(this._parts.length==0);}
JStringBuilder.prototype.toString=function(separator){return this._parts.join(separator||"");}
var JSize=System.createObject();JSize.prototype.initialize=function(Width,Height){this.className="JSize";this.Width=(typeof(Width)=="undefined"?0:Width);this.Height=(typeof(Height)=="undefined"?0:Height);}
JSize.prototype.minus=function(instance){return new JSize(this.Width-instance.Width,this.Height-instance.Height);}
JSize.prototype.plus=function(instance){return new JSize(this.Width+instance.Width,this.Height+instance.Height);}
var JRandomize=System.createObject();JRandomize.prototype.initialize=function(){this.random=Math.random;this.className="JRandomize";this.alphabet="abcdefghijklmnopqrstuvwxyz";}
JRandomize.prototype.toNumber=function(num){return Math.floor(this.random()*(Math.pow(10,num||1)));}
JRandomize.prototype.inNumberRange=function(lo,hi){return(Math.floor(this.random()*(hi*2))%(hi-lo+1))+lo;}
JRandomize.prototype.toAlpha=function(){var i=this.inNumberRange(0,this.alphabet.length-1);return this.alphabet.charAt(i);}
JRandomize.prototype.inAlphaRange=function(lo,hi){var i=this.inNumberRange(this.alphabet.indexOf(lo),this.alphabet.indexOf(hi));return this.alphabet.charAt(i);}
JRandomize.prototype.toId=function(num){return this.toAlpha()+this.toNumber(num||3);}
var JHttpRequest=System.createObject();JHttpRequest.prototype.initialize=function(strIniti,charseType){this.extend(new JHashtable());this.className="JHttpRequest";this.charseType=(charseType==null?0:charseType)
if(strIniti==null){this.stream=location.search;this.stream=this.stream.substring(1,this.stream.length);}
else{this.stream=strIniti;}
this._VBSUrlDecode();if(this.stream.length>0){if(this.stream.indexOf("&")>1){var strArray=this.stream.split("&");for(var i=0;i<strArray.length;i++){if(strArray[i].indexOf("=")>1){this._addParameter(strArray[i]);}}}else{if(this.stream.indexOf("=")>1){this._addParameter(this.stream);}}}}
JHttpRequest.prototype._VBSUrlDecode=function(){var strScript="";strScript+="Function VBSUrlDecode(Byval Str)\n"+"Dim Result,IsChar,LastChar,i,TempChar,NextChar,NextNumber\n"+"Result=\"\"\n"+"IsChar=False\n"+"LastChar=\"\"\n"+"For i=1 To Len(Str)\n"+" TempChar=Mid(Str,i,1)\n"+" If TempChar=\"+\" Then\n"+"  Result=Result\&\" \"\n"+" ElseIf TempChar=\"%\" Then\n"+"  NextChar=Mid(Str,i+1,2)\n"+"  NextNumber=Cint(\"\&H\" \&NextChar)\n"+"  If IsChar Then\n"+"   IsChar=False\n"+"   Result=Result\&Chr(Cint(\"\&H\"&LastChar\&NextChar))\n"+"  Else\n"+"   If Abs(NextNumber)<=127 Then\n"+"    Result=Result\&Chr(NextNumber)\n"+"   Else\n"+"    IsChar=True\n"+"    LastChar=NextChar\n"+"   End If\n"+"  End If\n"+"  i=i+2\n"+" Else\n"+"  Result=Result\&TempChar\n"+" End If\n"+"Next\n"+"VBSUrlDecode=Result\n"+"End Function"
System.execScript(strScript,"VBSUrlDecode","VBScript");}
JHttpRequest.prototype._addParameter=function(str){var strName,strValue,iPos,arrTemp;iPos=str.indexOf("=");strName=str.substring(0,iPos).toUpperCase();if(this.charseType==1){strValue=unescape(str.substring(iPos+1,str.length));}else{strValue=VBSUrlDecode(str.substring(iPos+1,str.length));}
if(this.exists(strName)){arrTemp=this.get(strName);arrTemp.push(strValue);this.put(strName,arrTemp);}else{arrTemp=new Array(strValue);this.put(strName,arrTemp);}}
JHttpRequest.prototype.getParameterCount=function(strParam){strParam=strParam.toUpperCase();if(this.exists(strParam))
return this.get(strParam).length;else
return-1;}
JHttpRequest.prototype.getParameter=function(strParam,intIndex){strParam=strParam.toUpperCase();if(this.exists(strParam))
if(!isNaN(intIndex))
return this.get(strParam)[intIndex];else
return this.get(strParam)[0];else
return null;}
var JHttpResponse=System.createObject();JHttpResponse.prototype.initialize=function(){this.className="JHttpResponse";this._strStream=null;}
JHttpResponse.prototype.getStream=function(){return this._strStream;}
JHttpResponse.prototype.setStream=function(stream){this._strStream=stream;}
JHttpResponse.prototype.write=function(strName,strValue){if(this._strStream!=null)
this._strStream+="&"+strName+"="+escape(strValue);else
this._strStream=strName+"="+escape(strValue);}
var JTextEncoder=System.createObject();JTextEncoder.prototype.initialize=function(){this.className="JTextEncoder";this.encodeModel=0;this._VBSEncode();}
JTextEncoder.prototype._VBSEncode=function(){var strScript="";strScript="Function VBSEncoder(vIn)\n"+" Dim strResult,theCarCode,nextCharCode,i\n"+" strResult = \"\"\n"+" For i = 1 To LenB(vIn)\n"+"  theCarCode = AscB(MidB(vIn,i,1))\n"+"  If theCarCode < &H80 Then\n"+"   strResult = strResult & Chr(theCarCode)\n"+"  Else\n"+"   nextCharCode = AscB(MidB(vIn,i+1,1))\n"+"   strResult = strResult & Chr(CLng(theCarCode) * &H100 + CInt(nextCharCode))\n"+"   i = i + 1\n"+"  End If\n"+" Next\n"+" VBSEncoder = strResult\n"+"End Function\n";System.execScript(strScript,"VBSEncoder","VBScript");}
JTextEncoder.prototype.encode=function(stream,strEncodeType){if(this.encodeModel==0){try{var objEncode=new ActiveXObject("Adodb.Stream");objEncode.Type=1;objEncode.Mode=3;objEncode.Open();objEncode.Write(stream);objEncode.Position=0;objEncode.Type=2;objEncode.Charset=strEncodeType;stream=objEncode.ReadText();objEncode.Close();objEncode=null;return stream;}catch(Exception){return VBSEncoder(stream);}}else{return VBSEncoder(stream);}}
var JAjax=System.createObject();JAjax.prototype.initialize=function(){this.className="JAjax";this.charsetType="gb2312";this.UrlDecodeMethod=0;this._objEncoder=new JTextEncoder();this._objEncoder.encodeModel=0;this._objXmlHttp=null;this._onTimeOut=null;this.timeOut=30000;this.onLoading=null;this.onLoaded=null;this.onInteractive=null;this.onComplete=null;this.onSuccess=null;this.onError=null;this.onTimeOut=null;}
JAjax.prototype.getRequest=function(strMethod,strUrl,objResponse,objRequestHeaders){var strTemp;strTemp=this.getText(strMethod,strUrl,objResponse,objRequestHeaders);if(strTemp==null)return null;return new JHttpRequest(strTemp,this.UrlDecodeMethod);}
JAjax.prototype.getXml=function(strMethod,strUrl,objResponse,objRequestHeaders){this._process(strMethod,strUrl,false,objResponse,objRequestHeaders);if(!this._objXmlHttp)return null;var strTemp=this._objXmlHttp.responseXML;this._objXmlHttp=null;return strTemp;}
JAjax.prototype.getText=function(strMethod,strUrl,objResponse,objRequestHeaders){this._process(strMethod,strUrl,false,objResponse,objRequestHeaders);if(!this._objXmlHttp)return null;var strTemp;if(this.charsetType!=null)
{strTemp=this._objXmlHttp.responseBody;if(strTemp==null)return null;this._objXmlHttp=null;return this._objEncoder.encode(strTemp,this.charsetType);}else{strTemp=this._objXmlHttp.responseText;if(strTemp==null)return null;this._objXmlHttp=null;return strTemp;}}
JAjax.prototype.getHtml=function(strMethod,strUrl,objResponse,objRequestHeaders){var strHtml=this.getText(strMethod,strUrl,objResponse,objRequestHeaders);if(strHtml==null)return null;var objReg=/<body.+?>([\s\S]+?)<\/body>/ig;var strTemp=strHtml.match(objReg);if(strTemp){strHtml=strTemp[0].replace(/<body.+?>/ig,"").replace(/<\/body>/ig,"");}
objReg=null;return strHtml;}
JAjax.prototype.getStream=function(strMethod,strUrl,objResponse,objRequestHeaders){this._process(strMethod,strUrl,false,objResponse,objRequestHeaders);if(!this._objXmlHttp)return null;var strTemp=this._objXmlHttp.responseStream;this._objXmlHttp=null;return strTemp;}
JAjax.prototype.getBody=function(strMethod,strUrl,objResponse,objRequestHeaders){this._process(strMethod,strUrl,false,objResponse,objRequestHeaders);if(!this._objXmlHttp)return null;var strTemp=this._objXmlHttp.responseBody;this._objXmlHttp=null;return strTemp;}
JAjax.prototype.createXMLHTTP=function(){var sArrXMLHTTP=new Array("MSXML3.XMLHTTP","MSXML2.XMLHTTP","Microsoft.XMLHTTP","MSXML.XMLHTTP","MSXML2.ServerXMLHTTP");var oXMLHTTP=null;if(window.XMLHttpRequest){try{return new XMLhttpRequest();}catch(Exception){for(var i=0;i<sArrXMLHTTP.length;i++){try{oXMLHTTP=new ActiveXObject(sArrXMLHTTP[i]);break;}catch(Exception){}}}}
for(var i=0;i<sArrXMLHTTP.length;i++){try{oXMLHTTP=new ActiveXObject(sArrXMLHTTP[i]);break;}catch(Exception){}}
return oXMLHTTP;}
JAjax.prototype._onreadystatechange=function(){if(this._objXmlHttp==null){if(typeof(this.onComplete)=="function"){this.onComplete(this._objXmlHttp);}
return;}
if(this._objXmlHttp.readyState==1){if(typeof(this.onLoading)=="function"){this.onLoading(this._objXmlHttp);}}
else if(this._objXmlHttp.readyState==2){if(typeof(this.onLoaded)=="function"){this.onLoaded(this._objXmlHttp);}}
else if(this._objXmlHttp.readyState==3){if(typeof(this.onInteractive)=="function"){this.onInteractive(this._objXmlHttp);}}
else if(this._objXmlHttp.readyState==4){if(typeof(this.onComplete)=="function"){this.onComplete(this._objXmlHttp);}
if(this._objXmlHttp.status=="200"){if(typeof(this.onSuccess)=="function"){this.onSuccess(this._objXmlHttp);}}
else{if(typeof(this.onError)=="function"){this.onError(this._objXmlHttp);}}
if(this._onTimeOut!=null){window.clearTimeout(this._onTimeOut);this._onTimeOut=null;}}}
JAjax.prototype._process=function(strMethod,strUrl,isSync,objResponse,objRequestHeaders){this._objXmlHttp=null;this._objXmlHttp=this.createXMLHTTP();if(!this._objXmlHttp)return null;var sendStr="",strLength=0;this._objXmlHttp.onreadystatechange=Function.createDelegate(this,this._onreadystatechange);strMethod=strMethod.toUpperCase();if(objResponse)strLength=objResponse.getStream().length+strUrl.length;if(typeof(this.onTimeOut)=="function"&&this.timeout>0)this._onTimeOut=window.setTimeout(this.onTimeOut,this.timeOut);this._objXmlHttp.open(strMethod,strUrl,isSync);if(objResponse){if(strMethod=="POST"){sendStr=objResponse.getStream();}else{if(strUrl.indexOf("?")>-1)
strUrl+="&"+objResponse.getStream();else
strUrl+="?"+objResponse.getStream();}}
objResponse=null;objResponse=new JHttpResponse();objResponse.write("Ajax_Send_Time",(new Date().toChineseString()));if(strUrl.indexOf("?")>-1)
strUrl+="&"+objResponse.getStream();else
strUrl+="?"+objResponse.getStream();if(typeof(objRequestHeaders)=="Function"){for(var header in objRequestHeaders){this._objXmlHttp.setRequestHeader(header,objRequestHeaders[header]);}}else{this._objXmlHttp.setRequestHeader("Content-Length",strLength);this._objXmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");}
this._objXmlHttp.send(sendStr);}
JAjax.prototype.updater=function(strMethod,strUrl,objResponse,objRequestHeaders){this._process(strMethod,strUrl,true,objResponse,objRequestHeaders);}
JAjax.prototype.submit=function(objForm,strMethod,isAys,objResponse){objResponse=Form.serialize(objForm,objResponse);if(isAys){return this.getText(strMethod,objForm.getAttribute("action"),objResponse,null);}else{this.updater(strMethod,objForm.getAttribute("action"),objResponse,null);}}
var JHttpCookie=System.createObject();JHttpCookie.prototype.initialize=function(name,value,expires,path,domain,secure){this.className="JHttpCookie";this.name=name;this.value=value;this.expires=(expires==null)?null:expires;this.path=(path==null)?null:path;this.domain=(domain==null)?null:domain;this.secure=(secure==null)?null:secure;}
JHttpCookie.prototype.toString=function(){var result=this.name+"="+this.value;if(this.expires)result+="; expires="+this.expires;if(this.path)result+="; path="+this.path;if(this.domain)result+="; domain="+this.domain;if(this.secure)result+="; secure="+this.secure;return result;}
JHttpCookie.prototype.toCookieString=function(){var result=this.name+"="+escape(this.value);if(this.expires)result+="; expires="+this.expires;if(this.path)result+="; path="+this.path;if(this.domain)result+="; domain="+this.domain;if(this.secure)result+="; secure="+this.secure;return result;}
var JHttpCookieManager=System.createObject();JHttpCookieManager.prototype.initialize=function(){this.extend(new JHashtable());this.className="JHttpCookieManager";this.stream=document.cookie;if(this.stream.length>0){if(this.stream.indexOf(";")>1){var strArray=this.stream.split(";");for(var i=0;i<strArray.length;i++){if(strArray[i].indexOf("=")>1){this.parseCookie(strArray[i]);}}}
else
{if(this.stream.indexOf("=")>1){this.parseCookie(this.stream);}}}}
JHttpCookieManager.prototype.parseCookie=function(str){var strName,strValue,iPos;iPos=str.indexOf("=");strName=str.substring(0,iPos).trim();strValue=unescape(str.substring(iPos+1,str.length));this.put(strName,strValue);}
JHttpCookieManager.prototype.addCookie=function(objCookie){document.cookie=objCookie.toCookieString();if(this.exists(objCookie.name)){this.replace(objCookie.name,objCookie.value);}else{this.put(objCookie.name,objCookie.value);}}
JHttpCookieManager.prototype.removeCookie=function(strName){if(this.exists(strName)){var tempCookie=new Cookie(strName,"");tempCookie.expires="expires=Fri, 02-Jan-1970 00:00:00 GMT";document.cookie=tempCookie.toCookieString();this.remove(strName);}}
JHttpCookieManager.prototype.removeAllCookie=function(){for(var vari in this.container){this.removeCookie(vari);}}
JHttpCookieManager.prototype.getCookieValue=function(strParam){if(this.exists(strParam)){return this.get(strParam);}}
JHttpCookieManager.prototype.getCookie=function(strParam){return new Cookie(strParam,this.getCookieValue(strParam));}
var JEvent=System.createObject();JEvent.prototype.initialize=function(){this.className="JEvent";this.KEY_BACKSPACE=8;this.KEY_TAB=9;this.KEY_RETURN=13;this.KEY_ESC=27;this.KEY_LEFT=37;this.KEY_UP=38;this.KEY_RIGHT=39;this.KEY_DOWN=40;this.KEY_DELETE=46;}
JEvent.prototype.element=function(event){return event.target||event.srcElement;}
JEvent.prototype.isLeftClick=function(event){return(((event.which)&&(event.which==1))||((event.button)&&(event.button==1)));}
JEvent.prototype.pointerX=function(event){return event.pageX||(event.clientX+
(document.documentElement.scrollLeft||document.body.scrollLeft));}
JEvent.prototype.pointerY=function(event){return event.pageY||(event.clientY+
(document.documentElement.scrollTop||document.body.scrollTop));}
JEvent.prototype.stop=function(event){if(event.preventDefault){event.preventDefault();event.stopPropagation();}else{event.returnValue=false;event.cancelBubble=true;}}
JEvent.prototype.findElement=function(event,tagName){var element=this.element(event);while(element.parentNode&&(!element.tagName||(element.tagName.toUpperCase()!=tagName.toUpperCase())))
element=element.parentNode;return element;}
JEvent.prototype.attachEvent=function(objElement,strEvent,objFunction){if(JBrowser.agent==JBrowser.Firefox){objElement.addEventListener(strEvent,objFunction);}else{objElement.attachEvent(strEvent,objFunction);}}
JEvent.prototype.detachEvent=function(objElement,strEvent,objFunction){if(JBrowser.agent==JBrowser.Firefox){objElement.removeEventListener(strEvent,objFunction,true);}else{objElement.detachEvent(strEvent,objFunction);}}
if(!window.Event)window.Event=new JEvent();function $(){var elements=new Array();for(var i=0;i<arguments.length;i++){var element=arguments[i];if(typeof element=="string")
element=document.getElementById(element);if(arguments.length==1)
return element;elements.push(element);}
return elements;}
function $c(strElementType){return document.createElement(strElementType);}
function $w(str){document.write(str);}
var JDomElement=System.createObject();JDomElement.prototype.initialize=function(){this.className="JDomElement";}
JDomElement.prototype.addCssClass=function(element,className){if(!this.containsCssClass(element,className)){element.className+=" "+className;}}
JDomElement.prototype.containsCssClass=function(element,className){return element.className.split(" ").contains(className);}
JDomElement.prototype.getBounds=function(element){var offset=this.getLocation(element);return{x:offset.x,y:offset.y,width:element.offsetWidth,height:element.offsetHeight};}
JDomElement.prototype.getElementById=function(id,element){if(!element)return document.getElementById(id);if(element.getElementById)return element.getElementById(id);var nodeQueue=[];var childNodes=element.childNodes;for(var i=0;i<childNodes.length;i++){var node=childNodes[i];if(node.nodeType==1){nodeQueue[nodeQueue.length]=node;}}
while(nodeQueue.length){node=nodeQueue.shift();if(node.id==id){return node;}
childNodes=node.childNodes;for(i=0;i<childNodes.length;i++){node=childNodes[i];if(node.nodeType==1){nodeQueue[nodeQueue.length]=node;}}}
return null;}
JDomElement.prototype.getLocation=function(element){var offsetX=0;var offsetY=0;var parent;for(parent=element;parent;parent=parent.offsetParent){if(parent.offsetLeft){offsetX+=parent.offsetLeft;}
if(parent.offsetTop){offsetY+=parent.offsetTop;}}
return{x:offsetX,y:offsetY};}
JDomElement.prototype.setLocationToCenter=function(element){var element=$(element)
element.style.left=(parseInt(document.body.clientWidth,10)/2)-(parseInt(element.offsetWidth,10)/2);element.style.top=(parseInt(document.body.clientHeight,10)/2)+(parseInt(element.offsetHeight,10)/2);}
JDomElement.prototype.removeCssClass=function(element,className){var currentClassName=" "+element.className+" ";var index=currentClassName.indexOf(" "+className+" ");if(index>=0){element.className=(currentClassName.substr(0,index)+" "+
currentClassName.substring(index+className.length+1,currentClassName.length)).trim();}}
JDomElement.prototype.setLocation=function(element,x,y){var style=element.style;style.position="absolute";style.left=x+"px";style.top=y+"px";}
JDomElement.prototype.toggleCssClass=function(element,className){if(this.containsCssClass(element,className)){this.removeCssClass(element,className);}
else{this.addCssClass(element,className);}}
JDomElement.prototype.visible=function(element){return $(element).style.display!="none";}
JDomElement.prototype.toggle=function(){for(var i=0;i<arguments.length;i++){var element=$(arguments[i]);Element[Element.visible(element)?"hide":"show"](element);}}
JDomElement.prototype.hide=function(){for(var i=0;i<arguments.length;i++){var element=$(arguments[i]);element.style.display="none";}}
JDomElement.prototype.show=function(){for(var i=0;i<arguments.length;i++){var element=$(arguments[i]);element.style.display="";}}
JDomElement.prototype.remove=function(element){element=$(element);element.parentNode.removeChild(element);}
JDomElement.prototype.getHeight=function(element){element=$(element);return element.offsetHeight;}
JDomElement.prototype.empty=function(element){return $(element).innerHTML.match(/^\s*$/);}
JDomElement.prototype.scrollTo=function(element){element=$(element);var x=element.x?element.x:element.offsetLeft,y=element.y?element.y:element.offsetTop;window.scrollTo(x,y);}
JDomElement.prototype.getStyle=function(element,style){element=$(element);var value=element.style[style];if(!value){if(document.defaultView&&document.defaultView.getComputedStyle){var css=document.defaultView.getComputedStyle(element,null);value=css?css.getPropertyValue(style):null;}else if(element.currentStyle){value=element.currentStyle[style];}}
if(window.opera&&["left","top","right","bottom"].indexOf(style)>-1)
if(this.getStyle(element,"position")=="static")
value="auto";return value=="auto"?null:value;}
JDomElement.prototype.setStyle=function(element,style){element=$(element);for(var name in style)
element.style[name]=style[name];}
JDomElement.prototype.getDimensions=function(element){element=$(element);if(this.getStyle(element,"display")!="none")
return{width:element.offsetWidth,height:element.offsetHeight};var els=element.style;var originalVisibility=els.visibility;var originalPosition=els.position;els.visibility="hidden";els.position="absolute";els.display="";var originalWidth=element.clientWidth;var originalHeight=element.clientHeight;els.display="none";els.position=originalPosition;els.visibility=originalVisibility;return{width:originalWidth,height:originalHeight};}
if(!window.Element)window.Element=new JDomElement();var JForm=System.createObject();JForm.prototype.initialize=function(){this.className="JForm";}
JForm.prototype.serialize=function(form,objResponse){var objForm=null;if(isString(objForm))
objForm=this.getElements($(form));else
objForm=form;var elements=objForm.elements;if(objResponse==null)
objResponse=new JHttpResponse();for(var i=0;i<elements.length;i++){var element=elements[i];if(!element.disabled){switch(element.type){case"text":case"password":case"hidden":case"textarea":objResponse.write(element.name,element.value);break;case"select-one":if(element.selectedIndex>=0){objResponse.write(element.name,element.options[element.selectedIndex].value);}
break;case"select-multiple":for(var j=0;j<element.options.length;j++){if(element.options[j].selected){objResponse.write(element.name,element.options[j].value);}}
break;case"checkbox":case"radio":if(element.checked){objResponse.write(element.name,element.value);}
break;}}}
return objResponse;}
JForm.prototype.getElements=function(form){form=$(form);return form.elements;}
JForm.prototype.getInputs=function(form,typeName,name){form=$(form);var inputs=form.getElementsByTagName("input");if(!typeName&&!name)
return inputs;var matchingInputs=new Array();for(var i=0;i<inputs.length;i++){var input=inputs[i];if((typeName&&input.type!=typeName)||(name&&input.name!=name))
continue;matchingInputs.push(input);}
return matchingInputs;}
JForm.prototype.disable=function(form){var elements=this.getElements(form);for(var i=0;i<elements.length;i++){var element=elements[i];element.blur();element.disabled="true";}}
JForm.prototype.enable=function(form){var elements=this.getElements(form);for(var i=0;i<elements.length;i++){var element=elements[i];element.disabled="false";}}
JForm.prototype.reset=function(form){$(form).reset();}
if(!window.Form)window.Form=new JForm();var JKeyboard=System.createObject();JKeyboard.prototype.initialize=function(){this.className="JKeyboard";this.Keys={};this.Keys[17]=new Array("CTRL");this.Keys[18]=new Array("ALT");this.Keys[16]=new Array("SHIFT");this.Keys[9]=new Array("TAB");this.Keys[20]=new Array("CAPS LOCK");this.Keys[192]=new Array("~","`");this.Keys[48]=new Array("0",")");this.Keys[49]=new Array("1","!");this.Keys[50]=new Array("2","@");this.Keys[51]=new Array("3","#");this.Keys[52]=new Array("4","$");this.Keys[53]=new Array("5","%");this.Keys[54]=new Array("6","^");this.Keys[55]=new Array("7","&");this.Keys[56]=new Array("8","*");this.Keys[57]=new Array("9","(");this.Keys[65]=new Array("A","a");this.Keys[66]=new Array("B","b");this.Keys[67]=new Array("C","c");this.Keys[68]=new Array("D","d");this.Keys[69]=new Array("E","e");this.Keys[70]=new Array("F","f");this.Keys[71]=new Array("G","g");this.Keys[72]=new Array("H","h");this.Keys[73]=new Array("I","i");this.Keys[74]=new Array("J","j");this.Keys[75]=new Array("K","k");this.Keys[76]=new Array("L","l");this.Keys[77]=new Array("M","m");this.Keys[78]=new Array("N","n");this.Keys[79]=new Array("O","o");this.Keys[80]=new Array("P","p");this.Keys[81]=new Array("Q","q");this.Keys[82]=new Array("R","r");this.Keys[83]=new Array("S","s");this.Keys[84]=new Array("T","t");this.Keys[85]=new Array("U","u");this.Keys[86]=new Array("V","v");this.Keys[87]=new Array("W","w");this.Keys[88]=new Array("X","x");this.Keys[89]=new Array("Y","y");this.Keys[90]=new Array("Z","z");this.Keys[189]=new Array("_","-");this.Keys[187]=new Array("=","+");this.Keys[8]=new Array("BACKSPACE");this.Keys[32]=new Array(" ");this.Keys[129]=new Array("{","[");this.Keys[221]=new Array("}","]");this.Keys[220]=new Array("|","\\");this.Keys[13]=new Array("ENTER");this.Keys[186]=new Array(":",";");this.Keys[222]=new Array("'","\"");this.Keys[188]=new Array("<",",");this.Keys[190]=new Array(">",".");this.Keys[191]=new Array("?","/");this.Keys[27]=new Array("ESC");this.Keys[112]=new Array("F1");this.Keys[113]=new Array("F2");this.Keys[114]=new Array("F3");this.Keys[115]=new Array("F4");this.Keys[116]=new Array("F5");this.Keys[117]=new Array("F6");this.Keys[118]=new Array("F7");this.Keys[119]=new Array("F8");this.Keys[120]=new Array("F9");this.Keys[121]=new Array("F10");this.Keys[122]=new Array("F11");this.Keys[123]=new Array("F12");this.Keys[45]=new Array("INSERT");this.Keys[36]=new Array("HOME");this.Keys[33]=new Array("PAGE UP");this.Keys[46]=new Array("DELETE");this.Keys[35]=new Array("END");this.Keys[34]=new Array("PAGE DOWN");}
JKeyboard.prototype.getKeyCode=function(NumKeyCode){return this.Keys[NumKeyCode].join("");}
JKeyboard.prototype.ctrlKey=function(event,ctrlKey){if(event.altKey&&ctrlKey=="Alt"){return true;}
if(event.ctrlKey&&ctrlKey=="Ctrl"){return true;}
if(event.shiftKey&&ctrlKey=="Shift"){return true;}
return false;}
JKeyboard.prototype.hasKey=function(NumKeyCode,Key){Key=Key.toUpperCase();if(NumKeyCode in this.Keys){var Keys=this.Keys[NumKeyCode];for(var i=0;i<Keys.length;i++){if(Keys[i]==Key)
return true;}}
return false;}
var JAccelerator=System.createObject();JAccelerator.prototype.initialize=function(ctrlKey,hotKey,action){this.className="JAccelerator";this.ctrlKey=typeof(ctrlKey)=="undefined"?null:ctrlKey;this.hotKey=typeof(hotKey)=="undefined"?null:hotKey;this.action=typeof(action)=="undefined"?null:action;}
var JAccelerators=System.createObject();JAccelerators.prototype.initialize=function(){this.extend(new JHashtable());this.className="JAccelerators";}
var JAcceleratorManager=System.createObject();JAcceleratorManager.prototype.initialize=function(){this.Accelerators=new JAccelerators();this.className="JAcceleratorManager";this.objKeyboard=new JKeyboard();}
JAcceleratorManager.prototype.sendMessage=function(event){var strkey,isNeedCtrl;if(event==null)return true;var objContainer=this.Accelerators.container;for(var Item in objContainer){if(objContainer[Item].className=="JAccelerator"){if(objContainer[Item].ctrlKey!=null&&isUndefined(objContainer[Item].ctrlKey)==false){strkey=objContainer[Item].ctrlKey.split("+");if(strkey!=null){if(isUndefined(strkey[1])==false&&isUndefined(this.objKeyboard.Keys[event.keyCode])==false){if(this.objKeyboard.hasKey(event.keyCode,strkey[1])&&this.objKeyboard.ctrlKey(event,strkey[0])){if(objContainer[Item].action!=null){eval(objContainer[Item].action);Event.stop(event);return false;}}}}}}}
for(var Item in objContainer){if(objContainer[Item].className=="JAccelerator"){strkey=objContainer[Item].hotKey;if(strkey!=null){if(this.objKeyboard.hasKey(event.keyCode,strkey)){if(objContainer[Item].action!=null){eval(objContainer[Item].action);Event.stop(event);return false;}}}}}
return true;}
var JDrag=System.createObject();JDrag.prototype.initialize=function(dragElement,sourceElement){this.className="JDrag";this.dragElement=dragElement;this.dragElementBounds=null;this.sourceElement=sourceElement;this.sourceElementBounds=null;this.downElement=null;this.beginDragPoint=null;this.beginEventPoint=null;this.onBeginDrag=Function.emptyFunction;this.onEndDrag=Function.emptyFunction;this.onDrag=Function.emptyFunction;this.__move=Function.createDelegate(this,this._move);this.__endDrag=Function.createDelegate(this,this._endDrag);Event.attachEvent(this.sourceElement,"onmousedown",Function.createDelegate(this,this._onBeginDrag));}
JDrag.prototype._onBeginDrag=function(){this.beginEventPoint={x:event.x,y:event.y}
this.dragElementBounds=Element.getBounds(this.dragElement);this.sourceElementBounds=Element.getBounds(this.sourceElement);this._initDrag();this.sourceElement.setCapture();Event.attachEvent(this.sourceElement,"onmousemove",this.__move);Event.attachEvent(this.sourceElement,"onmouseup",this.__endDrag);}
JDrag.prototype._initDrag=function(){var objPos=Element.getLocation(this.dragElement);this.downElement=window.document.elementFromPoint(objPos.x+1,objPos.y+1);}
JDrag.prototype._move=function(){this._initDrag();this.onDrag(this,event);}
JDrag.prototype._endDrag=function(){this.sourceElement.releaseCapture();Event.detachEvent(this.sourceElement,"onmousemove",this.__move);Event.detachEvent(this.sourceElement,"onmouseup",this.__endDrag);this.onEndDrag(this,event);}
var JResize=System.createObject();JResize.prototype.initialize=function(resizeElement,sourceElement){this.className="JResize";this.resizeElement=resizeElement;this.resizeElementBounds=null;this.sourceElement=sourceElement;this.sourceElementBounds=null;this.beginEventPoint=null;this.onBeginResize=Function.emptyFunction;this.onEndResize=Function.emptyFunction;this.onResize=Function.emptyFunction;this.__resize=Function.createDelegate(this,this._resize);this.__endResize=Function.createDelegate(this,this._endResize);Event.attachEvent(this.sourceElement,"onmousedown",Function.createDelegate(this,this._onBeginResize));}
JResize.prototype._onBeginResize=function(){this.sourceElement.setCapture();this.resizeElementBounds=Element.getBounds(this.resizeElement);this.sourceElementBounds=Element.getBounds(this.sourceElement);this.beginEventPoint={x:event.x,y:event.y}
this.onBeginResize(this,event);Event.attachEvent(this.sourceElement,"onmousemove",this.__resize);Event.attachEvent(this.sourceElement,"onmouseup",this.__endResize);}
JResize.prototype._resize=function(){this.onResize(this,event);}
JResize.prototype._endResize=function(){this.sourceElement.releaseCapture();Event.detachEvent(this.sourceElement,"onmousemove",this.__resize);Event.detachEvent(this.sourceElement,"onmouseup",this.__endResize);this.onEndResize(this,event);}
var JImagePlayer=System.createObject();JImagePlayer.initialize=function(strArrFlash,intWidth,intHeight,intTextHeight){this.className="JImagePlayer";this.width=intWidth;this.height=intHeight;this.textHeight=(intTextHeight==null?20:intTextHeight);var objRand=new JRandomize();this._objectID=objRand.toId();this._objImgUrls=new JStringBuilder();this._objLinkUrls=new JStringBuilder();this._objTitles=new JStringBuilder();this._strFlashUrl=strArrFlash;}
JImagePlayer.prototype.addItem=function(strImgUrl,strLinkUrl,strTitle){this._objImgUrls.append(escape(strImgUrl));this._objLinkUrls.append(escape(strLinkUrl));this._objTitles.append(escape(strTitle));}
JImagePlayer.prototype.createPlayer=function(){$w("<object id=\""+this._objectID+"_A\" classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" width=\""+this._width+"\" height=\""+(this._height+this._textHeight)+"\">");$w("<param name=\"allowScriptAccess\" value=\"sameDomain\"><param name=\"movie\" value=\""+this._strFlashUrl[0]+"\"><param name=\"quality\" value=\"high\"><param name=\"bgcolor\" value=\"#F0F0F0\">");$w("<param name=\"menu\" value=\"false\"><param name=wmode value=\"opaque\">");$w("<param name=\"FlashVars\" value=\"pics="+this._objImgUrls.toString("|")+"&links="+this._objLinkUrls.toString("|")+"&texts="+this._objTitles.toString("|")+"&borderwidth="+this._width+"&borderheight="+this._height+"&textheight="+this.textHeight+"\">");$w("<embed id=\""+this._objectID+"_B\" src=\""+this._strFlashUrl[1]+"\" wmode=\"opaque\" FlashVars=\"pics="+this._objImgUrls.toString("|")+"&links="+this._objLinkUrls.toString("|")+"&texts="+this._objTitles.toString("|")+"&borderwidth="+this._width+"&borderheight="+this._height+"&textheight="+this.textHeight+"\" menu=\"false\" bgcolor=\"#F0F0F0\" quality=\"high\" width=\""+this._width+"\" height=\""+this._height+"\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />");$w("</object>");}
JImagePlayer.prototype.insertPlayer=function(parentNode){var strTemp="<object id=\""+this._objectID+"_A\" classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" width=\""+this._width+"\" height=\""+(this._height+this._textHeight)+"\">";strTemp+="<param name=\"allowScriptAccess\" value=\"sameDomain\"><param name=\"movie\" value=\""+this._strFlashUrl[0]+"\"><param name=\"quality\" value=\"high\"><param name=\"bgcolor\" value=\"#F0F0F0\">";strTemp+="<param name=\"menu\" value=\"false\"><param name=wmode value=\"opaque\">";strTemp+="<param name=\"FlashVars\" value=\"pics="+this._objImgUrls.toString("|")+"&links="+this._objLinkUrls.toString("|")+"&texts="+this._objTitles.toString("|")+"&borderwidth="+this._width+"&borderheight="+this._height+"&textheight="+this.textHeight+"\">";strTemp+="<embed id=\""+this._objectID+"_B\" src=\""+this._strFlashUrl[1]+"\" wmode=\"opaque\" FlashVars=\"pics="+this._objImgUrls.toString("|")+"&links="+this._objLinkUrls.toString("|")+"&texts="+this._objTitles.toString("|")+"&borderwidth="+this._width+"&borderheight="+this._height+"&textheight="+this.textHeight+"\" menu=\"false\" bgcolor=\"#F0F0F0\" quality=\"high\" width=\""+this._width+"\" height=\""+this._height+"\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />";strTemp+="</object>";$(parentNode).innerHTML=strTemp;}
JImagePlayer.prototype.hidden=function(){$(this._objectID+"_A").style.display="none";$(this._objectID+"_B").style.display="none";}
JImagePlayer.prototype.show=function(){$(this._objectID+"_A").style.display="block";$(this._objectID+"_B").style.display="block";}
var JWinBlind=System.createObject();JWinBlind.prototype.initialize=function(Element,pageX,pageY,isMove,moveSpeed,align,moveX){this.className="JWinBlind"
this.Element=Element;this.pageX=pageX;this.pageY=pageY;this.isMove=isMove;this.moveSpeed=moveSpeed;this.align=align;this.moveX=isUndefined(moveX)?true:moveX;}
JWinBlind.prototype.move=function(){var TopPos,scrollTop,scrollLeft;if(!this.isMove)
return;scrollTop=document.body.scrollTop;scrollLeft=document.body.scrollLeft;if(document.documentElement){scrollTop=document.documentElement.scrollTop;scrollLeft=document.documentElement.scrollLeft;}
TopPos=this.Element.offsetTop;if(TopPos!=(scrollTop+this.pageY))
{var PosY=(scrollTop+this.pageY-TopPos)*this.moveSpeed;PosY=(PosY>0?1:-1)*Math.ceil(Math.abs(PosY));this.Element.style.top=TopPos+PosY;}
if(this.moveX){var PrePosX=0;if(this.align=="LEFT")
PrePosX=scrollLeft+this.pageX;else if(this.align=="RIGHT")
PrePosX=document.body.clientWidth-this.Element.offsetWidth-this.pageX;if(this.Element.offsetLeft!=(scrollLeft+PrePosX))
{var PosX=(scrollLeft+PrePosX-this.Element.offsetLeft)*this.moveSpeed;PosX=(PosX>0?1:-1)*Math.ceil(Math.abs(PosX));this.Element.style.left=this.Element.offsetLeft+PosX;}}}
var JWinBlindManager=System.createObject();JWinBlindManager.prototype.initialize=function(){this.extend(new JHashtable());this.className="JWinBlindManager";this.process=null;}
JWinBlindManager.prototype.addWinBlind=function(ID,pageX,pageY,Speed,Align,IsMove,MoveX){var objWinBlind=new JWinBlind();objWinBlind.Element=$(ID);objWinBlind.pageX=pageX;objWinBlind.align=Align.toUpperCase();objWinBlind.pageY=pageY;objWinBlind.isMove=IsMove;objWinBlind.moveSpeed=Speed;objWinBlind.moveX=MoveX;var scrollTop=document.body.scrollTop;var scrollLeft=document.body.scrollLeft;if(document.documentElement){scrollTop=document.documentElement.scrollTop;scrollLeft=document.documentElement.scrollLeft;}
objWinBlind.Element.style.top=scrollTop+pageY;if(objWinBlind.align=="RIGHT")
objWinBlind.Element.style.left=document.body.clientWidth-objWinBlind.Element.offsetWidth-objWinBlind.pageX;else
objWinBlind.Element.style.left=scrollLeft+objWinBlind.pageX;this.put(ID,objWinBlind);}
JWinBlindManager.prototype.startMove=function(lngSleep){this.endMove();this.process=window.setInterval(Function.createDelegate(this,this.move),lngSleep);}
JWinBlindManager.prototype.move=function(){for(var Item in this.container)
{if(this.container[Item].className=="JWinBlind"){if(this.container[Item].isMove)
this.container[Item].move();}}}
JWinBlindManager.prototype.endMove=function(){if(this.process!=null)
if(this.process!=null)window.clearInterval(this.process);}
JWinBlindManager.prototype.closeAll=function(){for(var Item in this.container)
{if(this.container[Item].isMove)
this.close(Item);}}
JWinBlindManager.prototype.close=function(strId){this.get(strId).Element.style.visibility="hidden";}
JWinBlindManager.prototype.show=function(strId){this.get(strId).Element.style.visibility="visible";}
JWinBlindManager.prototype.showAll=function(strId){for(var Item in this.container)
{if(this.container[Item].isMove)
this.show(Item);}}
var JRandomizeFloat=System.createObject();JRandomizeFloat.prototype.initialize=function(Element,isMove){this.className="JRandomizeFloat";this.Element=Element;this.moveMin=2;this.moveMax=5;this.moveY=this.moveX=this.moveMin+this.moveMax*Math.random();this.Vr=3;this.Px=0;this.Py=0;this.isMove=isMove;this.width=this.Element.offsetWidth;this.height=this.Element.offsetHeight;this.Element.onmouseover=Function.createDelegate(this,this._onMouseOver);this.Element.onmouseout=Function.createDelegate(this,this._onMouseOut);}
JRandomizeFloat.prototype._onMouseOver=function(){this.isMove=false;}
JRandomizeFloat.prototype._onMouseOut=function(){this.isMove=true;}
JRandomizeFloat.prototype.move=function(){if(!this.isMove)
return;var pageW=window.document.body.offsetWidth-8;var pageH=window.document.body.offsetHeight;var pageY=window.document.body.scrollTop;var pageX=window.document.body.scrollLeft;if(document.documentElement){pageY=document.documentElement.scrollTop;pageX=document.documentElement.scrollLeft;}
this.Px=this.Px+this.moveX;this.Py=this.Py+this.moveY;this.moveX+=this.Vr*(Math.random()-0.5);this.moveY+=this.Vr*(Math.random()-0.5);if(this.moveX>(this.moveMax+this.moveMin))this.moveX=(this.moveMax+this.moveMin)*2-this.moveX;if(this.moveX<(-this.moveMax-this.moveMin))this.moveX=(-this.moveMax-this.moveMin)*2-this.moveX;if(this.moveY>(this.moveMax+this.moveMin))this.moveY=(this.moveMax+this.moveMin)*2-this.moveY;if(this.moveY<(-this.moveMax-this.moveMin))this.moveY=(-this.moveMax-this.moveMin)*2-this.moveY;if(this.Px<=pageX)
{this.Px=pageX;this.moveX=this.moveMin+this.moveMax*Math.random();}
if(this.Px>=pageX+pageW-1)
{this.Px=pageX+pageW-1;this.moveX=-this.moveMin+this.moveMax*Math.random();}
if(this.Px>=pageW-this.width)
{this.Px=this.Px-20;this.moveX=-this.moveMin-this.moveMax*Math.random();}
if(this.Py<=pageY)
{this.Py=pageY;this.moveY=this.moveMin+this.moveMax*Math.random();}
if(this.Py>=pageY+pageH-this.height)
{this.Py=pageY+pageH-this.height;this.moveY=-this.moveMin-this.moveMax*Math.random();}
this.Element.style.left=this.Px;this.Element.style.top=this.Py;}
var JRandomizeFloatManager=System.createObject();JRandomizeFloatManager.prototype.initialize=function(){this.extend(new JHashtable());this.className="JRandomizeFloatManager";this.process=null;}
JRandomizeFloatManager.prototype.addRandomizeFloat=function(ID){var objRandomizeFloat=new JRandomizeFloat($(ID),true);this.put(ID,objRandomizeFloat);}
JRandomizeFloatManager.prototype.startMove=function(lngSleep){this.endMove();this.process=window.setInterval(Function.createDelegate(this,this.move),lngSleep);}
JRandomizeFloatManager.prototype.move=function(){for(var Item in this.container)
{if(this.container[Item].className=="JRandomizeFloat"){if(this.container[Item].isMove)
this.container[Item].move();}}}
JRandomizeFloatManager.prototype.endMove=function(){if(this.process!=null)
if(this.process!=null)window.clearInterval(this.process);}
JRandomizeFloatManager.prototype.closeAll=function(){for(var Item in this.container)
{if(this.container[Item].isMove)
this.close(Item);}}
JRandomizeFloatManager.prototype.close=function(strId){this.get(strId).Element.style.visibility="hidden";}
JRandomizeFloatManager.prototype.show=function(strId){this.get(strId).Element.style.visibility="visible";}
JRandomizeFloatManager.prototype.showAll=function(strId){for(var Item in this.container)
{if(this.container[Item].isMove)
this.show(Item);}}
var JFile=System.createObject();JFile.prototype.initialize=function(){this.className="JFile";}
JFile.getFullName=function(p_str){var startPos=p_str.lastIndexOf("/");if(startPos<0)startPos=p_str.lastIndexOf("\\");if(startPos<0)return p_str;return p_str.substring(startPos+1,p_str.length);}
JFile.getExtendName=function(p_str){var startPos=p_str.lastIndexOf(".");if(startPos<0)return"";return p_str.substring(startPos+1,p_str.length);}
JFile.getName=function(p_str){p_str=JFile.getFullName(p_str);var startPos=p_str.lastIndexOf(".");if(startPos<0)return"";return p_str.substring(0,startPos);}
var JDataCompare=System.createObject();JDataCompare.prototype={initialize:function(p_varEle,p_strAlign){this.extend(new JHashtable());this.className="JDataCompare";this.ElementBox=$(p_varEle);this.objRand=new JRandomize();this.compareCount=4;this.dataIdName="dataId";this.onExists=Function.emptyFunction;this.onOverflowerCompareCount=Function.emptyFunction;this.onEmpty=Function.emptyFunction;this.onCreateItem=Function.emptyFunction;this.onCompare=Function.emptyFunction;var objJWinBlm=new JWinBlindManager();objJWinBlm.addWinBlind(this.ElementBox,10,50,0.7,p_strAlign,true,true);objJWinBlm.startMove(100);},deleteCompareItem:function(srcElement){this.remove(srcElement.getAttribute(this.dataIdName));this.ElementBox.removeChild(srcElement);},addCompareItem:function(objEle){if((this.length+1)==this.compareCount){this.onOverflowerCompareCount(this,objEle);return;}
var s_strDataId=objEle.getAttribute(this.dataIdName);if(this.exists(s_strDataId)){this.onExists(this,objEle);return;}
var strId=this.objRand.toId();var objDiv=$c("DIV");objDiv.setAttribute("id",strId);objDiv.setAttribute(this.dataIdName,s_strDataId);this.onCreateItem(this,objEle,objDiv);this.ElementBox.appendChild(objDiv);this.put(objEle.dataId,s_strDataId);},getAllDataIds:function(){return this.toArray().join(",");},compare:function(){if(this.length<0){this.onEmpty(this);return;}
this.onCompare(this,this.getAllDataIds());}}
window.activeWindow=null;var JWindow=System.createObject();JWindow.prototype.initialize=function(width,height,parent){this.className="JWindow";this._objRand=new JRandomize();this._windowId=this._objRand.toId();this._contentPanelId=this._objRand.toId();this.parent=(parent==null?document.body:parent);this._window=$c("DIV");this._window.setAttribute("id",this._windowId);this._window.style.position="absolute";this._window.style.zIndex=1;this._window.style.display="none";this._window.style.width=width+"px";this._window.style.height=height+"px";this._window.className="JWindow_Css";this._contentPanel=$c("DIV");this._contentPanel.setAttribute("id",this._contentPanelId);this._contentPanel.style.width="100%";this._contentPanel.style.height="100%";this._contentPanel.className="JWindow_ContentPanel_Css";this._window.appendChild(this._contentPanel);this._isCreate=false;this.onResize=Function.emptyFunction;this.onDrag=Function.emptyFunction;this.onShow=Function.emptyFunction;this.onClose=Function.emptyFunction;this.onMin=Function.emptyFunction;this.onMax=Function.emptyFunction;this.onContextMenu=Function.emptyFunction;this.onClick=Function.emptyFunction;}
JWindow.prototype.show=function(){if(!this._isCreate){this._registerEventListener();this.parent.appendChild(this._window);this._isCreate=true;}
this._window.style.display="block";}
JWindow.prototype.isShow=function(){return this._window.style.display=="block";}
JWindow.prototype.hidden=function(){this._window.style.display="none";}
JWindow.prototype.getContentPanel=function(){return this._contentPanel;}
JWindow.prototype.getWindow=function(){return this._window;}
JWindow.prototype.getContentPanel=function(){return this._contentPanel;}
JWindow.prototype.getBounds=function(){return Element.getBounds(this._window);}
JWindow.prototype.getLocation=function(){return Element.getLocation(this._window);}
JWindow.prototype.setLocation=function(intX,intY){return Element.setLocation(this._window,intX,intY);}
JWindow.prototype.getSize=function(){return{width:this._window.offsetWidth,height:this._window.offsetHeight};}
JWindow.prototype.setSize=function(intWidth,intHeight){this._window.style.width=intWidth;this._window.style.height=intHeight;}
JWindow.prototype._registerEventListener=function(){Event.attachEvent(this._window,"onclick",Function.createDelegate(this,this._onClick));}
JWindow.prototype._onClick=function(){if(activeWindow!=null){activeWindow.style.zIndex=1;}
this._window.style.zIndex=2;activeWindow=this._window;this.onClick();}
var CONST_JFRAME_MIN_WIDTH=150;var CONST_JFRAME_MIN_HEIGHT=44;var CONST_IMAGES_RESOURCE_PATH="images/";var JFrame=System.createObject();JFrame.prototype.initialize=function(width,height,title,parent){this.extend(new JWindow(width,height,parent));this.className="JFrame";this._RestoreBounds=null;this._dialogBackPanelId=this._objRand.toId();this._dialogBackPanel=$c("DIV");this._dialogBackPanel.setAttribute("id",this._dialogBackPanelId);this._dialogBackPanel.className="JFrame_dialogBackPanel_Css";this._dialogBackPanel.style.position="absolute";this._dialogBackPanel.style.display="none";this.parent.appendChild(this._dialogBackPanel);this._titleContentPanelId=this._objRand.toId();this._titleContentPanel=$c("DIV");this._titleContentPanel.setAttribute("id",this._titleContentPanelId);this._titleContentPanel.className="JFrame_titleContentPanel_Css";this._contentPanel.appendChild(this._titleContentPanel);this._appIcoPanelId=this._objRand.toId();this._appIcoPanel=$c("DIV");this._appIcoPanel.setAttribute("id",this._appIcoPanelId);this._appIcoPanel.className="JFrame_titleContentPanel_appIcoPanel_Css";this._titleContentPanel.appendChild(this._appIcoPanel);this._appIcoId=this._objRand.toId();this._appIco=$c("IMG");this._appIco.src=CONST_IMAGES_RESOURCE_PATH+"/appIco.gif";this._appIco.className="JFrame_titleContentPanel_appIcoPanel_appIco_Css";this._appIco.setAttribute("id",this._appIcoId);this._appIcoPanel.appendChild(this._appIco);this._titlePanelId=this._objRand.toId();this._titlePanel=$c("DIV");this._titlePanel.className="JFrame_titleContentPanel_titlePanel_Css";this._titlePanel.setAttribute("id",this._titlePanelId);if(title)this._titlePanel.innerHTML=title;this._titleContentPanel.appendChild(this._titlePanel);this._buttonPanelId=this._objRand.toId();this._buttonPanel=$c("DIV");this._buttonPanel.setAttribute("id",this._buttonPanelId);this._buttonPanel.className="JFrame_titleContentPanel_buttonPanel_Css";this._titleContentPanel.appendChild(this._buttonPanel);this._minButtonId=this._objRand.toId();this._minButton=$c("IMG");this._minButton.title="最小化";this._minButton.setAttribute("id",this._minButtonId);this._minButton.src=CONST_IMAGES_RESOURCE_PATH+"/minButton.gif";this._buttonPanel.appendChild(this._minButton);this._maxButtonId=this._objRand.toId();this._maxButton=$c("IMG");this._maxButton.title="最大化";this._maxButton.setAttribute("id",this._maxButtonId);this._maxButton.src=CONST_IMAGES_RESOURCE_PATH+"/maxButton.gif";this._maxButton.setAttribute("action","max");this._buttonPanel.appendChild(this._maxButton);this._closeButtonId=this._objRand.toId();this._closeButton=$c("IMG");this._closeButton.title="关闭";this._closeButton.setAttribute("id",this._closeButtonId);this._closeButton.src=CONST_IMAGES_RESOURCE_PATH+"/closeButton.gif";this._buttonPanel.appendChild(this._closeButton);this._JFrame_contentPanelId=this._objRand.toId();this._JFrame_contentPanel=$c("DIV");this._JFrame_contentPanel.setAttribute("id",this._JFrame_contentPanelId);this._JFrame_contentPanel.style.width="100%";this._JFrame_contentPanel.className="JFrame_JFrame_contentPanel_Css";this._contentPanel.appendChild(this._JFrame_contentPanel);this._statusPanelId=this._objRand.toId();this._statusPanel=$c("DIV");this._statusPanel.setAttribute("id",this._statusPanelId);this._statusPanel.style.width="100%";this._statusPanel.className="JFrame_statusPanel_Css";this._contentPanel.appendChild(this._statusPanel);this._resizeButtonId=this._objRand.toId();this._resizeButton=$c("IMG");this._resizeButton.setAttribute("id",this._resizeButtonId);this._resizeButton.className="JFrame_statusPanel_resizeButton_Css";this._resizeButton.src=CONST_IMAGES_RESOURCE_PATH+"/resizeButton.gif";this._statusPanel.appendChild(this._resizeButton);this._objDrag=new JDrag(this._window,this._titlePanel);this._objResize=new JResize(this._window,this._resizeButton);}
JFrame.prototype._registerEventListenerForJFrame=function(){this._registerEventListener();this._objResize.onResize=Function.createDelegate(this,this._onResize);this._objDrag.onDrag=Function.createDelegate(this,this._onDrag);Event.attachEvent(this._titlePanel,"ondblclick",Function.createDelegate(this,this._onMax));Event.attachEvent(this._closeButton,"onclick",Function.createDelegate(this,this._onClose));Event.attachEvent(this._maxButton,"onclick",Function.createDelegate(this,this._onMax));Event.attachEvent(this._minButton,"onclick",Function.createDelegate(this,this._onMin));Event.attachEvent(this._dialogBackPanel,"oncontextmenu",Function.createDelegate(this,this._dialogBackPanel_onContextMenu));Event.attachEvent(this._JFrame_contentPanel,"oncontextmenu",Function.createDelegate(this,this._JFrame_contentPanel_onContextMenu));}
JFrame.prototype.showFrame=function(){if(!this._isCreate){this._registerEventListenerForJFrame();this.parent.appendChild(this._window);this._isCreate=true;}
var eventResult=this.onShow(this);if(!isUndefined(eventResult)){if(!eventResult){return false;}}
this.show();this._contentPanelResize();}
JFrame.prototype.showDialog=function(){var eventResult=this.onShow(this);if(!isUndefined(eventResult)){if(!eventResult){return false;}}
var width=this.parent.offsetWidth;var height=this.parent.offsetHeight;this._dialogBackPanel.style.zIndex=2;this._window.style.zIndex=3;this._dialogBackPanel.style.width=width+"px";this._dialogBackPanel.style.height=height+"px";this._dialogBackPanel.style.display="block";if(!this._isCreate){this._registerEventListenerForJFrame();this.parent.appendChild(this._window);this._isCreate=true;}
this.show();this._contentPanelResize();this.setLocation((this.parent.clientWidth/2)-(this._window.clientWidth/2),(this.parent.clientHeight/2)-(this._window.clientHeight/2));}
JFrame.prototype.hiddenFrame=function(){this._dialogBackPanel.style.display="none";this.hidden();}
JFrame.prototype.getContentPanel=function(){return this._JFrame_contentPanel;}
JFrame.prototype._dialogBackPanel_onContextMenu=function(){Event.stop(event);return false;}
JFrame.prototype._JFrame_contentPanel_onContextMenu=function(){var eventResult=this.onContextMenu(this,event);if(!isUndefined(eventResult)){if(!eventResult){Event.stop(event);return false;}}}
JFrame.prototype._onClose=function(){var eventResult=this.onClose(this,event);if(!isUndefined(eventResult)){if(!eventResult){return false;}}
this.hiddenFrame();}
JFrame.prototype._onMax=function(){var eventResult=this.onMax(this,event);if(!isUndefined(eventResult)){if(!eventResult){return false;}}
if(this._maxButton.getAttribute("action")=="max"){this._RestoreBounds=Element.getBounds(this._window);var parentBounds=Element.getBounds(this.parent);this.setLocation(parentBounds.x,parentBounds.y);this._window.style.width=this.parent.clientWidth+"px";this._window.style.height=this.parent.clientHeight+"px";this._maxButton.src=CONST_IMAGES_RESOURCE_PATH+"/restoreButton.gif";this._maxButton.setAttribute("action","restore");this._maxButton.setAttribute("title","还原");}else{this.setLocation(this._RestoreBounds.x,this._RestoreBounds.y);this._window.style.width=this._RestoreBounds.width+"px";this._window.style.height=this._RestoreBounds.height+"px";this._maxButton.src=CONST_IMAGES_RESOURCE_PATH+"/maxButton.gif";this._maxButton.setAttribute("action","max");this._maxButton.setAttribute("title","最大化");}
this._contentPanelResize();this._window.focus();}
JFrame.prototype._onMin=function(){var eventResult=this.onMin(this,event);if(!isUndefined(eventResult)){if(!eventResult){return false;}}
this._RestoreBounds=Element.getBounds(this._window);this._maxButton.src=CONST_IMAGES_RESOURCE_PATH+"/restoreButton.gif";this._maxButton.setAttribute("action","restore");this._maxButton.setAttribute("title","还原");this._window.style.width=CONST_JFRAME_MIN_WIDTH+"px";this._window.style.height=CONST_JFRAME_MIN_HEIGHT+"px";this._contentPanelResize();this._window.focus();}
JFrame.prototype._onDrag=function(objSource,objEvent){var eventResult=this.onDrag(this,objSource,objEvent);if(!isUndefined(eventResult)){if(!eventResult){return false;}}
var left=objSource.dragElementBounds.x+(parseInt(objEvent.x,10)-objSource.beginEventPoint.x);var top=objSource.dragElementBounds.y+(parseInt(objEvent.y,10)-objSource.beginEventPoint.y);objSource.dragElement.style.left=left+"px";objSource.dragElement.style.top=top+"px";this._RestoreBounds=Element.getBounds(this._window);}
JFrame.prototype._onResize=function(objSource,objEvent){var eventResult=this.onResize(this,objSource,objEvent);if(!isUndefined(eventResult)){if(!eventResult){return false;}}
var objResizeElement=objSource.resizeElement;var width=objSource.resizeElementBounds.width+(parseInt(event.x,10)-objSource.beginEventPoint.x);var height=objSource.resizeElementBounds.height+(parseInt(event.y,10)-objSource.beginEventPoint.y);if(width>CONST_JFRAME_MIN_WIDTH&&height>CONST_JFRAME_MIN_HEIGHT){objResizeElement.style.width=width+"px";objResizeElement.style.height=height+"px";this._contentPanelResize();this._RestoreBounds=Element.getBounds(this._window);}}
JFrame.prototype._contentPanelResize=function(){var height=(this._window.clientHeight-(this._statusPanel.clientHeight+this._titleContentPanel.clientHeight)-2);if(height<1)height=1;this._JFrame_contentPanel.style.height=height+"px";var width=(this._titleContentPanel.clientWidth-(this._appIcoPanel.clientWidth+this._buttonPanel.clientWidth)-20);if(width>10)
this._titlePanel.style.width=width+"px";}
JFrame.prototype.getTitle=function(){return this._titlePanel.innerHTML;}
JFrame.prototype.setTitle=function(strTitle){this._titlePanel.innerHTML=strTitle;}
JFrame.prototype.getStatusPanel=function(){return this._statusPanel;}
JFrame.prototype.getApplicationIco=function(){return this._appIco.src;}
JFrame.prototype.setApplicationIco=function(strUrl){this._appIco.src=strUrl;}
