// set up variables for layer animation
// up for home page
var direction = "home";


///////////////////////
// Mouseover scripts here
///////////////////////

//preload highlighted

aboutHi = new Image(77, 26);
aboutHi.src = "images/about_o.gif";
diningHi = new Image(65, 26);
diningHi.src = "images/forum_o.gif";
membershipHi = new Image(97, 26);
membershipHi.src = "images/membership_o.gif";
socialHi = new Image(100, 26);
socialHi.src = "images/stats_o.gif";
golfHi = new Image(73, 26);
golfHi.src = "images/golf_o.gif";
homeHi = new Image(52, 26);
homeHi.src = "images/home_o.gif";
contactHi = new Image(89, 26);
contactHi.src = "images/contact_o.gif";

//lowlighted icon substitutions

aboutLo = new Image(77, 26);
aboutLo.src = "images/about.gif";
diningLo = new Image(65, 26);
diningLo.src = "images/forum.gif";
membershipLo = new Image(97, 26);
membershipLo.src = "images/membership.gif";
socialLo = new Image(100, 26);
socialLo.src = "images/stats.gif";
golfLo = new Image(73, 26);
golfLo.src = "images/golf.gif";
homeLo = new Image(52, 26);
homeLo.src = "images/home.gif";
contactLo = new Image(89, 26);
contactLo.src = "images/contact.gif";

function hiLite(icon) {
	theMouseItem = icon;
	turnedOn = eval(icon + "Hi.src");	
		if (ie || dom) {document.images[theMouseItem].src = turnedOn;}
		if (nn) {document.navigation.document.images[theMouseItem].src = turnedOn;}
}


// Non is for assorted mouseovers that aren't in the nav bar

function hiLiteNon(nonicon) {
	thenonMouseItem = nonicon;
	turnedOn = eval(nonicon + "Hi.src");
		if (ie || dom) {document.images[thenonMouseItem].src = turnedOn;}
		if (nn) {document.background.document.images[thenonMouseItem].src = turnedOn;}
}

function loLiteNon(nonicon) {
	thenonMouseItem = nonicon;
	turnedOff = eval(thenonMouseItem + "Lo.src");
		if (ie || dom) {document.images[thenonMouseItem].src = turnedOff;}
		if (nn) {document.background.document.images[thenonMouseItem].src = turnedOff;}
}

// hilite and lolite TD for nav items
function hiLiteNavTD(cell) {
      if (ie) {
         thisObj = eval("document.all." + cell + ".style");
      }
      if (nn) {
        thisObj = eval("document.layers['" + cell + "'].style");
      }
      if (dom) {
        thisObj = eval("document.getElementById('" + cell + "').style");
      }
      thisObj.background="#E6EBDC";
      }
      
function loLiteNavTD(cell) {
      if (ie) {
         thisObj = eval("document.all." + cell + ".style");
      }
      if (nn) {
        thisObj = eval("document.layers['" + cell + "'].style");
      }
      if (dom) {
         thisObj = eval("document.getElementById('" + cell + "').style");
      }
      thisObj.background="#C6C6B3";
      }


// script for spawning new window

function openWindow(page,windowName,width,height,tools) {

// if window has already been opened and is behind main window,
// bring to front

		if (tools != 1) {
				showTools = ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no";
				} else {
				showTools = ",resizable=yes,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes";
				} 

    if (navigator.appName == 'Netscape') {
        adjWidth = width + 16;
        adjHeight = height + 16;
    }
    else {
        adjWidth = width + 16;
        adjHeight = height + 16;
    }
    
    myWin = window.open(page,'windowName','width=' + adjWidth + ',height=' + adjHeight + showTools);

	if (!myWin.focus()) {
		myWin.focus();
	}
	
}

