function trim(argvalue)
{
	var tmpstr = ltrim(argvalue);
	return rtrim(tmpstr);
}

function ltrim(argvalue)
{
	while (1)
	{
		if (argvalue.substring(0, 1) != " ")
		break;
		argvalue = argvalue.substring(1, argvalue.length);
	}
	return argvalue;
}

function rtrim(argvalue)
{
	while (1)
	{
		if (argvalue.substring(argvalue.length - 1, argvalue.length) != " ")
		break;
		argvalue = argvalue.substring(0, argvalue.length - 1);
	}
	return argvalue;
}

function checkInternationalPhone(s)
{
	var bracket=3
	strPhone=trim(strPhone)
	if(strPhone.indexOf("+")>1) return false
	if(strPhone.indexOf("-")!=-1)bracket=bracket+1
	if(strPhone.indexOf("(")!=-1 && strPhone.indexOf("(")>bracket)return false
	var brchr=strPhone.indexOf("(")
	if(strPhone.indexOf("(")!=-1 && strPhone.charAt(brchr+2)!=")")return false
	if(strPhone.indexOf("(")==-1 && strPhone.indexOf(")")!=-1)return false
	s=stripCharsInBag(strPhone,validWorldPhoneChars);
	return (isInteger(s) && s.length >= minDigitsInIPhoneNumber);
}

function echeck(str) 
{
	var at="@"
	var dot="."
	var lat=str.indexOf(at)
	var lstr=str.length
	var ldot=str.indexOf(dot)
	if (str.indexOf(at)==-1)
	{
		//alert("Invalid E-mail ID")
		return false
	}

	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr)
	{
		// alert("Invalid E-mail ID")
		return false
	}
	
	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr)
	{
		// alert("Invalid E-mail ID")
		return false
	}
	
	if (str.indexOf(at,(lat+1))!=-1)
	{
		//alert("Invalid E-mail ID")
		return false
	}
	
	if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot)
	{
		//alert("Invalid E-mail ID")
		return false
	}
	
	if (str.indexOf(dot,(lat+2))==-1)
	{
		// alert("Invalid E-mail ID")
		return false
	}
	
	if (str.indexOf(" ")!=-1)
	{
		//alert("Invalid E-mail ID")
		return false
	}
	return true					
}

function reset()
{
	//alert('inside the reset function');
	document.regForm.custname.value = "";
	document.regForm.company.value = "";
	document.regForm.address.value ="";
	document.regForm.city.value = "";
	document.regForm.state.value = "";
	document.regForm.zip.value = "";
	document.regForm.phone.value = "";
	document.regForm.email.value =""; 
}

// Global variable defaultEmptyOK defines default return value 
// for many functions when they are passed the empty string. 
// By default, they will return defaultEmptyOK.
//
// defaultEmptyOK is false, which means that by default, 
// these functions will do "strict" validation.  Function
// isInteger, for example, will only return true if it is
// passed a string containing an integer; if it is passed
// the empty string, it will return false.
//
// You can change this default behavior globally (for all 
// functions which use defaultEmptyOK) by changing the value
// of defaultEmptyOK.
//
// Most of these functions have an optional argument emptyOK
// which allows you to override the default behavior for 
// the duration of a function call.
//
// This functionality is useful because it is possible to
// say "if the user puts anything in this field, it must
// be an integer (or a phone number, or a string, etc.), 
// but it's OK to leave the field empty too."
// This is the case for fields which are optional but which
// must have a certain kind of content if filled in.

var defaultEmptyOK = false

// U.S. phone numbers have 10 digits.
// They are formatted as 123 456 7890 or (123) 456-7890.
var digitsInUSPhoneNumber = 10;

// BOI, followed by one or more digits, followed by EOI.
var reInteger = /^\d+$/

// BOI, followed by one digit, followed by EOI.
var reDigit = /^\d/

var defaultEmptyOK = false;

var reEmail = /^.+\@.+\..+$/;

var reInteger = /^\d+$/;

var phoneNumberDelimiters = "()-.";

var digitsInUSPhoneNumber = 10;

var iUSPhone = "This field must be a 10 digit U.S. phone number (like 415 555 1212). Please reenter it now.";



function isDigit (c)
{   
	return reDigit.test(c);
}

