<!--
// create an array of the room IDs and the keep track of the current position in the array

// to change the IDs that are pulled from the ag_Lodging_Rooms table in the DB, 
// change the numbers or their order in this array



// function to init the packages by setting the array of id's
function initPackageNav( ids, currentID){
	PackagesIDs = ids;
	// set the default position
	currentPos = 0;
	for( var i=0; i<ids.length; i++ ){
		if ( ids[i] == currentID ){
			currentPos = i;
			break;
		}
	}
}

// Custom function to load a different file in sequence from the file previously loaded
function loadNextPackage()
{
	//get the current value from the array
	if (PackagesIDs.length <= currentPos+1 || currentPos < 0) {
		currentPos = -1;
	}
	loadNewFragment('/customTags/DisplayPackage.cfm?PackageID=' + PackagesIDs[++currentPos], 'PackageFragment', completeFunc, startFunc);
}

function loadPreviousPackage()
{
	//get the current value from the array
	if (currentPos < 1) {
		currentPos = PackagesIDs.length;
	}
	loadNewFragment('/customTags/DisplayPackage.cfm?PackageID=' + PackagesIDs[--currentPos], 'PackageFragment', completeFunc, startFunc);
	//loadNewFragment('/customTags/DisplayRooms.cfm?roomID=' + roomsIDs[--currentPos], 'RoomFragment');
}
//-->
