// JavaScript Document

function deleteData(ID, table, keyID)
		{
			var answer = confirm("Delete entry " + ID + "?")
				if (answer){
								var url = "../mechanics/confirm.php?id=" + ID +"&table=" + table + "&key=" + keyID;
								new Ajax.Updater('dbtn'+ID, url, { 
												 method: 'get',
												 onComplete: function () {
													 		window.location.reload();
												 }
												 });
							}
		}

function showInfo(field, ID)
		{
			var url = "../mechanics/showInfo.php";
			new Ajax.Updater('dataInfo', url, {
					parameters: {field: field, id: ID}				 
			});

		}
		
function editor(i, ID, EditKey, tableName, dataKey)
		{
			new Ajax.InPlaceEditor('edit'+ i , '../mechanics/editor.php',{
					callback: function(form, value) { return 'name=' + escape(value)+'&id='+ ID + '&field=' + EditKey + '&table=' + tableName + '&key=' + dataKey},
					});
		}

