// JavaScript Document
function deleteRecord(id) {
	var row = document.getElementById("tr_"+id);
	var part_number = row.cells[0].innerHTML;	
	var description = row.cells[1].innerHTML;
	
	var str_warning = "* * *  WARNING  * * *\n";
	str_warning += "You are about to delete the following record:\n\n";
	str_warning += "Part Number: " + part_number + "\n";
	str_warning += "Description: " + description + "\n\n";
	str_warning += "Click \"OK\" to continue or \"Cancel\" to abort the request.";
	
	var response=confirm(str_warning);
	
	if(response==true) {
		$.post("Action.php", { action: "DELETE", ID: id, submit: "TRUE" } , function(data){location.replace("Admin.php");} );
	}
}

function moveRecord(cat, id, action) {
	$.post("libraries/record.position.lib.php", { action: action, key: id, cat: cat } , function(data){location.reload();} ); 
}

function submitForm(formID) {
  objForm = document.getElementById(formID);
  objForm.submit();
}
