function sh(e) {
    el = document.getElementById(e);
	
	if(el.style.display != "none")
		el.style.display = el.style.display  == "none" ? "" : "none";
	if(el.style.display == "none")
		el.style.display = el.style.display == "inline" ? "" : "block";
}

function disp_confirm(formID)
{
	if (confirm("Are you sure you want to delete this?"))
		{
		document.getElementById(formID).deletethis.value = 'delete';
		document.getElementById(formID).submit();
		}
	else
		{
		return false;
		}
}

jQuery(document).ready(function ($) {
	/* 	ORIGINAL CODE, REPLACED BY BETTER ONE BELOW...
     $('a.delete').click(function(){
          if(confirm('Are you sure you want to delete ' + $(this).attr('title') + '?')) {
               window.location = 'upload.php?page=edit_sermon.php&deletesinglepiece=confirmed&id=' + $(this).attr('name');
          }
     });
	*/
	$('a.delete').click(function(){
	   if(confirm('Are you sure you want to delete ' + $(this).attr('title') + '?')) {
			var url = $(this).attr('href');
			window.location = url;
			return false;
		} else return false;
	});

	$('table#sermonEditList tr').hover(function(){
		$(this).find('td.hoverShow').fadeIn('fast');
	},function(){
		$(this).find('td.hoverShow').fadeOut('fast');
	});
});
