// 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 User=document.getElementById("User").value;
	if(User==""){
	alert("您的姓名不能为空！");
	document.getElementById("User").focus();
	return false;
	}
	var title=document.getElementById("Title").value;
	if(title==""){
	alert("留言标题不能为空！");
	document.getElementById("Title").focus();
	return false;
	}
	
	var Content=document.getElementById("Content").value;
	if(Content==""){
	alert("留言内容不能为空！");
	document.getElementById("Content").focus();
	return false;
	}
	
	var CheckCode=document.getElementById("CheckCode").value;
	if(CheckCode==""){
	alert("验证码不能为空！");
	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(url){
  var curpage=document.getElementById("curpage").value;
  if (!validateNum(curpage)){
   alert("请输入数字！");
   document.getElementById("curpage").value="";
   return false;
  }else{
  location.href=url+"_"+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='#0033FF'style='font-size:12px;font-family: 宋体'> ",today.getYear(),"年",today.getMonth()+1,"月",today.getDate(),"日",d[today.getDay()+1],"</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+"/");   
   }   
}



