var menu_normal = new Array(new Image(), new Image(), new Image(), new Image(), new Image(), new Image(), new Image(), new Image(), new Image());
menu_normal[0].src = "../templates/menu/btn_home_normal.gif";
menu_normal[2].src = "../templates/menu/btn_vietnam_normal.gif";
menu_normal[3].src = "../templates/menu/btn_laos_normal.gif";
menu_normal[4].src = "../templates/menu/btn_cambodia_normal.gif";
menu_normal[5].src = "../templates/menu/btn_thailand_normal.gif";
menu_normal[6].src = "../templates/menu/btn_myanmar_normal.gif";
menu_normal[1].src = "../templates/menu/btn_china_normal.gif";
menu_normal[7].src = "../templates/menu/btn_seasia_normal.gif";
menu_normal[8].src = "../templates/menu/btn_grouptravel_normal.gif";
var menu_onmouseover = new Array(new Image(), new Image(), new Image(), new Image(), new Image(), new Image(), new Image(), new Image(), new Image());
menu_onmouseover[0].src = "../templates/menu/btn_home_onmouseover.gif";
menu_onmouseover[2].src = "../templates/menu/btn_vietnam_onmouseover.gif";
menu_onmouseover[3].src = "../templates/menu/btn_laos_onmouseover.gif";
menu_onmouseover[4].src = "../templates/menu/btn_cambodia_onmouseover.gif";
menu_onmouseover[5].src = "../templates/menu/btn_thailand_onmouseover.gif";
menu_onmouseover[6].src = "../templates/menu/btn_myanmar_onmouseover.gif";
menu_onmouseover[1].src = "../templates/menu/btn_china_onmouseover.gif";
menu_onmouseover[7].src = "../templates/menu/btn_seasia_onmouseover.gif";
menu_onmouseover[8].src = "../templates/menu/btn_grouptravel_onmouseover.gif";
function outMenu(id)
{
	var out = document.getElementById(id);	
	out.src = menu_normal[id].src
}
function overMenu(id)
{
	var over = document.getElementById(id);	
	over.src = menu_onmouseover[id].src
}
/* ----------------------------------------------------------------------------------------- */
var tour1 = new Image();
tour1.src = "http://viettravellink.com/aaa/find_tour_active.gif";
var tour2 = new Image();
tour2.src = "http://viettravellink.com/aaa/find_tour.gif";
var hotel1 = new Image();
hotel1.src = "http://viettravellink.com/aaa/find_hotel_active.gif";
var hotel2 = new Image();
hotel2.src = "http://viettravellink.com/aaa/find_hotel.gif";
var map1 = new Image();
map1.src = "http://viettravellink.com/aaa/find_map_active.gif";
var map2 = new Image();
map2.src = "http://viettravellink.com/aaa/find_map.gif";
function changeActive(id)
{
	var find_tour = document.getElementById("find_tour");
	var find_hotel = document.getElementById("find_hotel");
	var find_map = document.getElementById("find_map");
	var find_tour_content = document.getElementById("find_tour_content");
	var find_hotel_content = document.getElementById("find_hotel_content");
	var find_map_content = document.getElementById("find_map_content");
	if(id==1)
	{
		find_tour.src = tour1.src;
		find_hotel.src = hotel2.src;
		find_map.src = map2.src;
		find_hotel_content.style.display = "none";
		find_tour_content.style.display = "block";
		find_map_content.style.display = "none";
	}
	if(id==2)
	{
		find_tour.src = tour2.src;
		find_hotel.src = hotel1.src;
		find_map.src = map2.src;
		find_hotel_content.style.display = "block";
		find_tour_content.style.display = "none";
		find_map_content.style.display = "none";
	}
	if(id==3)
	{
		find_tour.src = tour2.src;
		find_hotel.src = hotel2.src;
		find_map.src = map1.src;
		find_hotel_content.style.display = "none";
		find_tour_content.style.display = "none";
		find_map_content.style.display = "block";
	}
}
var map = new Image();
map.src = "http://viettravellink.com/aaa/seasia.gif";
var vn_map = new Image();
vn_map.src = "http://viettravellink.com/aaa/seasia_vn.gif"
var laos_map = new Image();
laos_map.src = "http://viettravellink.com/aaa/seasia_laos.gif"
var cambodia_map = new Image();
cambodia_map.src = "http://viettravellink.com/aaa/seasia_cambodia.gif"
var thailand_map = new Image();
thailand_map.src = "http://viettravellink.com/aaa/seasia_thailand.gif"
var myanmar_map = new Image();
myanmar_map.src = "http://viettravellink.com/aaa/seasia_myanmar.gif"
function showMap(id)
{
	obj = document.getElementById("seasia");
	if(id == 1)
	{
		obj.src = vn_map.src
	}
	if(id == 2)
	{
		obj.src = laos_map.src
	}
	if(id == 3)
	{
		obj.src = cambodia_map.src
	}
	if(id == 4)
	{
		obj.src = thailand_map.src
	}
	if(id == 5)
	{
		obj.src = myanmar_map.src
	}
}
function check_special_character(element)// useful for reuse
{
	re = /[^A-Za-z0-9_]/;
	if(re.test(element.value))
	{
		alert("Don't input special character: * \' ? + $ & % ...");
		element.value="";
		element.focus();
		return false;
	}
	else
	{
		return true;	
	}
}
function check_tailor_made_tour()
{
	with(document.customtour_form)
	{
		if(txtFirstName.value == "")
		{
			alert("You have to input your first name.");
			txtFirstName.focus();
			return false;
		}
		if(txtLastName.value == "")
		{
			alert("You have to input your last name.");
			txtLastName.focus();
			return false;
		}
		if(slNationality.value == 0)
		{
			alert("You have to input your nationality.");
			slNationality.focus();
			return false;
		}
	    if(txtHomeAddress.value == "" && txtOfficeAddress.value=="")
		{
			alert("You have to input home address or office address.");
			txtHomeAddress.focus();
			return false;
		}
		if(txtCity.value == "")
		{
			alert("You have to input your city.");
			txtCity.focus();
			return false;
		}
		if(slCountry.value == 0)
		{
			alert("You have to input your country.");
			slCountry.focus();
			return false;
		}
		if(txtEmail.value == "")
		{
			alert("You have to input your email.");
			txtEmail.focus();
			return false;
		}
		re=/^[a-zA-Z0-9\_\.]+@[a-zA-Z0-9\_]+(\.\w+)+$/;
		if(!re.test(txtEmail.value))
		{
			alert("You have to input your correct email.");
			txtEmail.select();
			return false;
		}
		re1 = /[^0-9]/;
		if(txtHomePhone.value == "")
		{
			alert("Contact phone is not blank.");
			txtHomePhone.focus();
			return false;
		}
		if(re1.test(txtHomePhone.value))
		{
			alert("Contact phone is number.");
			txtHomePhone.focus();
			return false;	
		}
		if(txtAnticipateDate.value == "")
		{
			alert("You have to input your anticipate date.");
			txtAnticipateDate.focus();
			return false;
		}
		date = /^[0-9]{1,2}-[0-9]{1,2}-[0-9]{4}$/;
		if(!date.test(txtAnticipateDate.value))
		{
			alert("You have input correct date format : dd-mm-yyyy ");
			txtAnticipateDate.select();
			return false;
		}
		if(txtPeopleNumber.value == "")
		{
			alert("You have to input your people number.");
			txtPeopleNumber.focus();
			return false;
		}
		if(re1.test(txtPeopleNumber.value))
		{
			alert("People number is number");
			txtPeopleNumber.select();
			return false;
		}
		if(txtDayNumber.value == "")
		{
			alert("You have to input your day number.");
			txtDayNumber.focus();
			return false;
		}
		if(re1.test(txtDayNumber.value))
		{
			alert("People number is number");
			txtDayNumber.select();
			return false;
		}
		if(slAccommodation.value == 0)
		{
			alert("You have to choose one option");
			slAccommodation.focus();
			return false;
		}
	}
	return true;
}
function check_agree()
{
	if(document.getElementById("agree").checked == true)
	{
		document.getElementById("btnSubmit").disabled = false;	
	}
	else
	{
		document.getElementById("btnSubmit").disabled = true;
	}
}
function check_travel_agent()
{
	with(document.travelagent_form)
	{
		if(txtUsername.value == "")
		{
			alert("You have to input username.");
			txtUsername.focus();
			return false;
		}
		if(txtPassword.value == "")
		{
			alert("You have to input password");
			txtPassword.focus();
			return false;
		}
		if(txtPassword.value.length < 6)
		{
			alert("Password contains at least 6 character");
			txtPassword.focus();
			return false;
		}
		if(txtRetype.value == "")
		{
			alert("You have to retype password.");
			txtRetype.focus();
			return false;
		}
		if(txtRetype.value.length < 6)
		{
			alert("Password contains at least 6 character");
			txtRetype.focus();
			return false;
		}
		if(txtPassword.value != txtRetype.value)
		{
			alert("Password and Retype Password is not the same.");
			txtRetype.select();
			return false;
		}
		if(txtAnswer.value == "")
		{
			alert("You have to input answer.");
			txtAnswer.focus();
			return false;
		}
		if(txtFirstName.value == "")
		{
			alert("You have to input firstname.");
			txtFirstName.focus();
			return false;
		}
		if(txtLastName.value == "")
		{
			alert("You have to input lastname.");
			txtLastName.focus();
			return false;
		}
		if(slNationality.value == 0)
		{
			alert("You have choose your nationality.");
			slNationality.focus();
			return false;
		}
		if(txtEmail.value == "")
		{
			alert("You have to input email.");
			txtEmail.focus();
			return false;
		}
		re=/^[a-zA-Z0-9\_\.]+@[a-zA-Z0-9\_]+(\.\w+)+$/;
		if(!re.test(txtEmail.value))
		{
			alert("You have to input correct email.");
			txtEmail.select();
			return false;
		}
		if(txtOfficeName.value == "")
		{
			alert("You have to input Company name.");
			txtOfficeName.focus();
			return false;
		}
		if(txtOfficeAddress.value == "")
		{
			alert("You have to input Company Address.");
			txtOfficeAddress.focus();
			return false;
		}
		if(txtOfficeEmail.value == "")
		{
			alert("You have to input Company email.");
			txtOfficeEmail.focus();
			return false;
		}
		re1=/^[a-zA-Z0-9\_\.]+@[a-zA-Z0-9\_]+(\.\w+)+$/;
		if(!re1.test(txtOfficeEmail.value))
		{
			alert("You have to input correct Company email.");
			txtOfficeEmail.select();
			return false;
		}
		if(txtOfficePhone.value == "")
		{
			alert("You have to input phone number.");
			txtOfficePhone.focus();
			return false;
		}
		re2 = /[^0-9]/;
		if(re2.test(txtOfficePhone.value))
		{
			alert("Phone number only contain number.");
			txtOfficePhone.focus();
			return false;
		}
		if(txtOfficeFax.value == "")
		{
			alert("You have to input fax number.");
			txtOfficeFax.focus();
			return false;
		}
		if(re2.test(txtOfficeFax.value))
		{
			alert("Fax number only contain number.");
			txtOfficeFax.focus();
			return false;
		}
		if(txtOfficeEstablish.value == "")
		{
			alert("You have to input date of company establish.");
			txtOfficeEstablish.focus();
			return false;
		}
		date = /^[0-9]{1,2}-[0-9]{1,2}-[0-9]{4}$/;
		if(!date.test(txtOfficeEstablish.value))
		{
			alert("You have input correct date format : dd-mm-yyyy ");
			txtOfficeEstablish.select();
			return false;
		}
		if(txtOfficeStaff.value == "")
		{
			alert("You have to input your staff number.");
			txtOfficeStaff.focus();
			return false;
		}
		re3 = /[^0-9]/;
		if(re3.test(txtOfficeStaff.value))
		{
			alert("Staff number only contain number.");
			txtOfficeStaff.focus();
			return false;
		}
		if(txtOfficeMarket.value == "")
		{
			alert("You have to input market");
			txtOfficeMarket.focus();
			return false;
		}
		if(ckbAgree.checked == false)
		{
			alert("You have to agree our terms and conditions.");
			return false;
		}
	}
	return true;
}
function check_login_travel_agent()
{
	with(document.logintravelagent_form)
	{
		if(txtUsername.value == "")
		{
			alert("You have to input username.");
			txtUsername.focus();
			return false;
		}
		var arrString = txtUsername.value.split(" ");
		if(arrString.length > 1)
		{
			alert("Please remove blank space from your username");
			txtUsername.select();
			return false;
		}
		if(!check_special_character(txtUsername))
		{
			return false;	
		}
		if(txtPassword.value == "")
		{
			alert("You have to input password");
			txtPassword.focus();
			return false;
		}
		if(!check_special_character(txtPassword))
		{
			return false;	
		}
	}
	return true;
}
function check_forget_travel_agent()
{
	with(document.forgettravelagent_form)
	{
		if(txtUsername.value == "")
		{
			alert("You have to input username.");
			txtUsername.focus();
			return false;
		}
		if(!check_special_character(txtUsername))
		{
			return false;	
		}
		if(txtAnswer.value == "")
		{
			alert("You have to input your answer");
			txtAnswer.focus();
			return false;
		}
		if(!check_special_character(txtPassword))
		{
			return false;	
		}
	}
	return true;
}
function check_change_pass()
{
	with(document.changepass_form)
	{
		if(txtNewPassword.value.length < 6)
		{
			alert("Password contain at least 6 characters.");
			txtNewPassword.focus();
			return false;
		}
		if(!check_special_character(txtNewPassword))
		{
			return false;	
		}
		if(txtRetype.value.length < 6)
		{
			alert("Retype password contain at least 6 characters.");
			txtRetype.focus();
			return false;
		}
		if(!check_special_character(txtRetype))
		{
			return false;	
		}
		if(txtNewPassword.value != txtRetype.value)
		{
			alert("New password and Retype password is not the same.");
			txtRetype.select();
			return false;
		}
	}
	return true;
}
function check_contact_information(frm)
{
	with(frm)
	{
		if(txtFirstName.value == "")
		{
			alert("You have to input your first name.");
			txtFirstName.focus();
			return false;
		}
		if(txtLastName.value == "")
		{
			alert("You have to input your last name.");
			txtLastName.focus();
			return false;
		}
		if(slNationality.value == 0)
		{
			alert("You have to input your nationality.");
			slNationality.focus();
			return false;
		}
	    if(txtHomeAddress.value == "" && txtOfficeAddress.value=="")
		{
			alert("You have to input home address or office address.");
			txtHomeAddress.focus();
			return false;
		}
		if(txtCity.value == "")
		{
			alert("You have to input your city.");
			txtCity.focus();
			return false;
		}
		if(slCountry.value == 0)
		{
			alert("You have to input your country.");
			slCountry.focus();
			return false;
		}
		if(txtEmail.value == "")
		{
			alert("You have to input your email.");
			txtEmail.focus();
			return false;
		}
		re=/^[a-zA-Z0-9\_\.]+@[a-zA-Z0-9\_]+(\.\w+)+$/;
		if(!re.test(txtEmail.value))
		{
			alert("You have to input your correct email.");
			txtEmail.select();
			return false;
		}
		re1 = /[^0-9]/;
		if(txtHomePhone.value == "")
		{
			alert("Contact phone is not blank.");
			txtHomePhone.focus();
			return false;
		}
		if(re1.test(txtHomePhone.value))
		{
			alert("Contact phone is number.");
			txtHomePhone.focus();
			return false;	
		}
		return true;
	}
}
function check_tour_booking()
{
	with(document.tourbooking_form)
	{
		if(!check_contact_information(document.tourbooking_form))
		{
			return false;		
		}	
		if(txtStartDate.value == "")
		{
			alert("Start date is not blank.");
			txtStartDate.focus();
			return false;
		}
		date = /^[0-9]{1,2}-[0-9]{1,2}-[0-9]{4}$/;
		if(!date.test(txtStartDate.value))
		{
			alert("You have input correct date format : dd-mm-yyyy ");
			txtStartDate.select();
			return false;
		}
		if(txtEndDate.value == "")
		{
			alert("End date is not blank.");
			txtEndDate.focus();
			return false;
		}
		if(!date.test(txtEndDate.value))
		{
			alert("You have input correct date format : dd-mm-yyyy ");
			txtEndDate.select();
			return false;
		}
		if(txtArrival.value == "")
		{
			alert("Arrival flight is not blank.");
			txtArrival.focus();
			return false;
		}
		if(txtDeparture.value == "")
		{
			alert("Departure flight is not blank.");
			txtDeparture.focus();
			return false;
		}
		if(!rPayment[0].checked && !rPayment[1].checked)
		{
			alert("Please choose one payment method");
			rPayment[0].focus();
			return false;
		}
		if(!rAgree[0].checked && !rAgree[1].checked)
		{
			alert("Please agree with our terms and conditions before continuing.");
			rAgree[0].focus();
			return false;
		}
	}
	return true;
}
function check_hotel_booking()
{
	with(document.hotelbooking_form)
	{
		if(!check_contact_information(document.hotelbooking_form))
		{
			return false;		
		}
		if(txtCheckin.value == "")
		{
			alert("Check in is not blank.");
			txtCheckin.focus();
			return false;
		}
		date = /^[0-9]{1,2}-[0-9]{1,2}-[0-9]{4}$/;
		if(!date.test(txtCheckin.value))
		{
			alert("You have input correct date format : dd-mm-yyyy ");
			txtCheckin.select();
			return false;
		}
		if(txtCheckout.value == "")
		{
			alert("Check out is not blank.");
			txtCheckin.focus();
			return false;
		}
		if(!date.test(txtCheckout.value))
		{
			alert("You have input correct date format : dd-mm-yyyy ");
			txtCheckout.select();
			return false;
		}
		if(txtArrival.value == "")
		{
			alert("Arrival flight is not blank.");
			txtArrival.focus();
			return false;
		}
		if(txtDeparture.value == "")
		{
			alert("Departure flight is not blank.");
			txtDeparture.focus();
			return false;
		}
	}
	return true;
}
function check_add_feedback()
{
	with(document.feedback_form)
	{
		if(txtTourName.value == "")
		{
			alert("You have to input your tour name.");
			txtTourName.focus();
			return false;
		}
		if(txtFirstName.value == "")
		{
			alert("You have to input your first name.");
			txtFirstName.focus();
			return false;
		}
		if(txtLastName.value == "")
		{
			alert("You have to input your last name.");
			txtLastName.focus();
			return false;
		}
		if(slNationality.value == 0)
		{
			alert("You have to input your nationality.");
			slNationality.focus();
			return false;
		}
		if(txtStartDate.value == "")
		{
			alert("You have to input tour's start date.");
			txtStartDate.focus();
			return false;
		}
		date = /^[0-9]{1,2}-[0-9]{1,2}-[0-9]{4}$/;
		if(!date.test(txtStartDate.value))
		{
			alert("You have input correct date format : dd-mm-yyyy ");
			txtStartDate.select();
			return false;
		}
		if(txtEndDate.value == "")
		{
			alert("You have to input tour's end date.");
			txtEndDate.focus();
			return false;
		}
		if(!date.test(txtEndDate.value))
		{
			alert("You have input correct date format : dd-mm-yyyy ");
			txtEndDate.select();
			return false;
		}
		if(taOther.value == "")
		{
			alert("You have input your content.");
			taOther.focus();
			return false;
		}
	}
	return true;
}
function check_visa()
{
	with(document.visa_form)
	{
		date = /^[0-9]{1,2}-[0-9]{1,2}-[0-9]{4}$/;
		if(txtGivenName.value == "")
		{
			alert("You have to input your givenname.");
			txtGivenName.focus();
			return false;
		}
		if(txtSurName.value == "")
		{
			alert("You have to input your surname.");
			txtSurName.focus();
			return false;
		}
		if(slNationality.value == 0)
		{
			alert("You have to input your nationality.");
			slNationality.focus();
			return false;	
		}
		if(txtBirthDate.value == "")
		{
			alert("You have to input your birth date.");
			txtBirthDate.focus();
			return false;
		}
		if(!date.test(txtBirthDate.value))
		{
			alert("You have input correct date format : dd-mm-yyyy ");
			txtBirthDate.select();
			return false;
		}
		if(txtBirthPlace.value == "")
		{
			alert("You have to input your place of birth.");
			txtBirthPlace.focus();
			return false;
		}
		if(txtPassportNo.value == "")
		{
			alert("You have to input your passport no.");
			txtPassportNo.focus();
			return false;
		}
		if(txtBirthDate.value == "")
		{
			alert("You have to input your birth date.");
			txtBirthDate.focus();
			return false;
		}
		if(txtIssue.value == "")
		{
			alert("You have to input your issue date.");
			txtIssue.focus();
			return false;
		}
		if(!date.test(txtIssue.value))
		{
			alert("You have input correct date format : dd-mm-yyyy ");
			txtIssue.select();
			return false;
		}
		if(txtExpire.value == "")
		{
			alert("You have to input your expire date.");
			txtExpire.focus();
			return false;
		}
		if(!date.test(txtExpire.value))
		{
			alert("You have input correct date format : dd-mm-yyyy ");
			txtExpire.select();
			return false;
		}
		if(txtEntryDate.value == "")
		{
			alert("You have to input your entry date.");
			txtEntryDate.focus();
			return false;
		}
		if(!date.test(txtEntryDate.value))
		{
			alert("You have input correct date format : dd-mm-yyyy ");
			txtEntryDate.select();
			return false;
		}
		if(txtEntryBorder.value == "")
		{
			alert("You have to input entry border.");
			txtEntryBorder.focus();
			return false;
		}
		if(txtOccupation.value == "")
		{
			alert("You have to input your occupation.");
			txtOccupation.focus();
			return false;
		}
		if(txtContactNumber.value == "")
		{
			alert("You have to input your contact number.");
			txtContactNumber.focus();
			return false;
		}
		if(txtEmail.value == "")
		{
			alert("You have to input your email number.");
			txtEmail.focus();
			return false;
		}
		re1=/^[a-zA-Z0-9\_\.]+@[a-zA-Z0-9\_]+(\.\w+)+$/;
		if(!re1.test(txtEmail.value))
		{
			alert("You have to input correct email.");
			txtEmail.select();
			return false;
		}
		if(!txtCompanyName.disabled)
		{
			if(txtCompanyName.value == "")
			{
				alert("You have to input your company name.");
				txtCompanyName.focus();
				return false;
			}
		}
	}
	return true;
}
function check_news_letter_subcriber()
{
	with(document.subcriber_form)
	{
		if(txtFullName.value == "")
		{
			alert("You have to input your full name.");
			txtFullName.focus();
			return false;
		}
		if(txtEmail.value == "")
		{
			alert("You have to input your email.");
			txtEmail.focus();
			return false;
		}
		re1=/^[a-zA-Z0-9\_\.]+@[a-zA-Z0-9\_]+(\.\w+)+$/;
		if(!re1.test(txtEmail.value))
		{
			alert("You have to input correct email.");
			txtEmail.select();
			return false;
		}
		if(captcha_code.value == "")
		{
			alert("Please input protection code.");
			captcha_code.focus();
			return false;
		}
		return true;
	}
}
function time ()
{	
   var now = new Date();
   var yr = now.getFullYear();
   var mName = now.getMonth() + 1;
   var dName = now.getDay() + 1;
   var dayNr = ((now.getDate()<10) ? "0" : "")+ now.getDate();
   var ampm = (now.getHours() >= 12) ? " P.M." : " A.M."
   var hours = now.getHours();
   hours = ((hours > 12) ? hours - 12 : hours);
   var minutes = ((now.getMinutes() < 10) ? ":0" : ":") + now.getMinutes();
   var seconds = ((now.getSeconds() < 10) ? ":0" : ":") + now.getSeconds();
   if(dName==1) Day = "Sunday";
   if(dName==2) Day = "Monday";
   if(dName==3) Day = "Tuesday";
   if(dName==4) Day = "Wednesday";
   if(dName==5) Day = "Thursday";
   if(dName==6) Day = "Friday";
   if(dName==7) Day = "Saturday";
   if(mName==1) Month="January";
   if(mName==2) Month="February";
   if(mName==3) Month="March";
   if(mName==4) Month="April";
   if(mName==5) Month="May";
   if(mName==6) Month="June";
   if(mName==7) Month="July";
   if(mName==8) Month="August";
   if(mName==9) Month="September";
   if(mName==10) Month="October";
   if(mName==11) Month="November";
   if(mName==12) Month="December";
   // String to display current date.
   var DayOfWeek = (" "+ Day + ",");
   var MonthDayYear = (" " + Month + " " + dayNr + ", "+ yr + "  ");
   var TimeValue = (" " + hours + minutes + seconds + " " + ampm);
   document.getElementById("datetime").innerHTML = TimeValue +" - "+ DayOfWeek + MonthDayYear;
   document.getElementById("datetime").style.display = 'inline';
   timerID = setTimeout("time()",1000);
}
function check_contact_form()
{
	with(document.contact_us)
	{
		if(txtFullName.value == "")
		{
			alert("You have to input your full name.");
			txtFullName.focus();
			return false;
		}
		if(txtAddress.value == "")
		{
			alert("You have to input your address.");
			txtAddress.focus();
			return false;	
		}
		if(txtPhone.value == "")
		{
			alert("You have to input your phone.");
			txtPhone.focus();
			return false;
		}
		if(txtEmail.value == "")
		{
			alert("You have to input your email.");
			txtEmail.focus();
			return false;
		}
		re1=/^[a-zA-Z0-9\_\.]+@[a-zA-Z0-9\_]+(\.\w+)+$/;
		if(!re1.test(txtEmail.value))
		{
			alert("You have to input correct email.");
			txtEmail.select();
			return false;
		}
		if(taContent.value == "")
		{
			alert("You have to input your content.");
			taContent.focus();
			return false;
		}
		if(captcha_code.value == "")
		{
			alert("Please input protection code.");
			captcha_code.focus();
			return false;
		}
		return true;	
	}
}
function disableCompanyName()
{
	with(document.visa_form)
	{
		txtCompanyName.disabled = true;
		txtCompanyName.value = "";
		document.getElementById("txtCompanyName").style.backgroundColor= '#CCC';
	}
}
function enableCompanyName()
{
	with(document.visa_form)
	{
		txtCompanyName.disabled = false;
		document.getElementById("txtCompanyName").style.backgroundColor = '#FFF';
	}
}
function check_request_form()
{
	with(document.request_form)
	{
		if(txtFullName.value == "")
		{
			alert("Please input your name.");
			txtFullName.focus();
			return false;
		}
		if(slNationality.value == 0)
		{
			alert("Please select your nationality.");
			slNationality.focus();
			return false;	
		}
		if(txtPhone.value == "")
		{
			alert("Please input your phone.");
			txtPhone.focus();
			return false;	
		}
		if(txtEmail.value == "")
		{
			alert("Please input your email.");
			txtEmail.focus();
			return false;	
		}
		re1=/^[a-zA-Z0-9\_\.]+@[a-zA-Z0-9\_]+(\.\w+)+$/;
		if(!re1.test(txtEmail.value))
		{
			alert("You have to input correct email.");
			txtEmail.select();
			return false;
		}
		if(txtPerson.value == "")
		{
			alert("Please input person number in your group.");
			txtPerson.focus();
			return false;
		}
		if(txtTime.value == "")
		{
			alert("Please input your date of departure.");
			txtTime.focus();
			return false;
		}
		if(txtService.value == "")
		{
			alert("Please input the service.");
			txtService.focus();
			return false;
		}
		if(captcha_code.value == "")
		{
			alert("Please input protection code.");
			captcha_code.focus();
			return false;
		}
		return true;
	}
}
