var notie = false;
var slideCache = new Array();
var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;

if (checkIt('konqueror'))
{
browser = "Konqueror";
OS = "Linux";
}
else if (checkIt('safari')) browser = "Safari"
else if (checkIt('omniweb')) browser = "OmniWeb"
else if (checkIt('opera')) browser = "Opera"
else if (checkIt('webtv')) browser = "WebTV";
else if (checkIt('icab')) browser = "iCab"
else if (checkIt('msie')) browser = "Internet Explorer"
else if (!checkIt('compatible'))
{
browser = "Netscape Navigator"
version = detect.charAt(8);
}
else browser = "An unknown browser";

if (!version) version = detect.charAt(place + thestring.length);

if (!OS)
{
if (checkIt('linux')) OS = "Linux";
else if (checkIt('x11')) OS = "Unix";
else if (checkIt('mac')) OS = "Mac"
else if (checkIt('win')) OS = "Windows"
else OS = "an unknown operating system";
}

function checkIt(string)
{
place = detect.indexOf(string) + 1;
thestring = string;
return place;
}

function change_main(name)
{
	if (document.getElementById)
	{
		Img = document.getElementById("mainpic")
		Img.src = 'hotel_pics/' + name
	}
}

function change_ex_main(name)
{
	if (document.getElementById)
	{
		Img = document.getElementById("mainpic")
		Img.src = 'excursion_pics/' + name
	}
}

function showcar()
{
	if (document.getElementById)
	{
	cartab = document.getElementById("cartab").style.display = 'block';
	}
}
function showtrans()
{
	if (document.getElementById)
	{
	cartab = document.getElementById("transtab").style.display = 'block';
	}
}

function show_stars(loc,disp)
{
	sub_menu = document.getElementById(loc+'stars_sub_menu');
	sub_menu.style.display = disp;
}

function open_booking(id)
{ 
	temp = window.open('hotel_res.php?Id='+id,"BookingForm", "width=500,height=600,scrollbars=yes");
	temp.focus();
}

function open_yacht_booking(id)
{ 
	temp = window.open('yacht_res.php?Type=Yacht&amp;Id='+id,"BookingForm", "width=500,height=600,scrollbars=yes");
	temp.focus();
}

function open_cabin_booking(id)
{ 
	temp = window.open('yacht_res.php?Id='+id,"BookingForm", "width=500,height=600,scrollbars=yes");
	temp.focus();
}

function open_excursion_booking(id)
{ 
	temp = window.open('excursion_res.php?Id='+id,"BookingForm", "width=500,height=600,scrollbars=yes");
	temp.focus();
}

function open_car_booking(id)
{ 
	temp = window.open('car_res.php?Id='+id,"BookingForm", "width=500,height=600,scrollbars=yes");
	temp.focus();
}

function open_transfer_booking(id)
{ 
	temp = window.open('transfer_res.php?Id='+id,"BookingForm", "width=500,height=600,scrollbars=yes");
	temp.focus();
}

function open_wind_booking(id)
{ 
	temp = window.open('wind_res.php?Id='+id,"BookingForm", "width=500,height=600,scrollbars=yes");
	temp.focus();
}

function open_golf_booking(id)
{ 
	temp = window.open('golf_res.php?Id='+id,"BookingForm", "width=500,height=600,scrollbars=yes");
	temp.focus();
}

