/**
 * File: PmcGen.js
 * Version: 1.01
 * Date: 03/25/2005
 *
 * Purpose: General functions.
 */


/**
 * At the place of function call, writes date into the document. 
 * The date is in the following formats: 
 * format = 0 (default): "Monday, July 14, 2003"
 * format = 1: "July 14, 2003"
 */
/* void */ function printTodaysDate(format)
{
	var months = new Array(12);
	months[1] = "January";
	months[2] = "February";
	months[3] = "March";
	months[4] = "April";
	months[5] = "May";
	months[6] = "June";
	months[7] = "July";
	months[8] = "August";
	months[9] = "September";
	months[10] = "October";
	months[11] = "November";
	months[12] = "December";

	var days = new Array(7);
	days[1] = "Sunday";
	days[2] = "Monday";
	days[3] = "Tuesday";
	days[4] = "Wednesday";
	days[5] = "Thursday";
	days[6] = "Friday";
	days[7] = "Saturday";

	var today = new Date();
	var day = days[today.getDay() + 1];
	var month = months[today.getMonth() + 1];
	var date = today.getDate();
	var year = today.getFullYear(); 

	if (format == 1)
	{
		document.write(month + " " + date + ", " + year);
	}
	else
	{
		document.write(day + ", " + month + " " + date + ", " + year);
	}
	
	return true;
}


/**
 * Displays a status message in the status bar of the current window.
 *
 * @param strMsg  status message string to be displayed
 */

/* void */ function displayStatusMessage(strMsg)  
{
	window.status = strMsg;
	return true;
}


/**
 * Opens another browser windows with the specified features
 *
 * @param url  location (URL) of the page to be displayed in the new window
 * @param name      name of the new window
 * @param features  features of the new window
 */
/* void */ function openWindow(url, name, features) 
{
  newWindow = window.open(url, name, features);
  newWindow.focus();
}

/*
 * @param cellName  
 * @param status   status of the rollover: 0 = no background highlight, 1 = show background highlight
 */
function menu02Rollover(objId, status)
{
	var obj = document.getElementById(objId);
	if (status == 1)
	{
		obj.style.background="#CCCCCC";
	}
	else
	{
		obj.style.background="";
	}		
}



