﻿/* Search hotel by keyword*/
var jsSrchDefault="Hotel by Name";
function FindHotel(){
	if(fmhtfind.search_hotel.value==""){alert("Please input hotel name.");}
	else if(fmhtfind.search_hotel.value==jsSrchDefault){alert("Please input hotel name.");}
	else{location.href="http://reservation.passionasia.com/search_hotels.cfm/Cnty_id/Any/Cty_id/Any/sortby/1/search_hotel/"+fmhtfind.search_hotel.value+"/idx/1.htm";}
	return false;
}

var jsSrchDefault02="Hotel by Name";
function FindHotel(){
	if(fmhtfind.search_hotel.value==""){alert("Please input hotel name.");}
	else if(fmhtfind.search_hotel.value==jsSrchDefault02){alert("Please input hotel name.");}
	else{location.href="http://reservation.passionasia.com/search_hotels.cfm/Cnty_id/Any/Cty_id/Any/sortby/1/search_hotel/"+fmhtfind.search_hotel.value+"/idx/1.htm";}
	return false;
}


var jsSrchDefaultTH="กรุณากรอกชื่อโรงแรมเป็นภาษาอังกฤษ";
function FindHotel(){
	if(fmhtfind.search_hotel.value==""){alert("กรุณากรอกชื่อโรงแรมเป็นภาษาอังกฤษ");}
	else if(fmhtfind.search_hotel.value==jsSrchDefaultTH){alert("กรุณากรอกชื่อโรงแรมค่ะ");}
	else{location.href="http://reservation.passionasia.com/search_hotels.cfm/Cnty_id/Any/Cty_id/Any/sortby/1/search_hotel/"+fmhtfind.search_hotel.value+"/idx/1.htm";}
	return false;
}

var jsSrchDefaultJP="ホテル名（半角英数字）";
function FindHotel(){
	if(fmhtfind.search_hotel.value==""){alert("Please input hotel name.");}
	else if(fmhtfind.search_hotel.value==jsSrchDefaultJP){alert("Please input hotel name.");}
	else{location.href="http://reservation.passionasia.com/search_hotels.cfm/Cnty_id/Any/Cty_id/Any/sortby/1/search_hotel/"+fmhtfind.search_hotel.value+"/idx/1.htm";}
	return false;
}

function Linkto(url) {
	location.href = url;
}
function xrate() {
	window.open( "http://reservation.passionasia.com/tablecurrency.cfm", "exchangerate", 'width=470,height=350,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=1,resizable=0' );
}
function Last3digits(){
	wincvc=window.open( "http://www.passionasia.com/images/shared/card.gif", "wincvc0", 'width=420,height=185,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=0' );wincvc.focus();
}

function WinPopup(www, name, w, h){
	LeftPosition = (screen.width) ? (screen.width-w)/2: 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings ='height=' + h +',width='+w+', top='+TopPosition+',left='+LeftPosition+',resizable=0';
	window.open(www, name, settings);
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


