function getFileNameFromPath(filePath)
{
	if (filePath == "")
	{
		return "";
	}

	if (filePath.lastIndexOf("\/") > 0)
	{
		var pattern = "\/";
		var fileName = filePath.substring(filePath.lastIndexOf(pattern) + 1);
		return fileName;		
	}
	else if (filePath.lastIndexOf("\\") > 0)
	{
		var pattern = "\\";
		var fileName = filePath.substring(filePath.lastIndexOf(pattern) + 1);
		return fileName;
	}

	// we were not given a path, just return the filePath arg as the fileName (12/09/2009)
	return filePath
	


}






function cleanStringForJavascriptAlert(str)
{	
	// find a reg ex for this!
	var builder = str.replace("<strong>", "");
	builder = builder.replace("</strong>", "");
	
	builder = builder.replace("<br>", "");

	builder = builder.replace("<i>", "");
	builder = builder.replace("</i>", "");

	builder = builder.replace("<b>", "");
	builder = builder.replace("</b>", "");

	return builder;
}



function toBoolean(argEvaluate)
{	
	return ( (/^true$/i).test(argEvaluate) );
}
// see http://stackoverflow.com/questions/18082/validate-numbers-in-javascript-isnumeric
function isNumber(argString)
{
	return !isNaN(parseFloat(argString)) && isFinite(argString);
}
