/****************************************************************************************************/

/*****************************************************************************************************
Description:
	The following code is used to preload images in the top navigation bar.
*****************************************************************************************************/
	button_home_up = new Image(15, 100)
	button_home_up.src = "images/button_home_up.gif"
	button_home_down = new Image(15, 100)
	button_home_down.src = "images/button_home_down.gif"
	button_contact_up = new Image(15, 100)
	button_contact_up.src = "images/button_contact_up.gif"
	button_contact_down = new Image(15, 100)
	button_contact_down.src = "images/button_contact_down.gif"
	button_site_map_up = new Image(15, 100)
	button_site_map_up.src = "images/button_site_map_up.gif"
	button_site_map_down = new Image(15, 100)
	button_site_map_down.src = "images/button_site_map_down.gif"

/*****************************************************************************************************
Description:
	The following code is used to swap images in the top navigation bar.
*****************************************************************************************************/
	if(document.images)
	{
		button_home_up = new Image
		button_home_up.src = "images/button_home_up.gif"
		button_home_down = new Image
		button_home_down.src = "images/button_home_down.gif"
		button_contact_up = new Image
		button_contact_up.src = "images/button_contact_up.gif"
		button_contact_down = new Image
		button_contact_down.src = "images/button_contact_down.gif"
		button_site_map_up = new Image
		button_site_map_up.src = "images/button_site_map_up.gif"
		button_site_map_down = new Image
		button_site_map_down.src = "images/button_site_map_down.gif"
	}
	else
	{
		button_home_up = ""
		button_home_down = ""
		button_contact_up = ""
		button_contact_down = ""
		button_site_map_up = ""
		button_site_map_down = ""
		document.button1 = ""
		document.button2 = ""
		document.button3 = ""
	}

/*****************************************************************************************************
function printDate()
Description:
	This function prints the date in "Day, Month X, Y" format, where X = day of month, and Y = Year
Precondition:
	A webpage has been accessed.
Postcondition:
	The date is displayed on the webpage.
*****************************************************************************************************/
function printDate()
{
	var now = new Date();
	var month = new Array('January','February','March','April','May','June','July','August','September',
						  'October','November','December');
	var year = now.getFullYear();
	var day = ( (now.getDate() < 10 ) ? "0" : "" ) + now.getDate();
	document.write(month[now.getMonth()] + " " + day + ", " + year);
}

/*****************************************************************************************************
function showAddress( Arg1, Arg2 )
Description:
	This function is used to prevent email addresses from being found by search robots and spiders.
Precondition:
	A webpage where an email address needs to appear has been accessed.
	Arg1 and Arg2 have been specified.
Postcondition:
	Arg2 is appended to Arg1 and the result is visible on the webpage.
*****************************************************************************************************/
function showAddress( user, site )
{
	document.write( '<a href=\"mailto:' + user + '@' + site + '\">' );
	document.write( user + '@' + site + '</a>' );
}

/*****************************************************************************************************
function showSection( Arg1 )
Description:
	This function is used to display a section of a webpage one section at a time.
Precondition:
	Arg1 has been specified.
Postcondition:
	The section corresponding to Arg1 is displayed.
*****************************************************************************************************/

var objSection = null;

function showSection( sectionName )
{
	if ( objSection )
	objSection.style.display = 'none'
	objSection = document.getElementById( sectionName );
	objSection.style.display = 'block'
}

/*****************************************************************************************************
function changeLoc( Arg1 )
Description:
	This function is used with the drop-down menu on the index page to jump to different webpages.
Precondition:
	Arg1 has been specified.
Postcondition:
	The webpage corresponding to Arg1 is displayed.
*****************************************************************************************************/
function changeLocation(strDst)
{
	window.location = strDst;
}

/****************************************************************************************************/