// 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;
    }

}