// Mouseover for sub-navigation
if (document.images) {
	locationon = new Image();
	locationon.src = "images/location_on.gif";
	homeon = new Image();
	homeon.src = "images/home_on.gif";
	recipeson = new Image();
	recipeson.src = "images/recipes_on.gif";
	eventson = new Image();
	eventson.src = "images/events_on.gif";
	loungeon = new Image();
	loungeon.src = "images/lounge_on.gif";
	menuon = new Image();
	menuon.src = "images/menu_on.gif";
	restauranton = new Image();
	restauranton.src = "images/restaurant_on.gif";
	abouton = new Image();
	abouton.src = "images/about_on.gif";
	
	locationoff = new Image();
	locationoff.src = "images/location_off.gif";
	homeoff = new Image();
	homeoff.src = "images/home_off.gif";
	recipesoff = new Image();
	recipesoff.src = "images/recipes_off.gif";
	eventsoff = new Image();
	eventsoff.src = "images/events_off.gif";
	loungeoff = new Image();
	loungeoff.src = "images/lounge_off.gif";
	menuoff = new Image();
	menuoff.src = "images/menu_off.gif";
	restaurantoff = new Image();
	restaurantoff.src = "images/restaurant_off.gif";
	aboutoff = new Image();
	aboutoff.src = "images/about_off.gif";
}

function changeImages() {
  if (document.images) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
      document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");
    }
  } // end of document.images if
} // end of mouseover sub-navigation

/* Author: James Craig ( james[at]cookiecrook[dot]com) */
/* License: Free for reuse. Forget credit. Need a designer/coder? My job's kinda boring. */

var sUserAgent = navigator.userAgent.toLowerCase();
var isIE = document.all?true:false;
var isNS4 = document.layers?true:false;
var isOp = (sUserAgent.indexOf('opera')!=-1)?true:false;

var isMoz = (sUserAgent.indexOf('mozilla/5')!=-1 && sUserAgent.indexOf('opera')==-1 && sUserAgent.indexOf('msie')==-1)?true:false;

// ****************************************************************
// Make a new popup window...
// Parameters:
//   oAnchor: required object reference to the anchor (link)
//   sWindow: string for the window name if wanting to reuse window or null string ('') to use the default.
//   sProps: string of window properties ('width=300,height=200') or null string ('') to use the defaults defined here.
// Notes:
//   Notice in the example that the 'href' value maintains URL
//   (not "#" or "javascript:") and the 'title' attribute indicates
//   this will be a popup window. These things are required for
//   accessibility reasons.
// Example use:
//   <a href="/foo.htm" onclick="return pop(this,'survey');" title="Survey opens a new window.">Take our survey!</a>
//   <a href="/foo.htm" onclick="return pop(this,'','width=200,height=200');" title="Opens a new window.">Foo</a>
//   <a href="/foo.htm" onclick="return pop(this);" title="Opens a new window.">Foo</a>
// ****************************************************************
function pop(oAnchor,sWindow,sProps){
	var sUrl = '';
	if(oAnchor.getAttribute) sUrl = oAnchor.getAttribute('href');
	if(sUrl=='' && isIE) sUrl = window.event.srcElement.getAttribute('href');
	if(sUrl=='') sUrl = oAnchor.href;
	var sWindowName = sWindow?sWindow:'_blank';
	if(!sProps) sProps = 'width=640,height=480,scrollbars,resizable,toolbar,status,menubar,location';
	if(sUrl) var oPopup = window.open(sUrl,sWindowName,sProps);
	// An Opera bug returns too early if you focus the window, so we don't focus it in that browser.
	// Only a noticable defect (in that browser) if a window is already open and hidden behind another window.
	if(oPopup && !isOp) oPopup.focus();
	// If popup was created successfully, cancel link in calling window.
	// Acts as regular link in browser that has popup blocking enabled.
	return (oPopup)?false:true;
}