
	function forpopup(url,w,h,winName){
		big_pop=window.open(url,winName,"toolbar=no,width="+w+",height="+h+",resizable=yes,scrollbars=no,menubar=no,directories=no");
		big_pop.focus();
	}
	function forpopup_scroll(url,w,h,winName){
		big_pop=window.open(url,winName,"toolbar=no,width="+w+",height="+h+",resizable=yes,scrollbars=yes,menubar=no,directories=no");
		big_pop.focus();
	}
	function  popupWIN(openpage){
		var width = 400;
		var height = 300;
		var title = 'THAI_PHOTO';
		big_pop=window.open(openpage,title,"width="+width+",height="+height+",resizable=no,scrollbars=no,menubar=no,fullscreen=no");
		big_pop.moveTo(((screen.width-width)/2),((screen.height-height)/2)-20);
		big_pop.focus();
	}


function jumpworld(){
var loc=document.worldjump.world.options[document.worldjump.world.selectedIndex].text;
	 if (loc == "Australia"){
       location="australia.php";
     }else if (loc == "Cambodia"){
      location="cambodia.php";
      }else if (loc == "China"){
      location="china.php";
     }else if (loc == "Hong Kong"){
      location="hongkong.php";
	 }else if (loc == "India"){
     location="india.php";
     }else if (loc == "Indonesia"){
     location="indonesia.php";
     }else if (loc == "Japan"){
     location="japan.php";
     }else if (loc == "Korea"){
     location="korea.php";
     }else if (loc == "Laos"){
     location="laos.php";
     }else if (loc == "Malaysia"){
     location="malaysia.php";
	 }else if (loc == "Moscow"){
     location="moscow.php";
     }else if (loc == "Myanmar"){
     location="myanmar.php";
     }else if (loc == "Nepal"){
     location="nepal.php";
     }else if (loc == "New Zealand"){
     location="new-zealand.php";
     }else if (loc == "Philippines"){
     location="philippines.php";
     }else if (loc == "Singapore"){
     location="singapore.php";
     }else if (loc == "Sri Lanka"){
     location="sri-lanka.php";
    }else if (loc == "Thailand"){
     location="tit2_2.php";
     }else if (loc == "Taiwan"){
     location="taiwan.php";
     }else if (loc == "Vietnam"){
     location="vietnam.php";
    }
}
function jumpworld_c(){
var loc=document.worldjump.world.value;
	 if (loc == "Australia"){
       location="australia.php";
     }else if (loc == "Cambodia"){
      location="cambodia.php";
      }else if (loc == "China"){
      location="china.php";
     }else if (loc == "Hong Kong"){
      location="hongkong.php";
	 }else if (loc == "India"){
     location="india.php";
     }else if (loc == "Indonesia"){
     location="indonesia.php";
     }else if (loc == "Japan"){
     location="japan.php";
     }else if (loc == "Korea"){
     location="korea.php";
     }else if (loc == "Laos"){
     location="laos.php";
     }else if (loc == "Malaysia"){
     location="malaysia.php";
	 }else if (loc == "Moscow"){
     location="moscow.php";
     }else if (loc == "Myanmar"){
     location="myanmar.php";
     }else if (loc == "Nepal"){
     location="nepal.php";
     }else if (loc == "New Zealand"){
     location="new-zealand.php";
     }else if (loc == "Philippines"){
     location="philippines.php";
     }else if (loc == "Singapore"){
     location="singapore.php";
     }else if (loc == "Sri Lanka"){
     location="sri-lanka.php";
    }else if (loc == "Thailand"){
     location="tit2_2.php";
     }else if (loc == "Taiwan"){
     location="taiwan.php";
     }else if (loc == "Vietnam"){
     location="vietnam.php";
    }
}

