// JavaScript Source File: banner.js
//
// Author(s): Lawrence Durtschi, Snow College Web Master
//			  Scott Burton, Snow College Web Assistant
// Revised: 2000-11-29 - Created Initial Version
//          2001-01-19 - fixed links to the index page
//          2001-01-31 - fixed search and directory links
//			2001-02-27 - a few minor cleanup issues, mostly in comments
//			2003-09-09 - completely changed the banner for the new look on the snow site
//			2004-04-12 - Updated nav
//			2007-01-12 - New Server Migration
//			2007-09-15 - www.snow.edu and snow.edu DNS
//			2007-10-23 - fixed welcome for snow.edu
//			2009-07-20 - new website
//
// purpose: This JavaScript file is designed to be included
//      in Snow College web pages.  It's functions can then 
//      be referenced to draw the gradient down the left side
//      side of the page, the banner at the top, and other
//      items that are common to all pages.  This allows the
//      source to be contained in one place, ensuring consistency
//      and allowing easy modifications.
 

// function: draw_blue_gradient
// parameters: none
// returns: nothing
//
// purpose: This function applies the graphic 'backgroundb.gif'
//      to the background of the body.  This effectively places
//      the blue gradient along the left side of the page.
function draw_blue_gradient()
{
	// write the tag
//	document.write ("<body background=\"/resources/graphics/backgroundb.gif\">\n");
}

// function: draw_copper_gradient
// parameters: none
// returns: nothing
//
// purpose: This function applies the graphic 'backgroundc.gif'
//      to the background of the body.  This effectively places
//      the copper gradient along the left side of the page.
function draw_copper_gradient()
{
	// write the tag
//	document.write ("<body background=\"/resources/graphics/backgroundc.gif\">\n");
}
 