// Check whether string s is empty.
function isEmpty(s)
{   
	return ((s == null) || (s.length == 0))
}


// isInteger (STRING s [, BOOLEAN emptyOK])
// 
// Returns true if all characters in string s are numbers.
//
// Accepts non-signed integers only. Does not accept floating 
// point, exponential notation, etc.
//
// We don't use parseInt because that would accept a string
// with trailing non-numeric characters.
//
// By default, returns defaultEmptyOK if s is empty.
// There is an optional second argument called emptyOK.
// emptyOK is used to override for a single function call
//      the default behavior which is specified globally by
//      defaultEmptyOK.
// If emptyOK is false (or any value other than true), 
//      the function will return false if s is empty.
// If emptyOK is true, the function will return true if s is empty.
//
// EXAMPLE FUNCTION CALL:     RESULT:
// isInteger ("5")            true 
// isInteger ("")             defaultEmptyOK
// isInteger ("-5")           false
// isInteger ("", true)       true
// isInteger ("", false)      false
// isInteger ("5", false)     true

function isInteger (s)			
{   
	var i;			
	if (isEmpty(s)) 
		if (isInteger.arguments.length == 1) return defaultEmptyOK;
		else return (isInteger.arguments[1] == true);			
	return reInteger.test(s)
}
		
function isEmail (s)
{   
	var ch;
	for(var i=0;i<s.length-1;i++)
	{  
		ch=s.charAt(i);
		if(ch==" ") 
		{
			return false;
		}
	}

	if (isEmpty(s)) 
		if (isEmail.arguments.length == 1) return defaultEmptyOK;
		else return (isEmail.arguments[1] == true);
	else 
	{
		return reEmail.test(s)
	}
}


function selectObj(obj)	
{
	if(window.focus) 
	{
		obj.focus();
	}
}

function isUSPhoneNumber (s)
{   
	if (isEmpty(s)) 
		if (isUSPhoneNumber.arguments.length == 1) return defaultEmptyOK;
		else return (isUSPhoneNumber.arguments[1] == true);
	return (isInteger(s) && s.length == digitsInUSPhoneNumber)
}
				
