// #@(#)common_location_errors.js	1.4 17:27:48,11/05/20 (yy/mm/dd)
function ClearLocationBox(InputID,TableID,FormName)
{
	// Build row ID
	row = InputID + "_row";
		
	// Check to see if object exists - old browsers will ignore this and skip to else
	if (document.getElementById && document.createElement){
		// Test if TableID exists, if so ie desktop version, then delete row in question. Otherwise it's the mobile version
		if (document.getElementById(TableID) == null){
			// Hide unknown location div used on mobile site
			var element = document.getElementById("unknownLocation");
  			element.parentNode.removeChild(element);
		}else{
			// Remove table row
  			document.getElementById(TableID).deleteRow(document.getElementById(row).rowIndex);
		};
	}else{		
		// Empty <input> box
		document.forms[FormName].elements[InputID].value = ""
	};
	
	// Shift focus to 'Add more locations' box
	document.forms[FormName].elements["p1_new_999"].focus();
}
/* Script by JP(jobsite) 02/06/2005 */


