function isIE(){return document.all?true:false} function editperson(){$("#pf2").addClass("default-tab current");$("#pf1").removeClass();$("#persontab1").hide();$("#persontab2").show();} function displaypro(){$("#pf2").removeClass();$("#pf1").addClass("default-tab current");$("#persontab1").show();$("#persontab2").hide();} function displayselect(o){} function onSel(o,p,pn){$(".profliephoto li").removeClass();$(o).addClass("active");$("#profilephotoid").val(p);$("#profilephotoname").val(pn);} function saveSelProfilePhoto(){_ppn=$("#profilephotoid").val();_rtxt=$.ajax({async:false,type:"GET",url:"/community/profile/updateprofile.asp?action=upicon&ppn="+_ppn}).responseText;if(_rtxt.replace(/\s+/g,"").toLowerCase().substring(0,4)=="true"){$("#customerpic").attr("src","/community/profile/profilephoto/"+$("#profilephotoname").val());} generalDivWinClose();} function removeMsg(_n){_rtxt=$.ajax({async:false,type:"GET",url:"/community/include/delmessages.asp?m="+_n}).responseText;location.reload();} function doWinLogin(_s){_r=location.href;ShowIFrame('','/community/login-win.asp?r='+_r+'&s='+_s,630,350,'bottom');} function Keydown(evt,me,pe,se) {var keycode=window.event?evt.keyCode:evt.which;if(keycode==13)doLogin(me,pe,se);} function doLogin(formsign){var ec,cc,me,pe,se;if(typeof formsign=="string") {me="loginmail"+formsign;pe="loginpass"+formsign;se="loginErrTips"+formsign;} else {me="loginmail";pe="loginpass";se="loginErrTips";} ec=RegCkElement(me,"The email or password you've entered is incorrect.","/^(([\\u4E00-\\u9FA5]|[\\uFE30-\\uFEFF]|[\\d]|[a-zA-Z]|[\\_\\-\\.])+[\\@])(((([\\d]|[a-zA-Z]|[\\_\\-]|[\\[\\]\{\\}\>\\<])+[\\.])+)([\\d]|[a-zA-Z\\_\\-])+)$/","Email",se,false);if(!ec)return false;cc=StrIsNullOrEmpty(pe,"The email or password you've entered is incorrect.","",se,false);if(!cc)return false;webLoginAuth($("#"+me).val(),$("#"+pe).val(),$("input[name='s']").val(),se,$("#rememberme").attr("checked"));} function doLoginHref(){if(!doLogin())return;} function doWinLoginHref(){var ole,olp;ole=document.loginForm.loginmail.value;olp=document.loginForm.loginpass.value;if(ole==""||olp==""||ole.length<6){showLoginErrMsg("The email or password you've entered is incorrect.","loginErrTips");return false;} if(!webWinLoginAuth(ole,olp)){showLoginErrMsg("The email or password you've entered is incorrect.","loginErrTips");return false;} return true;} function getPass(){} function webLoginAuth(le,lp,ls,se,rm){$.post("/community/logincheck.asp",{loginmail:le,loginpass:lp,rememberme:rm},function(_sf){if(_sf=="true"){if(typeof ls=="string"){location.href=ls;}else{location.href="/community/customer-center/";}}else{showLoginErrMsg("The email or password you've entered is incorrect.",se);}});} function basecommMain(_s){parent.$("#personinfoComment").hide();parent.$("#commentLogin").hide();} function qaRightBaseMain(le,lp){parent.$("#personid").hide();parent.$("#qaLogin").hide();parent.$("#qabody").focus();} function qawinreplyMain(_n){nArray=_n.split("-");nid=nArray[1];parent.$("#replydivimg"+nid).hide();parent.$("#div"+nid).slideDown(300);} function webWinLoginAuth(le,lp){$.post("/community/logincheck.asp",{loginmail:le,loginpass:lp},function(_sf){if(_sf=="true"){sourcediv1=sourcediv;if(sourcediv.indexOf("-")){sourcediv1=sourcediv.split("-")[0];} switch(sourcediv1){case"qarightbase":qaRightBaseMain(le,lp);break;case"qawinreply":qawinreplyMain(sourcediv);break;case"basecomm":basecommMain(sourcediv);break;default:} parent.Check_Login();for(i=0;i\\<])+[\\.])+)([\\d]|[a-zA-Z\\_\\-])+)$/","","createAccountErrTips",false);if(!ec)return false;if(olp1!=olp2){showLoginErrMsg("Your password confirmation does not match.","createAccountErrTips");return false;} if(olp1.length<6){showLoginErrMsg("Your Password must be more than 6 characters.","createAccountErrTips");return false;} rtxt=$.ajax({async:false,type:"POST",url:"/community/save-create-account.asp",data:"cemail="+ole+"&cpass="+olp1+"&cname="+oln+"&vc="+vcode}).responseText;if(rtxt.replace(/\s+/g,"").toLowerCase()=="true"){loginFlag=true;location.href="/community/customer-center/";} else if(rtxt.replace(/\s+/g,"").toLowerCase()=="000"){showLoginErrMsg("Please enter the correct Verify Code","createAccountErrTips");return false} else{showLoginErrMsg("The email you've entered is not available.","createAccountErrTips");return false;}} function webCreateAccount(_u,_p,_n){return false;} function isLogin(){var loginFlag;loginFlag=false;rtxt=$.ajax({async:false,type:"GET",url:"/community/islogin.asp?"+Math.random()}).responseText;if(rtxt.replace(/\s+/g,"").toLowerCase()=="true"){loginFlag=true;} return loginFlag;} function qaReply(n){if(!isLogin()){doWinLogin("qawinreply-"+n);return;} $("#replydivimg"+n).hide();$("#div"+n).slideDown(300);$("#reply"+n).focus();} function qaSave(_o,n){$("#replydivimg"+n).show();writeQAtoA(_o,n);} function qaCancel(n){$("#replydivimg"+n).show();$("#div"+n).slideUp(300);} function writeQAtoQ(_o,_n,_e,_mf,_wf,_b){_title=document.title;_h1=isIE()?document.getElementsByTagName("H1")[0].innerText:document.getElementsByTagName("H1")[0].textContent;_url=location.href.replace("http://","");_url=_url.substring(_url.indexOf("/"),_url.length);if(!isLogin()){if(_n==""){alert("please input your name???");return false;} if(_e==""){alert("please input your email");return false;}} _wf=_wf?0:1;_mf=_mf?1:0;var o={name:_n,email:_e,mailflag:_mf,webflag:_wf,surl:_url,stitle:_title,body:_b};oldsrc=_o.src;_o.disabled="disabled";_o.src="/pic/loading.gif";$.post("/community/include/saveQA.inc.asp?action=q",{qaname:o.name,qaemail:o.email,qamailflag:o.mailflag,qawebflag:o.webflag,qasourceurl:o.surl,qasourcetitle:o.stitle,qabody:o.body,h1:_h1},function(_sf){if(parseInt(_sf)>0){if(parseInt(_wf)!=1){location.href="/forms/thankyou-questions.asp";}else{location.href="/faq/question/"+parseInt(_sf)+"/";}}else{alert("The question must be more than 20 characters long");_o.src=oldsrc;_o.disabled="";}});} function saveQAtoQonDiv(_n,_e,_mf,_wf,_b){writeQAtoQ(_n,_e,_mf,_wf,_b);generalDivWinClose();} function writeQAtoA(_o,o){oldsrc=_o.src;_o.disabled="disabled";_o.src="/pic/loading.gif";a_body=document.getElementById("reply"+o).value;$.post("/community/include/saveQA.inc.asp?action=a",{qaqid:o,qaabody:a_body},function(_sf){if(parseInt(_sf)>0){location.href="/faq/question/"+o+"/";}else{alert("The answer must be more than 20 characters long");_o.src=oldsrc;_o.disabled="";}});} function faqindexTab(_n){$(".qaNav ul li").eq(1).removeClass();$(".qaNav ul li").eq(2).removeClass();$("#lastquestion").hide();$("#Unanswered").hide();if(_n==1){$(".qaNav ul li").eq(1).addClass("active");$("#lastquestion").show();}else{$(".qaNav ul li").eq(2).addClass("active");$("#Unanswered").show();}} function updateNewsLetter(){var tmpt;tmpt="";for(i=0;i
"+_cname+"
on "+['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'][dt.getMonth()]+"."+dt.getDate()+","+dt.getFullYear()+" said
";tmpHtmlStr=tmpHtmlStr+"
";tmpHtmlStr=tmpHtmlStr+_cmsg+"
";tmpHtmlStr=tmpHtmlStr+"
" $(".commentList.roundCorner").append(tmpHtmlStr);commform.appendTo(".commentList.roundCorner");$("#commentMsg").val("");$("#CommCount").text(parseInt($("#CommCount").text())+1);}else{alert("System error!");}});} function generalDivWinClose(){$(document).trigger('close.facebox');} function stroyBack(){generalDivWinClose();location.href="index.asp";} function smtu(n){if(!isLogin()){alert("Please first login");return false;} _divid="sendmessages";_msg=document.getElementById(_divid+"_msg").value;if(_msg.length<10){alert("please input Messages,the message must be more than 10 characters long.");return false;} if(_msg.length>500){alert("The message must be less than 500 characters long.");return false;} rt=$.ajax({async:false,type:"GET",url:"/community/include/sendmessages.asp?u="+n+"&m="+_msg}).responseText;generalDivWinClose();} function hideNewsLetter(){generalDivWinClose();} function deleteTravelStory(n){generalDivWinClose();$.post("/community/travel-story/del-story.asp?sid="+n,function(_sf){});$("#trid"+n).fadeOut(300);} function deleteTravelNotes(n){generalDivWinClose();$.post("/community/travel-story/save-story.asp?action=delcity&nid="+n,function(_sf){});$("#trid"+n).fadeOut(300);} function saveStoryNewCity(_ac){_divid="newItinerary";_cityname=document.getElementById(_divid+"_newcityname").value;if(_cityname.length<2){alert("please input city name");return;} _tourdate=document.getElementById(_divid+"_newtourdate").value;if(_tourdate.length<2){alert("please input tour date");return;} _days=document.getElementById(_divid+"_tourdays").value;_sid=document.getElementById("sid").value;$.post("/community/travel-story/save-story.asp?action="+_ac,{cityname:_cityname,tourdate:_tourdate,sid:_sid,days:_days},function(_sf){if(parseInt(_sf)>0){generalDivWinClose();location.reload();}else{alert("The content cannot be null");}});} function storycheck(){st=document.getElementById("storytitle").value;sb=document.getElementById("storybody").value;sb=CKEDITOR.instances.storybody.getData();if(st==""||st.length>60){document.getElementById("stitleErrTips").style.display='';$("#stitleErrTips").css("opacity","100");$("#stitleErrTips").focus();return false;} if(sb==""||sb.length<100){$("#storyBodyErrTips").show();$("#storyBodyErrTips").css("opacity","100");$("#storyBodyErrTips").focus();return false;} if(document.addStory.tourdate.length==undefined){if(document.addStory.city.value==""){alert("please input cityname?");return false;} if(document.addStory.tourdate.value==""){alert("please input arrival date?");return false;}}else{for(n=0;nDelete This Place";if(tabObj.rows.length%2==0)isIE()?ggg.setAttribute("className","alt-row"):ggg.setAttribute("class","alt-row");} function delPlace(o){rn=document.getElementById("tr"+o).rowIndex;tabObj=document.getElementById("placeTable");tabObj.deleteRow(rn);for(u=1;u