String.prototype.stripTags=fStripTags;String.prototype.escapeHTML=fEscapeHTML;String.prototype.unescapeHTML=fUnescapeHTML;String.prototype.encodeHTML=fEncodeHTML;String.prototype.decodeHTML=fDecodeHTML;String.prototype.toInt=fToInt;String.prototype.usc_hdc=fUsc_hdc;String.prototype.trim=fTrim;String.prototype.ltrim=fLtrim;String.prototype.rtrim=fRtrim;String.prototype.len=fLen;String.prototype.left=fLeft;String.prototype.isNumber=fIsNumber;String.prototype.checkSpecialChar=fCheckSpecialChar;Date.prototype.dateAdd=fDateAdd;Date.prototype.format=fDateFormat;function Field(){};Field.clear=fClear;Field.activate=fActivate;function El(){}El.toggle=fToggle;El.hide=fHide;El.show=fShow;El.remove=fRemove;El.insertElement=fInsertElement;El.nextSibling=fNextSibling;El.preSibling=fPreSibling;El.createElement=fCreateElement;El.setAttr=fSetAttr;El.setStyle=fSetStyle;El.addClass=fAddClass;El.removeClass=fRemoveClass;El.setClass=fSetClass;El.delClass=fDelClass;El.getX=fGetX;El.getY=fGetY;El.position=fPosition;El.getCookie=fGetCookie;El.setCookie=fSetCookie;El.setImageSize=fSetImageSize;function EV(){}EV.getTarget=fGetTarget;EV.getEvent=fGetEvent;EV.getCharCode=fGetCharCode;EV.stopEvent=fStopEvent;EV.stopPropagation=fStopPropagation;EV.preventDefault=fPreventDefault;EV.pointerX=fPointerX;EV.pointerY=fPointerY;EV.observers=false;EV.observeAndCache=fObserveAndCache;EV.unloadCache=fUnloadCache;EV.stopObserving=fStopObserving;EV.observe=fObserve;function checkNoNamePart(str){str.toLowerCase();str.replace(/\s/gi,"");if(str.search("@")<0){return "";};return str;};function parseSingleEmail(sEmail){sEmail.replace(/\s/gi,"");var pos1=sEmail.lastIndexOf("<");var pos2=sEmail.lastIndexOf(">");if(pos1>=0&&pos2>=0&&pos2>pos1){var NoNamePart=sEmail.substring(pos1,pos2);return checkNoNamePart(NoNamePart);}else{if(pos1>=0||pos2>=0){return "";}else{return checkNoNamePart(sEmail);}};return "";}function isEmailAddr(sEmail){return/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/.test(sEmail);}function isPhoneNum(sPhone){return/^13[\d]{9}$/.test(sPhone)||/^15[39][\d]{8}$/.test(sPhone);}function fFixStr(str,n){var i,j;var s="";var len=str.length;for(i=0,j=1;i<len;i++,j++){if(str.charCodeAt(i)>255){j++;}if(j>n){break;}s+=str.charAt(i);}return s;}function fReplaceQuot(src){var re;var s="";re=/&quot;/g;
;s=src.replace(re,"");return s;}function fCheckDate(sDate){var arr=sDate.split("-");var d=new Date(arr[0],arr[1]-1,arr[2]);if(d.getFullYear()!=arr[0]||(d.getMonth()+1)!=parseInt(arr[1],10)||d.getDate()!=parseInt(arr[2],10)){return false;}return true;}function fTrim(){return this.replace(/(^\s*)|(\s*$)/g,"");}function fLtrim(){return this.replace(/(^\s*)/g,"");}function fRtrim(){return this.replace(/(\s*$)/g,"");}function fCleanBlank(){return this.replace(/\s/g,"");}function fCheckSpecialChar(flag){var reg=/[,%\'\"\/\\;|]/;if(this.search(reg)!=-1){if(flag){}return false;}return true;}function fLen(){var len=0;for(var i=0;i<this.length;i++){if(this.charCodeAt(i)>255){len+=2;}else{len++;}}return len;}function fStripTags(){return this.replace(/<\/?[^>]+>/gi,'');};function fEscapeHTML(){var B=document.createElement('div');var sText=document.createTextNode(this);B.appendChild(sText);return B.innerHTML;};function fUnescapeHTML(){var B=document.createElement('div');B.innerHTML=this.stripTags();return B.childNodes[0].nodeValue;};function fEncodeHTML(){var s=this;s=s.replace(/&/gi,"&amp;");s=s.replace(/</gi,"&lt;");s=s.replace(/>/gi,"&gt;");s=s.replace(/\"/gi,"&quot;");s=s.replace("\n","<br/>");return s;}function fDecodeHTML(){var s=this;s=s.replace(/&lt;/gi,"<");s=s.replace(/&gt;/gi,">");s=s.replace(/&quot;/gi,"\"");s=s.replace(/&amp;/gi,"&");s=s.replace(/&nbsp;/gi," ");return s;}function fToInt(){return parseInt(this,10);};function fUsc_hdc(){return unescape(this.unescapeHTML());};function fLeft(len){var i=0;var j=0;if(this.len()<=len){return this;}while(j<len){if(this.charCodeAt(i)>255){j+=2;}else{j++;};i++;}return this.substring(0,i)+"..";};function fIsNumber(){return(this.search(/^\d+$/g)==0);}function fDateAdd(n){return new Date(this.valueOf()+n*3600*24*1000);};function fDateFormat(){var ty=this.getFullYear();var tM=this.getMonth()+1;var td=this.getDate();var th=this.getHours();var tm=this.getMinutes();var ts=this.getSeconds();var sTime=ty+(tM<10?'-0':'-')+tM+(td<10?'-0':'-')+td+(th<10?' 0':' ')+th+(tm<10?':0':":")+tm+(ts<10?':0':':')+ts;return sTime}function fClear(){for(var i=0;i<arguments.length;i++)$(arguments[i]).value='';}function fActivate(oElement){try{$(oElement).focus();$(oElement).select();}catch(exp){}}function $(){var aElements=new Array();for(var i=0;i<arguments.length;i++){var oElement=arguments[i];if(typeof oElement=='string'){oElement=document.getElementById(oElement);}fExtendObj(El,oElement);if(arguments.length==1){return oElement;}aElements.push(oElement);}return aElements;}function fExtendObj(oOrg,oTag){for(var o in oOrg){try{if(!oTag[o]){oTag[o]=oOrg[o];}}catch(exp){}}}function fGetObj(sParam){var oElement=null;if(typeof(sParam)=='object'){oElement=sParam;}else{oElement=$(sParam);};return oElement;}function fToggle(){if(arguments.length==0){this.style.display=(this.style.display=='none'?'':'none');}else{for(var i=0;i<arguments.length;i++){var oElement=fGetObj(arguments[i]);if(oElement){oElement.style.display=(oElement.style.display=='none'?'':'none');}}}}function fHide(){if(arguments.length==0){this.style.display='none';}else{for(var i=0;i<arguments.length;i++){var oElement=fGetObj(arguments[i]);oElement.style.display='none';}}}function fShow(){if(arguments.length==0){this.style.display='';}else{for(var i=0;i<arguments.length;i++){var oElement=fGetObj(arguments[i]);oElement.style.display='';}}}function fRemove(){if(arguments.length==0){this.parentNode.removeChild(this);}else{for(var i=0;i<arguments.length;i++){oElement=fGetObj(arguments[i]);oElement.parentNode.removeChild(oElement);}}}function fInsertElement(oElement,obj,sPlace){try{if(arguments.length==2){var sPlace=obj;var obj=oElement;var oElement=this;}var oParent=oElement.parentNode;var nLen=oParent.childNodes.length;var nPos=-1;for(var i=0;i<nLen;i++){if(oParent.childNodes[i]==oElement){nPos=i;}}if(sPlace=="beforeEnd"){oElement.appendChild(obj);}else if(sPlace=="afterEnd"){if(nPos==nLen-1){oParent.appendChild(obj);}else{oParent.insertBefore(obj,oParent.childNodes[nPos+1]);}}else if(sPlace=="beforeBegin"){oParent.insertBefore(obj,oParent.childNodes[nPos]);}else if(sPlace=="afterBegin"){if(oElement.childNodes.length==0){oElement.appendChild(obj);}else{oElement.insertBefore(obj,oElement.childNodes[0]);}}}catch(exp){fDebug("fInsertElement",exp.description);}}function fNextSibling(oElement){try{if(!oElement){oElement=this;}var oParent=oElement.parentNode;var aChilds=oParent.childNodes;for(var i=0;i<aChilds.length;i++){if(aChilds[i]==oElement){if(i==aChilds.length-1){return null;}else{return aChilds[i+1];}}}}catch(exp){fDebug("fNextSibling",exp.description);}}function fPreSibling(oElement){try{if(!oElement){oElement=this;}var oParent=oElement.parentNode;var aChilds=oParent.childNodes;for(var i=0;i<aChilds.length;i++){if(aChilds[i]==oElement){if(i==0){return null;}else{return aChilds[i-1];}}}}catch(exp){fDebug("fPreSibling",exp.description);}}function fCreateElement(sTag,A){if(A){var o=$(A);if(o){El.remove(o);}}var oElement=document.createElement(sTag);if(A){oElement.id=A;}fExtendObj(El,oElement);return oElement;}function fSetAttr(oElement,oAttrObj){if(arguments.length==1){var oAttrObj=oElement;var oElement=this;}for(var o in oAttrObj){oElement[o]=oAttrObj[o];}}function fSetStyle(oElement,oStyleObj){if(arguments.length==1){var oStyleObj=oElement;var oElement=this;}for(var o in oStyleObj){oElement.style[o]=oStyleObj[o];}}function fAddClass(oElement,sClassName){if(arguments.length==1){var sClassName=oElement;var oElement=this;}var sOldName=" "+oElement.className.trim()+" ";var sNewName=" "+sClassName+" ";if(sOldName.indexOf(sNewName)==-1){oElement.className+=" "+sClassName;}}function fDelClass(oElement,sClassName){if(arguments.length==1){var sClassName=oElement;var oElement=this;}oElement.className=oElement.className.replace(sClassName,"");}function fRemoveClass(oElement,sClassName){if(arguments.length==1){var sClassName=oElement;var oElement=this;}var aClass=oElement.className.split(" ");var arr=[];for(var i=0;i<aClass.length;i++){if(aClass[i]!=sClassName){arr[arr.length]=aClass[i];}}oElement.className=arr.join(" ");}function fSetClass(oElement,sClassName){if(arguments.length==1){var sClassName=oElement;var oElement=this;}oElement.className=sClassName;}function fGetX(oElement){if(!oElement){var oElement=this;}var l=oElement.offsetLeft;while(oElement=oElement.offsetParent){l+=oElement.offsetLeft;}return l;}function fGetY(oElement){if(!oElement){var oElement=this;}var t=oElement.offsetTop;while(oElement=oElement.offsetParent){t+=oElement.offsetTop;}return t;}function fGetCookie(LA){var sRetValue;if(window.document.cookie==""){return "";}var sFirstChar,sLaseChar;var sCookieTemp=window.document.cookie;sFirstChar=sCookieTemp.indexOf(LA+"=");var bFlag=false;if(sFirstChar==0){bFlag=true;}else{sFirstChar=sCookieTemp.indexOf("; "+LA+"=");if(sFirstChar!=-1){bFlag=true;}};if(bFlag){if(sFirstChar==0){sFirstChar+=LA.length+1;}else{sFirstChar+=LA.length+3;};sLaseChar=sCookieTemp.indexOf(";",sFirstChar);if(sLaseChar==-1){sLaseChar=sCookieTemp.length;}sRetValue=sCookieTemp.substring(sFirstChar,sLaseChar);return sRetValue;}else{return "";}}function fSetCookie(LA,MA,sDomain,sPath,sDays){var oExDate=new Date();oExDate.setTime(oExDate.getTime()+sDays*24*60*60*1000);LA=LA+"="+MA;sDomain=(typeof sDomain=="undefined"||sDomain=="")?"":";domain="+sDomain;sPath=(typeof sPath=="undefined"||sPath=="")?"":";path="+sPath;sDays=(typeof sDays=="undefined"||sDays==""||sDays==0)?"":";expires="+oExDate.toGMTString();window.document.cookie=LA+sDays+sPath+sDomain;}function fSetImageSize(c,iWidth,iHeight,isFixChanged){var C=new Image();C.src=c.src;if(!isFixChanged&&(C.width>c.width||C.height>c.height)){return;}if(iWidth==0){var iW=C.width;}else{var iW=iWidth;};if(iHeight==0){var iH=C.height;}else{var iH=iHeight;};var p=(C.height-0)/(C.width-0);var h=iW*p;var w=iH/p;if(w>iW){c.style.width=iW+"px";c.style.height=Math.round(h)+"px";}if(h>iH){c.style.width=Math.round(w)+"px";c.style.height=iH+"px";}}function fGetClientWidth(){return(document.documentElement.offsetWidth||document.body.offsetWidth);}function fGetClientHeight(){return(self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight);}function fGetTarget(ev,resolveTextNode){if(!ev)ev=this.getEvent();var t=ev.target||ev.srcElement;if(resolveTextNode&&t&&"#text"==t.nodeName){return t.parentNode;}else{return t;}}function fGetEvent(e){var ev=e||window.event;if(!ev){var c=this.getEvent.caller;while(c){ev=c.arguments[0];if(ev&&Event==ev.constructor){break;}c=c.caller;}}return ev;}function fGetCharCode(ev){if(!ev)ev=this.getEvent();return ev.charCode||(ev.type=="keypress")?ev.keyCode:0;}function fStopEvent(ev){if(!ev)ev=this.getEvent();this.stopPropagation(ev);this.preventDefault(ev);}function fStopPropagation(ev){if(!ev)ev=this.getEvent();if(ev.stopPropagation){ev.stopPropagation();}else{ev.cancelBubble=true;}}function fPreventDefault(ev){if(!ev)ev=this.getEvent();if(ev.preventDefault){ev.preventDefault();}else{ev.returnValue=false;}}function fPointerX(event){if(!event)event=this.getEvent();var doc=document;return event.pageX||(event.clientX+(doc.documentElement.scrollLeft||doc.body.scrollLeft));};function fPointerY(event){if(!event)event=this.getEvent();var doc=document;return event.pageY||(event.clientY+(doc.documentElement.scrollTop||doc.body.scrollTop));};function fPosition(oElement){if(!oElement){var oElement=this;}var valueT=0,valueL=0;do{valueT+=oElement.offsetTop||0;valueL+=oElement.offsetLeft||0;oElement=oElement.offsetParent;}while(oElement);return[valueL,valueT];};function fObserveAndCache(oElement,name,observer,useCapture){if(!this.observers)this.observers=[];if(oElement.addEventListener){this.observers.push([oElement,name,observer,useCapture]);oElement.addEventListener(name,observer,useCapture);}else if(oElement.attachEvent){this.observers.push([oElement,name,observer,useCapture]);oElement.attachEvent('on'+name,observer);}}function fUnloadCache(){if(!this.observers)return;for(var i=0;i<this.observers.length;i++){this.stopObserving(this.observers[i][0],this.observers[i][1],this.observers[i][2],this.observers[i][3]);this.observers[i][0]=null;}this.observers=false;}function fObserve(oElement,name,observer,useCapture){useCapture=useCapture||false;if(name=='keypress'&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||oElement.attachEvent)){name='keydown';}this.observeAndCache(oElement,name,observer,useCapture);}function fStopObserving(oElement,name,observer,useCapture){useCapture=useCapture||false;if(name=='keypress'&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||oElement.detachEvent)){name='keydown';}if(oElement.removeEventListener){oElement.removeEventListener(name,observer,useCapture);}else if(oElement.detachEvent){oElement.detachEvent('on'+name,observer);}}function Hashtable(){this._hash=new Object();this._type="object";window.$continue=new Object();window.$break=new Object();this.add=function(key,value){if(value&&value.nodeType&&value.nodeType==1){value=$(value);}if(key&&key.nodeType&&key.nodeType==1){key=$(key);}if(this._type=="object"){if(typeof(key)!="undefined"){if(this.contains(key)==false){this._hash[key]=typeof(value)=="undefined"?null:value;return true;}else{return false;}}else{return false;}}else{if(typeof(value)!="undefined"&&typeof(key)!="undefined"){this._hash[key]=value;return true;}else if(typeof(key)!="undefined"){this._hash[this._hash.length]=key;return true;}else{return false;}}};this.remove=function(key){delete this._hash[key];};this.count=function(){if(this._type=="array"){return this._hash.length;}var i=0;for(var k in this._hash){i++;}return i;};this.items=function(key){return this._hash[key];};this.contains=function(key){return typeof(this._hash[key])!="undefined";};this.clear=function(){for(var k in this._hash){delete this._hash[k];}};this.each=function(func){try{if(this._type=="object"){for(var k in this._hash){try{func(k,this._hash[k]);}catch(e){if(e!=$continue)throw e;}}}else{for(var k=0;k<this._hash.length;k++){try{func(k,this._hash[k]);}catch(e){if(e!=$continue)throw e;}}}}catch(e){if(e!=$break)throw e;}};if(arguments.length>0){var arg=arguments[0];if(typeof arg=="object"){if(fIsValidCollection(arg)||arg.ie5){this._type="array";this._hash=new Array();for(var i=0;i<arg.length;i++){this.add(i,arg[i]);}}else{for(var o in arg){this.add(o,arg[o]);}}}}}function fIsValidCollection(o){return(o&&(o.length||o.length==0)&&typeof o!="string"&&!o.tagName&&!o.alert);}Array.prototype.exchange=function(iIndex,iFlag){if(Math.max(0,iIndex,iIndex+iFlag)<0||Math.min(this.length-1,iIndex,iIndex+iFlag)>this.length-1){return;}var I=this[iIndex];this[iIndex]=this[iIndex+iFlag];this[iIndex+iFlag]=I;};Array.prototype.escapeNull=function(){var aRtn=[];for(var i=0,len=this.length;i<len;i++){if(this[i]){aRtn[aRtn.length]=this[i];}}return aRtn;};Array.prototype.clone=function(){var aRtn=[];for(var i=0;this[i]&&(aRtn[i]=this[i]);i++);return aRtn;};Array.prototype.subtract=function(sCnt){var aRtn=[];for(var i=0;s=this[i];i++){if(s!=sCnt){aRtn[aRtn.length]=s;};}return aRtn;};Array.prototype.filter=function(reg){for(var i=0;s=this[i];i++){this[i]=s.replace(reg,"");}};if(!Array.prototype.push){Array.prototype.ie5=true;Array.prototype.push=function(){var startLength=this.length;for(var i=0;i<arguments.length;i++)this[startLength+i]=arguments[i];return this.length;}};Array.prototype.splice=function(n){var arr=new Array();for(var i=0;i<this.length;i++){if(i!=n){arr[arr.length]=this[i];}}return arr;};if(!Array.prototype.shift){Array.prototype.shift=function(){var returnValue=this[0];for(i=1;i<this.length;i++){this[i-1]=this[i];}this.length--;return returnValue;}};if(!Array.prototype.pop){Array.prototype.pop=function(){lastElement=this[this.length-1];this.length=Math.max(this.length-1,0);return lastElement;}}var URI_E_CHARS=new Array();for(var i=0x00;i<0x80;i++){var c=String.fromCharCode(i);if(i<0x10){URI_E_CHARS[c]="%0"+i.toString(16);}else if(c>='0'&&c<='9'){}else if(c>='A'&&c<='Z'){}else if(c>='a'&&c<='z'){}else{URI_E_CHARS[c]="%"+i.toString(16);}}URI_E_CHARS[" "]="+";window.encodeURIComponent=function(s){var s1="";for(var i=0;i<s.length;i++){var c0=s.charAt(i);var c1=URI_E_CHARS[c0];s1+=c1?c1:c0;}return s1;};
