function confirmDelete(table, id, arg, querystring, action) 
{
	if (action=="delete")
	{
		if(table=='contentDraft') {
			if (confirm("WARNING:  "+arg+"\n\nAre you sure you wish to delete this DRAFT")) {
				document.location = 'record_delete.php?table='+table+'&id='+id+'&action='+action+'&arg='+arg+'&qstring='+querystring;
			}
		}
		else {
			if (confirm("WARNING:  "+arg+"\n\nAre you sure you wish to delete this record from the CMS")) {
				document.location = 'record_delete.php?table='+table+'&id='+id+'&action='+action+'&arg='+arg+'&qstring='+querystring;
			}
		}
	}
	else if (action=="remove")
	{
		if (confirm("WARNING:  "+arg+"\n\nAre you sure you wish to remove this record from the CMS")) {
			document.location = 'record_delete.php?table='+table+'&id='+id+'&action='+action+'&qstring='+querystring;
		}
	}
}


function emptyvalidation(entered)
{
with (entered)
{
if (value==null || value=="") // || value==0)
{return false;}
else {return true;}
}
} 

function validemail(entered)
{
with(entered)
{
// var emailFilter=/^.+@.+\..{2,3}$/;
//alternate email filter (more simple)
var emailFilter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
if (!(emailFilter.test(value))) 
{
	return false;
}
else
{
	return true;
}
}
}

