/***************************************
	Required Functions
***************************************/
function modalDialogShow_IE(url,width,height) //IE
	{
	return window.showModalDialog(url,window,
		"dialogWidth:"+width+"px;dialogHeight:"+height+"px;edge:Raised;center:Yes;help:No;Resizable:Yes;Maximize:Yes");
	}
function modalDialogShow_Moz(url,width,height) //Moz
    {
    var left = screen.availWidth/2 - width/2;
    var top = screen.availHeight/2 - height/2;
    activeModalWin = window.open(url, "", "width="+width+"px,height="+height+",left="+left+",top="+top);
    window.onfocus = function(){if (activeModalWin.closed == false){activeModalWin.focus();};};
    }
var sActiveAssetInput;
function setAssetValue(v) //required by the asset manager
    {
    document.getElementById(sActiveAssetInput).value = v;
    }
function openAsset(s)
	{
	sActiveAssetInput = s
	if(navigator.appName.indexOf('Microsoft')!=-1)
		document.getElementById(sActiveAssetInput).value=modalDialogShow_IE("assetmanager.asp",640,465); //IE	
	else
		modalDialogShow_Moz("assetmanager.asp",640,465); //Moz	
	}
/*****************************************/

<!--
function isDate(dateStr) { //mm/dd/yyyy

var datePat = /^(\d{1,2})(\/|-)(\d{1,2})(\/|-)(\d{4})$/;
var matchArray = dateStr.match(datePat); // is the format ok?

if (matchArray == null) {
	return false;
}
	month = matchArray[1]; // p@rse date into variables
	day = matchArray[3];
	year = matchArray[5];

if (month < 1 || month > 12) { // check month range
	return false;
}

if (day < 1 || day > 31) {
	return false;
}

if ((month==4 || month==6 || month==9 || month==11) && day==31) {
	return false;
}

if (month == 2) { // check for february 29th
	var isleap = (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0));
	if (day > 29 || (day==29 && !isleap)) {
		return false;
	}
}
return true; // date is valid
}

//-->

function ShowFlash(strFileName,StrWidth,strHeight)
{
	document.write ("<embed src='"+strFileName+"' style='width:"+StrWidth+"px; height:"+strHeight+"px' quality='high' type='application/x-shockwave-flash' wmode='transparent'></embed>")
}
// Tab cho search-------------------------------------------------------------------------------------
function ShowDiv(x1,x2)
{
	v1 = document.getElementById(x1);
	v2 = document.getElementById(x2);	
//		v1.className = 'DivOn';
//		v2.className = 'DivOff';
		v1.style.display = '';
		v2.style.display = 'none';
}
//----------------------------------------------------------------------------------------------------

	function Check_Hotel_Search(){
		var strMess = ""

		if ((document.pSearch_Hotel.Hotel_Search.value == "")&&(document.pSearch_Hotel.Hotel_Location.value == "0")&&(document.pSearch_Hotel.Hotel_Price.value == "0")&&(document.pSearch_Hotel.Hotel_Class.value == "0")){
			strMess = strSearchAlert
		}
		
		if (strMess == ""){
			return true;
		}
		else {
			alert(strMess);
			return false
		}
	}
	
	function Check_Hotel_Search_1(){
		var strMess = ""

		if ((document.pSearch_Hotel_1.Hotel_Search_1.value == "")&&(document.pSearch_Hotel_1.Hotel_Location_1.value == "0")&&(document.pSearch_Hotel_1.Hotel_Price_1.value == "0")&&(document.pSearch_Hotel_1.Hotel_Class_1.value == "0")){
			strMess = strSearchAlert
		}
		
		if (strMess == ""){
			return true;
		}
		else {
			alert(strMess);
			return false
		}
	}
	
	function Check_Tour_Search(){
		var strMess = ""

		if ((document.pSearch_Tour.Tour_Search.value == "")&&(document.pSearch_Tour.Tour_Budget.value == "0")&&(document.pSearch_Tour.Tour_Category.value == "0")){
			strMess = strSearchAlert			
		}
		
		if (strMess == ""){
			return true;
		}
		else {
			alert(strMess);
			return false
		}
	}

	function Check_Tour_Search_1(){
		var strMess = ""

		if ((document.pSearch_Tour_1.Tour_Search_1.value == "")&&(document.pSearch_Tour_1.Tour_Budget_1.value == "0")&&(document.pSearch_Tour_1.Tour_Category_1.value == "0")){
			strMess = strSearchAlert			
		}
		
		if (strMess == ""){
			return true;
		}
		else {
			alert(strMess);
			return false
		}
	}
	
