function checkAddReviewForm () {
	var errorMsg = "";
	var formArea = document.getElementById('addReviewForm');

	//
	for( i = 0; i < formArea.review_type.length; i++ ){
		if(formArea.review_type[i].checked == true ) {
			reviewTypeValue = formArea.review_type[i].value;
		}
	}

	if (reviewTypeValue == "user") {
		//Check for a title
		if (formArea.user_title.value==""){
			errorMsg += "\n\tTitle";
		}
		//Check for a review
		if (formArea.user_review.value==""){
			errorMsg += "\n\tReview";
		}
	}else if (reviewTypeValue == "external") {
		//Check for a title
		if (formArea.external_title.value==""){
			errorMsg += "\n\tTitle";
		}
		//Check for a review
		if (formArea.external_review.value==""){
			errorMsg += "\n\tReview";
		}
		//Check for a source
		if (formArea.external_source_name.value==""){
			errorMsg += "\n\tSource name";
		}
	}else if (reviewTypeValue == "external_link") {
		//Check for a title
		if (formArea.external_link_title.value==""){
			errorMsg += "\n\tTitle";
		}
		//Check for a review introduction
		if (formArea.external_link_introduction.value==""){
			errorMsg += "\n\tReview introduction";
		}
		//Check for a source
		if (formArea.external_link_source_name.value==""){
			errorMsg += "\n\tSource name";
		}
		//Check for a source link
		if (formArea.external_link_source_url.value=="" || formArea.external_link_source_url.value=="http://"){
			errorMsg += "\n\tSource URL";
		}
	}

	//If there is aproblem with the form then display an error
	if (errorMsg != ""){
		msg = "_______________________________________________________________\n\n";
		msg += "The form has not been submitted because there are problem(s) with the form.\n";
		msg += "Please correct the problem(s) and re-submit the form.\n";
		msg += "_______________________________________________________________\n\n";
		msg += "The following field(s) need to be corrected: -\n";

		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}

	//Disable submit button
	document.getElementById('Submit').disabled=true;

	return true;
}

function checkEditReviewForm () {
	var errorMsg = "";
	var formArea = document.getElementById('editReviewForm');

	//
	reviewTypeValue = formArea.review_type.value;

	if (reviewTypeValue == "user") {
		//Check for a title
		if (formArea.user_title.value==""){
			errorMsg += "\n\tTitle";
		}
		//Check for a review
		if (formArea.user_review.value==""){
			errorMsg += "\n\tReview";
		}
	}else if (reviewTypeValue == "external") {
		//Check for a title
		if (formArea.external_title.value==""){
			errorMsg += "\n\tTitle";
		}
		//Check for a review
		if (formArea.external_review.value==""){
			errorMsg += "\n\tReview";
		}
		//Check for a source
		if (formArea.external_source_name.value==""){
			errorMsg += "\n\tSource name";
		}
	}else if (reviewTypeValue == "external_link") {
		//Check for a title
		if (formArea.external_link_title.value==""){
			errorMsg += "\n\tTitle";
		}
		//Check for a review introduction
		if (formArea.external_link_introduction.value==""){
			errorMsg += "\n\tReview introduction";
		}
		//Check for a source
		if (formArea.external_link_source_name.value==""){
			errorMsg += "\n\tSource name";
		}
		//Check for a source link
		if (formArea.external_link_source_url.value=="" || formArea.external_link_source_url.value=="http://"){
			errorMsg += "\n\tSource URL";
		}
	}

	//If there is aproblem with the form then display an error
	if (errorMsg != ""){
		msg = "_______________________________________________________________\n\n";
		msg += "The form has not been submitted because there are problem(s) with the form.\n";
		msg += "Please correct the problem(s) and re-submit the form.\n";
		msg += "_______________________________________________________________\n\n";
		msg += "The following field(s) need to be corrected: -\n";

		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}

	//Disable submit button
	document.getElementById('Submit').disabled=true;

	return true;
}

function checkTributeSongSubmitForm () {
	var errorMsg = "";
	var formArea = document.getElementById('addSongForm');

	//
	//Check for an artist name
	if (formArea.artist_name.value==""){
		errorMsg += "\n\tYour (artist) name";
	}
	//Check for an email address
	if (formArea.artist_email.value==""){
		errorMsg += "\n\tYour email address";
	}
	//Check for a song name
	if (formArea.song_title.value==""){
		errorMsg += "\n\tSong name";
	}
	//Check for a file or url
	if (formArea.file.value=="" && formArea.url.value==""){
		errorMsg += "\n\tSelect song OR Link to file";
	}
	//Check for original artist
	if (formArea.original_artist[0].checked == false && formArea.original_artist[1].checked == false ){
		errorMsg += "\n\tThis song is performed by me or my band";
	}

	//Check for details
	if (formArea.details.value==""){
		errorMsg += "\n\tDetails";
	}

	//If there is aproblem with the form then display an error
	if (errorMsg != ""){
		msg = "_______________________________________________________________\n\n";
		msg += "The form has not been submitted because there are problem(s) with the form.\n";
		msg += "Please correct the problem(s) and re-submit the form.\n";
		msg += "_______________________________________________________________\n\n";
		msg += "The following field(s) need to be corrected: -\n";

		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}

	//Disable submit button
	document.getElementById('Submit').disabled=true;

	return true;
}