
function NukeBadChars(textElement)
{
 var strTemp = textElement.value;
 
	for (i=0; i < strTemp.length; i++)  
	{
	 if (
	  (strTemp.charAt(i) == "'") || 
	  (strTemp.charAt(i) == '"'))
		{
			strTemp = strTemp.substr(0,i) + strTemp.substr(i + 1);
			i--;
		}
 }
 textElement.value = strTemp
}

function PhoneDashAdd(textElement)
{
	var strTemp = textElement.value; 
	
	// 801-222-3333 or (801)222-3333
	if ((strTemp.length > 0) && 
		 (((strTemp.charAt(0) >= '0') && (strTemp.charAt(0) <= '9')) &&
		  ((strTemp.charAt(3) >= '0') && (strTemp.charAt(3) <= '9'))))
	{
   textElement.value = strTemp.substr(0,3) + '-' + strTemp.substr(3,3) + '-' + strTemp.substr(6); 
 }
}

function ToUpper(textElement)
{
	var strTemp = textElement.value; 
   textElement.value = strTemp.toUpperCase(); 
}


