/************************************************************************
Filename: functions.js
Desc: Hold JavaScript Functions
Requires: NA
Created: Circa 2001, 2002, 2003
Created by: Amy Jo Hines, JAG Technologies
Set Variables: baseUrl; */

/************************************************************************
Function Group: getDateStrWithDOW()
Action: Gets Client Date and Formats It as Weekday, Month DD, YYYY
Returns: string (date)
From: http://www.crays.com/jsc/jsC4Udate.htm */

function GetDay(intDay){
    var DayArray = new Array("Sunday", "Monday", "Tuesday", "Wednesday", 
"Thursday", "Friday", "Saturday")
    return DayArray[intDay]
    }

function GetMonth(intMonth){
    var MonthArray = new Array("January", "February", "March", "April", "May", 
"June", "July", "August", 
"September","October", "November", "December")
    return MonthArray[intMonth]
    }

function getDateStrWithDOW(){
    var today = new Date()
    var year = today.getYear()
    if(year<1000) year+=1900
    var todayStr = GetDay(today.getDay()) + ", "
    todayStr += GetMonth(today.getMonth()) + " " + today.getDate()
    todayStr += ", " + year
    return todayStr
    }

/************************************************************************
Function Name: printMailto( recipient, title )
Action: Displays HTML Mailto Link
Returns: string */

function printMailto( recipient, title ){
	document.write("<a href=\"mailto");
	document.write(":" + recipient + "@");
	document.write("jagtechnologies.net\" title=\"" + title + "\">");
	document.write(recipient + "@jagtechnologies.net<\/a>");
	}

/************************************************************************
DISABLED - NEEDS DEBUGGED / FIXED
Function Name: menuGoto( menuform)
Action: redirects user to selected page
Returns: URL 
function menuGoto( menuform )	{
	var baseUrl = "http://localhost/jagtechonline/";
	selectedItem = menuform.url.selectedIndex;
	newUrl = menuform.url.options[ selectedItem ].value;
	if (newUrl.length != 0	{
		location.href = baseUrl + newUrl;
		}
	}*/		
