﻿// JScript 文件
var xmlhttp;  
 function go()
  {
//	 var cname=document.getElementById('Account').value;
//	 if(cname!='')
//	 {
	     if(window.ActiveXObject)
     {
         xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
     }
     else
     {
         xmlhttp=new xmlHttpRequest();
     }
     //alert(0);
     xmlhttp.onreadystatechange=handchange;
     xmlhttp.open("post","http://forum.tianker.com.cn/default4.aspx?cname=lihao" ,true);
     
     xmlhttp.send(null);
	 }
  //}	
		   
function handchange()
{
 
   if(xmlhttp.readystate==4)
   { 
      if(xmlhttp.status==200)
      {  
         //document.getElementById("rs").innerHTML=xmlhttp.ResponseText;
         
         alert(xmlhttp.ResponseText)
         //alert(document.cookie.length.ToString())
      }
   }
}
function toggleMsg() {
    $('#overlay').toggle();
    $('#msgbox').toggle();
    }
function GetLinedetail(lineid)
{ //alert($("#times").val())
   $.ajax({
   type:"POST",
   async: false,
   url:"/asc/GetLineDetail.aspx",
   data:"LineId="+ lineid +"&Times="+ $("#times").val(),
   success:function(html){
   if(html!='')
   {
      $("#linedetail").empty();
      $("#linedetail").append(html);
   }
   }   
   })
}
function change(id)
{     
   $("#d"+id).removeClass();
   $("#d"+id).addClass("mover");
}
function unchange(id)
{     
   $("#d"+id).removeClass();
   $("#d"+id).addClass("nomal");
}
function GetDetails(detailsid)
{ 
    toggleMsg();   
    $.ajax({
   type:"POST",
   async: false,
   url:"/asc/GetLinedetails.aspx",
   data:"DId="+ detailsid,
   success:function(html){
   if(html!='')
   {      
      $("#details").empty();
      $("#details").append(html);
       toggleMsg();
       resize();
   }
   else
   {
   //
   $("#details").empty();
     $("#details").append("该旅行社没有上传线路详情!");
      toggleMsg();
   }
   },
   timeout: 1000
//   error:function(xmlHttpRequest,error)
//   {
//   alert(dd);
//   }      
   })  
}
function resize()
{
  $("#details>img").addClass("size");
}
function Resize(t)
{
  if(t=="B")
  {
    $("#details>img").removeClass();
    $("#details>img").addClass("rsizeb");
  }
  else
  {
   $("#details>img").removeClass();
     $("#details>img").addClass("size");
  }
}
function book()
{
   var email= $("#txtEmail").val();
  if(email=='')
  {  
     alert('邮箱地址不能为空!');
     return;
  }
  else
  {
     if(email.search("^(?:\\w+\\.?)*\\w+@(?:\\w+\\.?)*\\w+$")!=0)
     {
        alert("请输入有效的邮件地址!");
        $("#txtEmail").val('');
        return;
     }
  }
   $.ajax({
   type:"POST",
   async: true,
   url:"/asc/TravelLineBook.aspx",
   data:"email="+ email,
   success:function(html){
   if(html!='')
   {
     alert(html);
     $("#txtEmail").val('');
   }
   }   
   })
}
function select(t)
{
   $("#times").val(t);
   $("#showtimes").empty();
   $("#showtimes").append('第'+t +'期');  
//   $("st2>a").removeClass();
//   $("st2>a").addClass("selecttimes");
   GetLinedetail(1);
}

$("#down").click(function(){ alert() })

function downdts(s)
{
    location.href='getsource.aspx?dts='+ s;
}