// ____________________________________________________________________________
// Module Vars
	var newWin = null;

// ____________________________________________________________________________
function imageon(imgName){
	if (document.images) {
		document[imgName].src = eval(imgName + 'on.src');
	}
}
	
// ____________________________________________________________________________
function imageoff(imgName){
	if (document.images) {
		document[imgName].src = eval(imgName + 'off.src');
	}
}

// ____________________________________________________________________________
function jsPopUp(strURL, intWidth, intHeight, blnScrollBars, blnResizable) {
	// this script provides a simple way to open a new window
	// with given url and dimensions - jmh

	if (newWin != null && !newWin.closed){
		newWin.focus();
	}
	
	var intLeft = (screen.availWidth-intWidth)/2;
	var intTop = (screen.availHeight-intHeight)/2;
	var strWindowOptions = 'toolbar=no';
	
	if (blnScrollBars) {
		strWindowOptions += ',scrollbars=yes';
	}
	
	if (blnResizable) {
		strWindowOptions += ',resizable=yes';
	}
	
	strWindowOptions += ',dependent=yes';
	
	//strWindowOptions += ',menubar=yes,toolbar=yes';
	// don't specify position for AOL - causes weird problems
	//if (navigator.userAgent.indexOf('AOL') == -1) {
		//strWindowOptions += ',left=' + intLeft + ',top=' + intTop;
	//}
	newWin = window.open(strURL, 'jsPopUp', 'width=' + intWidth + ',height=' + intHeight + ',' + strWindowOptions);
	//newWin.location = strURL;
	
	//if (newWin.opener == null){
		//newWin.opener = document;
	//}
	
	newWin.focus();

	// resize the window to account for weird AOL glitch
	//if (navigator.userAgent.indexOf('AOL') != -1) {
	//	newWin.height = newWin.height + 1;
	//	newWin.width = newWin.width + 1;
	//}
}

//_____________________________________________________________
/*a new version of jsPopUp.  We'll keep the old one for backwards compatibility for now
/*when 
/* GDG 11.15.06
*/
var popupWin = ''

function windowOpener(url, name, args) {
		
	if (!popupWin.closed && popupWin.location){
		popupWin.location.href = url;	
	}else{
		popupWin = window.open(url, name, args);
	}
	
	//if (window.focus) {
	popupWin.focus();
	//}
	
	return false;
}

// ____________________________________________________________________________
function clientDate() {
   // grabs the date from the client's machine and writes it on the webpage
   var name=navigator.appName
   var version=parseInt(navigator.appVersion)
   var clientdate=new Date()
   var year=clientdate.getYear()
   var day=clientdate.getDay()
   var month=clientdate.getMonth()
   var dayofmonth=clientdate.getDate()
   var daysarray=new Array("Sunday","Monday","Tuesday","Wednesday",
                 "Thursday","Friday","Saturday")
   var monthsarray=new Array("January","February","March","April","May","June",
                   "July","August","September","October","November","December")

   if (name=="Netscape") {
      year=1900+year
      }

   document.write("<font size=-2 face=Verdana, Arial, Helvetica, sans-serif><b>"+daysarray[day]+", "+monthsarray[month]+" "+dayofmonth+", "+year+"</font></b>")
   }




