

//Transfers Y-M-D value to another text area of a form as D M Y
function value_transfer(recipient, donor){
//alert("recipient"+ recipient + "donor = " + donor);
var y = document.getElementById(donor).value;
var x = y.split("-");
//alert(x[0]);
document.getElementById(recipient).value = x[2] + "/" + x[1] + "/" + x[0];
}

//Delete data base entry from a list
function event_delete(id, title){
	if(confirm('Are you sure you want to delete event \"' + title + '\" ID= ' + id + '? \nThis action cannot be undone.'))
	{location.href='./event_remove.php?ID=' + id ;}
}

//Delete photo database entry from a list
function gallery_delete(id, file_name){
	if(confirm('Are you sure you want to delete photo \"' + file_name + '\" ID= ' + id + '? \nThis action cannot be undone.'))
	{location.href='./gallery_remove.php?ID=' + id + '&File_Name=' + file_name;}
}

//Delete download database entry from a list
function downloads_delete(id, file_name){
	if(confirm('Are you sure you want to delete download \"' + file_name + '\" ID= ' + id + '? \nThis action cannot be undone.'))
	{location.href='./downloads_remove.php?ID=' + id + '&File_Name=' + file_name;}
}

//Delete news database entry from a list
function news_delete(id, title){
	if(confirm('Are you sure you want to delete news article \"' + title + '\" ID= ' + id + '? \nThis action cannot be undone.'))
	{location.href='./news_remove.php?ID=' + id ;}
}

