home_button = new Image;
home_button.src = "images/nav/nav_home_over.gif";
menus_button = new Image;
menus_button.src = "images/nav/nav_menus_over.gif";
locations_button = new Image;
locations_button.src = "images/nav/nav_locations_over.gif";
giftcards_button = new Image;
giftcards_button.src = "images/nav/nav_giftcards_over.gif";
firstfacts_button = new Image;
firstfacts_button.src = "images/nav/nav_firstfacts_over.gif";
suneclub_button = new Image;
suneclub_button.src = "images/nav/nav_suneclub_over.gif";
contact_button = new Image;
contact_button.src = "images/nav/nav_contact_over.gif";

hidediv = 0; // Delayed command to function, 0 means hide the div
divshowing = 0; // 0 means div is hidden, 1 means div is shown

function divshow(source)
{
	if (source == 1)
	{
		hidediv = 1;
		if (divshowing == 0)
		{
			divshowing = 1;
			sbox.style.background='#fffdd7';
			document.getElementById('searchbox').style.display='block';
		}
	}
	if (source == 0)
	{
		if (hidediv == 0)
		{
			if (divshowing == 1)
			{
				divshowing = 0;
				sbox.style.background='#ffe77c';
				document.getElementById('searchbox').style.display='none'
			}
		}
		if (hidediv == 1) { hidediv = 0; }
	}
}

// This makes the page secure
url = "http://www.firstwatch.com/";

function topmenu(currentpage)
{
	document.writeln("<tr valign='bottom' align='center'>");
	document.writeln("<td width='607px'></td>");
	
	// Newsroom
	document.write("<td width='84px'><a href='"+url+"newsroom.cgi' style='text-decoration:none; color:#");
	if (currentpage == 1) { document.write("2e2e2e;'"); }
	else { document.write("5d5d5d;' onmouseover='this.style.color=\"#8cc63f\"' onmouseout='this.style.color=\"#5d5d5d\""); }
	document.writeln("'>newsroom</a></td>");
	
	// Franchise
	document.write("<td width='75px'><a href='"+url+"franchise.htm' style='text-decoration:none; color:#");
	if (currentpage == 2) { document.write("2e2e2e"); }
	else { document.write("5d5d5d;' onmouseover='this.style.color=\"#8cc63f\"' onmouseout='this.style.color=\"#5d5d5d\""); }
	document.writeln("'>franchising</a></td>");
	
	// Employment
	document.write("<td width='63px'><a href='"+url+"careers.htm' style='text-decoration:none; color:#");
	if (currentpage == 3) { document.write("2e2e2e"); }
	else { document.write("5d5d5d;' onmouseover='this.style.color=\"#8cc63f\"' onmouseout='this.style.color=\"#5d5d5d\""); }
	document.writeln("'>careers</a></td>");

	// Employment
	document.write("<td width='50px'><a href='"+url+"faq.htm' style='text-decoration:none; color:#");
	if (currentpage == 4) { document.write("2e2e2e"); }
	else { document.write("5d5d5d;' onmouseover='this.style.color=\"#8cc63f\"' onmouseout='this.style.color=\"#5d5d5d\""); }
	document.writeln("'>FAQs</a></td>");

	// Search (no overstate?)
	document.write("<td width='59px' id='sbox'><a href='#' style='text-decoration:none; color:#5c5d5d; display:block;' ");
	document.write("onmouseover='this.style.color=\"#8cc63f\"' onmouseout='this.style.color=\"#5d5d5d\"' ");
	document.write("onclick=\"divshow(1); ");
	document.writeln("return false;\">search</a></td></tr>");
}

