/* this script contains validation routines for signing up */


//*************************************************************************
//	Function	:	validateInfo
//	Description	:  validates the information for signup
//	Pre			:	Nothing
//	Returns		:	True or False according to the input
//************************************************************************
function validateInfo()
{
var fields
var fields2, status
    fields = "";
    fields2 = "";
    status = false;

	if (document.frmUpload.txtNewsStartDate.value=="" ) {
		fields = fields + "Start Date " + '\n';
	}

	if (document.frmUpload.txtNewsEndDate.value=="" ) {
		fields = fields + "End Date " + '\n';
	}

	if (document.frmUpload.txtNewsDate.value=="" ) {
		fields = fields + "News Date " + '\n';
	}

	
	if (document.frmUpload.txtNewsCaption.value =="") {
		fields = fields + "Caption " + '\n';
	}

	
	if (! IsAlpha(document.frmUpload.txtNewsCaption.value) ) {
		fields2 = fields2 + "Caption " + '\n';
	}
	if ( fields != "" ) {
		alert("Please fill in the" + '\n' + fields);
	} else {
		if ( fields2 != "" ) {
			alert("These fields has Invalid inputs" + '\n' + fields2);
			status = false;
		} else {
		
			status = true;
		}		
	}
	
	
	return status;
}


