// JavaScript Document


// OK/Cancel, confirmation box
function confirm_delete()
{
var r=confirm("This will permanently delete the record from the database. Do you wish to continue.");
if (r)
  {
	return true;
  }
else
  {
	return false;
  }
}

// ajax function for image deletion.
function removeImage(divID,thisPageID,thisPostID,thisFile){
	
	var r=confirm("Are you sure you want to delete this image");

    if (r==true)
    {
      	var url = 'remove_image.php?pageid=' + thisPageID + '&postid=' + thisPostID + '&file=' + thisFile;

	new Ajax.Request(url, {
			    method: 'get',
  			    onSuccess: function(transport){
				$(divID).update('');
			  }
			});

    }
    else
    {
      return false;
    }

}