/////Added By RAP on 12-jan-2009///
function checkLandingForm() 
{	

	//alert('checkLandingForm');	
	var check=true;
	var focusmarker="";
	if (trim(document.regForm.custname.value) == "" || trim(document.regForm.custname.value) == "Enter Valid Name") 
	{
		document.getElementById("custname").value="Enter Valid Name";
	    document.getElementById("namefield").style.color="red";	    	    
	    document.getElementById("custname").className="";
	    document.getElementById("custname").className="invalidinputfield";
	    if(focusmarker == "")
	    {
	     	//alert('focusmarker :: custname ==>  ' + focusmarker) ;
	     	focusmarker = document.regForm.custname;	    	
	    }  
	    
	   	selectObj(focusmarker);	  
		check=false;		
	}
	else
   	{
   		document.getElementById("custname").className="";	  
   		document.getElementById("custname").className="large";    
   		document.getElementById("namefield").style.color="black";
   		selectObj(document.regForm.company);   			
   	}   

	if (trim(document.regForm.company.value) == "" || trim(document.regForm.company.value) == "Enter Valid Company") 
	{		
		document.getElementById("company").value="Enter Valid Company";
		document.getElementById("companyfield").style.color="red";		
		document.getElementById("company").className="";
	    document.getElementById("company").className="invalidinputfield";
	    if(focusmarker == "")
	    {
	     	//alert('focusmarker :: company ==>  ' + focusmarker) ;
	     	focusmarker= document.regForm.company;	    	
	    }  
	    
	   	selectObj(focusmarker);	  
	  	check=false;
	}
	else
   	{	   		
   		document.getElementById("company").className="";	  
   		document.getElementById("company").className="large";   
   		document.getElementById("companyfield").style.color="black";
   		selectObj(document.regForm.email);
   	}   
   	
   	if (trim(document.regForm.phone.value) == "" || trim(document.regForm.phone.value) == "Enter 10 digit Phone No.") 
	{
		//document.getElementById("phonefield").style.display="inline";
		document.getElementById("phonefield").style.color="red";
		document.getElementById("phone").value="Enter 10 digit Phone No.";
		document.getElementById("phone").className="";
		document.getElementById("phone").className="invalidinputfield";
	  	if(focusmarker == "")
	    {
	     	//alert('focusmarker :: phone ==>  ' + focusmarker) ;
	     	focusmarker= document.regForm.phone;	    	
	    }  
	    
	   	selectObj(focusmarker);	
		check=false;

	}
	else if (checkUSPhone(document.regForm.phone,false)==false) 
	{
		
	    //document.getElementById("phonefield").style.display="inline";
		document.getElementById("phonefield").style.color="red";			
		document.getElementById("phone").value="enter valid 10 digit phone no:";     	     
		document.getElementById("phone").className="";
	    document.getElementById("phone").className="invalidinputfield";
	    if(focusmarker == "")
	    {
	     	//alert('focusmarker :: phone ==>  ' + focusmarker) ;
	     	focusmarker= document.regForm.phone;	    	
	    }
	    
	   	selectObj(focusmarker);	
		check=false;
	}
	else
	{ 
	    document.getElementById("phonefield").style.color="black";	    
	    document.getElementById("phone").className="";	    
	    document.getElementById("phone").className="large"; 
	    
	}
  
	if (trim(document.regForm.email.value) == "" || trim(document.regForm.email.value) == "Enter Valid Email") 
	{
		//document.getElementById("emailfield").style.display="inline";
		document.getElementById("emailfield").style.color="red";
		document.getElementById("email").value="Enter Valid Email";
		document.getElementById("email").className="";
	    document.getElementById("email").className="invalidinputfield";
		if(focusmarker == "")
	    {
	     	//alert('focusmarker :: email ==>  ' + focusmarker) ;
	     	focusmarker= document.regForm.email;	    	
	    }  
	    
	   	selectObj(focusmarker);	
		check=false;

	}
	else if (isEmail(trim(document.regForm.email.value))==false || trim(document.regForm.email.value) == "Enter Valid Email")
	{
		document.getElementById("emailfield").style.color="red";
		//document.getElementById("emailfield").style.display="inline";
		
		document.getElementById("email").value="Enter Valid Email";
        document.getElementById("email").className="";
	    document.getElementById("email").className="invalidinputfield";
	    
	    if(focusmarker == "")
	    {
	     	//alert('focusmarker :: email ==>  ' + focusmarker) ;
	     	focusmarker= document.regForm.email;	    	
	    }  
	    
	   	selectObj(focusmarker);	
		check=false;

	}
	else
	{	   
		document.getElementById("email").className="";
		document.getElementById("email").className="large"; 
	  	document.getElementById("emailfield").style.color="black";
      	//document.getElementById("emailvalidfield").style.display="none";
      	selectObj(document.regForm.phone);
	}
	
	
	
	if((trim(document.regForm.custname.value) == "" || trim(document.regForm.custname.value) == "Enter Valid Name") && (trim(document.regForm.company.value) == "" || trim(document.regForm.company.value)=="Enter Valid Company") && (trim(document.regForm.email.value) == "" || trim(document.regForm.email.value) == "Enter Valid Email") && (isEmail(trim(document.regForm.email.value))==false || trim(document.regForm.email.value) == "Enter Valid Email") && (trim(document.regForm.phone.value) == "" || trim(document.regForm.phone.value) == "Enter 10 digit Phone No.") && (checkUSPhone(document.regForm.phone,false)==false))
	selectObj(document.regForm.custname);
	//alert('inside validate.js:: check= ' + check);
	if(check==true)
		return true;
	
		return false;
}

/////--------End-------Added By RAP on 12-jan-2009///


