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

//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 {
		if (flash=='nav.swf') { //content page
			html = html + '<img src="images/header.gif" alt="Bethlehem PA Bed and Breakfast $#151; Sayre Mansion Inn" width="760" height="148" border="0" usemap="#Map"><br />';
			html = html + '<map name="Map">';
			html = html + '<area shape="rect" coords="0,115,61,146" href="rooms.htm" alt="Rooms">';
			html = html + '<area shape="rect" coords="61,115,145,146" href="breakfast.htm" alt="Breakfast">';
			html = html + '<area shape="rect" coords="145,115,234,146" href="directions.htm" alt="Directions">';
			html = html + '<area shape="rect" coords="234,115,308,146" href="history.htm" alt="History">';
			html = html + '<area shape="rect" coords="308,115,390,146" href="meetings.htm" alt="Meetings">';
			html = html + '<area shape="rect" coords="390,115,476,146" href="weddings.htm" alt="Weddings">';
			html = html + '<area shape="rect" coords="476,115,561,146" href="areainfo.htm" alt="Area Info">';
			html = html + '<area shape="rect" coords="561,115,688,146" href="http://www.webervations.com/magic-scripts/giftcert.asp?memberid=32460" alt="Gift Certificates">';
			html = html + '<area shape="rect" coords="688,115,760,146" href="specials.htm" alt="Specials">';
			html = html + '</map>';
		}
	}
	return html;
}

function emailSignup(email) {
	var dx=590;
	var dy=400;
	var url = 'http://ccprod.roving.com/roving/d.jsp?m=1011277863095&p=oi&go=Go&ea='+email;

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

function teddy() {
	var dx=590;
	var dy=400;

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


//-->

