function clearFileInput(fileInputId) 
{ 
var oldInput = document.getElementById(fileInputId); 
var newInput = document.createElement("input"); 
     
	newInput.onchange      = oldInput.onchange; 
	newInput.type          = "file"; 
	newInput.id            = oldInput.id; 
	newInput.name          = oldInput.name; 
	newInput.size          = oldInput.size; 
	newInput.className     = oldInput.className; 
	newInput.style.cssText = oldInput.style.cssText; 
	oldInput.parentNode.replaceChild(newInput, oldInput); 
}

