function validateFileNameEntered(fieldName)
{
	//alert("fieldName: " + fieldName);
	
	var element = document.getElementById(fieldName);
	
	//alert("element: " + element);
	//alert("value: " + element.value);
	
	var value = trim(element.value);
		
	if (value.length < 1)
	{
		return false;
	}
	else
	{
		return true;
	}
}

function validateFileNameForRemove(fieldName)
{
	if (! validateFileNameEntered(fieldName))
	{
		alert("Please select a file to remove.");
		return false;
	}
	else
	{
		return true;
	}
}

function validateFileNameForUpload(fieldName)
{
	if (! validateFileNameEntered(fieldName))
	{
		alert("Please select a file to upload.");
		return false;
	}
	else
	{
		return true;
	}
}

function trim(string)
{
    return string.replace(/^\s*|\s*$/g,"");
}