<!--
// 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 rooms by setting the array of id's
function initRoomNav( ids, currentID){
	roomsIDs = 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 loadNextRoom()
{
	//get the current value from the array
	if (roomsIDs.length <= currentPos+1 || currentPos < 0) {
		currentPos = -1;
	}
	loadNewFragment('/customTags/DisplayRoom.cfm?roomID=' + roomsIDs[++currentPos], 'RoomFragment', completeFunc, startFunc);
}

function loadPreviousRoom()
{
	//get the current value from the array
	if (currentPos < 1) {
		currentPos = roomsIDs.length;
	}
	loadNewFragment('/customTags/DisplayRoom.cfm?roomID=' + roomsIDs[--currentPos], 'RoomFragment', completeFunc, startFunc);
	//loadNewFragment('/customTags/DisplayRoom.cfm?roomID=' + roomsIDs[--currentPos], 'RoomFragment');
}


//-->