$(function(){ $.ajax({ type: "GET", url: "/include/tmp_index_search.htm", success: function(msg){ $("#searchBox").html(msg); } }); $("#uk,#aus,#all").hide(); $.ajax({ type: "GET", url: "/uc-client/AspHttp_Accept_Language.asp", success: function(msg){ //msg = "en-au"; switch(msg){ case "en-gb" : $("#uk").show(); break; case "en-au" : $("#aus").show(); break; default: $("#all").show(); break; } } }); }); function googlesreachHeadernew(isEnter) { var temphref,g_q temphref = null; g_q = null; g_q = $("#g_q").val(); temphref = $("#g_sa").attr("href"); temphref = temphref + "&q=" +g_q; if(isEnter==1){ window.location.href=temphref; }else{ $("#g_sa").attr("href",temphref); } } var login_sign= false; var URL = "/uc-client/client.asp"; var Ihide = true; function Check_Login() { $.get(URL + "?c=login&round=" + GetRandom(1000),function(data){ if ($(data).find("UserID").text() =="0"){ login_sign = false; }else{ login_sign = true; Logined($(data).find("NickName").text()); } },"xml"); } Mlogin(0); function Mlogin(signno) { var Email,Pass; Email = $("#loginmail1").val(); Pass = $("#loginpass1").val(); rememberme = $("#rememberme").attr("checked"); if (login_sign == false && signno ==1) { if (Email=="") return alert("Email required!"); if (Pass=="") return alert("Password required!"); $.ajax({ type: "POST",url: URL, data: "c=login&loginmail=" + Email + "&loginpass=" + Pass + "&rememberme="+rememberme, cache: false,dataType: "xml", success: function(msg){ if ($(msg).find("UserID").text()!="0"){ Logined($(msg).find("NickName").text()); }else{ alert("Wrong email or password!"); } } }); } } function GetRandom(n){ return Math.floor( Math.random() * n+1)}; function MSingOut() { $.get(URL + "?c=signout&round=" + GetRandom(1000),function(data){ if ($(data).find("Statu").text() =="1"){ login_sign = false; initLgoin(); } },"text"); } function initLgoin(){ $("#headLogin .logIn,#headLogin .signUp").show(); $("#headLogin .logout,#headLogin .logged,#headLogin .loginForm").hide(); } function showLoginForm(){ $("#headLogin .logIn img").attr("src","/pic/red-arrow-up.png"); $("#headLogin .loginForm").fadeIn(300); } function hideLoginForm(){ $("#headLogin .logIn img").attr("src","/pic/red-arrow-down.png"); $("#headLogin .loginForm").fadeOut(100); $("#headLogin_overlay").remove(); } function Logined(NickName){ $("#headLogin .signUp,#headLogin .logIn,#headLogin .loginForm").hide(); $("#headLogin .logout,#headLogin .logged").show(); $("#headLogin .logged a").text(NickName); } function show(){ $("#headLogin .logIn").click(function(){ if($("#headLogin .loginForm").is(":visible")){hideLoginForm();}else{showLoginForm();} }); $("#headLogin .loginForm").mouseup(function() {return false}); $(document).mouseup(function(e) { if($(e.target).parent("#headLogin").length==0) {hideLoginForm();} }); } $(function() { Check_Login();show(); var mainMenu=$("#mainMenu li"); var subNav=$("#subMenu ul"); var subNum=subNav.length; $.get("/siteMenu.asp",function(data){ var allSubNav=data.split("{links}"); var allNum=allSubNav.length-2; var thisNav=-1; $(mainMenu).each(function(q){ if($(this).hasClass("active")){ thisNav=q; } }); allSubNav.splice(0,1); for(var i=0;i // JavaScript Document $(function(){ $(".cityDetail a img").attr("height","110"); $(".cityDetail a img").attr("width","143"); }); var theImages = new Array(); // do not change this theImages[0] = '/css/images/homepage/charles.gif'; theImages[1] = '/css/images/homepage/carsten.gif'; theImages[2] = '/css/images/homepage/jose.gif'; var theImages1 = new Array(); // do not change this theImages1[0] = '/css/images/homepage/tiananmen.jpg'; theImages1[1] = '/css/images/homepage/great-wall.gif'; var theImages2 = new Array(); // do not change this theImages2[0] = '/css/images/homepage/shanghai-expo.jpg'; theImages2[1] = '/css/images/homepage/the-bund-2.gif'; var theImages3 = new Array(); // do not change this theImages3[0] = '/css/images/homepage/guilin.jpg'; theImages3[1] = '/css/images/homepage/terrace-fiedl.gif'; var theImages4 = new Array() // do not change this theImages4[0] = '/css/images/homepage/terra-cotta.jpg'; theImages4[1] = '/css/images/homepage/big-goose-pagoda.gif'; var theImages5 = new Array() // do not change this theImages5[0] = '/image/tour-2010/winter/harbin-1.jpg'; theImages5[1] = '/image/tour-2010/winter/harbin-2.jpg'; var theImages6 = new Array(); // do not change this theImages6[0] = '/image/tour-2010/winter/yabuli-1.jpg'; theImages6[1] = '/image/tour-2010/winter/yabuli-2.jpg'; var theImages7 = new Array(); // do not change this theImages7[0] = '/image/tour-2010/winter/sanya.jpg'; theImages7[1] = '/image/tour-2010/winter/sanya-2.jpg'; var theImages8 = new Array(); // do not change this theImages8[0] = '/image/TA/tripadvisor-11.gif'; theImages8[1] = '/image/TA/tripadvisor-4.gif'; theImages8[2] = '/image/TA/tripadvisor-8.gif'; theImages8[3] = '/image/TA/tripadvisor-6.gif'; var theImages9 = new Array(); // do not change this theImages9[0] = '/image/TA/ta-1.gif'; theImages9[1] = '/image/TA/ta-2.gif'; theImages9[2] = '/image/TA/ta-3.gif'; theImages9[3] = '/image/TA/ta-4.gif'; function showImage(){ var j = 0, p = theImages.length,whichImage = Math.round(Math.random()*(p-1));//,preBuffer = new Image(); //preBuffer.src = theImages[whichImage]; document.write('Feedback Video'); } function showImage1(){ var j = 0, p = theImages1.length,whichImage = Math.round(Math.random()*(p-1)); document.write('Beijing Travel Guide'); } function showImage2(){ var j = 0, p = theImages2.length,whichImage = Math.round(Math.random()*(p-1)); document.write('Shanghai Travel Guide'); } function showImage3(){ var j = 0, p = theImages3.length,whichImage = Math.round(Math.random()*(p-1)); document.write('Guilin Travel Guide'); } function showImage4(){ var j = 0, p = theImages4.length,whichImage = Math.round(Math.random()*(p-1)); document.write('Xian Travel Guide'); } function showImage5(){ var j = 0, p = theImages5.length,whichImage = Math.round(Math.random()*(p-1)); document.write(''); } function showImage6(){ var j = 0, p = theImages6.length,whichImage = Math.round(Math.random()*(p-1)); document.write(''); } function showImage7(){ var j = 0, p = theImages7.length,whichImage = Math.round(Math.random()*(p-1)); document.write(''); } function showImage8(){ var j = 0, p = theImages8.length,whichImage = Math.round(Math.random()*(p-1)); document.write('Recommendation from TripAdvisor'); } function showImage9(){ var j = 0, p = theImages9.length,whichImage = Math.round(Math.random()*(p-1)); document.write('Recommendation from TripAdvisor'); }; //