<!--
//Validate date
function DateVerify(sInDate, thisCntl) 
{
	sMonthNm = new Array("Null","January","February","March","April","May","June","July","August","September","October","November","December");
	iNoOfDays = new Array(0,31,28,31,30,31,30,31,31,30,31,30,31)
	
	if(sInDate.indexOf("-")!=-1)
	{
		sInDateArray = sInDate.split("-");
	}else{
		sInDateArray = sInDate.split("/");
	}
	iInMonth = Math.abs(sInDateArray[0]);
	iInDay = Math.abs(sInDateArray[1]);
	iInYear = Math.abs(sInDateArray[2]);
	
	if(isNaN(iInMonth) || (iInMonth < 1 || iInMonth > 12)){
		alert ("Please enter a month between 1 and 12");
		thisCntl.select();
		thisCntl.focus();
		return false;}
		
	if(isNaN(iInYear)||(iInYear < 1000)){ 
		alert ("Please enter a 4 digit numeric year");
		thisCntl.select();
		thisCntl.focus();
		return false;}
		
	if(iInYear%4==0){
		 iNoOfDays[2]=29;}
	
	if(isNaN(iInDay) || (iInDay < 1 || iInDay > iNoOfDays[iInMonth])){
		alert ("Please enter a valid day");
		thisCntl.select();
		thisCntl.focus();
		return false;}
}

// Input required for a control
function CheckReqd(sInStr, thisCntl, sMesg) 
{
	var i;
	var iNoOfSpaces = 0;
	var sLength = sInStr.length;

// Check for spaces only 	 
	for (i = 0; i <= (sLength - 1); i++) {
		if (sInStr.charAt(i) == " ") {
			iNoOfSpaces++;
		}
	}
	
	if (iNoOfSpaces > 0 && iNoOfSpaces == sLength) {
		alert("Can not have all spaces");
		thisCntl.select();
		thisCntl.focus();
		return false;} 
			 	
//	Check for nulls etc.	
	if(sInStr == "" || sInStr == null || sInStr.length == 0){
		alert("Please enter " + sMesg);
		thisCntl.select();
		thisCntl.focus();
		return false;}
}

//-->
