function testphone(obj1)
{
  //Check that phone number is not blank
  if (obj1== "")
  {
    alert("Please enter a value for the phone # field.");
	obj1="";
    return (obj1);
  }
  //Strip ( and - from the string, leaving just numbers
  obj1=obj1.replace("(","");
  obj1=obj1.replace(")","");
  obj1=obj1.replace("-","");
  obj1=obj1.replace("-","");
   //alert(isNaN(p))
  if (isNaN(obj1)==true){
    alert("Enter the phone number as all numbers or xxx-xxx-xxxx ");
	obj1="";
    return (obj1);
    }
if (obj1.length !=10) { 
   alert("Please enter a  10 digit phone number in the \"phone number\" field.");
    	obj1="";

	return (obj1);
	}
  obj1=obj1.substring(0,3)+"-"+obj1.substring(3,6)+"-"+obj1.substring(6,10);
  return (obj1);
}


