Date.prototype.format=function(a){var c={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};/(y+)/.test(a)&&(a=a.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)));for(var b in c)RegExp("("+b+")").test(a)&&(a=a.replace(RegExp.$1,RegExp.$1.length==1?c[b]:("00"+c[b]).substr((""+c[b]).length)));return a};
$("#jp_today,#jd_fromDate,#jd_toDate").each(function(a){a.value=(new Date((new Date).getTime()+864E5)).format("yyyy-MM-dd")});$("#skinlist a").on("click",function(a){a=parseInt(a.innerHTML)-1;Cookie.set("style",a);skinSelector.set("style",a)});
var MailLogin={mailCache:[],sendMail:function(){var a=$("#mail_user_114la").el.value,c=$("#mail_passwd_114la").el.value,b=$("#mail_server_114la").el,d=document.mail,b=b.selectedIndex,e=Config.Mail[b],a={u:a,p:c};if(e.val==0)alert("\u60a8\u6ca1\u6709\u9009\u62e9\u90ae\u7bb1\uff01");else if(Yl.trim(a.u)=="")alert("\u7528\u6237\u540d\u4e0d\u80fd\u4e3a\u7a7a\uff01"),$("#mail_user_114la").el.focus();else if(Yl.trim(a.p)=="")alert("\u5bc6\u7801\u4e0d\u80fd\u4e3a\u7a7a\uff01"),$("#mail_passwd_114la").el.focus();
else{if(this.mailCache.index!=b)this.mailCache.forEach(function(a){d.removeChild(a)}),this.mailCache=[];d.action=e.action;for(I in e.params)$(d).create("input",{type:"hidden",name:I,value:format(e.params[I],a)},function(a){MailLogin.mailCache.push(a);this.append(a)});d.submit();$("#mail_passwd_114la").el.value=""}},change:function(a){var c=Config.Mail[a.selectedIndex];c.type=="link"?(window.open(c.action),a.selectedIndex=17):cache.set("SE_ONFOCUS",!0)}},SE=function(){var a=[$("#searchForm").el.tn,
$("#searchForm").el.ch];$("#searchForm .search-input").el.focus();$("#searchForm .search-input").on("mouseover",function(a){if(!cache.get("SE_ONFOCUS"))a.value=a.value,a.focus()});$("#mail_passwd_114la,#searchForm .search-input").on("blur",function(){cache.remove("SE_ONFOCUS")});$("#searchForm .search-input").on("focus",function(a){cache.set("SE_ONFOCUS",!0);Browser.isIE?Yl.getFocus(a):a.focus()});return{set:function(c){function b(a){for(var b=0,c=a.length;b<c;b++)$("#searchForm").remove(a[b]);return[]}
$("#searchForm").el.action=c.action;$("#sf_label img").el.src=c.img[0];$("#sf_label img").el.setAttribute("alt",c.img[1]);$("#searchForm .search-input").el.name=c.name;$("#searchForm .search-btn").el.value=c.btn;$("#sf_label").el.href=c.url;a.length>0&&(a=b(a));for(var d in c.params)$("#searchForm").create("input",{name:d,value:c.params[d],type:"hidden"},function(b){a.push(b);this.append(b)})}}}();
$("#navbar li").on("click",function(a){$("#searchForm .search-input").el.focus();$("#navbar li").removeClass("navbar-select");$(a).addClass("navbar-select");a=a.getAttribute("rel");KeywordCount({u:a,n:a,q:0});SE.set(Config.Search[a]);if(Browser.isIE)$("#searchForm .search-input").el.value=$("#searchForm .search-input").el.value;$("#searchForm .search-link").hide();$("#searchForm div#sw_"+a).show();return!1});
document.onclick=function(a){var a=a||window.event,a=a.srcElement||a.target,c=a.id;c!=="showSetting"&&$("#settingBox").el&&$("#settingBox").hide();if(a.tagName&&a.tagName.toUpperCase()=="A"||a.parentNode.tagName&&a.parentNode.tagName.toUpperCase()=="A"||a.parentNode.parentNode.tagName&&a.parentNode.parentNode.tagName.toUpperCase()=="A"){if(a.rel&&a.rel=="nr")return;var b,d;if(a.parentNode.tagName.toUpperCase()=="A"&&a.tagName.toUpperCase()=="IMG")b=a.parentNode.href,d=a.alt;else if(a.parentNode.parentNode.tagName.toUpperCase()==
"A")b=a.parentNode.parentNode.href,d=a.innerHTML;else{b=a.href;d=a.innerHTML;if(Yl.trim(b)=="javascript:void(0);"||Yl.trim(b)=="javascript:void(0)")b=d;if(a.getAttribute("rel"))b=d=a.innerHTML}KeywordCount({u:b,n:d,q:0});UserTrack.add(a)}Config.Track.forEach(function(a){c==a[0]&&KeywordCount(a[1])})};
$("#showSetting").on("click",function(a){a.blur();$("#settingBox").el?$("#settingBox").show():$("#wrap").create("div",{id:"settingBox"},function(a){var b=Yl.createFrame({src:"/public/widget/setting/index.html",width:"260",height:"230"});a.innerHTML='<span class="h2">\u4e2a\u6027\u8bbe\u7f6e</span><div id="LSIMG" class="loading"></div><div id="loadSettingBox" style="display:none;">'+b+"</div>";this.append(a);var d=a.getElementsByTagName("iframe")[0];Yl.loadFrame(d,function(){$("#LSIMG").hide();a.innerHTML=
'<span class="h2">\u4e2a\u6027\u8bbe\u7f6e</span>'+b;$("#settingBox .h2").on("click",function(){$("#settingBox").hide()})})})});
(function(){if($("#topsite em").el){var a,c=!0,b,d=function(){if(c&&a)a.style.display="none"};$("#topsite em").each(function(e){e.onmouseover=function(){d();var f=e.parentNode.getElementsByTagName("div")[0];b=window.setTimeout(function(){$(f).show()},200);a=f;c=!1;if(!f.onmouseover)f.onmouseover=function(){c=!1},f.onmouseout=function(){c=!0;window.setTimeout(d,200)}};e.onmouseout=function(){c=!0;window.setTimeout(d,200);b!=void 0&&window.clearTimeout(b)}})}})();
var HoverTab=function(a,c){var b,d=a.getAttribute("rel");["click","mouseover"].forEach(function(e){switch(e){case "click":b&&window.clearTimeout(b);a["on"+e]=function(){c();d&&KeywordCount({u:d,n:d,q:0})};break;case "mouseover":a["on"+e]=function(){b&&window.clearTimeout(b);b=window.setTimeout(function(){c();d&&KeywordCount({u:d,n:d,q:0})},300)},a.onmouseout=function(){b!=void 0&&window.clearTimeout(b)}}})},Suggest=function(){function a(){if(i){var a=i.length;h<0?h=a-1:h>=a&&(h=0);for(var b=0,a=i.length;b<
a;b++)i[b].className="";i[h].className="hover";f.el.value=i[h].innerHTML}}function c(){if(!(typeof l!="object"||typeof l=="undefined")){var a="<ul>";l.forEach(function(b,c){a+=cache.get("CURRENT_SE_TAB")=="taobao"?'<li key="'+c+'">'+b[0]+"</li>":'<li key="'+c+'">'+b+"</li>"});a+='</ul><div class="close"><a id="closeSugBtn">\u5173\u95ed</a></div>';i=g.el.getElementsByTagName("li");g.el.innerHTML=a;g.show();h=-1;k=!1;d()}}function b(){g.hide();k=!0}function d(){g.el.onmouseover=function(a){a=a||window.event;
a=a.target||a.srcElement;if(a.tagName.toUpperCase()=="LI"){for(var b=0,c=i.length;b<c;b++)i[b].className="";a.className="hover";h=parseInt(a.getAttribute("key"));$(a).on("mouseout",function(a){a.className=""})}n=!0};g.el.onmouseout=function(){n=!1};g.el.onclick=function(a){a=a||window.event;a=a.target||a.srcElement;if(a.tagName.toUpperCase()=="LI"){f.el.value=a.innerHTML;f.el.focus();b();var c=document.getElementById("searchForm");cache.set("Handdle_Key","S");c.onsubmit();c.submit()}a.id=="closeSugBtn"&&
(f.el.setAttribute("autocomplete","on"),f.el.focus(),g.hide(),o=!0)}}function e(){var a=$("head").el,b=cache.get("CURRENT_SE_TAB");if(j)j.charset=b=="taobao"?"utf-8":"gb2312";Browser.isIE||(j&&a.removeChild(j),j=null);if(!j){var c=document.createElement("script");c.type="text/javascript";c.charset=b=="taobao"?"utf-8":"gb2312";a.insertBefore(c,a.firstChild);j=c}var a=(new Date).getTime(),c=encodeURIComponent(f.el.value),d="http://suggestion.baidu.com/su?wd="+c+"&sc=114la&rd="+a;switch(b){case "mp3":d=
"http://nssug.baidu.com/su?wd="+c+"&prod=mp3&sc=114la&rd="+a;break;case "image":d="http://nssug.baidu.com/su?wd="+c+"&prod=image&fm=114la&rd="+a;break;case "v115":d="http://nssug.baidu.com/su?wd="+c+"&prod=video&sc=114la&rd="+a;break;case "zhidao":d="http://nssug.baidu.com/su?wd="+c+"&prod=zhidao&sc=114la&rd="+a;break;case "web":d="http://suggestion.baidu.com/su?wd="+c+"&sc=114la&rd="+a;break;case "taobao":d="http://suggest.taobao.com/sug?code=utf-8&callback=TB.Suggest.callback&q="+c+"&rd="+a}j.src=
d}var f=$("#searchForm .search-input"),g=$("#suggest"),m,h=-1,j=null,l,i,n=!1,k=!1,o=!1;f.el.onkeydown=function(c){c=c||window.event;if(!o)switch(c.keyCode){case 38:if(k){if(this.value=="")break;g.show();k=!1}else h--;a();break;case 40:if(k){if(this.value=="")break;g.show();k=!1}else h++;a();break;case 27:this.value=m;b();break;case 13:cache.set("Handdle_Key","13"),b()}};f.el.onkeyup=function(a){a=a||window.event;if(!o)switch(m=this.value,a.keyCode){case 38:break;case 40:break;case 8:this.value==
""?b():e();break;case 27:this.value=m,b();case 13:cache.set("Handdle_Key","13");b();break;default:m!=""&&e()}};f.el.onblur=function(){n||b()};$("#searchForm").el.onsubmit=function(){KeywordCount({type:cache.get("CURRENT_SE_TAB")?cache.get("CURRENT_SE_TAB"):"web",word:f.el.value,url:window.location.href,key:cache.get("Handdle_Key")},"http://www.tjj.com/click.php");var a=!1;Config.Keywords.forEach(function(b){f.el.value==b[0]&&(window.open(b[1]),a=!0)});if(a)return!1};$("#search_btn").on("click",function(){cache.set("Handdle_Key",
"B")});window.baidu={};window.baidu.sug=function(a){typeof a=="object"&&typeof a.s!="undefined"&&typeof a.s[0]!="undefined"?(l=a.s,c()):b()};window.TB={};window.TB.Suggest={};window.TB.Suggest.callback=function(a){typeof a=="object"&&typeof a.result!="undefined"&&typeof a.result[0][0]!="undefined"?(l=a.result,c()):b()}}(),UserTrack=function(){return{add:function(a){try{if(a.tagName.toUpperCase()=="A"&&a.href.indexOf("http://")==0&&a.href.indexOf("http://"+Yl.getHost())!=0&&!(a.rel&&a.rel=="nr")){var c=
{url:a.href,content:a.innerHTML},b=c.url+"_[TEXT]_"+c.content+"_[YLMF]_",d=Cookie.get("history");d&&(d.indexOf(b)>-1&&(d=d.replace(b,"")),b+=d);Cookie.set("history",b,null,null,"114la.com");var e;document.getElementById("bb1")&&(e=document.getElementById("bb1").getElementsByTagName("iframe"));e&&e.length&&e[0].contentWindow.History.show()}}catch(f){}}}}(),miniSearch=function(){function a(){KeywordCount({type:c,word:b.value,url:window.location.href,key:cache.is("CLICK_BS_BTN")?"B":13},"http://www.tjj.com/click.php");
cache.remove("CLICK_BS_BTN")}var c="s0",b=$("#f_int input").el;$("#f_radio input.radio").each(function(a){if(a.checked==!0)c=a.id;a.onclick=function(){c=this.id}});$("#f_btn input").on("click",function(){cache.set("CLICK_BS_BTN",1)});return{gosearch:function(d){if(c=="s0")a(),d.submit();else{var e;switch(c){case "s2":e="www.google.com.hk/search?q=";break;case "s3":$("#taobao-q").el.value=b.value;if(!cache.get("TAOBAO_PARM")){var d=Config.Search.taobao.params,f;for(f in d)$("#taobao-form").create("input",
{type:"hidden",name:f,value:d[f]},function(a){this.append(a)});cache.set("TAOBAO_PARM",!0)}a();$("#taobao-form").el.submit();return;case "s4":window.open("http://www.caimincun.com");return;case "s5":window.open("http://www.soso.com/q?w="+b.value+"&unc=s200000_8&cid=union.s.wh&ie=gb2312");a();return}window.open("http://"+e+encodeURIComponent(b.value));a()}}}}();
$("#tool-tab li").each(function(a){HoverTab(a,function(){$("#tool-tab li").removeClass("tool-tab-select");a.className="tool-tab-select";var c=a.getAttribute("rel");$(".tb").hide();$("#"+c).show()})});function KeywordCount(a,c){if(a&&a!=""){var b=c||"http://www.tjj.com/index",d=(new Date).getTime(),e=new Image,f="",g;for(g in a)f+=g=="u"?"?"+g+"="+encodeURIComponent(a[g]):"&"+g+"="+encodeURIComponent(a[g]);e.src=b=="http://www.tjj.com/index"?b+f+"&i="+d:b+"?i="+d+f}}
DOMReady(function(){$("#mail_user_114la,#mail_passwd_114la,#f_int input,#q_int input").on("blur",function(a){cache.remove(a.id+"GETFOCUS")});$("#mail_user_114la,#mail_passwd_114la").on("focus",function(a){cache.set(a.id+"GETFOCUS",!0)})});
var daodao=function(){return{searchTravel:function(){var a=document.getElementById("daodao_travel_q").value,c=document.getElementById("daodao_travel_k").value,b="http://www.daodao.com/Search?m=13078";a&&!c?b+="&q="+encodeURIComponent(a):!a&&c?b+="&q="+encodeURIComponent(c):a&&c&&(b+="&q="+encodeURIComponent(a+"+"+c));window.open(b)}}}();
function goTop(a,c){var a=a||0.1,c=c||15,b=0,d=0;document.documentElement&&(b=document.documentElement.scrollLeft||0,d=document.documentElement.scrollTop||0);var e=1+a;window.scrollTo(Math.floor(b/e),Math.floor(d/e));(b>0||d>0)&&window.setTimeout("goTop("+a+", "+c+")",c)}function ResumeError(){return!0}
var showInput=function(a,c){var b=!1;$("#"+a).on("click",function(){$("#"+c).el.style.display=="none"?$("#"+c).show():$("#"+c).hide()});$("#"+a).on("mouseover",function(){b=!0});$("#"+a).on("mouseout",function(){b=!1});$("body").on("click",function(){b||$("#"+c).hide()})};showInput("inputArrow","inputList");$("#shuoxue").on("click",function(){$("#inputList").hide();return!1});hwInput("shuoxue","search","ssoud");