// function: write_banner
// parameters: none
// returns: nothing
//
// purpose: This function writes the banner along the top of the
//      page.  It references a number of graphics, and creates
//      links to various places around the Snow College website.
function write_banner()
{
	// include the other javascript files needed to run the menu system
	document.write("<script language='javascript' src='http://www.snow.edu/resources/scripts/sniffer.js'></script>\n");
	document.write("<script language='javascript1.2' src='http://www.snow.edu/resources/scripts/custom.js'></script>\n");
	document.write("<script language='javascript1.2' src='http://www.snow.edu/resources/scripts/style.js'></script>\n");
	
	document.write("<style type='text/css'>");
	document.write("<!--\n");
	document.write("#men {\n");
	document.write("BORDER-RIGHT: 2px outset; BORDER-TOP: 2px outset; Z-INDEX: 1; LEFT: 0px; VISIBILITY: hidden; BORDER-LEFT: 2px outset; BORDER-BOTTOM: 2px outset; POSITION: absolute; TOP: 0px\n");
	document.write("}\n");
	document.write("#men A {\n");
	document.write("PADDING-RIGHT: 1px; PADDING-LEFT: 1px; PADDING-BOTTOM: 4px; MARGIN: 1px 1px 1px 16px; FONT: 12px sans-serif; WIDTH: 100%; PADDING-TOP: 3px; HEIGHT: 100%; TEXT-DECORATION: none\n");
	document.write("}\n");
	document.write(".ico {\n");
	document.write("BORDER-RIGHT: medium none; BORDER-TOP: medium none; FLOAT: left; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none\n");
	document.write("}\n");

/*	document.write("body{\n");
	document.write("	font-family : Verdana, Arial, Helvetica, sans-serif;\n");
	document.write("	color : #003366;\n");
	document.write("	font-style : normal;\n");
	document.write("	font-weight: normal;\n");
	document.write("	text-decoration: none;\n");
	document.write("	font-size: 12px;	\n");
	document.write("}\n");
	document.write(".text{\n");
	document.write("	font-family : Verdana, Arial, Helvetica, sans-serif;\n");
	document.write("	color : #003366;\n");
	document.write("	font-style : normal;\n");
	document.write("	font-weight: normal;\n");
	document.write("	text-decoration: none;\n");
	document.write("	font-size: 12px;	\n");
	document.write("}\n");
	document.write(".smtext{\n");
	document.write("	font-family : Verdana, Arial, Helvetica, sans-serif;\n");
	document.write("	color : #003366;\n");
	document.write("	font-style : normal;\n");
	document.write("	font-weight: normal;\n");
	document.write("	text-decoration: none;\n");
//	document.write("	font-size : 10px;	\n");
	document.write("}\n");
*/


	document.write("A:link {\n");
	document.write("	font-family : Verdana, Arial, Helvetica, sans-serif;\n");
	document.write("	color: #1B3C78;\n");
	document.write("	font-style : normal;\n");
	document.write("	text-decoration: none;\n");
//	document.write("	font-size : 10px;\n");
	document.write("	font-weight: bold\n");
	document.write("}\n");
	document.write("A:visited {\n");
	document.write("	font-family : Verdana, Arial, Helvetica, sans-serif;\n");
	document.write("	color: #CC9933;\n");
	document.write("	font-style : normal;\n");
	document.write("  	text-decoration: none;\n");
//	document.write("	font-size : 10px;\n");
	document.write("}\n");
	document.write("A:active {\n");
	document.write("	font-family : Verdana, Arial, Helvetica, sans-serif;\n");
	document.write("	color: #CC9933;\n");
	document.write("	text-decoration: none;	\n");
//	document.write("	font-size : 10px;\n");
	document.write("}\n");
	document.write("A:hover {\n");
	document.write("	font-family : Verdana, Arial, Helvetica, sans-serif;\n");
	document.write("	color: #1B3C78;\n");
	document.write("	text-decoration: underline;	 \n");
//	document.write("	font-size : 10px;	\n");
	document.write("}\n");


	document.write("#topMenu A\n");
	document.write("{\n");
	document.write("	font-family: Arial, Verdana, Helvetica, sans-serif;\n");
	document.write("	color: #E8C67F;\n");
	document.write("	font-size: 14px;\n");
	document.write("	font-weight: 1000;\n");
	document.write("	text-decoration: none;\n");
	document.write("	\n");
	document.write("}\n");
	document.write("#topMenu A:hover\n");
	document.write("{\n");
	document.write("	font-family: Arial, Verdana, Helvetica, sans-serif;\n");
	document.write("	color: #FFFFFF;\n");
	document.write("	text-decoration: none;\n");
	document.write("}	\n");
	document.write("td {\n");
	document.write("	font-family : Verdana, Arial, Helvetica, sans-serif;\n");
	document.write("	color : #003366;\n");
	document.write("	font-style : normal;\n");
	document.write("	font-weight: normal;\n");
	document.write("	text-decoration: none;\n");
	document.write("	font-size: 12px;	\n");
	document.write("}\n");


document.write("#rMenu A\n");
	document.write("{\n");
	document.write("	font-family: Arial, Verdana, Helvetica, sans-serif;\n");
	document.write("	color: #FFFFFF;\n");
	document.write("	font-size: 16px;\n");
	document.write("	font-weight: bold;\n");
	document.write("	text-decoration: none;\n");
	document.write("	\n");
	document.write("}\n");
	document.write("#rMenu A:hover\n");
	document.write("{\n");
	document.write("	font-family: Arial, Verdana, Helvetica, sans-serif;\n");
	document.write("	color: #FFFFFF;\n");
	document.write("	font-size: 16px;\n");
	document.write("	font-weight: bold;\n");
	document.write("	text-decoration: underline;\n");
	document.write("}	\n");
	document.write("#rMenu A:visited\n");
	document.write("{\n");
	document.write("	font-family: Arial, Verdana, Helvetica, sans-serif;\n");
	document.write("	color: #E8C77A;\n");
	document.write("	font-size: 16px;\n");
	document.write("	font-weight: bold;\n");
	document.write("	text-decoration: none;\n");
	document.write("}	\n");
	document.write("#rMenu A:active\n");
	document.write("{\n");
	document.write("	font-family: Arial, Verdana, Helvetica, sans-serif;\n");
	document.write("	color: #E8C77A;\n");
	document.write("	font-size: 16px;\n");
	document.write("	font-weight: bold;\n");
	document.write("	text-decoration: none;\n");
	document.write("}	\n");
	

	

document.write("#lMenu A\n");
	document.write("{\n");
	document.write("	font-family: Arial, Verdana, Helvetica, sans-serif;\n");
	document.write("	color: #E8C77A;\n");
	document.write("	font-size: 11px;\n");
	document.write("	font-weight: bold;\n");
	document.write("	text-decoration: none;\n");
	document.write("	\n");
	document.write("}\n");
	document.write("#lMenu A:hover\n");
	document.write("{\n");
	document.write("	font-family: Arial, Verdana, Helvetica, sans-serif;\n");
	document.write("	color: #FFFFFF;\n");
	document.write("	font-size: 11px;\n");
	document.write("	font-weight: bold;\n");
	document.write("	text-decoration: underline;\n");
	document.write("}	\n");
	document.write("#lMenu A:visited\n");
	document.write("{\n");
	document.write("	font-family: Arial, Verdana, Helvetica, sans-serif;\n");
	document.write("	color: #E8C77A;\n");
	document.write("	font-size: 11px;\n");
	document.write("	font-weight: bold;\n");
	document.write("	text-decoration: none;\n");
	document.write("}	\n");
	document.write("#lMenu A:active\n");
	document.write("{\n");
	document.write("	font-family: Arial, Verdana, Helvetica, sans-serif;\n");
	document.write("	color: #E8C77A;\n");
	document.write("	font-size: 11px;\n");
	document.write("	font-weight: bold;\n");
	document.write("	text-decoration: none;\n");
	document.write("}	\n");
	

	document.write("//-->\n");
	document.write("</style>\n");

	prepend_title();
//	document.write('<title>Snow College - Ephraim, Utah | Top Nav Bar</title>\n');
	document.write('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\n');
	document.write('<link rel="SHORTCUT ICON" href="http://www.snow.edu/snow.ico"> \n');
	document.write('</head>\n');
	document.write('\n');
	document.write('<body OnLoad="checkCount()" leftmargin="0" topmargin="0" rightmargin="0" marginwidth="0" bgcolor="#FFFFFF">\n');



	document.write('<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#0A3150" hspace="0">\n');
	document.write('  <tr align="center"> \n');
	document.write('    <td height="30" width="1"></td>\n');

	if(window.location == "http://www.snow.edu" ||
	   window.location == "http://www.snow.edu/" ||
	   window.location == "http://snow.edu" ||
	   window.location == "http://snow.edu/" ||
	   window.location == "http://www.snow.edu:82" ||
	   window.location == "http://www.snow.edu:82/")
	{
		document.write('    <td width="107"><div id="topMenu"><a href="http://www.snow.edu/president">Welcome</a></div></td>\n');
	}
	else
	{
		document.write('    <td width="97"><div id="topMenu"><a href="http://www.snow.edu/"><img src="http://www.snow.edu/resources/graphics/snow_banner3.gif" border=0 alt="Snow College - Home Page"></a></div></td>\n');
	}
	document.write('    <td width="87"><div id="topMenu"><a href="http://www.snow.edu/general/academics.html">Academics</a></div></td>\n');
	document.write('    <td width="74"><div id="topMenu"><a href="http://www.snow.edu/welcome/admissions">Admissions</a></div></td>\n');
	document.write('    <td width="53"><div id="topMenu"><a href="http://www.snowbadgers.com">Athletics</a></div></td>\n');
	document.write('    <td width="68"><div id="topMenu"><a href="http://www.snow.edu/calendar">Calendars</a></div></td>\n');
	document.write('    <td width="57"><div id="topMenu"><a href="http://www.lib.snow.edu">Library</a></div></td>\n');
	document.write('    <td width="10">&nbsp;</td>\n');
	document.write('    <td width="30"><div id="topMenu"><a href="http://www.snow.edu/indexAZ/index.html">Index</a></div></td>\n');
	document.write('    <td width="11">&nbsp;</td>\n');
	document.write('  </tr>\n');
	document.write('</table> \n');
 

	document.write('<script language="javascript1.2" src="http://www.snow.edu/resources/scripts/menu.js">\n');
	document.write('</script>\n');


document.write('<br>\n');
document.write('<table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" hspace="0" style="position:absolute;top:55px;">\n');
document.write('  <tr> \n');
document.write('    <td><img src="http://www.snow.edu/resources/graphics/line.gif" width="100%" height="4" border="0"></td>\n');
document.write('  </tr>\n');
document.write('</table>\n');
document.write('<br>\n');


/*
	// writes the folling lines, which describe the banner, to the html page
	document.write ("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n");
	document.write ("	<tr bgcolor=\"#003366\">\n");
	document.write ("   	<td>\n");
	document.write ("\n");
	document.write ("			<table bgcolor=\"white\" border=\"0\" width=\"580\" cellpadding=\"0\" cellspacing=\"0\">\n");
	document.write ("				<tr bgcolor=\"#003366\" align=\"center\">\n");
	document.write ("					<td align=\"right\" bgcolor=\"#003366\" width=\"476\"><a href=\"http://www.snow.edu\"><img src=\"/resources/graphics/snow_banner.gif\" width=\"120\" height=\"21\" border=\"0\"></a><img src=\"/resources/graphics/blueblank.gif\" border=\"0\" width=\"50\" height=\"21\" hspace=\"12\"><a href=\"/indexAZ/index.html\"><img alt=\"A-Z index\" src=\"/resources/graphics/a-zindex.gif\" border=\"0\" width=\"52\" height=\"21\" hspace=\"12\"></a><a href=\"/general/directories.html\"><img alt=\"Directory\" src=\"/resources/graphics/directory.gif\" border=\"0\" width=\"102\" height=\"21\" hspace=\"12\"></a><a href=\"http://www.snow.edu/search\"><img alt=\"Search our site\" src=\"/resources/graphics/search.gif\" border=\"0\" width=\"39\" height=\"21\" hspace=\"12\"></a></td>\n");
	document.write ("				<!--SEARCH FORM-->\n");
	document.write ("				<form method=\"GET\" action=\"http://www.snow.edu/search/query.html\">\n");
	document.write ("					<td align=\"right\"><font face=\"Verdana,Arial,Helvetica\" size=\"1\">\n");
	document.write ("						<input type=\"text\" name=\"qt\" size=\"10\" accesskey=\"s\" tabindex=\"0\" >\n");
	document.write ("						</font>\n");
	document.write ("					</td>\n");
	document.write ("					<td align=\"right\"><input type=\"image\" src=\"/resources/graphics/go_banner.gif\" border=\"0\" width=\"28\" height=\"21\" valign=\"bottom\" name=\"image\"></td>\n");
	document.write ("				</form>\n");
	document.write ("				</tr>\n");
	document.write ("			</table>\n");
	document.write ("		</td>\n");
	document.write ("	</tr>\n");
	document.write ("</table>\n");
	document.write ("\n");
	document.write ("		<p></p>\n");
*/
}
 