function check3FieldsForm()
{

    //alert('check3FieldsForm');	
	var check=true;
	var focusmarker="";
	if (trim(document.regForm.custname.value) == "" || trim(document.regForm.custname.value) == "Enter Valid Name") 
	{
		document.getElementById("custname").value="Enter Valid Name";	   	    	    
	    document.getElementById("custname").className="";
	    document.getElementById("custname").className="invalidinputfield_new";
	    if(focusmarker == "")
	    {
	     	//alert('focusmarker :: custname ==>  ' + focusmarker) ;
	     	focusmarker = document.regForm.custname;	    	
	    }  
	    
	   	selectObj(focusmarker);	  
		check=false;		
	}
	else
   	{
   		document.getElementById("custname").className="";	  
   		document.getElementById("custname").className="input_new";    
   		selectObj(document.regForm.email);   			
   	}  

	
   	if (trim(document.regForm.phone.value) == "" || trim(document.regForm.phone.value) == "Enter 10 digit Phone No.") 
	{		
		document.getElementById("phone").value="Enter 10 digit Phone No.";
		document.getElementById("phone").className="";
		document.getElementById("phone").className="invalidinputfield_new";
	  	if(focusmarker == "")
	    {
	     	//alert('focusmarker :: phone ==>  ' + focusmarker) ;
	     	focusmarker= document.regForm.phone;	    	
	    }  
	    
	   	selectObj(focusmarker);	
		check=false;

	}
	else if (checkUSPhone(document.regForm.phone,false)==false) 
	{  
		document.getElementById("phone").value="enter valid 10 digit phone no:";     	     
		document.getElementById("phone").className="";
	    document.getElementById("phone").className="invalidinputfield_new";
	    if(focusmarker == "")
	    {	     	
	     	focusmarker= document.regForm.phone;	    	
	    }
	    
	   	selectObj(focusmarker);	
		check=false;
	}
	else
	{ 	     
	    document.getElementById("phone").className="";	    
	    document.getElementById("phone").className="input_new"; 
	    selectObj(document.regForm.email);
	}
  
	if (trim(document.regForm.email.value) == "" || trim(document.regForm.email.value) == "Enter Valid Email") 
	{		
		document.getElementById("email").value="Enter Valid Email";
		document.getElementById("email").className="";
	    document.getElementById("email").className="invalidinputfield_new";
		if(focusmarker == "")
	    {
	     	//alert('focusmarker :: email ==>  ' + focusmarker) ;
	     	focusmarker= document.regForm.email;	    	
	    }  
	    
	   	selectObj(focusmarker);	
		check=false;

	}
	else if (isEmail(trim(document.regForm.email.value))==false || trim(document.regForm.email.value) == "Enter Valid Email")
	{			
		document.getElementById("email").value="Enter Valid Email";
        document.getElementById("email").className="";
	    document.getElementById("email").className="invalidinputfield_new";
	    
	    if(focusmarker == "")
	    {
	     	//alert('focusmarker :: email ==>  ' + focusmarker) ;
	     	focusmarker= document.regForm.email;	    	
	    }  
	    
	   	selectObj(focusmarker);	
		check=false;

	}
	else
	{	   
		document.getElementById("email").className="";
		document.getElementById("email").className="input_new"; 	  	
      	selectObj(document.regForm.email);
	}
	
	
	
	if((trim(document.regForm.custname.value) == "" || trim(document.regForm.custname.value) == "Enter Valid Name") &&  (trim(document.regForm.email.value) == "" || trim(document.regForm.email.value) == "Enter Valid Email") && (isEmail(trim(document.regForm.email.value))==false || trim(document.regForm.email.value) == "Enter Valid Email") && (trim(document.regForm.phone.value) == "" || trim(document.regForm.phone.value) == "Enter 10 digit Phone No.") && (checkUSPhone(document.regForm.phone,false)==false))
		selectObj(document.regForm.custname);
	//alert('inside validate.js:: check= ' + check);
	if(check==true)
		return true;
	
		return false;

}
				
