   function CheckForm(t){
		rec_selected = false;
		for (i=0; i<t.length; i++){
		   if(t[i].name=="id"){
			   if(t[i].checked){
				   rec_selected = true;
					break;
				}
			}
		}
		if(!rec_selected){
			alert('Please select a record first');
			return false;
		}
		else {
		   return true;
		}
	}
	
	function ConfirmDelete(t){
		rec_selected = false;
		for (i=0; i<t.length; i++){
		   if(t[i].name=="id"){
			   if(t[i].checked){
				   rec_selected = true;
					break;
				}
			}
		}
		if(!rec_selected){
			alert('Please select a record first');
			return false;
		}
		
		if(confirm('Are you sure you want to delete the selected record?')){
			t.form_action.value = "delete";
			if(t.action.search("gig_edit.php")>0) t.action = "/admin/gig_post.php";
			if(t.action.search("location_edit.php")>0) t.action = "/admin/location_post.php";
			if(t.action.search("email_edit.php")>0) t.action = "/admin/email_post.php";
			if(t.action.search("music_edit.php")>0) t.action = "/admin/music_post.php";
			
			t.method = "post";
			t.submit();
		}
		else {
			return false;
		}
	}
	
	function CheckGigEditForm(t){
		var aryFocus = new Array();
		var err_msg = "";
		var blnSelected = false;
		
		blnSelected = false;
		for(i=0;i<t.location_id.length;i++){
			if(t.location_id[i].selected){
				if(i != 0) blnSelected = true;
				break;
			}
		}
		if(!blnSelected){
			err_msg += "No location selected.\n";
			aryFocus[aryFocus.length] = "location_id";
		}
		
		if(!t.gig_date.value){
			err_msg += "No gig date entered.\n";
			aryFocus[aryFocus.length] = "gig_date";
		}
					
		if(err_msg){
			alert(err_msg + "\nPlease enter.  Thank you.");
			t[aryFocus[0]].focus();
			return false;
		}
	}


	function CheckLocationEditForm(t){
		var aryFocus = new Array();
		var err_msg = "";
		
		if(!t.location_name.value){
			err_msg += "No location name entered.\n";
			aryFocus[aryFocus.length] = "location_name";
		}
					
		if(err_msg){
			alert(err_msg + "\nPlease enter.  Thank you.");
			t[aryFocus[0]].focus();
			return false;
		}
	}


	function CheckMusicEditForm(t){
		var aryFocus = new Array();
		var err_msg = "";
		
		if(!t.title.value){
			err_msg += "No audio/video title entered.\n";
			aryFocus[aryFocus.length] = "title";
		}
					
		if(err_msg){
			alert(err_msg + "\nPlease enter.  Thank you.");
			t[aryFocus[0]].focus();
			return false;
		}
	}

