$(function(){ //游船星级页效果 $("#sortType").change(function(){ $("#TmpsortType").val($(this).val()); $("#SearchForm").submit(); }); $(".pageNav li").css("cursor","pointer"); $(".pageNav li").click(function(){ $(".pageNav li").removeClass("active"); $("#stardiv-4,#stardiv-5").css("display","none"); $("#"+$(this).attr("class")).css("display",""); $(this).addClass("active"); }); //游船星级页效果 }); ca = 1 function displayCruiseInfo(o,s){ if (($("#wrapper").width()-$(o).offset().left)<400){ leftxx = $(o).offset().left-200; $("#"+s).css("left",leftxx); } $("#"+s).show(); ca = 1; $("#"+s).attr("ca", function() { return 1 }); } function hideCruiseInfo(s){ if ($("#"+s).attr("ca")!=2){return false;} $("#"+s).hide(); } function hci(s){ $("#"+s).attr("ca", function() { return 2 }); setTimeout("hideCruiseInfo('"+s+"')",100); } function getMonthDiff(dt1,dt2){ return dt2.getFullYear()*12+dt2.getMonth()-(dt1.getFullYear()*12+dt1.getMonth()); } function godate(o1,o2,a,o){ m=1; $("div.monthSelect.roundCorner ul li").removeClass(); if (o.tagName == "LI"){ o.className="active"; }else{ dt = new Date(o1,o2,01); ndt = new Date(); m = (getMonthDiff(ndt,dt)); $("div.monthSelect.roundCorner ul li").eq(m).addClass("active"); } $("#seriesCalendarTable").html("loading..."); $.get("/yangtzecruise/seriesdate.asp?year="+o1+"&month="+o2+"&ac="+a,function(data){ $("#seriesCalendarTable").html(data); }); } cpage = 1 function listimgpage(p){ if (p>1) {cpage=p; $("#previdno").hide(); $("#previd").show(); }else{ cpage=1; $("#previdno").show(); $("#previd").hide(); $("#nextid").show(); $("#nextidno").hide(); } startid = (p-1)*4; endid = startid + 3; $(".shipicList").hide(); for (i=startid;i<=endid;i++){ $("#listimg"+i).show(); if (i>=(allimg-1)){ $("#nextid").hide(); $("#nextidno").show(); return false; } } } $(function(){ $("select[name=sortType]").change(function() { $("#TmpsortType").val($(this).val()); $("#SearchForm").submit(); }); $("input[name=cCRI_SN]").next("a").click(function() { if($("input[name=cCRI_SN]:checked").length <= 1) { alert('err:less than 2');return false; } var cCRI_SN_split = "" ; //cCRI_SN_split 取得航期ID $("input[name=cCRI_SN]:checked").each(function(){ cCRI_SN_split = cCRI_SN_split + $(this).val() + "," }); location.href = "/yangtzecruise/compare-cruise.asp?cruiseid="+cCRI_SN_split }); }); $(function(){ $("select[name=sortType]").change(function() { $("#TmpsortType").val($(this).val()); $("#SearchForm").submit(); }); $("input[name=cCRI_SN]").next("a").click(function() { if($("input[name=cCRI_SN]:checked").length <= 1) { alert('err:less than 2');return false; } var cCRI_SN_split = "" ; //cCRI_SN_split 取得航期ID $("input[name=cCRI_SN]:checked").each(function(){ cCRI_SN_split = cCRI_SN_split + $(this).val() + "," }); location.href = "/yangtzecruise/compare-cruise.asp?cruiseid="+cCRI_SN_split }); }); $(function(){ $("#reviewSubmit").click(function(){ m_arr = new Array(); var email = RegCkElement("name","Please fill in a valid email address! Eg: service@chinahighlights.com","/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/","","",false); var passwd = StrIsNullOrEmpty("password","Please fill in your password.","","",false); $.post("/include/ajax.asp",{strtemp:"cruise-review-check-user",e:$("#name").val(),p:$("#password").val()},function(data){ m_arr = data.split("_"); }) if(email && passwd) { if(m_arr[0] == "0") { alert("log error!"); return false; } else { $("#form1").submit(); } } }); })