browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);

ns3up = (browserName == "Netscape" && browserVer >= 3);
ie4up = (browserName.indexOf("Microsoft") >= 0 && browserVer >= 4);

function showPic(imgName) 
{
	if (ns3up || ie4up) 
		imgOn = ("" + imgName);
		
	document.mainpic.src = imgOn;
}

function doSpecialBooking(id)
{
	window.open('../transactions/special-book.php?id='+id, '','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars,resizable,width=680,height=470');
}

function doQuote(hotelCode) 
{
	//window.open('../transactions/user-booking.php?hotel='+hotelCode, '', 'resizable,scrollbars,width=700,height=600')
	window.open('../transactions/quick-quote.php?hotel='+hotelCode, '', 'resizable,scrollbars,width=700,height=600');
}

//Add to Favourites
function bookmarksite(title, url)
{
	if (document.all)
		window.external.AddFavorite(url, title);
	else if (window.sidebar)
		window.sidebar.addPanel(title, url, "");
}

function openCurrencyConverter()
{
	window.open('http://www.oanda.com/convert/classic?user=sahotels', '', 'width=700,height=500');
}

function validateQQ()
{
	if (document.frmQuickQuote.hotel.value == "")
	{
		alert('Please specify a hotel.');
		return false;
	}
	else
	  return true;
}
