function verifyVenue(theForm){
	var theresult, errMsg;
	errMsg = '';
	theresult = false;

	if( theForm.VenueName.value != '' || theForm.VenueAddress.value != '' ){
		theresult = true;
	}

	if((theForm.VenueBuiltYear_Start.value != '' && theForm.VenueBuiltYear_End.value != '') && (theForm.VenueBuiltYear_Start.value > theForm.VenueBuiltYear_End.value)){
		theresult = false;
		errMsg += 'Please make sure that the start date range is lower than the end date range\n';
	}else if( theForm.VenueBuiltYear_Start.value != '' && theForm.VenueBuiltYear_End.value != '' ){
		theresult = true;
	}
	if((theForm.VenueNamedYear_Start.value != '' && theForm.VenueNamedYear_End.value != '') && (theForm.VenueNamedYear_Start.value > theForm.VenueNamedYear_End.value)){
		theresult = false;
		errMsg += 'Please make sure that the start date range is lower than the end date range\n';
	}else if( theForm.VenueNamedYear_Start.value != '' && theForm.VenueNamedYear_End.value != '' ){
		theresult = true;
	}
	if((theForm.VenueClosedYear_Start.value != '' && theForm.VenueClosedYear_End.value != '') && (theForm.VenueClosedYear_Start.value > theForm.VenueClosedYear_End.value)){
		theresult = false;
		errMsg += 'Please make sure that the start date range is lower than the end date range\n';
	}else if( theForm.VenueClosedYear_Start.value != '' && theForm.VenueClosedYear_End.value != '' ){
		theresult = true;
	}
	if((theForm.VenueDemolishedYear_Start.value != '' && theForm.VenueDemolishedYear_End.value != '') && (theForm.VenueDemolishedYear_Start.value > theForm.VenueDemolishedYear_End.value)){
		theresult = false;
		errMsg += 'Please make sure that the start date range is lower than the end date range\n';
	}else if( theForm.VenueDemolishedYear_Start.value != '' && theForm.VenueDemolishedYear_End.value != '' ){
		theresult = true;
	}

	if(!theresult){
		if(errMsg != ''){
			alert(errMsg)
		}else{
			alert("Please fill out some of the fields.")
		}
	}
	return theresult;
}
function checkForm(theForm){
	var theresult, errMsg;
	errMsg = '';
	theresult = false;
	if(theForm.name == 'song'){
		if(theForm.SongName.value != ''){
			theresult = true;
		}
		if(errMsg != ''){
			theresult = false;
		}
	}else if(theForm.name == 'role'){
		if(theForm.RoleName.value != ''){
			theresult = true;
		}
		if(errMsg != ''){
			theresult = false;
		}
	}else if(theForm.name == 'award'){
		if( (theForm.AwdSxDate.options[ theForm.AwdSxDate.selectedIndex ].value == '') && (theForm.AwdCatNo.options[ theForm.AwdCatNo.selectedIndex ].value == '') ){
			theresult = false;
			errMsg = 'Please select a category or a year.';
		}else{
			theresult = true;
		}
	}else if(theForm.name == 'venue'){
		if(theForm.VenueName.value != ''){
			theresult = true;
		}
		if(theForm.VenueAddress.value != ''){
			theresult = true;
		}
	}else if(theForm.name == 'shows'){
		if( theForm.openstartmonth.value == 'MM' || theForm.openstartmonth.value == '' ){
			theForm.openstartmonth.value = '';
		}
		if( theForm.closestartmonth.value == 'MM' || theForm.closestartmonth.value == '' ){
			theForm.closestartmonth.value = '';
		}
		if( theForm.openstartday.value == 'DD' || theForm.openstartday.value == '' ){
			theForm.openstartday.value = '';
		}
		if( theForm.closestartday.value == 'DD' || theForm.closestartday.value == '' ){
			theForm.closestartday.value = '';
		}
		if( theForm.openstartyear.value == 'YYYY' || theForm.openstartyear.value == '' ){
			theForm.openstartyear.value = '';
		}
		if( theForm.closestartyear.value == 'YYYY' || theForm.closestartyear.value == '' ){
			theForm.closestartyear.value = '';
		}
		if( theForm.openendmonth.value == 'MM' || theForm.openendmonth.value == '' ){
			theForm.openendmonth.value = '';
		}
		if( theForm.closeendmonth.value == 'MM' || theForm.closeendmonth.value == '' ){
			theForm.closeendmonth.value = '';
		}
		if( theForm.openendday.value == 'DD' || theForm.openendday.value == '' ){
			theForm.openendday.value = '';
		}
		if( theForm.closeendday.value == 'DD' || theForm.closeendday.value == '' ){
			theForm.closeendday.value = '';
		}
		if( theForm.openendyear.value == 'YYYY' || theForm.openendyear.value == ''){
			theForm.openendyear.value = '';
		}
		if( theForm.closeendyear.value == 'YYYY' || theForm.closeendyear.value == ''){
			theForm.closeendyear.value = '';
		}

		if( theForm.playingstartmonth.value == 'MM' || theForm.playingstartmonth.value == '' ){
			theForm.playingstartmonth.value = '';
		}
		if( theForm.playingendmonth.value == 'MM' || theForm.playingendmonth.value == '' ){
			theForm.playingendmonth.value = '';
		}
		if( theForm.playingstartday.value == 'DD' || theForm.playingstartday.value == '' ){
			theForm.playingstartday.value = '';
		}
		if( theForm.playingendday.value == 'DD' || theForm.playingendday.value == '' ){
			theForm.playingendday.value = '';
		}
		if( theForm.playingstartyear.value == 'YYYY' || theForm.playingstartyear.value == '' ){
			theForm.playingstartyear.value = '';
		}
		if( theForm.playingendyear.value == 'YYYY' || theForm.playingendyear.value == '' ){
			theForm.playingendyear.value = '';
		}
		
		
		if(theForm.ShowProperName.value != ''){
			theresult = true;
		}
		if(theForm.ShowSetting.value != ''){
			theresult = true;
		}
		if(theForm.NumOfPerf.value != ''){
			theresult = true;
		}
		if(theForm.ProdType.value != ''){
			theresult = true;
		}
		if(theForm.ProdSubType.value != ''){
			theresult = true;
		}
		if(theForm.openstartmonth.value != ''){
			theresult = true;
		}
		if(theForm.closestartmonth.value != ''){
			theresult = true;
		}
		if(theForm.openstartday.value != ''){
			theresult = true;
		}
		if(theForm.closestartday.value != ''){
			theresult = true;
		}
		if(theForm.openstartyear.value != ''){
			theresult = true;
		}
		if(theForm.closestartyear.value != ''){
			theresult = true;
		}
		if(theForm.openendmonth.value != ''){
			theresult = true;
		}
		if(theForm.closeendmonth.value != ''){
			theresult = true;
		}
		if(theForm.openendday.value != ''){
			theresult = true;
		}
		if(theForm.closeendday.value != ''){
			theresult = true;
		}
		if(theForm.openendyear.value != ''){
			theresult = true;
		}
		if(theForm.CastSize.value != ''){
			theresult = true;
		}
		
		if(theForm.playingstartyear.value != ''){
			theresult = true;
		}
		if(theForm.playingstartmonth.value != ''){
			theresult = true;
		}
		if(theForm.playingstartday.value != ''){
			theresult = true;
		}	
		if(theForm.playingendyear.value != ''){
			theresult = true;
		}
		if(theForm.playingendmonth.value != ''){
			theresult = true;
		}
		if(theForm.playingendday.value != ''){
			theresult = true;
		}												
		if(errMsg != ''){
			theresult = false;
		}
	} else {
		if( theForm.birthstartmonth.value == 'MM' || theForm.birthstartmonth.value == '' ){
			theForm.birthstartmonth.value = '';
		}
		if( theForm.deathstartmonth.value == 'MM' || theForm.deathstartmonth.value == '' ){
			theForm.deathstartmonth.value = '';
		}
		if( theForm.birthstartday.value == 'DD' || theForm.birthstartday.value == '' ){
			theForm.birthstartday.value = '';
		}
		if( theForm.deathstartday.value == 'DD' || theForm.deathstartday.value == '' ){
			theForm.deathstartday.value = '';
		}
		if( theForm.birthstartyear.value == 'YYYY' || theForm.birthstartyear.value == '' ){
			theForm.birthstartyear.value = '';
		}
		if( theForm.deathstartyear.value == 'YYYY' || theForm.deathstartyear.value == '' ){
			theForm.deathstartyear.value = '';
		}
		if( theForm.birthendmonth.value == 'MM' || theForm.birthendmonth.value == '' ){
			theForm.birthendmonth.value = '';
		}
		if( theForm.deathendmonth.value == 'MM' || theForm.deathendmonth.value == '' ){
			theForm.deathendmonth.value = '';
		}
		if( theForm.birthendday.value == 'DD' || theForm.birthendday.value == '' ){
			theForm.birthendday.value = '';
		}
		if( theForm.deathendday.value == 'DD' || theForm.deathendday.value == '' ){
			theForm.deathendday.value = '';
		}
		if( theForm.birthendyear.value == 'YYYY' || theForm.birthendyear.value == ''){
			theForm.birthendyear.value = '';
		}
		if( theForm.deathendyear.value == 'YYYY' || theForm.deathendyear.value == ''){
			theForm.deathendyear.value = '';
		}
		if(theForm.FirstName.value != ''){
			theresult = true;
		}
		if(theForm.LastName.value != ''){
			theresult = true;
		}
		if(theForm.FuncNo.value != ''){
			theresult = true;
		}
		if(theForm.Gender.value != ''){
			theresult = true;
		}
		if(theForm.birthcity.value != ''){
			theresult = true;
		}
		if(theForm.BirthState.value != ''){
			theresult = true;
		}
		if(theForm.BirthCountry.value != ''){
			theresult = true;
		}
		if(theForm.deathcity.value != ''){
			theresult = true;
		}
		if(theForm.DeathState.value != ''){
			theresult = true;
		}
		if(theForm.DeathCountry.value != ''){
			theresult = true;
		}
		if(theForm.birthstartmonth.value != ''){
			theresult = true;
		}
		if(theForm.birthstartday.value != ''){
			theresult = true;
		}
		if(theForm.birthstartyear.value != ''){
			theresult = true;
		}
		if(theForm.birthendmonth.value != ''){
			theresult = true;
		}
		if(theForm.birthendday.value != ''){
			theresult = true;
		}
		if(theForm.birthendyear.value != ''){
			theresult = true;
		}
		if(theForm.deathstartmonth.value != ''){
			theresult = true;
		}
		if(theForm.deathstartday.value != ''){
			theresult = true;
		}
		if(theForm.deathstartyear.value != ''){
			theresult = true;
		}
		if(theForm.deathendmonth.value != ''){
			theresult = true;
		}
		if(theForm.deathendday.value != ''){
			theresult = true;
		}
		if(theForm.deathendyear.value != ''){
			theresult = true;
		}
	}
	if(!theresult){
		if(errMsg != ''){
			alert(errMsg)
		}else{
			alert("Please fill out some of the fields.")
		}
	}
	return theresult;
}
