// JavaScript Document
function jumpLine(){
document.form1.submit();
}


function jumpZuche(){
document.fzc.submit();
}

function jumpHotel(){
document.fhotel.submit();
}

function jumpTickets(){
document.ftickets.submit();
}


function Clear(x)
{
document.getElementById(x).value="";

}


  function CheckForm(){
	 
	var title=document.getElementById("title").value;
	if(title==""){
	alert("留言标题不能为空！");
	document.getElementById("title").focus();
	return false;
	}
	

	var CheckCode=document.getElementById("CheckCode").value;
	if(CheckCode==""){
	alert("验证码不能为空！");
	document.getElementById("CheckCode").focus();
	return false;
	}
	
	  
   var User=document.getElementById("User").value;
	if(User==""){
	alert("您的姓名不能为空！");
	document.getElementById("User").focus();
	return false;
	}
	
    
	var Tel=document.getElementById("Tel").value;
	if(Tel==""){
	alert("联系方式不能为空！");
	document.getElementById("Tel").focus();
	return false;
	}
    
	
	}
	
function CkeckDp(){
	var Content=document.getElementById("Content").value;
	if(Content.length<=8){
	alert("内容不能少于8个字符！");
	document.getElementById("Content").focus();
	return false;
	}
}
		
	

function line(id){
location.href="/yuding/line_yuding.asp?Id="+id;
}
function hotel(id,i){
location.href="/yuding/HotelBook.asp?Id="+id+"&RoomId="+i;
} 

 function jing(id){
location.href="/yuding/jing_yuding.asp?Id="+id;
} 

 function che(id){
location.href="/yuding/che_yuding.asp?Id="+id;
} 

function validateNum(sDouble)
{
	var re = /^\d+(?=\.{0,1}\d+$|$)/
	return re.test(sDouble)
}
	
function GoPage(url2,url){
  var curpage=document.getElementById("curpage").value;
  if (!validateNum(curpage)){
   alert("请输入数字！");
   document.getElementById("curpage").value="";
   return false;
  }else{
  if (curpage==1){
	  location.href="/"+url2+"/"+url+"/";
  }else{ 
    location.href="/"+url2+"/"+url+"/Index_"+curpage+".html";
  }
  
  }
}


function GoPageList(url2){
  var curpage=document.getElementById("curpage").value;
  if (!validateNum(curpage)){
   alert("请输入数字！");
   document.getElementById("curpage").value="";
   return false;
  }else{
  if (curpage==1){
	  location.href="/"+url2+"/";
  }else{ 
    location.href="/"+url2+"/Index_"+curpage+".html";
  }
  
  }
}


function GoSearch(){
  var curpage=document.getElementById("curpage").value;
  if (!validateNum(curpage)){
   alert("请输入数字！");
   document.getElementById("curpage").value="";
   return false;
  }else{
  fromSearch.submit();
  }
}


function initArray(){ 
	this.length=initArray.arguments.length 
	for(var i=0;i<this.length;i++) 
		this[i+1]=initArray.arguments[i]
}


function getdate(){
	today=new Date(); 
	var d=new initArray( " 星期日 ", " 星期一 ", " 星期二 ", " 星期三 ", " 星期四 ", " 星期五 ", " 星期六 ");
	document.write("<font color='#ffffff'style='font-size:12px;font-family: 宋体'> ",today.getYear(),"年",today.getMonth()+1,"月",today.getDate(),"日 ",d[today.getDay()+1], today.getHours(),":", today.getMinutes(), ":", today.getSeconds() , "</font>" ); 
}

/*****/

function addfavorite(){//加入收藏   
   if (document.all){
      window.external.addFavorite(document.location.href,document.title);   
   }else if (window.sidebar){   
      window.sidebar.addPanel(document.title,document.location.href, "");   
   }   
}
   
  
//推荐使用。   
function SetHomepage(){//设为首页   
   if(document.all){   
      document.body.style.behavior="url(#default#homepage)";   
      document.body.setHomePage("http://"+document.location.host+"/");   
   }   
   else if(window.sidebar){   
        if(window.netscape){   
             try{   
                 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");   
             }   
             catch(e){   
                 alert("您的浏览器未启用[设为首页]功能，开启方法：先在地址栏内输入about:config,然后将项 signed.applets.codebase_principal_support 值该为true即可");   
             }   
        }   
        var prefs=Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);   
        prefs.setCharPref("browser.startup.homepage","http://"+document.location.host+"/");   
   }   
}


  var tdClass

function SetClass(td){
		tdClass=td.className;
		td.className='trclass-check';
}
function GetClass(td){
		td.className=tdClass
}



