<!--
var imgdir = "/images/"		// image directory
var dispImg = new Array()	// image array
var indx = 0				// loop index

// Variables for window timeout function...
var msdelay = 500;
var timercnt = 0;
var maxsecs = 0;

// Preload images...
// preload("about")
/// preload("home")

function preload(imgname){
	// Function to preload images into array...
	dispImg[indx] = new Image()
	dispImg[indx++].src = imgdir + imgname + "_out.gif"
	dispImg[indx] = new Image()
	dispImg[indx++].src = imgdir + imgname + "_in.gif"
	}

function setImg(cImg,state) {
	// Function to set image picture based upon image name and state...
	document.images[cImg].src = imgdir + cImg + "_" + state + ".gif"
	}

msHover = function() {
    // Function to perform style hover in IE...
	var msEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<msEls.length; i++) {
		msEls[i].onmouseover=function() {
			this.className+=" mshover";
		}
		msEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" mshover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", msHover);

function dispYear(){
	// Function to display the current year of the client system date...
	var today = new Date();
	var year  = today.getYear();
	
	if (year < 1900) year += 1900; 
	return(year);
	}

function CheckWinTimeout() {
    // Function to check and close window at timeout specified...
    // maxsecs = maximum number of seconds to wait   
	if (timercnt >= (maxsecs * 1000)) {
        if(new_window.closed ==  false) new_window.close(); }
    else {
        timercnt += msdelay;
        setTimeout("CheckWinTimeout()", msdelay); }
    }
	
function openLinkWindow(winwidth, winheight, URLstr, menubar, timeout) {
    /* Function to open a new window of specified size, show the menu and specified URL
        winwidth = width of window in pixels (minimum of 10, 0=autosize)
        winheight = height of window in pixels (minimum of 10, 0=autosize)
        URLstr = URL to be shown
        menubar = menu bar shown for window >0 = true
        timeout = number of seconds to auto timeout and close the window (<= 0 means no timeout)
    */
    
	var autowidth = Math.round(window.screen.width * 0.75);  
	var autoheight = Math.round(window.screen.height * 0.75);
    
    // See if we want the menu...  
    if (menubar > 0) {
    	winStats='toolbar=yes,location=yes,directories=yes,menubar=yes,'; }
    else {
    	winStats='toolbar=no,location=no,directories=no,menubar=no,'; }
	winStats+='scrollbars=yes,width=';
    
    // Set the window width...
	if (winwidth > window.screen.width) {
		winStats+= window.screen.width; }
	else {
		if (winwidth > 10) {
			winStats+= winwidth; }
		else {
			winStats+= autowidth; }
		}
	winStats+= ',height=';	

    // Set the window height...
	if (winheight > window.screen.height) {
		winStats+= window.screen.height; }
	else {
		if (winheight > 10) {
			winStats+= winheight; }
		else {
			winStats+= autoheight; }
		}
	// Set the window location - centered...	
	if (winwidth > 10) {
    	xloc = Math.round(((window.screen.width - winwidth) / 2) * 0.8); }
    else {
    	xloc = Math.round((window.screen.width - autowidth) * 0.8); }
    if (xloc < 0) xloc = 10; 
    
	if (winheight > 10) {
		yloc = Math.round(((window.screen.height - winheight) / 2) * 0.8); }
    else {
		yloc = Math.round((window.screen.height - autoheight) * 0.4); }
	if (yloc < 0) yloc = 15;
	
    // Set the window parameters...
	if (navigator.appName.indexOf("Microsoft")>=0) {
		winStats+=',left=' + xloc + ',top=' + yloc; }
	else{
		winStats+=',screenX=' + xloc + ',screenY=' + yloc; }

    // Open the window...
	new_window = window.open(URLstr,"_blank",winStats);

    // Setup the auto timeout check, if requested...
    if (timeout > 0) {
        timercnt = 0;
        maxsecs = timeout;
        setTimeout("CheckWinTimeout()", msdelay); }
	}

// Random Image Function
function dispImage(SrcName, ExtName, MaxImages){
	// imgno will be randomly set to 0..(Maximages-1)
	imgno = Math.floor(Math.random() * MaxImages);
	return("<img src='" + SrcName + imgno + ExtName + "' border=0>");
	}

// Date Format Function
function dispDate(){
	curr_mo = ["January", "February", "March", "April", "May", "June",
	"July", "August", "September", "October", "November", "December"];
	
	var today = new Date();
	var day   = today.getDate();
	var month = today.getMonth();
	var year  = today.getYear();
	
	if (year < 1900)  year += 1900;
	return(curr_mo[month] + " " +day + ", " +year);
	}
-->
