
/*

NeoMem.org JavaScript routines
Created January 2000

To include in a page, put <script src="neomem.js"></script> in header section.

*/



// Get today's date.
// Returns a string containg the date in "Monday, January 5, 2000" format.
function getToday() 
{
	var months=new Array(13);
	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 time = new Date();
	var strDayOfWeek = days[time.getDay() + 1];
	var strMonth = months[time.getMonth() + 1];
	var intDayOfMonth = time.getDate();
	var intYear = time.getYear();

	if (intYear < 2000) intYear = intYear + 1900;

	var strToday = strDayOfWeek + ", " + strMonth + " " + intDayOfMonth + ", " + intYear;

	return strToday;
}



// Open an image in a new window
function makeNewWindow(strSource, strCaption) 
{
	var newWindow = window.open("","","toolbar=0,resizable=yes,scrollbars=yes")
	newWindow.document.open();
	newWindow.document.write("<html>");
	newWindow.document.write("<title>" + strCaption + "</title>");
	newWindow.document.write("<body bgcolor=black text=white>");
	newWindow.document.write("<center><p><img src="+ strSource + "><br><br><large>" + strCaption + "</large></p></center>");
	newWindow.document.write("</body></html>");
	newWindow.document.close();
}


function new_win() 
{
	// By using a # in the tag below, you prevent a page from being replaced when
	// a link is followed. Now you can open more than 1 window at a time and
	// specify the size of the window your opening.
	var win1=open("help.htm","Help","resizable=no,height=200,width=200");
}



// Call this to toggle display of hierarchical information
function ToggleDisplay(oButton, oItems) 
{
	if ((oItems.style.display == "") || (oItems.style.display == "none"))
	{
		oItems.style.display = "block";
		oButton.src = "images/minus.gif";
	}
	else
 	{
		oItems.style.display = "none";
		oButton.src = "images/plus.gif";
	}
	return false;
}