function write_copyright()
{
	document.write('<br>');
	document.write('<table width="700" border="0" align="center" cellpadding="0" cellspacing="0">\n');
	document.write('  <tr>\n');
	document.write('    <td width="700" align="center"><div align="center"><font face="Arial, Helvetica, sans-serif"><font color="#003366" size="1"><strong>Snow \n');
	document.write('        College &#8226; 150 East College Avenue &#8226; Ephraim, UT 84627 USA &#8226; \n');
	document.write('        435.283.7000 &#8226; Copyright &copy; 2009 Snow College. &#8226; All Rights \n');
	document.write('        Reserved. </strong></font><font face="Arial, Helvetica, sans-serif"><br><br>\n');
	document.write('        </font> </font></div></td>\n');
	document.write('  </tr>\n');
	document.write('</table>\n');
}


function prepend_title()
{
	if(document.title.indexOf('Snow College - Ephraim') == -1)
	{
		document.title = 'Snow College - Ephraim, Utah | ' + document.title;
	}
}

function sc_image(image_src, image_width)
{
	document.write('<img src="http://www.snow.edu/resources/graphics/snowlogo_small.jpg"><br>\n');
	document.write('<img src="'+image_src+'" width="'+image_width+'" style="position:relative;top:-50px;left:75px;border-style:solid;border-color:#F9D081;border-width:7px;"><br>\n');
}

function gold_image(image_src, image_width)
{
	if(image_width)
	{
		document.write('<img src="'+image_src+'" width="'+image_width+'" style="border-style:solid;border-color:#F9D081;border-width:7px;"><br>\n');
	}
	else
	{
		document.write('<img src="'+image_src+'" style="border-style:solid;border-color:#F9D081;border-width:7px;"><br>\n');
	}
}

// end of file

