<!--
//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 || isNS6);
var isPc = navigator.userAgent.indexOf("Windows") != -1;
var isMac = !isPc;
var yPos = 0;

//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;
}

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 swapBackground(name,color) {
	if (isIE5==true){
		obj = eval('document.'+name);
        	obj = document.getElementById(name);
		obj.style.backgroundColor = color;
	} else if(isNS6==true) {
		obj.style.backgroundColor = color;
	}
}

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>';
		if (flash=='intro.swf') {
			html = html + '<img src="images/invisible.gif" width=1 height=180><br>';
		}
	} else {
		if (flash=='header.swf' || flash=='header_home.swf' || flash=='intro.swf') { //index page
			html = html + '<div style="background:#ffffff;padding:10;float:center;text-align:center;"><b><a href="home.htm">home</a>&nbsp;&nbsp;<img src="images/bullet_diamond_333.gif" width=7 height=7>&nbsp;&nbsp;<a href="about.htm">about</a>&nbsp;&nbsp;<img src="images/bullet_diamond_333.gif" width=7 height=7>&nbsp;&nbsp;<a href="rooms.htm">rooms & rates</a>&nbsp;&nbsp;<img src="images/bullet_diamond_333.gif" width=7 height=7>&nbsp;&nbsp;<a href="breakfast.htm">breakfast</a>&nbsp;&nbsp;<img src="images/bullet_diamond_333.gif" width=7 height=7>&nbsp;&nbsp;<a href="specials.htm">specials</a>&nbsp;&nbsp;<img src="images/bullet_diamond_333.gif" width=7 height=7>&nbsp;&nbsp;<a href="activities.htm">activities</a>&nbsp;&nbsp;<img src="images/bullet_diamond_333.gif" width=7 height=7>&nbsp;&nbsp;<a href="find.htm">find us</a>&nbsp;&nbsp;<img src="images/bullet_diamond_333.gif" width=7 height=7>&nbsp;&nbsp;<a href="giftcert.htm">gift certificates</a></b></div>';
		}
	}
	return html;
}

function activityPop(location) {
	var dx=500;
	var dy=460;
	var w = window.open('act_'+location+'.htm', 'activity', 'width=' + dx + ',height=' + dy + ',status=no,resizable=no,menubar=yes,location=no,scrollbars=yes,toolbar=no');
	w.focus();
}

function specialsPop() {
	var dx=680;
	var dy=460;
	var w = window.open('http://www.webervations.com/magic-scripts/packages.asp?memberid=chelseagardeninn', 'specials', 'width=' + dx + ',height=' + dy + ',status=no,resizable=no,menubar=yes,location=no,scrollbars=yes,toolbar=no');
	w.focus();
}

function popOffsite(location) {
	var w = window.open();
	w.document.writeln("<html><head></head>");
	w.document.writeln("<frameset border=0 rows=50,* frameborder=no framespacing=0>");
	w.document.writeln("<frame frameborder=no framespacing=0 marginheight=0 marginwidth=0 name=nav noresize scrolling=no src=\"popOffsiteNav.htm\">");
	w.document.writeln("<frame frameborder=no framespacing=0 name=body noresize src=\"" + location + "\">");
	w.document.writeln("</frameset>");
	w.document.writeln("</html>");

	w.focus();
}

//-->
