/********************************************************************************
*						JavaScript : chat_pkg.js								*
*					Author : Chatchawarn Lauruengtana							*
*								Version : 1.0									*
*						Created : February 2, 2003								*
********************************************************************************/
/********************************************************************************
*									Description									*
*	This module is specifically designed for Amari Hotels and Resorts Package	*
* checking. We have to declare all necessary code in the array below. For		*
* further detail must find in developer reference report that composes by me.	*
*									Version 1.0									*
*						Author: Chatchawarn Lauruengtana						*
********************************************************************************/
// Global variable declaration
// var aPackage=new Array(
//   new Array("APH","BKK102","PK4",1),
//   new Array("BVH","BKK103","UGP",3),
//   new Array("WGH","BKK100","UGP",3),
//   new Array("ATH","BKK101","Package",3),
//   new Array("ORR","PYX148","GLF",3),
//   new Array("RCH","CNX149x","GLP",3)
// );

function chat_aSearch(aSrc,nKeyIdx,nRetIdx,sFind) {
	var sRes='';
	for(var i=0;i<aSrc.length;i++) {
		if(sFind==aSrc[i][nKeyIdx]) {
			sRes=aSrc[i][nRetIdx];
			break;
		}
	}
	if(i==aSrc.length) {
		alert("Debug: Err(2)"+sFind+"->chat_aSearch");
	}	
	return(sRes);
}
