//---Cookies
function SetCookie(name,value)//两个参数，一个是cookie的名，一个是值
{
	document.cookie = name + "="+ escape(value)+ ";" ;
}
//取cookies函数
function getCookie(name)
{
	var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|\$)"));
	if(arr != null) return unescape(arr[2]);
	return null;

}

//--- 会员登录切换

//---判断用户名口令是否为空 Programing by Jeftom---
var User_ID = getCookie('User_ID');
var Serial_no = getCookie('Serial_no');
if (User_ID = 'null')
{
	User_ID = '';
}
if (Serial_no = 'null')
{
	Serial_no = '';
}


//---页面跳转开始---
function jumpto(theURL){
	if (theURL == 0)	// 国内酒店预定查询跳转
	{
		document.location = 'http://hotel.lvee.cn:9090/HBE/Hotel/WebHotelEntranceAction.action?Corp_ID=CAN378&MODULE=CAN378_hotel_new.htm';
	}
	if (theURL == 1)	// 国内机票
	{
		document.location = 'http://www.lvee.cn/cgishell/module/air/air_res.pl?User_ID='+User_ID+'&Serial_no='+Serial_no+'&Corp_ID=CAN378&org=CAN&via=CAN&dst=PEK&MODULE=CAN378_air_new.htm';
	}
	else if (theURL == 2)	// 会员注册
	{
		document.location = 'http://www.lvee.cn/cgishell/module/reg.pl?Corp_ID=CAN378&cols=98&MODULE=CAN378_member.htm';
	}
	else if (theURL == 3)	// 旅游度假
	{
		document.location = 'http://www.lvee.cn/cgishell/module/tour/tour_query.pl?Corp_ID=CAN378&MODULE=CAN378_tour.htm';
	}
	else if (theURL == 4)	// 国际机票
	{
		document.location = 'http://www.lvee.cn/cgishell/module/airinte/airinte_list.pl?Corp_ID=CAN378&MODULE=CAN378_inter_new.htm&href=/cgishell/module/airinte/airinte_list.pl';
	}
	else if (theURL == 5)	// 签证
	{
		document.location = 'http://www.lvee.cn/cgishell/module/visa/visa_manager.pl?&Corp_ID=CAN378&MODULE=CAN378_visa.htm';
	}
	else if (theURL == 6)	//VIP贵宾申请
	{
		document.location = 'http://www.lvee.cn/vip_reg.htm';
	}
	else if (theURL == 7)	//积分商城
	{
		document.location = 'http://www.lvee.cn/cgishell/module/gift.pl?Corp_ID=CAN378&MODULE=CAN378_member_2.htm&Group_ID=0&width=650';
	}
	else if (theURL == 8)	// 商务租车
	{
		document.location = 'http://www.lvee.cn/cgishell/module/auto/Auto_query.pl?Corp_ID=CAN378&MODULE=CAN378_auto.htm';
	}
        if (theURL == 9)	// 网上转账
	{
		document.location = 'http://www.lvee.cn/cgishell/golden/pub/other/Net_transfer.pl?Corp_ID=CAN378&MODULE=CAN378_transfer.htm';
	}
        if (theURL == 10)	// 网上值机
	{
		document.location = 'http://www.lvee.cn/zhiji/index.html';
	}
	else if (theURL == 11)	// 主页
	{
		document.location = 'http://www.lvee.cn/index.html';
	}
	else if (theURL == 12)	// 主页
	{
		document.location = 'http://www.lvee.cn/easyboarding/main.html';
	}
	else if (theURL == 13)	// 白云机场
	{
		document.location = 'http://news.lvee.cn/html/jcdh/index.html';
	}
	else if (theURL == 14)	// 国际机票
	{
		document.location = 'http://www.lvee.cn/cgishell/golden/admin/inteair/inteair_res.pl?Corp_ID=CAN378&MODULE=CAN378_inter_new.htm&href=/cgishell/module/airinte/airinte_list.pl';
	}
	else if (theURL == 15)	// 国际机票
	{
		document.location = 'http://www.lvee.cn/cgishell/module/find_pass.pl?Corp_ID=CAN378&MODULE=CAN378_air.htm&userid=';
	}
	
}
//---页面跳转结束---


//---隐藏显示层开始---
function ee(n){
	var mainTable = document.getElementById("mainTable");
	for(i=0;i<mainTable.tBodies.length;i++){
		mainTable.tBodies[i].style.display="none";
		mainTable.tBodies[n].style.display="block";
	}
}
//---隐藏显示层结束---

//---登录检测开始---
function Login(){
	login=document.frmLogin.User_ID.value;
	pwd=document.frmLogin.Password.value;
	if (login=="")  {
		alert("请填写您的用户名！");
		document.frmLogin.User_ID.focus();
		return false;
	}
	if (pwd=="")   {
		alert("请填写登录口令！");
		document.frmLogin.Password.focus();
		return false;
	}
}

function VipLogin(){
	login=document.frmVipLogin.User_ID.value;
	pwd=document.frmVipLogin.Password.value;
	if (login=="")  {
		alert("请填写您的用户名！");
		document.frmVipLogin.User_ID.focus();
		return false;
	}
	if (pwd=="")   {
		alert("请填写登录口令！");
		document.frmVipLogin.Password.focus();
		return false;
	}
}
//---登录检测结束---


//---登录检测开始---
function Login2(){
	login=document.frmLogin2.User_ID.value;
	pwd=document.frmLogin2.Password.value;
	if (login=="")  {
		alert("请填写您的用户名！");
		document.frmLogin2.User_ID.focus();
		return false;
	}
	if (pwd=="")   {
		alert("请填写登录口令！");
		document.frmLogin2.Password.focus();
		return false;
	}
	frmLogin2.submit();
}
//---登录检测结束---