function checkForm() 
{
	//alert('Entering into the method');
	
	/* 
	if (trim(document.regForm.custname.value) == "" && trim(document.regForm.company.value)== "" && trim(document.regForm.email.value)=="" && trim(document.regForm.phone.value)== "")){
	
	document.getElementById("namefield").style.display="inline";
	document.getElementById("companyfield").style.display="inline";
	document.getElementById("emailfield").style.display="inline";
	document.getElementById("phonefield").style.display="inline";
	
	document.getElementById("custname").focus();
	}
	*/

	var totCount = 4;
	var aryElements = new Array(4);
	var bln_1 = true;
	var bln_2;
	var bln_3;
	var bln_4;

	aryElements[0] = "custname";
	aryElements[1] = "company";
	aryElements[2] = "phone";
	aryElements[3] = "email";

	if (trim(document.regForm.custname.value) == '')
	{
		document.getElementById("namefield").style.display="inline";
		document.getElementById("custname").focus();
		bln_1 = false;	
	}
	else
	{
		//bln_1 = true;
		document.getElementById("namefield").style.display="none";	
	}

	if (trim(document.regForm.company.value) == '')
	{
		document.getElementById("companyfield").style.display="inline";	
		bln_1 = false;
	}
	else
	{
		//bln_2 = true;
		document.getElementById("companyfield").style.display="none";
	}

	if (trim(document.regForm.phone.value) == '')
	{
		//bln_3 = false;
		document.getElementById("phonefield").style.display="inline";
		bln_1 = false;
	}
	else
	{
		//bln_3 = true;
		document.getElementById("phonefield").style.display="none";
	}

	if (trim(document.regForm.email.value) == '')
	{
		//bln_4 = false;
		document.getElementById("emailfield").style.display="inline";	
		bln_1 = false;
		//return false;
	}

	else
	{
		if (echeck(document.regForm.email.value)==false)
		{
			document.getElementById("emailfield").style.display="none";
			document.getElementById("emailvalidfield").style.display="inline";
			//alert('Please enter a E_mail');
			document.getElementById("email").focus();
			bln_1 = false;
			//return false;
		}
		//bln_4 = true;
		else
		{
			document.getElementById("emailvalidfield").style.display="none";
			document.getElementById("emailfield").style.display="none";
		}
	}
	return bln_1;

	/* if (trim(document.regForm.phone.value) == '')
	{
		//bln_3 = false;
		document.getElementById("phonefield").style.display="inline";
	}
	else
	{
		if(checkInternationalPhone(document.regForm.phone.value)==false)
		{ 
			document.getElementById("phonefield").style.display="none";
			document.getElementById("phonevalidfield").style.display="inline";
			//alert('Please enter a valid phone number');
			document.getElementById("phone").focus();
			//return false;
		}
		//bln_3 = true;
		else
		{
			document.getElementById("phonevalidfield").style.display="none";
			//document.getElementById("phonefield").style.display="none";
		}
	}   
	*/

	/*var iCount;
	for(iCount=0;iCount<totCount;iCount++)
	{
		alert(eval('document.getElementById("'+ aryElements[iCount] +'")'));
	}
	*/


	/*if (trim(document.regForm.custname.value) == "") 
	{
		document.getElementById("namefield").style.display="inline";
		//alert('Please enter a  name');
		document.getElementById("custname").focus();
		return false;
	}
	document.regForm.custname.value=trim(document.regForm.custname.value);
	else
	{
		//bln_1 = true;
		document.getElementById("namefield").style.display="none";	
	}

	if (trim(document.regForm.company.value)== "") 
	{
		document.getElementById("companyfield").style.display="inline";
		//alert('Please enter a company');
		document.getElementById("company").focus();
		return false;
	}
	document.regForm.company.value=trim(document.regForm.company.value);
	else
	{
		//bln_2 = true;
		document.getElementById("companyfield").style.display="none";
	}
	if (trim(document.regForm.email.value)=="")
	{
		document.getElementById("emailfield").style.display="inline";
		//alert('Please enter a E_mail');
		document.getElementById("email").focus();
		return false;
	}
	document.regForm.email.value=trim(document.regForm.email.value);
	else
	{
		//bln_4 = true;
		document.getElementById("emailfield").style.display="none";
	}
	if (echeck(document.regForm.email.value)==false)
	{
		document.getElementById("emailfield").style.display="none";
		document.getElementById("emailvalidfield").style.display="inline";
		//alert('Please enter a E_mail');
		document.getElementById("email").focus();
		return false;
	}
	if (trim(document.regForm.phone.value)== "") 
	{
		document.getElementById("phonefield").style.display="inline";
		//alert('Please enter a phone number');
		document.getElementById("phone").focus();
		return false;
	}
	document.regForm.phone.value=trim(document.regForm.phone.value);
	else
	{
		//bln_3 = true;
		document.getElementById("phonefield").style.display="none";
	}   
	if(isInteger(document.regForm.phone.value)==false)
	{ 
		document.getElementById("phonefield").style.display="none";
		document.getElementById("phonevalidfield").style.display="inline";
		//alert('Please enter a valid phone number');
		document.getElementById("phone").focus();
		return false;
	}
	*/
	//return true;
}

