/**
 * This function is called while clicking links
 *
 * @param   object   the link
 * @param   object   the thing to be deleted
 *
 * @return  boolean  whether to delete or not
 */
function confirmLink(theLink, theWarning) {
   // Confirmation is not required in the configuration file
   // or browser is Opera (crappy js implementation)
   // if (confirmMsg == '' || typeof(window.opera) != 'undefined') {
   //    return true;
   //}
   // I don't know what effect my comments will have.

   var is_confirmed = confirm(theWarning);
   if (is_confirmed) {
		theLink += "&confirmed=1";
   } 
	
	return is_confirmed;
} // end of the 'confirmLink()' function

/**
 * This function is called when ever the form is submitted.
 *
 * @return  boolean  whether to submit or not.
 */
function checkForm() {
	is_good = true;
	/* if the form action is the song request form
	 * if the song artist is the default, set it to 'Unknown'
 	 * if the song name is blank or the default, throw an error up
	 */
	var default_artist = "Enter Artist Here";
	var default_title = "Enter Song Title Here";
	var song=(document.getElementById('song_title'));
	var artist=(document.getElementById('song_artist'));

	if((artist.value=='')|(artist.value==default_artist)){
		artist.value='Unknown';
	}

	if((song.value=='')|(song.value==default_title)){
		alert('Enter a song title');
		is_good = false;
	}
   
	return is_good;
} // end checkForm

/**
function jump_to_anchor() {
	var songanchor=(document.getElementById('editsonganchor'));
	if (songanchor != null) {
		// this didn't work so it was pulled
		//	location.href = "#editsonganchor";
	}
}
 */