function jumpWorldwide(){
    var loc=document.TSIndex.JumpStation.options[document.TSIndex.JumpStation.selectedIndex].text;
	if (loc == "Denmark"){
       location="http://www.thai-airways.dk";
      }else if (loc == "England"){
       location="http://www.thaiairways.co.uk";
     }else if (loc == "Germany"){
       location="http://www.thai-airways.de";
	 }else if (loc == "Indonesia"){
       location="http://www.thaiairways.co.id";
     }else if (loc == "Japan"){
       location="http://www.thaiair.co.jp";
     }else if (loc == "Korea"){
       location="http://www.thaiair.co.kr";
     }else if (loc == "Norway"){
       location="http://www.thaiairways.no";
     }else if (loc == "The Netherlands"){
       location="http://www.thaiairways.nl";
     }else if (loc == "Spain"){
       location="http://www.thaiairways.es";
     }else if (loc == "Sweden"){
       location="http://www.thaiairways.se";
     }else if (loc == "Switzerland"){
       location="http://www.thaiair.ch";
     }else if (loc == "Taiwan"){
       location="http://www.thaiairways.com.tw";
     }else if (loc == "U.S.A."){
      location="http://www.thaiair.com/redirect/rdr_usasite.htm";
     }else if (loc == "Australia"){
      location="http://www.thaiairways.com.au";
     }else if (loc == "Italy"){
      location="http://www.thaiair.it";
     }else if (loc == "France"){
      location="http://www.thaiairways.fr";
	 	 }else if (loc == "Thailand"){
      location="http://www.thaiair.com/redirect/rdr_thaisite.htm";
	   }else if (loc == "Global Site"){
      location="http://www.thaiair.com/redirect/rdr_mainsite.htm";
     }else if (loc == "Hong Kong"){
      location="http://www.thaiairways.com.hk";
     }else if (loc == "Singapore"){
      location="http://www.thaiairways.com.sg";
     }else if (loc == "Vietnam"){
      location="http://www.thaiairvn.com";
     }
}

function checkup(forms){
		if(forms.userid.value =="") {
			alert("Please fill in Member ID");
			forms.userid.focus();
			return false;
		}
		if(forms.pin.value=="") {
			alert("Please fill in pin code");
			forms.pin.focus();
			return false;
		}
		return true;
	}

	function validateForm()
	{
		if (loginform.ctyDropdown.options[loginform.ctyDropdown.selectedIndex].value == "0")
		{
			alert('Please select a country.');
			loginform.ctyDropdown.focus();
			return false;
		};

		if (loginform.memberID.value == "")
		{
			alert('Please enter your Member ID.');
			loginform.memberID.focus();
			return false;
		}

		if (loginform.pinCode.value == "")
		{
			alert('Please enter your PIN Code.');
			loginform.pinCode.focus();
			return false;
		};

		loginform.submit();
	}

	function validateRohForm()
	{
		if (rohloginform.memberID.value == "")
		{
			alert('Please enter your Member ID.');
			rohloginform.memberID.focus();
			return false;
		}

		if (rohloginform.pinCode.value == "")
		{
			alert('Please enter your PIN Code.');
			rohloginform.pinCode.focus();
			return false;
		};

		rohloginform.submit();
	}

	function validateBooking()
	{
		if (bookingform.D_City.options[bookingform.D_City.selectedIndex].value == "xxx")
		{
			alert('Please select a Flight Origin.');
			bookingform.D_City.focus();
			return false;
		};

		if (bookingform.A_City.options[bookingform.A_City.selectedIndex].value == "xxx")
		{
			alert('Please select a Flight Destination.');
			bookingform.A_City.focus();
			return false;
		};
		var validAdult = bookingform.pasAdult.value;
		var validChild = bookingform.pasChild.value;

		if (isNaN(validAdult) || (validAdult=""))
		{
			alert('Please enter the valid number of Adult tickets.');
			bookingform.pasAdult.focus();
			return false;
		}

		if (isNaN(validChild) || (validChild=""))
		{
			alert('Please enter the valid number of Children tickets.');
			bookingform.pasChild.focus();
			return false;

		}

		bookingform.submit();

	}

	function validateSchedule()
	{
		if (shceduleform.D_City.options[bookingform.D_City.selectedIndex].value == "xxx")
		{
			alert('Please select a Flight Origin.');
			shceduleform.D_City.focus();
			return false;
		};

		if (shceduleform.A_City.options[bookingform.A_City.selectedIndex].value == "xxx")
		{
			alert('Please select a Flight Destination.');
			shceduleform.A_City.focus();
			return false;
		};

		scheduleform.submit();

	}

	function validateFlightStatus()
	{
		if (flightstatusform.D_City.options[bookingform.D_City.selectedIndex].value == "xxx")
		{
			alert('Please select a Flight Origin.');
			bookingform.D_City.focus();
			return false;
		};

		if (flightstatusform.A_City.options[bookingform.A_City.selectedIndex].value == "xxx")
		{
			alert('Please select a Flight Destination.');
			bookingform.A_City.focus();
			return false;
		};

		if (flightstatusform.airline.value = "")
		{
			alert('Please enter the airline which you would like to check.');
			flightstatusform.airline.focus();
			return false;
		}

		if (flightstatusform.flightno.value = "")
		{
			alert('Please enter the flight number which you would like to check.');
			flightstatusform.flightno.focus();
			return false;

		}

		flightstatusform.submit();

	}