function checkClickToCall() 
{
	document.click_to_call.customername.value = trim(document.click_to_call.customername.value);
	
	if(document.click_to_call.customername.value == "") 
	{
		alert('Please enter a  name');
		document.getElementById("customer_name").value="";
		document.getElementById("customer_name").focus();
		return false;
	}
	
	document.click_to_call.customerphone.value=trim(document.click_to_call.customerphone.value);

	if(document.click_to_call.customerphone.value== "") 
	{
		alert('Please enter a phone number');
		document.getElementById("customer_phone").value="";
		document.getElementById("customer_phone").focus();
		return false;
	}
	/* The following else part is commented out for now, as James stated that we need to be flexible enough to test the functionality as of now in this release of last quarter of 2008 */
	/* 

	else
	{					
		var tempPhoneNumber;
		var newPhoneNumber;
		newPhoneNumber = "";
		tempPhoneNumber = new String(trim(document.click_to_call.customerphone.value));
		for (i=0;i<tempPhoneNumber.length;i++)
		{
			if (isDigit(tempPhoneNumber[i]) == true)
			{
				newPhoneNumber = newPhoneNumber + tempPhoneNumber[i];
			}
		}
		
		newPhoneNumber = trim(newPhoneNumber);
		
		if (isUSPhoneNumber(trim(document.click_to_call.customerphone.value)) != true)
		{
			alert('Please enter a valid phone number \(Only Numerals of 10 digits allowed\) ');
			document.getElementById("customer_phone").value = trim(document.click_to_call.customerphone.value);
			document.getElementById("customer_phone").focus();
			return false;
		}
		else
		{
			if (isUSPhoneNumber(newPhoneNumber) != true)
			{
				alert('Please enter a valid phone number \(Only Numerals of 10 digits allowed\)');
				document.getElementById("customer_phone").value = trim(document.click_to_call.customerphone.value);
				document.getElementById("customer_phone").focus();
				return false;
			}
			else
			{
				document.click_to_call.customerphone.value = trim(newPhoneNumber);
			}
		}
	}
	
	*/
	
	/* The above else part is commented out for now, as James stated that we need to be flexible enough to test the functionality as of now in this release of last quarter of 2008 */
	
	return true;
}

function stripCharsInBag (s, bag)
{  
    var st;
    st=s;
	var i;
	var returnString = "";

	// Search through string's characters one by one.
	// If character is not in bag, append to returnString.

	for (i = 0; i < st.length; i++)
	{	 
		// Check that current character isn't whitespace.
		var c = st.charAt(i);
		if (bag.indexOf(c) == -1) returnString += c;
	}

	return returnString;
}


function isUSPhoneNumber (s)
{  	  
	if (isEmpty(s))			 
		if (isUSPhoneNumber.arguments.length == 1) return defaultEmptyOK;
		else return (isUSPhoneNumber.arguments[1] == true);
	return (isInteger(s) && s.length == digitsInUSPhoneNumber)
}

function warnInvalid (theField, s)
{ 
    
  theField.focus()
    theField.select()
    //alert(s)
    return false
}



function checkUSPhone (theField, emptyOK)
{   		
	if (checkUSPhone.arguments.length == 1) 
	{
		emptyOK = defaultEmptyOK;		
	}
	
	if ((emptyOK == true) && (isEmpty(theField.value)))
	{ 
		return true;
	}
	else    
	{								
		var normalizedPhone = stripCharsInBag(theField.value, phoneNumberDelimiters);
		//alert(normalizedPhone);		
		if (!isUSPhoneNumber(normalizedPhone, false))
		{ 
			return warnInvalid (theField, iUSPhone);
		}			
		else        	
		{  			
			// if you don't want to reformat as (123) 456-789, comment next line out
			//theField.value = reformatUSPhone(normalizedPhone);
			return true;
		}
	}
}

// Satheesh

/*function isInteger(s)
{
var i;

for (i = 0; i < s.length; i++)
{
var c = s.charAt(i);
if (((c < "0") || (c > "9"))) return false;
//if (!checkInternationalPhone(strPhone)) return false;
}
if(checkInternationalPhone(s))
//document.getElementById("phonevalidfield").style.display="inline";
return true;
else 
//document.getElementById("phonevalidfield").style.display="none";
return false;
}*/