function openW_()
{
strURL = "node_list.asp";
if(arguments.length > 0)
strURL = strURL + "?eid=" + arguments[0];
if(arguments.length > 1)
{
strURL = strURL + "&cnt1=" + arguments[1];
strURL = strURL + "&cnt2=" + arguments[2];
}

var strOPT = "width=250,height=250,toolbar=no,menubar=no,location=no,resizable=no,status=no,scrollbars=yes,titlebar=no"
window.open (strURL,"myw",strOPT)
}


var newWin;

var screenheight = screen.availHeight; 
var screenwidth = screen.availWidth; 
	
function openURL(strURL, intWidth, intHeight, blnHidden) {
		var win_top = (screenheight - intHeight) / 2;
		var win_left = (screenwidth - intWidth) / 2;
	
		var myBars = 'directories=no,location=no,menubar=no,status=no,titlebar=no,toolbar=yes';
		var myOptions = 'scrollbars=yes,width=' + intWidth + ',height=' + intHeight + ',resizable=yes';
		if (blnHidden == true) {
			myOptions = myOptions + ',top=3000,left=3000';
		} else {
			myOptions = myOptions + ',top=' + win_top + ',left=' + win_left;
		}
		
		var myFeatures = myBars + ',' + myOptions;
		newWin = window.open(strURL, 'MyNewWin', myFeatures);
		newWin.focus;
	}


 function trim(StringValue)
    {
      var sReturnValue = "";
      sReturnValue = StringValue.replace(/^\s+/,"");
      sReturnValue = sReturnValue.replace(/\s+$/,"");
      return(sReturnValue);
    }

function isDate(dateStr) {

// Checks for the following valid date formats:
// MM/DD/YYYY   MM-DD-YYYY

// alert (dateStr);
var datePat = /^(\d{1,2})(\/|-)(\d{1,2})\2(\d{4})$/; // requires 4 digit year
var matchArray = dateStr.match(datePat); // is the format ok?

	if (matchArray == null) {
		//alert("Date is not in a valid format.")
		return false;
	}
month = matchArray[1]; // parse date into variables
day = matchArray[3];
year = matchArray[4];

	if (month < 1 || month > 12) { // check month range
		//alert("Month must be between 1 and 12.");
		return false;
	}
	if (day < 1 || day > 31) {
		//alert("Day must be between 1 and 31.");
		return false;
	}
	if ((month==4 || month==6 || month==9 || month==11) && day==31) {
		//alert("Month "+month+" doesn't have 31 days!")
		return false;
	}
	if (month == 2) { // check for february 29th
		var isleap = (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0));
		if (day>29 || (day==29 && !isleap)) {
		//alert("February " + year + " doesn't have " + day + " days!");
		return false;
   		}
	}
	
	if (year < 1960 )  {
		//alert(month + "/" + day + "/" + year + " is out of range.  No data available for dates prior to 1998.");
		return false;
	    }
	return true;
}


