(function(){function eptoneExtend(destination,source){for(var property in source)
destination[property]=source[property];return destination;}
eptoneExtend(Object,{eptoneExtend:eptoneExtend});})();(function(){if(window.$Eptone&&window.$Eptone.initialized){return;}
var $Eptone={initialized:false,Browser:{}};window.$Eptone=$Eptone;$Eptone.Flash={install:false,version:0,isIE:document.all,isOk:false,check:function(){if(this.isIE){var swf;try{swf=new ActiveXObject('ShockwaveFlash.ShockwaveFlash');}catch(ex){}
if(swf){this.install=true;VSwf=swf.GetVariable("$version");this.version=parseInt(VSwf.split(" ")[1].split(",")[0]);}}else{if(navigator.plugins&&navigator.plugins.length>0){var swf=navigator.plugins["Shockwave Flash"];if(swf){this.install=true;var words=swf.description.split(" ");for(var i=0;i<words.length;++i){if(isNaN(parseInt(words[i])))continue;this.version=parseInt(words[i]);}}}}},getObject:function(movieName){if(navigator.appName.indexOf("Microsoft")!=-1){return window[movieName];}else{return document[movieName];}}}
$Eptone.Flash.check();$Eptone.AjaxScript=function(options){this.options={id:'',url:'',language:'javascript',type:'text/javascript',charset:'UTF-8',noCache:true,prepare:false}
Object.eptoneExtend(this.options,options||{});}
Object.eptoneExtend($Eptone.AjaxScript.prototype,{send:function(options){if(this.running)return;if(this.options.prepare){var result=$Eptone.Function.bind(this.options.prepare,this,[options])();if(result==false)return;}
this.running=true;var old=this.options;options=Object.eptoneExtend({url:old.url},options);var url=options.url;var nowtime=new Date().getTime();var jsonName=this.jsoncallback="json"+nowtime;url+=(url.indexOf('?')>-1?'&':'?')+"jsoncallback="+jsonName;if(this.options.noCache){var noCache='noCache='+nowtime;url+='&'+noCache;}
var id=this.options.id||new Date().getTime();var oldScript=document.getElementById(id);if(oldScript&&oldScript.parentNode){oldScript.parentNode.removeChild(oldScript);}
var script=this.script=document.createElement('script');script.id=id;script.src=url;script.language=this.options.language;script.type=this.options.type;script.charset=this.options.charset;document.getElementsByTagName("head")[0].appendChild(script);script.onload=script.onreadystatechange=$Eptone.Function.bind(this.onStateChange,this);},onStateChange:function(){var state=this.script.readyState;if(!state||state=="loaded"||state=="interactive"||state=="complete"){this.running=false;var response={"json":window[this.jsoncallback]};if(!this.handleResponse(response)){if(this.options.onHandleError){$Eptone.Function.bind(this.options.onHandleError,this,[response])();}
return;}
if(this.options.onSuccess){$Eptone.Function.bind(this.options.onSuccess,this,[response])();}}},handleResponse:function(response){try{var json=response.json;if(typeof json.code=="number"&&json.code<=-100){if(json.code==-102&&$eptone){$Eptone.Utils.setCookie("bother"+$eptone.userId,"true");}
return false;}}catch(e){}
return true;}});$Eptone.Utils={topUrl:["com","net","com.cn","net.cn","org.cn","gov.cn","ac.cn","bj.cn","sh.cn","tj.cn","cq.cn","jl.cn","hl.cn","js.cn","zj.cn","ah.cn","fj.cn","jx.cn","sd.cn","ha.cn","hb.cn","gd.cn","gx.cn","hi.cn","sc.cn","gz.cn","yn.cn","xz.cn","sn.cn","gs.cn","qh.cn","nx.cn","xj.cn","tw.cn","hk.cn","mo.cn","he.cn","sx.cn","nm.cn","ln.cn","cn","cc","org","biz","info","mobi","com.tw","com.hk","hk","tw","io","ac","name","pro","ws","sh","hn","edu","gov","eu","jp","travel","tv","im"],getCompatDocElement:function(){var docEle;if(document.compatMode=="BackCompat"){docEle=document.body;}else{docEle=document.documentElement;}
return docEle;},createVistorId:function(){var randomStr="";for(var i=0;i<5;i++){randomStr+=Math.floor(Math.random()*10);}
return new Date().getTime()+randomStr;},getCookie:function(sName){var aCookie=document.cookie.split('; ');for(var i=0;i<aCookie.length;i++){var aCrumb=aCookie[i].split('=');if(sName==aCrumb[0])
return unescape(aCrumb[1]);}
return'';},setCookie:function(name,value,time){var nameString=name+'='+escape(value);var expdate=new Date();if(time==null||isNaN(time))time=60*60*24*3650*1000;expdate.setTime(expdate.getTime()+time);var expiryString=' ;expires = '+expdate.toGMTString();if(time==-1)expiryString='';var path=" ;path =/";var domain="; domain="+this.getDomain(""+document.location);document.cookie=nameString+expiryString+path+domain;},getDomain:function(url){si=7;if(url.indexOf("https://")!=-1){si=8;}
url=url.substring(si,url.length);if(url.indexOf("/")==-1){url+="/";}
url=url.substring(0,url.indexOf("/"));if(url.indexOf(":")!=-1){url=url.substring(0,url.indexOf(":"));}
if(this.isIP(url)){return url;}
for(i=0;i<this.topUrl.length;i++){if($Eptone.Utils.endWith(url,this.topUrl[i])){point=1;if(this.topUrl[i].indexOf(".")){point=2;}
if(url.split(".").length==point)
return url;url=url.substring(0,url.indexOf(this.topUrl[i])-1);var index=url.lastIndexOf("\.");if(index!=-1){url=url.substring(index+1,url.length);return url+"."+this.topUrl[i];}else
return url;}}
return url;},endWith:function(str,endStr){var reg=new RegExp(endStr+"$");return reg.test(str);},trim:function(str){return str.replace(/(^\s*)|(\s*$)/g,"");},isIP:function(url){var reg=/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])(\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])){3}$/;if(reg.test(url))
return true;else
return false;},check:function(item){if(typeof(item)=="string"){return item=="true";}
return item==true;},singleEncode:function(str){var tempStr="";for(i=0;i<str.length;i++){var tempSub=str.substr(i,1);if(str.charCodeAt(i)>256)
tempStr+=tempSub;else
tempStr+=encodeURIComponent(tempSub);}
return tempStr;},winopen:function(url){window.open(url,"_blank");},javascript:function(src,options){var element=document.createElement('script');element.src=src;element.type="text/javascript";element.charset="UTF-8";Object.eptoneExtend(element,options||{});document.getElementsByTagName("head")[0].appendChild(element);return element;},css:function(src,options){var element=document.createElement("link");element.rel="stylesheet";element.rev="stylesheet";element.href=src;element.type="text/css";element.media="all";Object.eptoneExtend(element,options||{});document.getElementsByTagName("head")[0].appendChild(element);return element;}}
$Eptone.Function={bind:function(func,bind,args){return function(){return func.apply(bind,args!=undefined?args:[]);}},append:function(func,appender){var __method=func||appender;return function(){if(__method==appender){return __method();}
var result=__method();appender(arguments);return result;}}}})();
function $(el){if(typeof(el)=='string'){return document.getElementById(el);}
return el;}
(function(){function extend(destination,source){for(var property in source)
destination[property]=source[property];return destination;}
extend(Object,{extend:extend});})();(function(){var timer;function fireContentLoadedEvent(){if(document.loaded)return;if(timer)window.clearTimeout(timer);document.loaded=true;if(typeof($EptReady)=="function"){$EptReady();}}
function checkReadyState(){if(document.readyState==='complete'){document.detachEvent('onreadystatechange',checkReadyState);fireContentLoadedEvent();}}
function pollDoScroll(){try{document.documentElement.doScroll('left');}
catch(e){timer=window.setTimeout(pollDoScroll,50);return;}
fireContentLoadedEvent();}
if(document.addEventListener){document.addEventListener('DOMContentLoaded',fireContentLoadedEvent,false);}else{document.attachEvent('onreadystatechange',checkReadyState);if(window==top)
timer=window.setTimeout(pollDoScroll,50);}
window.onload=fireContentLoadedEvent;})();Object.extend(String.prototype,{getLength:function(){var text=this.replace(/[^\x00-\xff]/g,"**");return text.length;},replaceAll:function(AFindText,ARepText){return this.replace(new RegExp(AFindText,"g"),ARepText);},endWith:function(oString){var reg=new RegExp(oString+"$");return reg.test(this);},urlReplaceAll:function(s1,s2){var reg=new RegExp("([\?])","g");if(reg.test(s1)){s1=s1.replace(reg,"\\?");}
var reg1=new RegExp("([\+])","g");if(reg1.test(s1)){s1=s1.replace(reg1,"\\+");}
return this.replace(new RegExp(s1,"g"),s2);},escapeRegExp:function(){return this.replace(/([.*+?^${}()|[\]\/\\])/g,'\\$1');},trim:function(){return this.replace(/(^\s*)|(\s*$)/g,"");}});if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return"";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;
$Eptone.Vistor={syncCookie:function(){if($Eptone.Flash.isOk){var flash=$Eptone.Flash.getObject("Vistor");if(typeof(flash.set)=="function"){flash.set("ept_vistor"+user.id,browser.jsonStr);flash.set("ept_vistor_cookie"+user.id,browser.cookie);}}
$Eptone.Utils.setCookie("ept_vistor"+user.id,browser.jsonStr);$Eptone.Utils.setCookie("ept_vistor_cookie"+user.id,browser.cookie);},getCookieParam:function(){return"ept_vistor_cookie"+user.id+"="+browser.cookie;}}
function shortClick(event){if(event.keyCode=="13"&&!event.ctrlKey){if(shortcut==0){Chat.Request.SendMsgAjax.send();}
return false;}else if(event.ctrlKey&&event.keyCode=="13"){if(shortcut==1)
Chat.Request.SendMsgAjax.send();if(shortcut==0)
$("msginput").value+="\r\n";return false;}
return true;}
function enterRrturn(event){if(event.keyCode=="13"&&!event.ctrlKey){if(shortcut==0)
return false;}
else if(event.ctrlKey&&event.keyCode=="13"){if(shortcut==1)
return false;}}
function SetShorCut(tp){if(tp==0){shortcut=0;}else{shortcut=1;}
$Eptone.Utils.setCookie("shortCutName",shortcut);}
function clickInput(msg){var inputMsg=$("msginput");inputMsg.innerHTML+=msg;}
function regInput(obj,reg,inputStr){if(!document.all)return;var docSel=document.selection.createRange();if(docSel.parentElement().tagName!="INPUT")
return false;oSel=docSel.duplicate();oSel.text="";var srcRange=obj.createTextRange();oSel.setEndPoint("StartToStart",srcRange);var str=oSel.text+inputStr+srcRange.text.substr(oSel.text.length);return reg.test(str);}
function filterword1(evt){if(!document.all)return;if(evt.keyCode==13)evt.keyCode=9;}
function filterword2(evt){if(!document.all)return;if((evt.keyCode<48||evt.keyCode>57)&&evt.keyCode!=13)evt.returnValue=false;}
function filterword3(evt){if((evt.keyCode>=48&&evt.keyCode<=57)||(evt.keyCode>=65&&evt.keyCode<=90)||(evt.keyCode>=97&&evt.keyCode<=122)||evt.keyCode==13){}else{evt.returnValue=false;}}
function is_all_number(str){if(str.trim()==""){return false;}
exp=/[^0-9]/g;if(str.search(exp)!=-1){return false;}
return true;}
function is_phone(str){if(str.trim()==""){return false;}
exp=/^0([1-9][0-9]{1,2}(\-)?[2-8][0-9]{6,7})$/g;if(str.search(exp)==-1){return false;}
return true;}
function is_number(str){if(str.trim()==""){return false;}
exp=/[^0-9()-]/g;if(str.search(exp)!=-1){return false;}
return true;}
function is_email(str){if(str.trim()==""){return false;}
exp=/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/;flag=exp.test(str);　　 if(!flag){return false;}
return true;}
function getNowTime(){var now=new Date();var yy=now.getYear();if(getOs()!=1){yy=yy+1900;}
var month=now.getMonth()+1;var dd=now.getDate();var hh=now.getHours();var mm=now.getMinutes();var ss=now.getSeconds();var clock=yy+'-';if(month<10)clock+='0';clock+=month+'-';if(dd<10)clock+='0';clock+=dd+' ';if(hh<10)clock+='0';clock+=hh+':';if(mm<10)clock+='0';clock+=mm+':';if(ss<10)clock+='0';clock+=ss;return clock;}
function getOs()
{if(navigator.userAgent.indexOf("MSIE")>0)return 1;if(isFirefox=navigator.userAgent.indexOf("Firefox")>0)return 2;if(isSafari=navigator.userAgent.indexOf("Safari")>0)return 3;if(isCamino=navigator.userAgent.indexOf("Camino")>0)return 4;if(isMozilla=navigator.userAgent.indexOf("Gecko/")>0)return 5;return 0;}
function alertMsg(foralert){showAlertMsg(foralert)
$("closeAlert").focus();}
function showAlertMsg(foralert){if($("gbdqzt")!=null){$("gbdqzt").style.display="none";}
if($("showinfo")!=null){$("showinfo").style.display="none";}
$("showalert").innerHTML=foralert;$("alert_bg").style.display="block";$("msgalert").style.display="block";$("msgalert").focus();}
function cancelMa(){if($("gbdqzt")!=null){$("gbdqzt").style.display="block";}
if($("showinfo")!=null){$("showinfo").style.display="block";}
if($("msginput")!=null){$("msginput").readOnly=false;}
$("alert_bg").style.display="none";$("msgalert").style.display="none";}
function Show(id){$(id).style.display="";}
function Hide(id){$(id).style.display="none";}
function breakWord(str){var b=String.fromCharCode('8203');return str.split('').join(b);}
function selectTab(tab){$(tab).className="on";}
function addNumber(num){if($("phone_code").value==languageSet.inputNumber)
$("phone_code").value="";$("phone_code").value+=num;}
function goClear(){$("phone_code").value="";}
function back(){if($("phone_code").value==languageSet.inputNumber){$("phone_code").value="";}
var str=$("phone_code").value;if(str.length>0)
str=str.substring(0,str.length-1);$("phone_code").value=str;}
function show(eid){$(eid).style.display="";}
function showTab(target,nn){$("col1").style.display="none";if($("col2"))$("col2").style.display="none";$("col3").style.display="none";$(target).style.display="";$("n1").className="";$("n4").className="";$(nn).className="on";if(target=="col1"){var Msg_Chat=$("MsgShow");Msg_Chat.scrollTop=Msg_Chat.scrollHeight;}}
function showTarget(target){if(target=="chat"){showTab("col1","n1");}else if(target=="message"){showTab("col3","n4");if(server.state>0){$("n1").style.display="";}}}
function Bold(){if($("bold").className=="")
{$("bold").className="bechoose";$("msginput").style.fontWeight="bold";}
else
{$("bold").className="";$("msginput").style.fontWeight="normal";}}
function Em(){if($("em").className=="")
{$("em").className="bechoose";$("msginput").style.fontStyle="italic";}
else
{$("em").className="";$("msginput").style.fontStyle="normal";}}
function Strike(){if($("strike").className=="")
{$("strike").className="bechoose";$("msginput").style.textDecoration="underline";}
else
{$("strike").className="";$("msginput").style.textDecoration="none";}}
var colIn=false;function showCol(flag){var tar=$('choose-color');if(flag){colIn=true;tar.style.display='';tar.focus();}else{tar.style.display=colIn?'':'none';}}
function setColor(color){var color;$("choose-color").style.display="none";$("msginput").style.color="#"+color;$("msginput").__msg_color=color;}
function ShowStyle(flag){var sty=$('sendstyle');if(flag){styleflag=true;sty.style.display='';}else{sty.style.display=styleflag?'':'none';}}
function chgStyle(sty){if(sty==0){$("ce0").className="s2";$("ce1").className="s4";}
else{$("ce0").className="s4";$("ce1").className="s2";}
$('sendstyle').style.display="none";}
function overStyle(tp){var cln0=$("ce0").className;var cln1=$("ce1").className;if(tp==0){if(cln0=="s3")
$("ce0").className="s2";else{$("ce0").className="s1";}}
else if(tp==1){if(cln1=="s3")
$("ce1").className="s2";else{$("ce1").className="s1";}}
else if(tp==2){if(cln0=="s2")
$("ce0").className="s3";else{$("ce0").className="s4";}}
else if(tp==3){if(cln1=="s2")
$("ce1").className="s3";else{$("ce1").className="s4";}}}
function showNickname(){$("nick_name").value=browser.name;show("contain3");}
function showimg(pi){var tname=":"+pi+":";oImg=document.createElement("IMG");oImg.src="chat_style/pub/faces/"+pi+".gif";var height=oImg.height;var width=oImg.width;if(document.all){$("msginput").appendChild(oImg);}else{$("msginput").value+=tname;}
$("faces-show").style.display="none";$("face-show").style.display="none";$("msginput").focus();}
function clearInput(id,reg){var textValue=$(id).value;var str=/(^\d+$)|(^\d+-$)|(^\d+-\d+$)/;if(reg)str=reg;if(!str.test(textValue))
$(id).value="";}
function showFace(flag){var pop=$('faces-show');if(flag){faceflag=true;pop.style.display='';}else{pop.style.display=faceflag?'':'none';}}
function rl(pi,n){var faceStyle=$("face-show").style;if(n==1){faceStyle.right="1px";faceStyle.left="";}else{faceStyle.left="1px";faceStyle.right="";}
faceStyle.display="";faceStyle.background="#fff url(chat_style/pub/faces/"+pi+".gif) center no-repeat";}
function showGroup(flag,n){if($("side")){var pop=$('groupNames');if(flag){groupflag=true;if(n==1){if(pop.style.display=='')
pop.style.display='none';else
pop.style.display='';}}else{pop.style.display=groupflag?'':'none';}}}
function showGn(id){$(id).className="on";}
function hideGn(id){$(id).className="";}
function selType(id,name){$("telG").value=id;$("selName").innerHTML=name;$("groupNames").style.display="none";}
var adPlayer={isIE:document.all,div:null,time1:6000,time2:30,timer1:null,timer2:null,word:"",index:0,opacity:1,value:0.05,isShow:false,init:function(addiv){this.div=addiv;},start:function(){if(source.ads.length<1)return;this.setAd();this.div.innerHTML=this.word;if(source.ads.length<2)return;this.next();},next:function(){this.timer1=window.setTimeout("adPlayer.play()",this.time1);},play:function(){if(this.opacity<=0){this.index=(this.index+1>=source.ads.length)?0:this.index+1;this.setAd();this.div.innerHTML=this.word;this.isShow=true;}
this.opacity=this.isShow?(this.opacity+this.value):(this.opacity-this.value);this.timer2=window.setTimeout("adPlayer.changeOpacity()",this.time2);},setAd:function(){var sdd=source.ads[this.index].content;if(sdd.getLength()>32)sdd=source.ads[this.index].content.substring(0,16);this.word="<a href='"+source.ads[this.index].href+"' title='"+source.ads[this.index].content+"' target='blank'><font color='"+source.ads[this.index].color+"'>"+sdd+"</font></a><br>";},changeOpacity:function(){if(this.isIE){this.div.filters.alpha.opacity=this.opacity*100;}else{this.div.style.MozOpacity=this.opacity;}
if(this.opacity>=1){this.isShow=false;this.next();}else{this.play();}}}
var imgPlay={div:"show-pic",target:1,nowFrame:0,nextFrame:0,backChange:1,showChange:0,active:0,target:-1,change:0,isIE:document.all,timer1:null,timer2:null,init:function(){var str="";str+="<a href='"+source.picture[0].href+"' target='_blank' title='"+source.picture[0].title+"' id='imgHref' >"
+"<img id='backImg' style='"+(this.isIE?"filter:alpha(opacity=100)":"-moz-opacity:1")+"' width='518' height='60' src='"+source.picture[0].fileurl+"' onerror=\"this.src='pic1.gif'\"></img>";if(source.picture.length>1)
str+="<img  style='"+(this.isIE?"filter:alpha(opacity=0)":"-moz-opacity: 0")+"' id='showImg' width='518' height='60' src='"+source.picture[1].fileurl+"' onerror=\"this.src='pic1.gif'\"></img>";str+="</a>";$(this.div).innerHTML=str;if(source.picture.length>1){$("li0").className="on";this.play();}},changeOpacity:function(){this.change=1;if((this.active==1&&this.backChange<=0)||(this.active==0&&this.backChange>=1)){clearInterval(this.timer1);$("imgHref").href=source.picture[this.nextFrame].href;$("imgHref").title=source.picture[this.nextFrame].title;this.setOn();if(this.target==-1){this.timer2=setTimeout("imgPlay.next()",4000);}else
imgPlay.next();this.change=0;return;}
if(this.active==1){this.backChange-=0.05;this.showChange+=0.05;}else{this.backChange+=0.05;this.showChange-=0.05;}
if(this.isIE){$("backImg").filters.alpha.opacity=this.backChange*100;$("showImg").filters.alpha.opacity=this.showChange*100;}else{$("backImg").style.MozOpacity=this.backChange;$("showImg").style.MozOpacity=this.showChange;}},setOn:function(){for(i=0;i<source.picture.length;i++){$("li"+i).className="";}
$("li"+this.nextFrame).className="on";},next:function(){this.nowFrame=this.nextFrame;clearInterval(this.timer1);if(this.target==-1)
this.nextFrame=(this.nextFrame<(source.picture.length-1))?this.nextFrame+1:0;else
this.nextFrame=this.target;this.target=-1;this.active=this.active==1?0:1;if(this.active==1){$("showImg").src=source.picture[this.nextFrame].fileurl;}else{$("backImg").src=source.picture[this.nextFrame].fileurl;}
this.timer1=setInterval("imgPlay.changeOpacity()",20);},play:function(){if(source.picture.length<=1)return;setTimeout("imgPlay.next()",4000);},to:function(frame){this.target=frame;if(this.change==0){clearTimeout(this.timer2);this.next();}
if(this.change==1){this.next();}}}
var Shower=function(trigger,pannel){this._initialize(trigger,pannel);}
Object.extend(Shower.prototype,{_initialize:function(trigger,pannel){this.trigger=$(trigger);this.pannel=$(pannel);this.trigger.onclick=$Eptone.Function.bind(this.toggle,this);this.trigger.onmouseover=function(){this.__isOver=true;}
this.trigger.onmouseout=function(){this.__isOver=false;}
this.pannel.onmouseover=function(){this.__isOver=true;}
this.pannel.onmouseout=function(){this.__isOver=false;}},show:function(){this.isShow=true;this.pannel.style.display="";},hide:function(){this.isShow=false;this.pannel.style.display="none";},close:function(){if(this.trigger.__isOver||this.pannel.__isOver){return;}
this.hide();},toggle:function(){if(this.isShow){this.hide();}else{this.show();}
return false;}});var SelectBox=function(selector,shower,options){this.options={classOver:"on",classOut:"",effect:"SPAN",onCheck:false}
Object.extend(this.options,options||{});this.selector=$(selector);this.shower=$(shower);this.option=this.selector.getElementsByTagName("UL")[0];this.initialize();}
Object.extend(SelectBox.prototype,Shower.prototype);Object.extend(SelectBox.prototype,{initialize:function(){this._initialize(this.shower,this.option);this.value=0;var _this=this;var options=this.allOption=this.option.getElementsByTagName(this.options.effect);var overFunc=typeof(this.options.classOver)=="function"?this.options.classOver:function(){this.parentNode.className=_this.options.classOver;}
var outFunc=typeof(this.options.classOut)=="function"?this.options.classOut:function(){this.parentNode.className=_this.options.classOut;}
for(var i=0;i<options.length;i++){var option=options[i];option.onmouseover=overFunc;option.onmouseout=outFunc;option.onclick=$Eptone.Function.bind(this.select,this,[option]);}},set:function(value){for(var i=0;i<this.allOption.length;i++){var option=this.allOption[i];if(option.getAttribute("value")==value){this.select(option);break;}}
return this;},select:function(ele){this.checkEle=ele;var value=this.value=ele.getAttribute("value");var label=this.getLabel();this.shower.innerHTML=label;this.hide();if(this.options.onCheck){$Eptone.Function.bind(this.options.onCheck,this,[ele,value,label])();}},getLabel:function(){var hasChildren=this.checkEle.getElementsByTagName("SPAN").length>0;if(hasChildren){return this.checkEle.getElementsByTagName("SPAN")[0].innerHTML;}
return this.checkEle.innerHTML;}});var shortcut=0;if($Eptone.Utils.getCookie("shortCutName")!=null&&$Eptone.Utils.getCookie("shortCutName")!="")
shortcut=$Eptone.Utils.getCookie("shortCutName");
var tname;var telGid=0;var Chat={message:{"oldMsg":"","original":"","inputting":"","sendMsg":"","showMsg":""},getMessage:function(){var original,sendMsg,showMsg;if(document.all){original=$("msginput").innerHTML.trim();}else{original=$("msginput").value.trim();}
var isInputing=(this.message.oldMsg!=original);Object.extend(this.message,{"original":original,"inputting":isInputing});if(isInputing){if(document.all){sendMsg=Chat.Faces.img2key(original).replaceAll('&lt;','<').replaceAll('&gt;','>').replaceAll('&amp;','&');showMsg=Chat.Faces.key2img(original);}else{sendMsg=original;showMsg=Chat.Faces.key2img(original.replaceAll('&','&amp;').replaceAll('<','&lt;').replaceAll('>','&gt;'));}
Object.extend(this.message,{"oldMsg":original,"sendMsg":sendMsg,"showMsg":showMsg});}
return this.message;},showSysMsg:function(message,options){options=options||{};var behind=options.behind||"";var isAlert=options.alert||false;var prefix=isAlert?languageSet.systemAlert:"";$("MsgShow").innerHTML+="<dt class='sys'>"+prefix+message+"</dt>"+behind;$("MsgShow").scrollTop=$("MsgShow").scrollHeight;}}
Chat.AjaxObject=function(){var xmlhttp_request=false;try{if(netscape.security.PrivilegeManager.enablePrivilege){netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserRead');}}catch(ex){}
try{if(window.ActiveXObject){for(var i=5;i;i--){try{if(i==2){xmlhttp_request=new ActiveXObject("Microsoft.XMLHTTP");}else{xmlhttp_request=new ActiveXObject("Msxml2.XMLHTTP."+i+".0");xmlhttp_request.setRequestHeader("Content-Type","text/xml");xmlhttp_request.setRequestHeader("Content-Type","UTF-8");}
break;}
catch(e){xmlhttp_request=false;}}}else if(window.XMLHttpRequest){xmlhttp_request=new XMLHttpRequest();if(xmlhttp_request.overrideMimeType){xmlhttp_request.overrideMimeType('text/xml');}}}catch(e){xmlhttp_request=false;}
return xmlhttp_request;}
Chat.AjaxRequest=function(options){this.ajaxObj=new Chat.AjaxObject();this.options={url:'',method:'get',async:true,encoding:'UTF-8',contentType:'application/x-www-form-urlencoded',data:'',noCache:true,prepare:false}
Object.extend(this.options,options||{});if(this.options.prepare){this.options.prepare=$Eptone.Function.bind(this.options.prepare,this);}}
Object.extend(Chat.AjaxRequest.prototype,{send:function(options){if(this.running)return;if(this.options.prepare&&this.options.prepare()==false)return;this.running=true;var old=this.options;options=Object.extend({data:old.data,url:old.url,method:old.method},options);var data=options.data,url=options.url,method=options.method;if(this.options.noCache){var noCache='noCache='+new Date().getTime();data=(data)?noCache+'&'+data:noCache;}
if(data&&method=='get'){url=url+(url.indexOf('?')>-1?'&':'?')+data;data=null;}
this.ajaxObj.open(method,url,this.options.async);this.ajaxObj.setRequestHeader("Content-Type",this.options.contentType+"; charset="+this.options.encoding);this.ajaxObj.onreadystatechange=$Eptone.Function.bind(this.onStateChange,this);this.ajaxObj.send(data);},onStateChange:function(){if(this.ajaxObj.readyState!=4||!this.running)return;this.running=false;this.status=this.ajaxObj.status;var json;try{json=eval('('+this.ajaxObj.responseText+')');}catch(e){}
var response={"json":json,"text":this.ajaxObj.responseText,"xml":this.ajaxObj.responseXML};if(!this.handleResponse(response)){if(this.options.onHandleError){$Eptone.Function.bind(this.options.onHandleError,this,[response])();}
return;}
if(this.options.onComplete){$Eptone.Function.bind(this.options.onComplete,this,[response])();}
if(this.isSuccess()){if(this.options.onSuccess){$Eptone.Function.bind(this.options.onSuccess,this,[response])();}}else{if(this.options.onFailure){$Eptone.Function.bind(this.options.onFailure,this,[response])();}}},isSuccess:function(){return((this.status>=200)&&(this.status<300));},handleResponse:function(response){try{var json=response.json;if(typeof json.code=="number"&&json.code<=-100){return false;}}catch(e){}
return true;}});Chat.AjaxIFrame=function(form,options){this.options={}
Object.extend(this.options,options||{});this.form=$(form);this.form.onsubmit=$Eptone.Function.bind(function(){return Chat.AIM.submit(this.form,this.options);},this);}
Chat.AIM={frame:function(options){var wrapperId=options.id||new Date().getTime();var wrapper=document.getElementById(wrapperId);if(!wrapper){wrapper=document.createElement('DIV');wrapper.id=wrapperId;}
var id="f"+wrapperId;wrapper.innerHTML='<iframe style="display:none" src="about:blank" id="'+id+'" name="'+id+'" onload="Chat.AIM.loaded(\''+id+'\')"></iframe>';document.body.appendChild(wrapper);var iframe=document.getElementById(id);if(options&&typeof(options.onComplete)=='function'){iframe.onComplete=options.onComplete;}
return id;},form:function(f,name){f.setAttribute('target',name);},submit:function(f,options){Chat.AIM.form(f,Chat.AIM.frame(options));if(options&&typeof(options.onStart)=='function'){return options.onStart();}else{return true;}},loaded:function(id){var iframe=document.getElementById(id);if(iframe.contentDocument){var doc=iframe.contentDocument;}else if(iframe.contentWindow){var doc=iframe.contentWindow.document;}else{var doc=window.frames[id].document;}
if(doc.location.href=="about:blank"){return;}
var html=doc.body.innerHTML;var json;try{json=eval('('+html+')');}catch(e){}
var response={"json":json,"text":html};if(typeof(iframe.onComplete)=='function'){iframe.onComplete(response);}}}
var imgArray=[":cool:",":laugh:",":groping:",":sweat:",":hide-smile:",":fool:",":contempt:",":making-face:",":tired:",":smile:",":puzzled:",":sorrow:",":poor:",":fool-smile:",":kiss:",":sleeping:",":soldier:",":ignore:",":epistaxis:",":panic:",":bad:",":vomiting:",":shut-up:",":diving:"];Chat.Faces={faces:[":cool:",":laugh:",":groping:",":sweat:",":hide-smile:",":fool:",":contempt:",":making-face:",":tired:",":smile:",":puzzled:",":sorrow:",":poor:",":fool-smile:",":kiss:",":sleeping:",":soldier:",":ignore:",":epistaxis:",":panic:",":bad:",":vomiting:",":shut-up:",":diving:"],getReg:function(face){var reg=new RegExp("<IMG[^>]+chat_style\\/pub\\/faces\\/"+face.substring(1,face.length-1)+".gif[^<]+>","g");return reg;},img2key:function(msg){for(i=0;i<this.faces.length;i++){msg=msg.replace(this.getReg(this.faces[i]),this.faces[i]);}
return msg;},key2img:function(msg){for(i=0;i<this.faces.length;i++){msg=msg.replaceAll(this.faces[i],"<IMG src=\"chat_style/pub/faces/"+this.faces[i].substring(1,this.faces[i].length-1)+".gif\">");}
return msg;}}
Chat.Observer={start:function(){this.timer1=window.setTimeout("Chat.Observer.overtime(1)",1800000);this.timer2=window.setTimeout("Chat.Observer.overtime(2)",2400000);},stop:function(){clearInterval(this.timer1);clearInterval(this.timer2);},restart:function(){this.stop();this.start();},overtime:function(type){if(type==1){alertMsg(languageSet.waitLongly);}else{Chat.showSysMsg(languageSet.waitLongly1);server.state=0;chat.disableChat();Chat.Request.CloseAjax.send();alert(languageSet.waitLongly1);}}}
Chat.Request={init:function(){this.initUploadFile();},initUploadFile:function(){new Chat.AjaxIFrame("uploadForm",{id:"_upload_file",onStart:function(){$('filelang').value=user.lang;},onComplete:function(response){var result=response.json;if(!result){return;}
if(result.code==0){alertMsg(result.msg);return;}
$('contain4').style.display="none";Chat.showSysMsg(result.msg);}});},getUSB:function(){return"u_i="+user.id+"&s_i="+server.id+"&b_i="+browser.id;},getChatUrl:function(method){return"/chat/chat.do?method="+method+"&"+Chat.Request.getUSB()+"&pageId="+browser.pageId;},getCallUrl:function(method){return"/call/call.do?method="+method+"&"+Chat.Request.getUSB();},CloseAjax:new Chat.AjaxRequest({prepare:function(){if(!browser.living||this.isClosed)return false;Chat.Request.SyncMsgAjax.stopResponseTimer();Chat.Request.SyncMsgAjax.stopTimer();var url=Chat.Request.getChatUrl("close")+"&isbother="+browser.isBother;this.options.url=url;},onSuccess:function(){this.isClosed=true;}}),SyncMsgAjax:new Chat.AjaxRequest({init:function(){var _this=Chat.Request.SyncMsgAjax;_this.initialized=true;_this.errorCounter=0;_this.handleBusy=function(){this._server_busy=true;Chat.showSysMsg(languageSet.systemBusy,{alert:true});chat.disableChat();};_this.handleIdle=function(){this._server_busy=false;chat.enableChat();};_this.startResponseTimer=function(){this.busyTimer=window.setTimeout("Chat.Request.SyncMsgAjax.handleBusy()",60000);};_this.stopResponseTimer=function(){if(this.busyTimer)window.clearTimeout(this.busyTimer);};_this.stopTimer=function(){if(this.timer)window.clearTimeout(this.timer);};},prepare:function(){var submitURL=Chat.Request.getChatUrl("sync");var message=Chat.getMessage();if(message.inputting){var sendMsg=message.sendMsg;submitURL+="&input=1&sendMsg="+encodeURIComponent(sendMsg.substr(0,200));}
this.options.url=submitURL;if(!this.initialized)this.options.init();this.startResponseTimer();},onComplete:function(){this.stopResponseTimer();this.timer=window.setTimeout("Chat.Request.SyncMsgAjax.send()",2000);},onSuccess:function(response){var result=response.json
var newServer=result.server;if(server.state!=newServer.state){server.state=newServer.state;if(newServer.state==0){server.offline();Chat.showSysMsg(languageSet.serverOffline,{alert:true});}else{server.online();}}
if(newServer.serverChanged&&server.id!=newServer.id){server.change(newServer);var chgMsg=languageSet.serverChange();Chat.showSysMsg(chgMsg,{alert:true});}
server.inputState=newServer.inputState;if(server.inputState==1){$("showInput").className="inputing";document.title=languageSet.inputting();}else{$("showInput").className="";document.title=languageSet.title();}
var fin=false;if(document.all&&document.activeElement.id=="msginput")fin=true;for(var i=0;i<result.messages.length;i++){var msg=result.messages[i];var content=Chat.Utils.urlReplace(msg.content);$("MsgShow").innerHTML+="<dt class='"+($Eptone.Utils.check(msg.serverMsg)?"kf":"")+"'>"
+msg.sender+"  "+msg.date+"</dt>\r\n<dd><pre><span style='"+Chat.Utils.parseStyle(msg.style)
+"'>"+Chat.Faces.key2img(content)+"</span></pre></dd>";$("MsgShow").scrollTop=$("MsgShow").scrollHeight;$("showInput").className="";document.title=languageSet.title();if(fin){var obj=$("msginput");var r=obj.createTextRange();r.moveStart('character',obj.value.length);r.collapse(true);r.select();}}
this.errorCounter=0;if(this._server_busy)this.handleIdle();},onFailure:function(){this.errorCounter++;if(this.errorCounter>4){Chat.showSysMsg(languageSet.connectFail,{alert:true});this.stopTimer();chat.disableChat();}},onHandleError:function(response){var result=response.json;if(result.code==-102){Bother.loathe();return;}else if(result.code==-104){Chat.showSysMsg(languageSet.waitLongly2);}else{Chat.showSysMsg(languageSet.waitLongly3);}
browser.living=false;this.stopResponseTimer();chat.disableChat();return;}}),SendMsgAjax:{send:function(){if(!chat.isLiving)return;this.ajax=this.createAjax();this.ajax.send();$("msginput").focus();},createAjax:function(){return new Chat.AjaxRequest({method:"post",prepare:function(){var msgStyle="";var msg_fw=$("msginput").style.fontWeight;if(msg_fw=="")msg_fw="normal";if(msg_fw=="normal")msgStyle+="0";else msgStyle+="1";var msg_fs=$("msginput").style.fontStyle;if(msg_fs=="")msg_fs="normal";if(msg_fs=="normal")msgStyle+="0";else msgStyle+="1";var msg_td=$("msginput").style.textDecoration;if(msg_td=="")msg_td="none";if(msg_td=="none")msgStyle+="0";else msgStyle+="1";var msg_fz=chat.fontSizeSelector.value;msgStyle+=msg_fz;var msg_cl=$("msginput").__msg_color;if(!msg_cl)msg_cl="000000";msgStyle+=msg_cl;var temp_msgStyle="font-weight:"+msg_fw+";font-style:"+msg_fs+";text-decoration:"+
msg_td+";color:#"+msg_cl+";font-size:"+msg_fz+"px; font-family:"+
chat.fontFamilySelector.getLabel();msgStyle=encodeURIComponent(msgStyle);var message=Chat.getMessage();var temp_msg=message.showMsg;var send_msg=message.sendMsg;if(send_msg.getLength()>1200){Chat.showSysMsg(languageSet.error.sendLongly);return false;}
var msg=encodeURIComponent(send_msg);if(msg.replaceAll("%0D%0A","")==""||msg.trim()==""){Chat.showSysMsg(languageSet.error.sendNull);document.online_msg.msginput.value="";return false;}
var talktime=getNowTime();browser_name=browser.name.replaceAll("<","&lt;");browser_name=browser_name.replaceAll(">","&gt;");this.message=temp_msg;$("MsgShow").innerHTML+="<dt>"+browser_name+"  "+talktime+"</dt>\r\n<dd><pre><span style='"+temp_msgStyle+"'>"+temp_msg+"</span></pre></dd>";$("MsgShow").scrollTop=$("MsgShow").scrollHeight;this.options.url=Chat.Request.getChatUrl("send")+"&type=0&style="+msgStyle+"&font="+chat.fontFamilySelector.value;this.options.data="content="+msg;$("msginput").innerHTML="";document.online_msg.msginput.value="";$("inputvalue").value="";},onSuccess:function(response){var server=response.json;var state=server.state;var options={alert:true};if(state==0){Chat.showSysMsg(languageSet.serverOffline,options);}else if(state==2||state==4){Chat.showSysMsg(languageSet.serverNotHere,options);}else if(state==3){var reply=server.reply||languageSet.serverBussiness;Chat.showSysMsg(reply,options);}
Chat.Observer.restart();},onFailure:function(){Chat.showSysMsg(this.message+" "+languageSet.sendFail);}});}},TransferAjax:(new function(){this.ajax=new Chat.AjaxRequest({onSuccess:function(response){var result=response.json;var code=result.code;$("loading").style.display="none";if(code==-1)return;var newServer=result.server;var ollState=server.state;server.id=newServer.id;server.state=newServer.state;server.groupName=tname;if(code==0){server.offline();Chat.showSysMsg(languageSet.offLineChange,{alert:true});}else{chat.enableChat();server.change(newServer);Chat.showSysMsg(languageSet.changeServerOK+tname,{alert:true,behind:"<dt>"+languageSet.serverName()+"：</dt>\r\n<dd>"+languageSet.welcomeText()+"</dd>"});}}});this.send=function(typeId,typeName){if(!browser.living)return;tname=typeName;telGid=typeId;$("loading").style.display="";this.ajax.send({url:Chat.Request.getChatUrl("transfer")+"&g_i="+typeId});}}),RenameAjax:new Chat.AjaxRequest({method:"post",prepare:function(){var name=$("nick_name").value.trim();if(name==""){alertMsg(languageSet.error.nicknameNull);$("nick_name").focus();return false;}else if(name.length>40){alertMsg(languageSet.error.nicknamLongly);return false;}
this.options.url=Chat.Request.getChatUrl("rename")+"&b_n="+encodeURIComponent(name);return true;},onSuccess:function(response){var result=response.json;var name=result.name;Hide($('contain3'));$("name").value=browser.name=name;browser.jsonStr=result.vistorJSON;$Eptone.Vistor.syncCookie();alertMsg(languageSet.updateSuccess);}}),LeaveAjax:new Chat.AjaxRequest({method:"post",prepare:function(){var l_type=0;if(document.msgForm.msgType[1].checked)
l_type=1;var l_name=$("name").value.trim();if(l_name==""){alertMsg(languageSet.error.nicknameNull);return false;}else if(l_name.length>40){alertMsg(languageSet.error.nicknamLongly);return false;}
var l_tel=$("phone").value.trim();var l_email=$("email").value.trim();if(l_tel==""&&l_email==""){alertMsg(languageSet.error.ETNullErr);return false;}
var reg=/^[0-9-]+$/;if(l_tel!=""&&!reg.test(l_tel)){alertMsg(languageSet.error.numErr);return false;}
if(l_email!=""&&!is_email(l_email)){alertMsg(languageSet.error.emailErr);return false;}
var accuseMsg=$("msgContent");if(accuseMsg.value.trim()==""){accuseMsg.focus();alertMsg(languageSet.error.msgNull);return false;}else if(accuseMsg.value.trim().getLength()>1200){alertMsg(languageSet.error.msgLongly);return false;}
var submitURL=Chat.Request.getChatUrl("leave")+"&type="+l_type+"&tel="+l_tel+"&email="+l_email+"&content="+encodeURIComponent(accuseMsg.value)+"&name="+encodeURIComponent(l_name);this.options.url=submitURL;},onSuccess:function(){alertMsg(languageSet.submitSuccess);}}),ScoreAjax:new Chat.AjaxRequest({prepare:function(){var score=2;if($("bad").checked)score=0;else if($("medium").checked)score=1;this.options.url=Chat.Request.getChatUrl("score")+"&score="+score;},onSuccess:function(){alertMsg(languageSet.submitSuccess);}}),CallAjax:new Chat.AjaxRequest({prepare:function(){var number=$("phone_code").value.trim();if(!Chat.Validator.isMobile(number)){if(number==""){alertMsg(languageSet.error.numNull);return false;}
number=Chat.Utils.getPhone(number.replace("-",""));if(number==""){alertMsg(languageSet.error.numErr1);return false;}}
var v_code;if(user.isValiset==0)
v_code=$("v_code").value.trim();else
v_code=$("secret_code").value.trim();if(v_code==""){alertMsg(languageSet.error.checkNumErr);return false;}
var telG=$("telG").value;if(user.isShowGroup==1&&telG==0){alertMsg(languageSet.consultHead);return false;}
this.options.url=Chat.Request.getCallUrl("call")+"&lang="+user.lang+"&tel="+number+"&vcode="+v_code+"&g_i="+server.groupId+"&telG="+telG+"&valiset="+user.isValiset;},onSuccess:function(response){var result=response.json;alertMsg(result.reason);if(user.isValiset==0){$("validateImg").src=$("validateImg").src+'&'+new Date().getTime();}
Chat.Observer.restart();}}),LangAjax:new $Eptone.AjaxScript({id:"langjs",noCache:false,prepare:function(options){var lang=this.language=options.language;var langJs="cn.js";if(lang==1)langJs="en.js";else if(lang==2)langJs="big5.js";this.options.url="lang/"+langJs;},onSuccess:function(){user.lang=this.language;$("cssUrl").href=languageSet.css();document.title=languageSet.title();$("logo").alt=languageSet.logoAlt();$("inquire").innerHTML=languageSet.inquire;$("message").innerHTML=languageSet.message;$("language").className=languageSet.language;$("language").title=languageSet.otherLanguage;$("infoPromt").innerHTML=languageSet.infoPromt;$("closeAlert").innerHTML=languageSet.closeAlert;$("inquireTab").innerHTML=languageSet.inquire;if($("consultHead"))$("consultHead").innerHTML=languageSet.consultHead;if($("consultEnd"))$("consultEnd").innerHTML=languageSet.consultEnd;$("telling").innerHTML=languageSet.telling();$("telling").title=languageSet.telling();$("bold").title=languageSet.bold;$("em").title=languageSet.em;$("strike").title=languageSet.strike;$("color").title=languageSet.color;$("clear").title=languageSet.clearScreen;$("msgData").innerHTML=languageSet.msgData;$("sendmsg").innerHTML=languageSet.sendmsg;$("ce0").innerHTML=languageSet.sendEnter;$("ce1").innerHTML=languageSet.sendCtrl;$("modifyNickname").innerHTML=languageSet.modifyNickname;if($("contain")!=undefined){$("namecard").innerHTML=languageSet.namecard;$("serverInfo").innerHTML=languageSet.serverInfo;$("serverName").innerHTML=languageSet.server_name();$("serverEmail").innerHTML=languageSet.serverEmail();$("serverTel").innerHTML=languageSet.serverTel();$("serverIntro").innerHTML=languageSet.serverIntro();}
$("modifyNickname").innerHTML=languageSet.modifyNickname;$("nickname").innerHTML=languageSet.modifyNickname;$("inputNickName").innerHTML=languageSet.inputNickName;$("nickNameSubmit").innerHTML=languageSet.submit;$("msgData1").innerHTML=languageSet.msgData;$("downloadData").innerHTML=languageSet.downloadData;$("close").innerHTML=languageSet.close;$("path").innerHTML=languageSet.path;$("ul").innerHTML=languageSet.upload;$("remind").innerHTML=languageSet.remind;$("uploadtitle").innerHTML=languageSet.uploadtitle;$("face").title=languageSet.facetitle;$("file").title=languageSet.filetitle;$("type").innerHTML=languageSet.type;$("msgTab").innerHTML=languageSet.msgTab;$("msgMsg").innerHTML=languageSet.msgMsg;$("suggestionMsg").innerHTML=languageSet.suggestionMsg;$("msgName").innerHTML=languageSet.msgName;$("msgPhone").innerHTML=languageSet.msgPhone;$("msgEmail").innerHTML=languageSet.msgEmail;$("content").innerHTML=languageSet.content;$("msgSubmit").innerHTML=languageSet.submit;$("overallMerit").innerHTML=languageSet.overallMerit;$("goodMsg").innerHTML=languageSet.good;$("mediumMsg").innerHTML=languageSet.medium;$("badMsg").innerHTML=languageSet.bad;$("scoreSubmit").innerHTML=languageSet.submit;$("score4Server").innerHTML=languageSet.score4Server;if($("side")!=undefined){$("freeCallAlt").innerHTML=languageSet.freeCallAlt;$("phone_code").value=languageSet.inputNumber;if(user.isValiset==0){$("v_code").title=languageSet.nosee;$("v_code").value=languageSet.identifyingCode;}else{$("pw").innerHTML=languageSet.password;}
$("makeCall").innerHTML=languageSet.makeCall;$("callTxt").innerHTML=languageSet.freeCallText();$("format").innerHTML=languageSet.format;$("telFormat").innerHTML=languageSet.telFormat;$("mobileFormat").innerHTML=languageSet.mobileFormat;$("noticeT").innerHTML=languageSet.noticeT;$("noticeContent").innerHTML=languageSet.noticeContent;$("selName").innerHTML=(server.groupName==null)?languageSet.changeServer:server.groupName;if($("spanid0"))$("spanid0").innerHTML=languageSet.changeServer;}
$("language_a").innerHTML=languageSet.lang;$("language_a").title=languageSet.langVesion;}})}
Chat.Record={isLoading:false,getUrl:function(method){return"/chat/record.do?method="+method+"&"+Chat.Request.getUSB();},HistoryAjax:new Chat.AjaxRequest({prepare:function(){$("contain2").style.display="";if(!chat.isLiving){return false;}
this.options.url=Chat.Record.getUrl("html");},onSuccess:function(response){var result=response.json;var allmsg=result.record;if(allmsg==""){allmsg="<dt>"+languageSet.dataNull+"</dt>";}
$("history").innerHTML=Chat.Faces.key2img(Chat.Utils.recordChg(allmsg));}}),download:function(){this.isLoading=true;document.download.action=Chat.Record.getUrl("text");document.download.submit();this.isLoading=false;}}
Chat.Utils={parseStyle:function(style){var html="";if(style.bold=="true"){html+="font-weight:bold;";}else{html+="font-weight:normal;";}
if(style.italic=="true"){html+="font-style:italic;";}else{html+="font-style:normal;";}
if(style.underline=="true"){html+="text-decoration:underline;";}else{html+="text-decoration:none;";}
html+="font-size:"+style.size+"px; color:#"+style.color+"; font-family:"+style.fontFamily+";";return html;},recordChg:function(msg){var r=/(<span.*>)(.*)(<\/span>)/gm;var strarr=msg.split("</pre></dd>");var result="";for(i=0;i<strarr.length;i++){if(r.exec(strarr[i])){var bin=strarr[i].indexOf(">",strarr[i].indexOf("<span"))+1;var ein=strarr[i].lastIndexOf("</span>");var content=strarr[i].substring(bin,ein);var temp=RegExp.$1+this.parseUrl(content)+RegExp.$3
result+=strarr[i].replace(r,temp);}else{result+=strarr[i];}
if(i<(strarr.length-1))result+="</pre></dd>";}
return result;},parseUrl:function(msg){msg=msg.replaceAll("<","&lt;");msg=msg.replaceAll(">","&gt;");var reg0=/^\[url\](.+)\[\/url]$/;var reg1=/^\[url\](.+)\[\/url](.+)$/;if(reg0.test(msg)){msg="<a href='"+RegExp.$1+"' target=_blank>点击下载</a>";}else if(reg1.test(msg)){msg="<a href='"+RegExp.$1+"' target=_blank>点击下载</a>"+RegExp.$2;}
return msg;},urlReplace:function(msg){msg=msg.replaceAll("<","&lt;");msg=msg.replaceAll(">","&gt;");var reg0=/^\[url\](.+)\[\/url]$/;var reg1=/^\[url\](.+)\[\/url](.+)$/;var reg2=/^\[img\](.+)\[\/img]$/;if(reg2.test(msg)){msg="<a href='"+RegExp.$1+"' target='_blank'><img src='"+RegExp.$1+"' /></a>";}else if(reg0.test(msg)){var filenames=RegExp.$1.split('/');msg="<a href='"+RegExp.$1+"' target=_blank>点击下载</a>&lt;"+filenames[filenames.length-1]+"&gt;";}else if(reg1.test(msg)){msg="<a href='"+RegExp.$1+"' target=_blank>点击下载</a>"+RegExp.$2;}else{var reg=RegExp("([hH]{1}[tT]{2}[pP]{1}:\/\/[:+!%=&@_A-Za-z0-9\-\.\/\?]+|[wW]{3}\.[:+!%=&@_A-Za-z0-9\-\.\/\?]+)(\s*)");var strtemp=msg;var repArray=new Array();var tempArray=new Array();var n=0;while(reg.test(strtemp)){var tempRep=RegExp.$1;var reg1=new RegExp("[hH]{1}[tT]{2}[pP]{1}:\/\/","g");var temp="http://"+tempRep.replace(reg1,"");var temp="<a href=\""+temp+"\" target=\"_blank\">"+temp+"</a>";var i=n++;repArray[i]=tempRep;tempArray[i]=temp;strtemp=strtemp.urlReplaceAll(tempRep,"");}
for(i=0;i<repArray.length;i++){msg=msg.urlReplaceAll(repArray[i],tempArray[i]);}}
return msg;},parseImg:function(msg){var reg0=/^\[img\](.+)\[\/img]$/;if(reg0.test(msg)){msg="<a href='"+RegExp.$1+"' target='_blank'><img src='"+RegExp.$1+"' /></a>";}
return msg;},getPhone:function(str){exp=/^010[2-9]\d{7}$/g;if(str.search(exp)!=-1){return str.substring(0,3)+"-"+str.substring(3,str.length);}
exp=/^02[0-9][2-9]\d{6,7}$/g;if(str.search(exp)!=-1){return str.substring(0,3)+"-"+str.substring(3,str.length);}
exp=/^0[3-9]\d{2}[2-9]\d{6,7}$/g;if(str.search(exp)!=-1){return str.substring(0,4)+"-"+str.substring(4,str.length);}
return"";},filterword2:function(evt){if(!document.all)return;if((evt.keyCode<48||evt.keyCode>57)&&evt.keyCode!=13)evt.returnValue=false;}}
Chat.Validator={isMobile:function(str){if(str.trim()==""){return false;}
exp=/^(13|15|18|19)([0-9]{9})$/g;if(str.search(exp)==-1){return false;}
return true;}}
var Bother={isBother:function(){if($Eptone.Flash.install){var result=$Eptone.Flash.getObject("Vistor").get("bother");if(result=="true"){return true;}}
result=$Eptone.Utils.getCookie("bother"+user.id);if(result=="true"&&$Eptone.Flash.install)$Eptone.Flash.getObject("Vistor").set("bother",true);return(result=="true")?true:false;},loathe:function(){browser.isBother=1;if($Eptone.Flash.install){$Eptone.Flash.getObject("Vistor").set("bother","true");}
$Eptone.Utils.setCookie("bother"+user.id,"true");setTimeout(function(){Bother.redirect();},50);},redirect:function(){var ephome="http://www.qihuatong.com/";if(window.top)
window.top.location.href=ephome;else
window.location.href=ephome;}}