function doEdit(sIdx, sPart){
	if(submitable()){
		document.forms[0]["index"].value = sIdx;
		document.forms[0]["task"].value = 'edit';
		document.forms[0]["part"].value = sPart;
		document.forms[0].submit();
	}
}

function doDelete(sIdx, sPart, sItem){
	if(confirm("Are you sure you want to remove \"" + sItem + "\"?")){
		document.forms[0]["index"].value = sIdx;
		document.forms[0]["task"].value = 'delete';
		document.forms[0]["part"].value = sPart;
		document.forms[0].submit();
	}
}

function doReorder(sIdx, sPart){
	document.forms[0]["index"].value = sIdx;
	document.forms[0]["task"].value = 'reorder';
		/*assigning a value to "part" is only a formality in this function because right now there is 
		  only one part to reorder on the server (task='reorder'). However, "part" may become 
		  required if reordering functionality is provided for some other aspect of the site content,
		  in which case, "part" will serve to indicate what is being reordered.
		*/
	document.forms[0]["part"].value = sPart;
	document.forms[0].submit();
}

function showFieldName(){
	var fld = document.elementFromPoint(event.clientX, event.clientY);
	window.status = "id='" + fld.id + "',  name='" + fld.name + "',  value='" + fld.value + "'";
	//if(fld.id){
	//	window.clipboardData.setData("Text", fld.id);
	//}
}

