var MT=window.MT||{};MT.namespace=function(){var a=arguments,o=null,i,j,d;for(i=0;i<a.length;++i){d=a[i].split(".");o=MT;for(j=(d[0]=="MT")?1:0;j<d.length;++j){o[d[j]]=o[d[j]]||{};o=o[d[j]];}}return o;};MT.namespace("lang","util","app","widget","system","module");(function(){var $C=YAHOO.util.Connect;var $D=YAHOO.util.Dom;var $E=YAHOO.util.Event;var _9=YAHOO.util.CustomEvent;var _a=YAHOO.util.KeyListener;var _b=YAHOO.env.ua.ie;var _c=(_b==6);var _d=YAHOO.env.ua.gecko;var _e=YAHOO.env.ua.webkit;var _f=YAHOO.env.ua.opera;var _10=YAHOO.lang.isString;var _11=YAHOO.lang.trim;MT.lang={date:function(_12,_13){var _14=this,_15,f,_17=/\\?([a-z])/gi,_18,_19=function(n,c){if((n=n+"").length<c){return new Array((++c)-n.length).join("0")+n;}else{return n;}},_1c=["Sun","Mon","Tues","Wednes","Thurs","Fri","Satur","January","February","March","April","May","June","July","August","September","October","November","December"],_1d={1:"st",2:"nd",3:"rd",21:"st",22:"nd",23:"rd",31:"st"};_18=function(t,s){return f[t]?f[t]():s;};f={d:function(){return _19(f.j(),2);},D:function(){return f.l().slice(0,3);},j:function(){return _15.getDate();},l:function(){return _1c[f.w()]+"day";},N:function(){return f.w()||7;},S:function(){return _1d[f.j()]||"th";},w:function(){return _15.getDay();},z:function(){var a=new Date(f.Y(),f.n()-1,f.j()),b=new Date(f.Y(),0,1);return Math.round((a-b)/86400000)+1;},W:function(){var a=new Date(f.Y(),f.n()-1,f.j()-f.N()+3),b=new Date(a.getFullYear(),0,4);return 1+Math.round((a-b)/86400000/7);},F:function(){return _1c[6+f.n()];},m:function(){return _19(f.n(),2);},M:function(){return f.F().slice(0,3);},n:function(){return _15.getMonth()+1;},t:function(){return (new Date(f.Y(),f.n(),0)).getDate();},L:function(){return new Date(f.Y(),1,29).getMonth()===1|0;},o:function(){var n=f.n(),W=f.W(),Y=f.Y();return Y+(n===12&&W<9?-1:n===1&&W>9);},Y:function(){return _15.getFullYear();},y:function(){return (f.Y()+"").slice(-2);},a:function(){return _15.getHours()>11?"pm":"am";},A:function(){return f.a().toUpperCase();},B:function(){var H=_15.getUTCHours()*3600,i=_15.getUTCMinutes()*60,s=_15.getUTCSeconds();return _19(Math.floor((H+i+s+3600)/86.4)%1000,3);},g:function(){return f.G()%12||12;},G:function(){return _15.getHours();},h:function(){return _19(f.g(),2);},H:function(){return _19(f.G(),2);},i:function(){return _19(_15.getMinutes(),2);},s:function(){return _19(_15.getSeconds(),2);},u:function(){return _19(_15.getMilliseconds()*1000,6);},e:function(){throw "Not supported (see source code of date() for timezone on how to add support)";},I:function(){var a=new Date(f.Y(),0),c=Date.UTC(f.Y(),0),b=new Date(f.Y(),6),d=Date.UTC(f.Y(),6);return 0+((a-c)!==(b-d));},O:function(){var a=_15.getTimezoneOffset();return (a>0?"-":"+")+_19(Math.abs(a/60*100),4);},P:function(){var O=f.O();return (O.substr(0,3)+":"+O.substr(3,2));},T:function(){return "UTC";},Z:function(){return -_15.getTimezoneOffset()*60;},c:function(){return "Y-m-d\\Th:i:sP".replace(_17,_18);},r:function(){return "D, d M Y H:i:s O".replace(_17,_18);},U:function(){return _15.getTime()/1000|0;}};this.date=function(_30,_31){_14=this;if(typeof _31==="undefined"){_15=new Date();}else{_15=(_31 instanceof Date)?new Date(_31):new Date(_31*1000);}return _30.replace(_17,_18);};return this.date(_12,_13);},strtotime:function(str,now){var i,_35,s,_37="",_38="";_37=_11(str+"");_37=_37.replace(/\s{2,}|^\s|\s$/g," ");_37=_37.replace(/[\t\r\n]/g,"");if(_37=="now"){return (new Date()).getTime()/1000;}else{if(!isNaN(_38=Date.parse(_37))){return (_38/1000);}else{if(now){now=new Date(now*1000);}else{now=new Date();}}}_37=_37.toLowerCase();var _39={day:{"sun":0,"mon":1,"tue":2,"wed":3,"thu":4,"fri":5,"sat":6},mon:{"jan":0,"feb":1,"mar":2,"apr":3,"may":4,"jun":5,"jul":6,"aug":7,"sep":8,"oct":9,"nov":10,"dec":11}};var _3a=function(m){var ago=(m[2]&&m[2]=="ago");var num=(num=m[0]=="last"?-1:1)*(ago?-1:1);switch(m[0]){case "last":case "next":switch(m[1].substring(0,3)){case "yea":now.setFullYear(now.getFullYear()+num);break;case "mon":now.setMonth(now.getMonth()+num);break;case "wee":now.setDate(now.getDate()+(num*7));break;case "day":now.setDate(now.getDate()+num);break;case "hou":now.setHours(now.getHours()+num);break;case "min":now.setMinutes(now.getMinutes()+num);break;case "sec":now.setSeconds(now.getSeconds()+num);break;default:var day;if(typeof (day=_39.day[m[1].substring(0,3)])!="undefined"){var _3f=day-now.getDay();if(_3f===0){_3f=7*num;}else{if(_3f>0){if(m[0]=="last"){_3f-=7;}}else{if(m[0]=="next"){_3f+=7;}}}now.setDate(now.getDate()+_3f);}break;}break;default:if(/\d+/.test(m[0])){num*=parseInt(m[0],10);switch(m[1].substring(0,3)){case "yea":now.setFullYear(now.getFullYear()+num);break;case "mon":now.setMonth(now.getMonth()+num);break;case "wee":now.setDate(now.getDate()+(num*7));break;case "day":now.setDate(now.getDate()+num);break;case "hou":now.setHours(now.getHours()+num);break;case "min":now.setMinutes(now.getMinutes()+num);break;case "sec":default:now.setSeconds(now.getSeconds()+num);break;}}else{return false;}break;}return true;};_35=_37.match(/^(\d{2,4}-\d{1,2}-\d{1,2})(?:\s(\d{1,2}:\d{1,2}(:\d{1,2})?)?(?:\.(\d+))?)?$/);if(_35!==null){if(!_35[2]){_35[2]="00:00:00";}else{if(!_35[3]){_35[2]+=":00";}}s=_35[1].split(/-/g);for(i in _39.mon){if(_39.mon[i]==s[1]-1){s[1]=i;}}s[0]=parseInt(s[0],10);s[0]=(s[0]>=0&&s[0]<=69)?"20"+(s[0]<10?"0"+s[0]:s[0]+""):(s[0]>=70&&s[0]<=99)?"19"+s[0]:s[0]+"";return parseInt(MT.lang.strtotime(s[2]+" "+s[1]+" "+s[0]+" "+_35[2])+(_35[4]?_35[4]/1000:""),10);}var _40="([+-]?\\d+\\s"+"(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?"+"|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday"+"|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday)"+"|(last|next)\\s"+"(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?"+"|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday"+"|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday))"+"(\\sago)?";_35=_37.match(new RegExp(_40,"gi"));if(_35===null){return false;}for(i=0;i<_35.length;i++){if(!_3a(_35[i].split(" "))){return false;}}return (now.getTime()/1000);}};MT.util={fixTextareaCursorPosition:function(_41){if(_10(_41)){_41=$D.get(_41);}if(_b||_f){var rng=_41.createTextRange();rng.text=_41.value;rng.collapse(false);}else{if(_e){_41.select();window.getSelection().collapseToEnd();}}},focusTextarea:function(_43){try{_43.focus();this.fixTextareaCursorPosition(_43);}catch(e){}},checkCapsLock:function(e){e=(e)?e:window.event;var _45=false;if(e.which){_45=e.which;}else{if(e.keyCode){_45=e.keyCode;}}var _46=false;if(e.shiftKey){_46=e.shiftKey;}else{if(e.modifiers){_46=!!(e.modifiers&4);}}if(_45>=97&&_45<=122&&_46){return true;}if(_45>=65&&_45<=90&&!_46){return true;}return false;},getEvalRes:function(o,_48){try{return eval("("+o.responseText+")");}catch(ex){return {"status":0,"msg":_48||"\u7f51\u7edc\u6709\u95ee\u9898\uff0c\u8bf7\u7a0d\u540e\u91cd\u8bd5\u3002"};}},decodeJSON:function(str){try{return eval("("+str+")");}catch(ex){return null;}},ctrlEnter:function(el,_4b){var _4c=new YAHOO.util.KeyListener(el,{ctrl:true,keys:[13,100]},function(){_4b();_4c.disable();window.setTimeout(function(){_4c.enable();},2000);});_4c.enable();},yFadeRemove:function(_4d,_4e){var p=$D.getAncestorByTagName(_4d,_4e);if(!p){return;}MT.util.Effect.yellowFadeOut(p,function(el){el.parentNode.removeChild(el);if(_b){MT.util.reFlow();}});},reFlow:function(){if(_b){document.body.style.zoom=1.1;document.body.style.zoom="";}},getLength:function(str){if(!str){return 0;}for(var i=0,_53=0,len=str.length;i<len;i++){_53=str.charCodeAt(i)>255?_53+2:_53+1;}return _53;},toFull:function(str){var ret="";for(var i=0,len=str.length;i<len;i++){var _59=str.charCodeAt(i);if(_59==32){ret+=String.fromCharCode(12288);}else{if(_59<127){ret+=String.fromCharCode(_59+65248);}else{ret+=str[i];}}}return ret;},toHalf:function(str){var ret="";for(var i=0,len=str.length;i<len;i++){var _5e=str.charCodeAt(i);if(_5e==12288){ret+=String.fromCharCode(32);}else{if(_5e>65280&&_5e<65375){ret+=String.fromCharCode(_5e-65248);}else{ret+=String.fromCharCode(_5e);}}}return ret;},toPostData:function(o){var arr=[];for(var i in o){arr.push(encodeURIComponent(i)+"="+encodeURIComponent(o[i]));}return arr.join("&");},parseStr:function(str){if(!str){return null;}var arr=str.split("&");var ret={};for(var i=0,len=arr.length;i<len;i++){var tmp=arr[i].split("=");ret[tmp[0]]=tmp[1];}return ret;},loadImage:function(src){var img=new Image();img.src=src;},pad:function(num,_6b,_6c){if(!_6c){_6c="0";}var len=num.toString().length;while(len<_6b){num=_6c+num;len++;}return num;},parseDate:function(_6e){var tmp=_6e.split(" ");var _70=tmp[1]+" "+tmp[2]+", "+tmp[5]+" "+tmp[3];return Date.parse(_70)-(new Date()).getTimezoneOffset()*60*1000;},getRelativeTime:function(_71){var _72=_10(_71)?this.parseDate(_71).valueOf():_71;var now=new Date();var _74=parseInt((now.getTime()-_72)/1000,10);if(_74<1){return "1 \u79d2\u524d";}else{if(_74<60){return _74+" \u79d2\u524d";}else{if(_74<60*60){return parseInt(_74/60,10)+" \u5206\u949f\u524d";}else{if(_74<60*60*24){return "\u7ea6 "+parseInt(_74/3600,10)+" \u5c0f\u65f6\u524d";}else{return this.getFullTime(_71);}}}}},getFullTime:function(_75){var d=new Date(_10(_75)?this.parseDate(_75):_75);var _77=d.getFullYear();var _78=this.pad(d.getMonth()+1,2);var _79=this.pad(d.getDate(),2);var _7a=this.pad(d.getHours(),2);var _7b=this.pad(d.getMinutes(),2);return _77+"-"+_78+"-"+_79+" "+_7a+":"+_7b;},getText:function(el){if(_10(el)){el=$D.get(el);}var _7d=el.innerText||el.textContent;return _11(_7d);},getRadioValue:function(_7e,_7f){if(_10(_7e)){_7e=$D.get(_7e);}var r=_7e[_7f];if(!r){return null;}var n=r.length;if(n){for(var i=0;i<n;++i){if(r[i].checked){return r[i].value;}}}return r.value;},fixIE6Png:function(_83){if(!_c){return;}if(_10(_83)){_83=$D.get(_83);}var reg=/.png$/i;$D.getElementsBy(function(img){return reg.test(img.src);},"img",_83,function(img){img.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\""+img.src+"\", sizingMethod=\"crop\");";img.src="/static/img/importantblk.gif";});},inArray:function(_87,_88,_89){var key="",_8b=!!_89;if(_8b){for(key in _88){if(_88[key]===_87){return true;}}}else{for(key in _88){if(_88[key]==_87){return true;}}}return false;},ucfirst:function(str){str+="";return str.charAt(0).toUpperCase()+str.substr(1);},uuid:function(len,_8e){var _8f="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");var _90=_8f,_91=[],i;_8e=_8e||_90.length;if(len){for(i=0;i<len;i++){_91[i]=_90[0|Math.random()*_8e];}}else{var r;_91[8]=_91[13]=_91[18]=_91[23]="-";_91[14]="4";for(i=0;i<36;i++){if(!_91[i]){r=0|Math.random()*16;_91[i]=_90[(i==19)?(r&3)|8:r];}}}return _91.join("");},data:function(el,key,_96){if(_10(el)){el=$D.get(el);}if(!el||!el.nodeName||!_10(key)){return false;}var _97="data-"+key;if(_96===undefined){return el.getAttribute(_97);}else{el.setAttribute(_97,_96);return true;}},getCommonDialog:function(id,_99){var _9a={width:"400px",fixedcenter:true,close:false,draggable:false,zindex:7,modal:true,visible:false};for(var i in _99){_9a[i]=_99[i];}var _9c=new YAHOO.widget.Panel(id,_9a);_9c.showEvent.subscribe(function(){$D.getElementsByClassName("close","*",id,function(el){$E.on(el,"click",function(){_9c.hide();});});});_9c.setContent=function(_9e){this.setBody("<div class=\"common-dialog\">"+_9e+"</div>");};_9c.fixOverlay=function(){if(_c||(_b==7&&document.compatMode=="BackCompat")){this.sizeUnderlay();}};_9c.open=function(){this.render(document.body);this.show();};return _9c;},getCommonCalendar:function(id,_a0,_a1){var _a2=["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"];var _a3=["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"];var cal=new YAHOO.widget.Calendar(id,_a0);cal.cfg.setProperty("MONTHS_SHORT",_a2);cal.cfg.setProperty("MONTHS_LONG",_a2);cal.cfg.setProperty("WEEKDAYS_1CHAR",_a3);cal.cfg.setProperty("WEEKDAYS_SHORT",_a3);cal.cfg.setProperty("WEEKDAYS_MEDIUM",_a3);cal.cfg.setProperty("WEEKDAYS_LONG",_a3);cal.cfg.setProperty("HIDE_BLANK_WEEKS",true);cal.cfg.setProperty("START_WEEKDAY",1);cal.cfg.setProperty("DATE_FIELD_DELIMITER","-");cal.cfg.setProperty("DATE_RANGE_DELIMITER","/");cal.cfg.setProperty("MDY_YEAR_POSITION",1);cal.cfg.setProperty("MDY_MONTH_POSITION",2);cal.cfg.setProperty("MDY_DAY_POSITION",3);cal.cfg.setProperty("MY_YEAR_POSITION",1);cal.cfg.setProperty("MY_MONTH_POSITION",2);cal.cfg.setProperty("MD_MONTH_POSITION",1);cal.cfg.setProperty("MD_DAY_POSITION",2);cal.cfg.setProperty("MY_LABEL_YEAR_POSITION",1);cal.cfg.setProperty("MY_LABEL_MONTH_POSITION",2);cal.cfg.setProperty("MY_LABEL_YEAR_SUFFIX","\u5e74");for(var i in _a1){cal.cfg.setProperty(i,_a1[i]);}return cal;},getCommonSandbox:function(id){return new MT.system.Sandbox(id||this.uuid());},Effect:{_yfade:function(el,_a8,_a9,_aa){var a=arguments,f="#fff478",t="#ffffff",cb;if(YAHOO.lang.isArray(a[2])){f=a[2][0]?a[2][0]:f;t=a[2][1]?a[2][1]:t;}else{if(YAHOO.lang.isFunction(a[2])){cb=a[2];}}if(YAHOO.lang.isFunction(a[3])){cb=a[3];}var opa=_a8=="out"?{from:1,to:0}:{from:0,to:1};var _b0=new YAHOO.util.ColorAnim(el,{backgroundColor:{from:f,to:t},opacity:opa},1,YAHOO.util.Easing.easeNone);if("undefined"!=typeof cb){_b0.onComplete.subscribe(function(){cb(el);});}_b0.animate();return _b0;},yellowFadeOut:function(el,_b2,_b3){return MT.util.Effect._yfade(el,"out",_b2,_b3);},yellowFadeIn:function(el,_b5,_b6){return MT.util.Effect._yfade(el,"in",_b5,_b6);}},Cookie:{getExpiresDate:function(_b7,_b8,_b9){var _ba=new Date();if(typeof _b7=="number"&&typeof _b8=="number"&&typeof _b8=="number"){_ba.setDate(_ba.getDate()+parseInt(_b7,10));_ba.setHours(_ba.getHours()+parseInt(_b8,10));_ba.setMinutes(_ba.getMinutes()+parseInt(_b9,10));return _ba.toGMTString();}},_getValue:function(_bb){var _bc=document.cookie.indexOf(";",_bb);if(_bc==-1){_bc=document.cookie.length;}return unescape(document.cookie.substring(_bb,_bc));},get:function(_bd){var arg=_bd+"=";var _bf=arg.length;var _c0=document.cookie.length;var i=0;while(i<_c0){var j=i+_bf;if(document.cookie.substring(i,j)==arg){return this._getValue(j);}i=document.cookie.indexOf(" ",i)+1;if(i===0){break;}}return "";},set:function(_c3,_c4,_c5,_c6,_c7,_c8){document.cookie=_c3+"="+escape(_c4)+((_c5)?"; expires="+_c5:"")+((_c6)?"; path="+_c6:"")+((_c7)?"; domain="+_c7:"")+((_c8)?"; secure":"");},remove:function(_c9,_ca,_cb){if(this.get(_c9)){document.cookie=_c9+"="+((_ca)?"; path="+_ca:"")+((_cb)?"; domain="+_cb:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT";}},clear:function(){var _cc=document.cookie.split(";");for(var i=0;i<_cc.length;i++){this.remove(_11(_cc[i].split("=")[0]),"/","mt.com");this.remove(_11(_cc[i].split("=")[0]),"/","kxapp.mt.com");}}}};MT.system.Core=(function(){var _ce={},_cf={};var _d0=YAHOO.lang.isFunction;function register(_d1,_d2){if(!_d0(_d2)){throw Error("\u8bf7\u5b9a\u4e49\u6b63\u786e\u7684\u6784\u9020\u51fd\u6570: { moduleId:"+_d1+", creator:"+_d2+" }");}_ce[_d1]={creator:_d2,instance:null};}function registerAll(_d3){for(var i in _d3){register(i,_d3[i]);}}function start(_d5){var m=_ce[_d5];if(!m){return;}var _d7=new MT.system.Sandbox(_d5);m.instance=m.creator(_d7);if(_d0(m.instance.init)){m.instance.init();}}function stop(_d8){var m=_ce[_d8];if(m&&m.instance){if(_d0(m.instance.destroy)){m.instance.destroy();}m.instance=null;}}function startAll(){for(var i in _ce){if(_ce.hasOwnProperty(i)){start(i);}}}function stopAll(){for(var i in _ce){if(_ce.hasOwnProperty(i)){stop(i);}}}function subscribe(_dc,fn,obj,_df){if(!_cf[_dc]){_cf[_dc]=new _9(_dc);}_cf[_dc].signature=_9.FLAT;_cf[_dc].subscribe(fn,obj,_df);}function unsubscribe(_e0,fn,obj){var _e3=_cf[_e0];if(!_e3){return;}_e3.unsubscribe(fn,obj);}function fire(_e4,_e5){var _e6=_cf[_e4];if(!_e6){return;}_e6.fire(_e5);}return {register:register,registerAll:registerAll,start:start,stop:stop,startAll:startAll,stopAll:stopAll,subscribe:subscribe,unsubscribe:unsubscribe,fire:fire};})();MT.system.Sandbox=function(id){this.id=id;};MT.system.Sandbox.prototype=(function(){var _e8=MT.system.Core;var _e9=YAHOO.lang.isArray;return {listen:function(_ea,fn,obj,_ed){_ea=_e9(_ea)?_ea:[_ea];for(var i=0;i<_ea.length;i++){_e8.subscribe(_ea[i],fn,obj,_ed);}},remove:function(_ef,fn,obj){_ef=_e9(_ef)?_ef:[_ef];for(var i=0;i<_ef.length;i++){_e8.unsubscribe(_ef[i],fn,obj);}},notify:function(_f3,_f4){_e8.fire(_f3,_f4);}};})();MT.widget={selectAndCopy:function(_f5,_f6,_f7){if(_10(_f5)){_f5=$D.get(_f5);}if(!_f5){return;}function copy(){if(_b){try{window.clipboardData.setData("Text",_f5.value);alert(_f7||"\u590d\u5236\u6210\u529f\uff0c\u4f60\u53ef\u4ee5\u7c98\u5e16\u5230MSN\u6216QQ\u4e2d\u53d1\u7ed9\u597d\u53cb\u3002");}catch(e){}}window.setTimeout(function(){_f5.select();},0);}$E.on(_f5,"click",copy);$E.on(_f6,"click",copy);},showMessage:function(_f8,_f9){var _fa=$D.getElementsByClassName("sysmsgw","div","doc");if(_fa.length){_fa=_fa[0];}else{_fa=document.createElement("div");_fa.className="sysmsgw";_fa.innerHTML="<div class=\"sysmsg\"><p></p><span class=\"close\" onclick=\"MT.app.Core.removeFromCloseButton(this)\">\u5173\u95ed</span></div>";$D.insertAfter(_fa,"hdw");}_fa.id="sysmsg-"+_f8;var p=_fa.getElementsByTagName("p")[0];p.innerHTML=_f9;},removeMessage:function(){var _fc=$D.getElementsByClassName("sysmsgw","div","doc");if(_fc.length){_fc=_fc[0];_fc.parentNode.removeChild(_fc);}},startMsnChat:function(_fd){try{window.setTimeout(function(){var frm=document.createElement("form");$D.get("doc").appendChild(frm);frm.method="post";frm.action="msnim:chat?contact="+_fd;frm.submit();},100);}catch(e){alert(e);}}};MT.app.Core={removeFromCloseButton:function(_ff){var p=$D.getAncestorByClassName(_ff,"sysmsgw");p.parentNode.removeChild(p);},removeTip:function(){var _101=$D.get("sysmsg-tip");var _102=$D.get("sysmsg-tip-close");if(!_101||!_102){return;}$E.on(_102,"click",function(e){_101.parentNode.removeChild(_101);});},sysmsg:function(){this.removeTip();var _104=$D.get("sysmsg-error");if(!_104){_104=$D.get("sysmsg-success");}if(!_104){return;}$D.getElementsByClassName("close","span",_104,function(el){$E.on(el,"click",function(e){MT.app.Core.removeFromCloseButton(el);});});},initAccountMenu:function(){var _107=$D.get("myaccount");var _108=$D.get("myaccount-menu");$E.on(_107,"click",function(e){_107.blur();var isUc=this.getAttribute("isuc");if(!isUc){$E.stopEvent(e);}});$E.on(_107,"mouseover",function(e){_108.style.display="block";});$E.on(_107,"mouseout",function(e){handleOut(e);});$E.on(_108,"mouseout",function(e){handleOut(e);});function handleOut(e){var _10f=$E.getTarget(e);var _110=$E.getRelatedTarget(e);if(_108==_110||$D.isAncestor(_108,_110)){$D.addClass(_107,"hover");}else{$D.removeClass(_107,"hover");_108.style.display="none";}}},changeCity:function(){var _111=$D.get("header-city");var _112=$D.get("guides-city-list");if(!_111||!_112){return;}$E.on(_111,"click",function(e){if($D.getStyle(_112,"display")=="none"){_111.className="unfold";_112.style.display="block";_gaq.push(["_trackEvent","InnerLink","Click","/CitySelector/click"]);}else{_111.className="fold";_112.style.display="none";}});$E.on(document,"click",function(e){var _115=$E.getTarget(e);var _116=_115.nodeName.toLowerCase();if(_115!=_111&&_115!=_112&&!$D.isAncestor(_111,_115)&&!$D.isAncestor(_112,_115)){window.setTimeout(function(){_111.className="fold";_112.style.display="none";},10);}});},msnHelp:function(){var _117="custom-service-dialog";var _118=MT.util.getCommonDialog(_117,{width:"420px"});var _119=null;var _11a=15;$E.on(["service-msn-help","service-qq-help"],"click",function(e){$E.stopEvent(e);this.blur();var type=this.getAttribute("stype");var msn=this.getAttribute("saddress");if(_b){if(type=="msn"){MT.widget.startMsnChat(msn);}else{if(type=="qq"){var url=this.getAttribute("surl");window.open(url,"_blank","height=544, width=644,toolbar=no,scrollbars=no,menubar=no,status=no");}}}else{showDialog(type,msn);}});function showDialog(type,_120){var html=["<div class=\"\">"];html.push("<h3 class=\"head\">\u5ba2\u670d"+(type=="msn"?"MSN":"QQ")+"<span class=\"close\">\u5173\u95ed</span></h3>");html.push("<div class=\"body\">");if(type=="msn"){html.push("<p>\u62b1\u6b49\uff0c\u5f53\u524d\u6d4f\u89c8\u5668\u4e0d\u517c\u5bb9\u5ba2\u670dMSN\u3002<br />\u60a8\u53ef\u4ee5\u52a0 <strong>"+_120+"</strong> \u4e3a\u597d\u53cb\uff0c\u518d\u8fdb\u884c\u54a8\u8be2\u3002</p>");}else{html.push("<p>\u62b1\u6b49\uff0c\u5f53\u524d\u6d4f\u89c8\u5668\u4e0d\u517c\u5bb9\u5ba2\u670dQQ\u3002<br />\u60a8\u53ef\u4ee5\u52a0 <strong>"+_120+"</strong> \u4e3a\u597d\u53cb\uff0c\u518d\u8fdb\u884c\u54a8\u8be2\u3002</p>");}html.push("</div></div>");$D.addClass(document.body,"yui-skin-sam");_118.hideEvent.subscribe(function(){window.clearTimeout(_119);});_118.setContent(html.join(""));_118.open();_119=window.setTimeout(function(){_118.hide();},_11a*1000);}},trackGAEvent:function(){var _122="gaevent";var _123="galabel";$E.on(document,"click",function(e){var _125=$E.getTarget(e);var _126=_125.nodeName.toLowerCase();trackCustomEvent(_125);if(_126==="a"){trackOutLink(_125);}});function trackCustomEvent(el){var attr=el.getAttribute(_122);if(!attr){return;}var _129=attr.split("|");var _12a=_129[0];var _12b=_129[1];var _12c=_129[2];var _12d=_129[3];if(!_12c&&el.href){_12c=el.href.replace("http://","");}_gaq.push(["_trackEvent",_12a,_12b,_12c,_12d]);}function trackOutLink(el){var link=el.href;var reg=/^(http:\/\/|mailto:)/;if(link&&reg.test(link)){link=link.replace("http://","");var _131=link.indexOf("?");var _132=el.getAttribute(_123);if(_131>0){link=link.substring(0,_131);}if(/\.(meituan|mt|fdpmt)\.com/.test(link)){return;}if(_132){link+="#label="+_132;}_gaq.push(["_trackEvent","OutLink","Click",link]);}}},_subscribedDialog:null,getSubscribedDialog:function(){if(!this._subscribedDialog){var _133={width:"400px",fixedcenter:true,close:false,draggable:false,zindex:7,modal:true,visible:false};this._subscribedDialog=new YAHOO.widget.Panel("email-subscribed-dialog",_133);}return this._subscribedDialog;},startSubscribedDialog:function(_134,_135){var _136=this;$D.addClass(document.body,"yui-skin-sam");_gaq.push(["_trackPageview","/maillist/subscribed"]);showDialog();function showDialog(){var _137=_136.getSubscribedDialog();var type=getHelpType(_134);var html=["<div class=\"email-subscribed-dialog-c\">"];html.push("<h3><span id=\"email-subscribed-dialog-close\" class=\"close\">\u5173\u95ed</span></h3>");html.push("<div class=\"succ\">");html.push("<p class=\"title\">\u90ae\u4ef6\u8ba2\u9605\u6210\u529f\uff01</p>");if(_135){html.push("<p class=\"notice\">"+_135+"\u6bcf\u5929\u7684\u56e2\u8d2d\u5c06\u53ca\u65f6\u53d1\u5230\u60a8\u90ae\u7bb1</p>");}html.push("</div>");html.push("<div class=\"setting\"><h4>\u60a8\u53ef\u80fd\u6536\u4e0d\u5230\u8ba2\u9605\u90ae\u4ef6...</h4><p class=\"text\">\u8bf7\u5c06 <strong>info@meituan.com</strong> \u52a0\u5165\u90ae\u7bb1\u767d\u540d\u5355</p>");if(type){html.push("<a class=\"link\" href=\"/help/email/"+type+"\" target=\"_blank\">\u7acb\u5373\u8fdb\u884c\u8bbe\u7f6e</a>");}html.push("</div>");html.push("</div>");_137.setBody(html.join(""));_137.render(document.body);_137.show();$E.on("email-subscribed-dialog-close","click",function(e){_137.hide();});}function getHelpType(_13b){var _13c={"163.com":"163","126.com":"126","gmail.com":"gmail","qq.com":"qq","vip.qq.com":"qq","foxmail.com":"qq","live.com":"live","live.cn":"live","hotmail.com":"live","yahoo.com.cn":"yahoo","yahoo.cn":"yahoo","sina.com":"sina","vip.sina.com":"sina","sohu.com":"sohu","139.com":"139"};var _13d,key;if(_13b){_13d=_13b.indexOf("@");if(_13d){key=_13b.substr(_13d+1);if(_13c[key]){return _13c[key];}}}return "other";}},subscribe:function(_13f,_140,_141){_13f=$D.get(_13f);if(!_13f){return;}var _142=_13f.email;var hint="\u8bf7\u8f93\u5165\u60a8\u7684Email...";if(_142&&_142.value!==""){hint=_142.value;}if(_142.value===""){_142.style.color="#999999";_142.value=hint;}$E.on(_13f,"submit",function(e){$E.stopEvent(e);if(_142.value===""||_142.value===hint){return alert("\u8bf7\u8f93\u5165\u60a8\u7684Email\u5730\u5740\u3002");}$C.setForm(_13f);var _145=$C.asyncRequest("POST",_13f.action,{success:function(o){var res=MT.util.getEvalRes(o);if(res.status){MT.app.Core.startSubscribedDialog(_142.value,_140);}else{if(res.data&&res.data.needCaptcha){window.location.href="/maillist/subscribe/"+_141;}else{alert(res.msg);}}},failure:function(o){}});return true;});$E.on(_142,"focus",function(e){if(_142.value===hint){_142.value="";}_142.style.color="#000000";});$E.on(_142,"blur",function(e){if(_142.value===""){_142.style.color="#999999";_142.value=hint;}});},headerSubscribe:function(){var _14b=$D.get("header-city");if(!_14b){return;}var id=_14b.getAttribute("sid");var name=_14b.getAttribute("sname");var slug=_14b.getAttribute("sslug");this.subscribe("header-subscribe-form",name,slug);this.subscribeSms("header-subscribe-sms",id,name);},autoCompleteEmail:function(_14f,_150){if(_10(_14f)){_14f=$D.get(_14f);}if(_10(_150)){_150=$D.get(_150);}_150.innerHTML="<p class=\"email-title\">\u8bf7\u9009\u62e9\u60a8\u7684\u90ae\u7bb1\u7c7b\u578b...</p><ul class=\"email-list\"></ul>";var _151=_150.getElementsByTagName("ul")[0];var _152=["163.com","gmail.com","qq.com","126.com","hotmail.com","sina.com","yahoo.com.cn","sohu.com","yahoo.cn","139.com"];var _153=0;var _154=0;$E.on(_14f,"blur",function(){$D.setStyle(_150,"display","none");});$E.on(_14f,"keydown",function(ev){var key=ev.keyCode;if(key==9){if($D.getStyle(_150,"display")==="block"){$D.setStyle(_150,"display","none");}}else{if(key==13){_14f.value=select();if($D.getStyle(_150,"display")==="block"){$D.setStyle(_150,"display","none");$E.stopEvent(ev);}}else{if(key==38||key==40){if(ev.shiftKey==1){return;}if(key==38){if(_153<=0){_153=_154;}_153--;selectLi(_153);$E.stopEvent(ev);}else{if(key==40){if(_153>_154-2){_153=-1;}_153++;selectLi(_153);$E.stopEvent(ev);}}}else{window.setTimeout(function(){displayList(_14f);},10);}}}});function displayList(){var mail=_14f.value;var html=[];var _159="";var name="";var _15b=mail.indexOf("@");if(_15b<0){name=mail;}else{if(_15b==mail.length-1){name=mail.substr(0,_15b);}else{name=mail.substr(0,_15b);_159=mail.substr(_15b+1);}}html.push("<li>"+mail+"</li>");for(var i=0;i<_152.length;i++){var _15d=_152[i];var _15e=_152[i].substr(0,_159.length);if(_159===""||_159==_15e){var _15f=name+"@"+_15d;html.push("<li title=\""+_15f+"\">"+_15f+"</li>");}}_153=0;removeEvent();_151.innerHTML=html.join("");$D.setStyle(_150,"display","block");attachEvent();}function removeEvent(){var _160=_151.getElementsByTagName("li");for(var i=0;i<_160.length;i++){var el=_160[i];el.onmousedown=null;el.onmouseover=null;el.onmouseout=null;}}function attachEvent(){var _163=_151.getElementsByTagName("li");var _164=_163[0];_154=_163.length;$D.addClass(_164,"current");for(var i=0;i<_163.length;i++){var el=_163[i];el.onmousedown=function(){_14f.value=this.innerHTML;};el.onmouseover=function(){$D.removeClass(_164,"current");$D.addClass(this,"current");};el.onmouseout=function(){$D.removeClass(this,"current");$D.addClass(_164,"current");};}}function selectLi(_167){var _168=_151.getElementsByTagName("li");for(var i=0;i<_168.length;i++){$D.removeClass(_168[i],"current");}$D.addClass(_168[_167],"current");}function select(){var _16a=_151.getElementsByTagName("li");if(_16a[_153]){return _16a[_153].innerHTML;}else{return _16a[0].innerHTML;}}},init:function(){this.sysmsg();this.initAccountMenu();this.changeCity();this.headerSubscribe();this.autoCompleteEmail("header-subscribe-email","header-subscribe-auto");this.trackGAEvent();this.msnHelp();}};MT.app.Core.subscribeSms=function(el,_16c,_16d){if(_10(el)){el=$D.get(el);}if(!_16d){_16d="\u7f8e\u56e2";}var _16e="sms-subscribe-dialog";var _16f=MT.util.getCommonDialog(_16e,{width:"400px"});var _170=false;var _171="<h4>\u77ed\u4fe1\u8ba2\u9605"+_16d+"\u6bcf\u65e5\u56e2\u8d2d\u4fe1\u606f</h4><p class=\"noti\">\u8ba4\u8bc1\u7801\u5df2\u53d1\u9001\u5230\u60a8\u7684\u624b\u673a\uff1a<strong>%mobile</strong></p><p class=\"verify cf\"><label for=\"sms-subscribe-verify\">\u8ba4\u8bc1\u7801</label><input type=\"text\" id=\"sms-subscribe-verify\" class=\"f-text\" maxlength=\"20\" name=\"code\" /><span class=\"tip\">\u8bf7\u8f93\u5165\u60a8\u6536\u5230\u7684\u8ba4\u8bc1\u7801\uff0c\u5b8c\u6210\u8ba2\u9605</span></p><p class=\"act\"><input type=\"hidden\" name=\"cityid\" value=\"%cityId\" /><input type=\"hidden\" name=\"mobile\" value=\"%mobile\" /><input type=\"submit\" class=\"commit confirm\" value=\"\u53d1\u9001\" /></p>";var _172="<div class=\"succ\"><p class=\"title\">\u77ed\u4fe1\u8ba2\u9605\u6210\u529f\uff01</p><p class=\"notice\">"+_16d+"\u6bcf\u5929\u7684\u56e2\u8d2d\u4fe1\u606f\u5c06\u53ca\u65f6\u53d1\u5230\u60a8\u624b\u673a</p></div><div class=\"alert\">\u6e29\u99a8\u63d0\u793a\uff1a\u6536\u5230\u8ba2\u9605\u77ed\u4fe1\u540e\uff0c\u76f4\u63a5\u56de\u590dQX\u53ef\u53d6\u6d88\u8ba2\u9605</div>";$E.on(el,"click",function(e){$D.addClass(document.body,"yui-skin-sam");showDialog();});function showDialog(){_170=false;var html=["<div class=\"\">"];html.push("<h3 class=\"head\"><span class=\"close\">\u5173\u95ed</span></h3>");html.push("<div class=\"body\"><form id=\"sms-subscribe-form\" action=\"/mobilelist/subscribe\" method=\"post\">");html.push("<h4>\u77ed\u4fe1\u8ba2\u9605"+_16d+"\u6bcf\u65e5\u56e2\u8d2d\u4fe1\u606f</h4>");html.push("<p class=\"mobile\"><label for=\"sms-subscribe-mobile\">\u624b\u673a\u53f7</label><input type=\"text\" id=\"sms-subscribe-mobile\" class=\"f-text\" maxlength=\"20\" name=\"mobile\" value=\"\" /><span class=\"tip\">\u8bf7\u8f93\u5165\u60a8\u7684\u624b\u673a\u53f7</span></p>");html.push("<p class=\"enter\"><label for=\"sms-subscribe-captcha\">\u9a8c\u8bc1\u7801</label><input type=\"text\" id=\"sms-subscribe-captcha\" class=\"f-text\" maxlength=\"20\" name=\"captcha\" /><span class=\"tip\">\u6309\u4e0b\u56fe\u5b57\u7b26\u586b\u5199\uff0c\u4e0d\u533a\u5206\u5927\u5c0f\u5199</span></p>");html.push("<p class=\"captcha cf\"><img id=\"sms-subscribe-captcha-img\" src=\"/account/captcha?"+Math.random()+"\" width=\"100\" height=\"50\" /><span id=\"sms-subscribe-captcha-change\">\u770b\u4e0d\u6e05\u695a\uff1f\u6362\u4e00\u5f20</span></p>");html.push("<p class=\"act\"><input type=\"hidden\" name=\"cityid\" value=\""+_16c+"\" /><input type=\"submit\" class=\"commit\" value=\"\u53d1\u9001\" /></p>");html.push("</form></div></div>");_16f.setContent(html.join(""));_16f.open();initEvent();}function initEvent(){$E.on("sms-subscribe-captcha-change","click",changeCaptcha);$E.on("sms-subscribe-form","submit",function(e){$E.stopEvent(e);if(_170){var code=this.code.value;if(code===""){alert("\u8bf7\u8f93\u5165\u60a8\u6536\u5230\u7684\u8ba4\u8bc1\u7801");this.code.focus();return false;}confirmVerify(this);}else{var _177=this.mobile.value;var _178=this.captcha.value;if(_177===""||!_177.match(/^\d{11}$/)){alert("\u8bf7\u8f93\u5165\u6b63\u786e\u768411\u4f4d\u624b\u673a\u53f7\u7801");this.mobile.focus();return false;}else{if(_178===""){alert("\u9a8c\u8bc1\u7801\u4e0d\u80fd\u4e3a\u7a7a");this.captcha.focus();return false;}}sendVerify(this);}return true;});}function changeCaptcha(){var img=$D.get("sms-subscribe-captcha-img");var src=img.src.replace(/(\?0\.\d+)?$/,"");img.src=src+"?"+Math.random();}function sendVerify(_17b){$C.setForm(_17b);var _17c=_17b.cityid.value;var _17d=_17b.mobile.value;var _17e=$C.asyncRequest("POST","/mobilelist/subscribe",{success:function(o){var res=MT.util.getEvalRes(o);if(res.status){if(res.data["subscribed"]){showSucc(_17b);}else{_17b.innerHTML=_171.replace(/%cityId/g,_17c).replace(/%mobile/g,_17d);window.setTimeout(function(){_17b.code.focus();},100);_170=true;fixOverlay();}}else{changeCaptcha();alert(res.msg);_17b.captcha.focus();}},failure:function(o){}});}function confirmVerify(_182){$C.setForm(_182);var _183=$C.asyncRequest("POST","/mobilelist/verify",{success:function(o){var res=MT.util.getEvalRes(o);if(res.status){showSucc(_182);}else{alert(res.msg);_182.code.focus();}},failure:function(o){}});}function showSucc(_187){_187.innerHTML=_172;fixOverlay();}function fixOverlay(){if(_c||(_b==7&&document.compatMode=="BackCompat")){_16f.sizeUnderlay();}}};MT.app.Kaixin=(function(){return {login:function(){var _188=$C.asyncRequest("POST","/account/applogin",{success:function(o){var res=MT.util.getEvalRes(o);if(res.status){var url=res.data["type"]==="unbind"?"/account/bind/kaixin001":"/";window.location.href=url;}else{alert(res.msg);}},failure:function(o){},timeout:18000});},logout:function(){window.location.href="/";},bind:function(){var _18d=$D.get("kaixin-bind-list");var _18e=$D.get("kaixin-bind-form");var _18f=$D.get("kaixin-bind-signuped");var _190=$D.get("kaixin-bind-unsignuped");var _191=false;var _192=(function(){var el=$D.hasClass(_18f,"current")?_18f:_190;return $D.getElementsByClassName("textbody","div",el)[0];})();if($D.hasClass(_18f,"current")){focus();}$E.on([_18f,_190],"click",function(e){if($D.hasClass(this,"current")||_191){return;}var _195=this.getElementsByTagName("input")[0];var _196=$D.getElementsByClassName("textbody","div",this)[0];_195.checked=true;$D.removeClass([_18f,_190],"current");$D.addClass(this,"current");_191=true;var _197=_196.getAttribute("sheight");var _198=_192.getAttribute("sheight");var _199=0.5;var ease=YAHOO.util.Easing.easeBoth;var anim=new YAHOO.util.Anim(_196,{height:{from:0,to:_197}},_199,ease);var _19c=new YAHOO.util.Anim(_192,{height:{form:_198,to:0}},_199,ease);var _19d=this;$D.removeClass(_196,"hide");$D.addClass(_192,"hide");anim.onComplete.subscribe(function(){var c=getBodyContent(_196);_196.style.visibility="visible";if(_19d==_18f){focus();}_191=false;});_19c.onComplete.subscribe(function(){var c=getBodyContent(_192);_192.style.visibility="hidden";_192=_196;_191=false;});anim.animate();_19c.animate();});function getBodyContent(el){return $D.getElementsByClassName("textbody-c","div",el)[0];}function focus(){try{_18e.email.focus();}catch(e){}}}};})();})();
