﻿function xsl(v){for(var i=1;i<4;i++){$('#ct'+i).attr('class','tbsoff');$('#cct'+i).hide();}$('#ct'+v).attr('class','tbson');$('#cct'+v).show();}
function showt(v){for(var i=1;i<4;i++){$('#tl'+i).removeAttr('class');$('#tlist'+i).hide();}$('#tl'+v).attr('class','tlon');$('#tlist'+v).show();}
function swb(v){$('#tab1').removeAttr('class');$('#tab2').removeAttr('class');if(v=='1'){$('#tab1').attr('class','tab_on');$('#tab2').attr('class','tab_off');$('#tabc1').show();$('#tabc2').hide();}else{$('#tab1').attr('class','tab_off');$('#tab2').attr('class','tab_on');$('#tabc1').hide();$('#tabc2').show();}}
function dologin(){$.ajax({ type: "POST", url: '/User/Login.aspx', data: $('#loginform').serialize(), success: function(msg) { if (msg == "1") { location.href = location.href; } else { alert(msg); } }, error: function(request) { alert('数据提交失败，请重试！'); $('#btnedit').removeAttr('disabled'); } });return false;}
function order(vl, tk) {if (confirm('您确认要预订 ' + $('#' + tk).val() + ' 张票吗？')) {$.ajax({ type: "GET", beforeSend: function() { $('#loader').show(); }, complete: function() { $('#loader').hide(); }, url: "/User/Order.aspx", data: { v: encodeURI(vl), n: $('#' + tk).val() }, success: function(msg) { if (msg == "1") { if (confirm('订票成功，请等待审核！现在去查看订票状态?')) { location.href = '/User/Main.aspx'; } } else if (msg == "2") { alert('您只有登录后才能进行预订！\n请在页面最上方登录处登录！'); } else { alert(msg); } }, error: function(request) { alert('数据提交遇到未知错误，请联系管理员！'); } });}}
function sitesearch() {location.href = '/Search.aspx?tb=line&kw=' + encodeURI($('#sitekey').val());}
function dosline() {location.href = '/Search.aspx?tbl=line&cate=' + encodeURI($('#tourcate').val()) + '&days=' + encodeURI($('#days').val()) + '&kw=' + encodeURI($('#area').val());}
function dohotel() {location.href='/Hotel/Search.aspx?htitle='+encodeURIComponent($('#htitle').val())+'&hstar='+encodeURIComponent($('#hstar').val())+'&harea='+encodeURIComponent($('#harea').val())+'&hprice='+encodeURIComponent($('#hprice').val())}
$(document).ready(function() {$('#menu ul li:last-child').css('background', 'none');})