function printmenu(currentpage)
{
	if (currentpage == 1)
	{	document.writeln("<table border=0 width='702px' cellpadding=0 cellspacing=0>");
		document.writeln("<tr><td><img border=0 src='images/spacer.gif' width='61px' height='31px'></td>");
	} else {
		document.writeln("<table border=0 width='752px' cellpadding=0 cellspacing=0>");
		document.writeln("<tr><td><img border=0 src='images/spacer.gif' width='111px' height='31px'></td>");
	}

	// Home
	if (currentpage == 1)
	{	document.writeln("<td><img border=0 src='images/nav/nav_home_on.gif'></td>"); }
	else
	{	document.write("<td><a href='"+url+"index.htm' onmouseover='document.navhome.src=home_button.src' ");
		document.write("onmouseout='document.navhome.src=\"images/nav/nav_home.gif\"'>");
		document.writeln("<img border=0 src='images/nav/nav_home.gif' name='navhome'></a></td>"); }
	
	// Menus
	if (currentpage == 2)
		{ document.writeln("<td><img border=0 src='images/nav/nav_menus_on.gif'></td>"); }
	else
	{	document.write("<td><a href='"+url+"menu.htm' onmouseover='document.navmenus.src=menus_button.src' ");
		document.write("onmouseout='document.navmenus.src=\"images/nav/nav_menus.gif\"'>");
		document.writeln("<img border=0 src='images/nav/nav_menus.gif' name='navmenus'></a></td>"); }

	// Locations
	if (currentpage == 3)
		{ document.writeln("<td><img border=0 src='images/nav/nav_locations_on.gif'></td>"); }
	else
	{	document.write("<td><a href='"+url+"locations.cgi' onmouseover='document.navlocations.src=locations_button.src' ");
		document.write("onmouseout='document.navlocations.src=\"images/nav/nav_locations.gif\"'>");
		document.writeln("<img border=0 src='images/nav/nav_locations.gif' name='navlocations'></a></td>"); }

	// Gift Card
	if (currentpage == 4)
		{ document.writeln("<td><img border=0 src='images/nav/nav_giftcards_on.gif'></td>"); }
	else
	{	document.write("<td><a href='"+url+"giftcard.htm' onmouseover='document.navgiftcards.src=giftcards_button.src' ");
		document.write("onmouseout='document.navgiftcards.src=\"images/nav/nav_giftcards.gif\"'>");
		document.writeln("<img border=0 src='images/nav/nav_giftcards.gif' name='navgiftcards'></a></td>"); }

	// First Facts
	if (currentpage == 5)
		{ document.writeln("<td><img border=0 src='images/nav/nav_firstfacts_on.gif'></td>"); }
	else
	{	document.write("<td><a href='"+url+"firstfacts.htm' onmouseover='document.navfirstfacts.src=firstfacts_button.src' ");
		document.write("onmouseout='document.navfirstfacts.src=\"images/nav/nav_firstfacts.gif\"'>");
		document.writeln("<img border=0 src='images/nav/nav_firstfacts.gif' name='navfirstfacts'></a></td>"); }
	
	// Sun EClub (currently goes to another page, no overstate)
	if (currentpage == 6)
		{ document.writeln("<td><img border=0 src='images/nav/nav_suneclub_on.gif'></td>"); }
	else
	{	document.write("<td><a href='"+url+"suneclub.cgi' onmouseover='document.navsuneclub.src=suneclub_button.src' ");
		document.write("onmouseout='document.navsuneclub.src=\"images/nav/nav_suneclub.gif\"'>");
		document.writeln("<img border=0 src='images/nav/nav_suneclub.gif' name='navsuneclub'></a></td>"); }
	
	// Contact page
	if (currentpage == 7)
		{ document.writeln("<td><img border=0 src='images/nav/nav_contact_on.gif'></td></tr>"); }
	else
	{	document.write("<td><a href='"+url+"contact.htm' onmouseover='document.navcontact.src=contact_button.src' ");
		document.write("onmouseout='document.navcontact.src=\"images/nav/nav_contact.gif\"'>");
		document.writeln("<img border=0 src='images/nav/nav_contact.gif' name='navcontact'></a></td></tr>"); }
	
	document.writeln("</table>");
}

function footer()
{
	now = new Date;
	document.write("<table border=0 width='928px' cellpadding=0 cellspacing=0  style='font:10px Tahoma;'>");
	document.write("<tr><td width='65px' align='center' style='padding-left:10px;'><a href='"+url+"legal_notice.htm' ");
	document.write("        style='color:#616161; text-decoration:none;'>Legal Notice</a></td>");
	document.write("    <td width='10px' align='center' style='color:#616161;'>&bull;</td>");
	document.write("    <td width='45px' align='center'><a href='"+url+"sitemap.htm' style='color:#616161; ");
	document.write("        text-decoration:none;'>Site Map</a></td>");
	document.write("    <td width='808px' align='right' style='color:#616161;'>&copy; "+now.getFullYear());
	document.write("         First Watch Restaurants, Inc. All rights reserved.</td></tr>");
	document.write("</table>");
}

function indexfooter()
{
	now = new Date;
	document.write("<table border=0 width='405px' cellpadding=0 cellspacing=0  style='font:10px Tahoma;'>");
	document.write("<tr><td width='15px'></td>");
	document.write("    <td width='65px' align='center' style='padding-left:10px;'><a href='"+url+"legal_notice.htm' ");
	document.write("        style='color:#616161; text-decoration:none;'>Legal Notice</a></td>");
	document.write("    <td width='10px' align='center' style='color:#616161;'>&bull;</td>");
	document.write("    <td width='45px' align='center'><a href='"+url+"sitemap.htm' style='color:#616161; ");
	document.write("        text-decoration:none;'>Site Map</a></td>");
	document.write("    <td width='10px' align='center' style='color:#616161;'>&bull;</td>");
	document.write("    <td width='260px' align='right' style='color:#616161;'>&copy; "+now.getFullYear());
	document.write("         First Watch Restaurants, Inc. All rights reserved.</td></tr>");
	document.write("</table>");

}

