﻿function toggle(row) 
{
	// 03/15/08 fixed for FireFox

	// alert (document.getElementById("lastToggle").value);
	// alert (row);
	// alert ('TitleRow='+'title'+row);
	
	var lastRow = document.getElementById("lastToggle")	;
	var prevRow = document.getElementById(lastRow.value);
	var thisRow = document.getElementById(row);
	var titleRow = document.getElementById('title'+row);
	var linkRow = document.getElementById('link'+row);

	if (thisRow.style.display=="none")							// if row is hidden
	{
		thisRow.style.display="";							// show the row
		titleRow.className="PriceTableCellBold";			// and hilite Departure Date above shown row
		linkRow.style.fontWeight="bold";					// and bold the link
		
							// turn lastToggle off if not 'none' (uninitialized) and not the same as the row just turned on
		if (document.getElementById("lastToggle").value!='none' && document.getElementById("lastToggle").value!=row )
		{	
			prevRow.style.display="none";					// hide the row
			titleRow.className="PriceTableCell";			// and un-hilite Departure Date above last row
			linkRow.style.fontWeight="normal";				// and un-bold the link
		}
	}
	else														// else, if row is shown
	{
		thisRow.style.display="none";							// hide the row
		titleRow.className="PriceTableCell";					// and un-hilite Departure Date above hidden row
		linkRow.style.fontWeight="normal";						// and un-bold the link		
	}
	document.getElementById("lastToggle").value=row;					// then store this row in 'lastToggle'
}


