<!--

var obj = null;
var thePics = new Array();

//FLASH SNIFF
var useFlash = false;

if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] ) {
// Check for Flash version 5 or greater in Netscape
var plugin = navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin;
//alert(plugin);
//alert(parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)));
if (plugin && parseInt(plugin.description.substring(plugin.description.indexOf(".")-1))>=5)
	useFlash = true;
} else if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 &&
  navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	// Assume any Windows IE except for Windows 3.1 supports the OBJECT tag
	useFlash = true;
}

//BROWSER SNIFF
var isIE4 = (document.all && !document.getElementById) ? true : false;
var isIE5 = (document.all && document.getElementById) ? true : false;
var isNS6 = (!document.all && document.getElementById) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
var isDHTML = (isIE5 || isIE6 || isNS6);
var isPc = navigator.userAgent.indexOf("Windows") != -1;
var isMac = !isPc;


//redirect on NS4
if(!isDHTML) {
	document.location.replace('oldbrowser.htm');
}


//FUNCTIONS

function swap(name,state) {
    if(thePics[name+state] && thePics[name+state].complete) {
        document.images[name].src = thePics[name+state].src;
    }
}

function preloadPics(thePics) {
	for (i=0;i<thePics.length;i++){
		thePics[thePics[i]] = new Image();
		thePics[thePics[i]].src = 'images/'+thePics[i]+'.gif';
		thePics[thePics[i]+'_over'] = new Image();
		thePics[thePics[i]+'_over'].src = 'images/'+thePics[i]+'_over.gif';
	}
}

function getFlash(flash,width,height,bgcolor) {
	var html = '';
	if(useFlash) {
		html = html + '<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" WIDTH=' + width + ' HEIGHT=' + height + '>';
		html = html + '<PARAM NAME=movie VALUE=\"' + flash + '\"><PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#' + bgcolor + '>';
		html = html + '<EMBED src=\"' + flash + '\" quality=high bgcolor=#' + bgcolor + ' WIDTH=' + width + ' HEIGHT=' + height + ' TYPE="application/x-shockwave-flash" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\">';
		html = html + '</EMBED></OBJECT>';
	} else {
		html = '';
		if(flash=='header.swf') html = getNonFlashHeader(html);
	}
	return html;
}

function getNonFlashHeader(html) {
	html = html + '<center><a href="about.htm">About</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
	html = html + '<a href="rooms.htm">Rooms</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
	html = html + '<a href="specials.htm">Specials</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
	html = html + '<a href="art.htm">Art</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
	html = html + '<a href="weddings.htm">Weddings</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
	html = html + '<a href="business.htm">Business</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
	html = html + '<a href="spa.htm">Spa</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
	html = html + '<a href="activities.htm">Activities</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
	html = html + '<a href="media.htm">Media</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
	html = html + '<a href="directions.htm">Directions</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
	html = html + '</center>';
	return html;
}

function popup(location) {
	var dx=500;
	var dy=460;

	var w = window.open(location, 'popup', 'width=' + dx + ',height=' + dy + ',status=no,resizable=no,menubar=yes,location=no,scrollbars=no,toolbar=no');
	w.focus();
}

function popGrounds() {
	var dx=580;
	var dy=580;

	var w = window.open('grounds_pics.htm', 'popup', 'width=' + dx + ',height=' + dy + ',status=no,resizable=no,menubar=yes,location=no,scrollbars=no,toolbar=no');
	w.focus();
}

function checkAvail(room) {
	opener.location = 'checkavail.htm';
	opener.focus();
}

	
function homeUncover() {
    if (isNS6 || isIE4 || isIE5){
        var hidden = 'hidden';
        var visible = 'visible';
    } else if (document.layers){
        var hidden = 'hide';
        var visible = 'show';
    }

    var newVis = hidden;

    if (isIE4 || isIE5){
        obj = eval('document.all.homeCover2.style');
        obj.visibility = newVis;
    } else if (isNS6){
        obj = document.getElementById('homeCover2');
        obj.style.visibility = newVis;
    }

}


function photoPop(which) {
	var x=10;
	var y=10;
	var dx=550;
	var dy=480;

	var w = window.open('', '_blank', 'width=' + dx + ',height=' + dy + ',status=no,resizable=yes,menubar=yes,location=no,scrollbars=yes,toolbar=yes');
	w.document.writeln('<html><head><link rel=\"stylesheet\" type=\"text/css\" href=\"styles.css\"></head>');
	w.document.writeln('<body><center>');
	w.document.writeln('<br><a href=\"images/media/Hi_Res/'+which+'\" style=\"color:#fff;\">Click here for a high-resolution (6 megapixel) version of this photo.<br><br>');
	w.document.writeln('<img src=\"images/media/Lo_Res/'+which+'\"><br></a><br>');
	w.document.writeln('<a href=\"javascript:window.close()\" style=\"color:#fff;\">Close Window<br></a><br>');
	w.document.writeln('</center></body>');
	w.document.writeln('</html>');

	w.focus();
}

//-->
