﻿
function DisableControl(controlId)
{
  document.aspnetForm.ctl00$headerText$usrPortion$Button1.disabled=true;
}
 
function DisableControl_SetTimeout(controlId,interval)
{
  setTimeout("DisableControl('" +controlId + "')",interval);
}
 
function btnSave_Click(control)
{
  DisableControl_SetTimeout(control.id,400);
}

//SM
function ValidatorSM(aspnetForm)
{
var xCnt = 0;

//p.ctl00$headerText$usrPortion$Button1.disabled=true;

document.getElementById('proc').style.display = 'block'
var p = document.aspnetForm;
  
   if (p.ctl00$headerText$movetozip_sm.value != "")
	if (p.ctl00$headerText$movetozip_sm.value.length != 5)
	{
		alert("Zip Code must be 5 digits in length.");
		xCnt++;
		p.ctl00$headerText$usrPortion$Button1.disabled=false;
		document.getElementById('proc').style.display = 'none'
		p.ctl00$headerText$movetozip_sm.focus();
		return (false);
	}
	
	//check for numberic values for all zip boxes
    if (p.ctl00$headerText$movetozip_sm.value != "")
      {
          var _x=p.ctl00$headerText$movetozip_sm.value;
          var _exp = new RegExp(/^\d+$/);
          var _test=_exp.test(_x);
          
         if(!_test)
            {
            alert("Please enter a 5 digit zip code.");
            xCnt++;
	        p.ctl00$headerText$usrPortion$Button1.disabled=false;
      	    document.getElementById('proc').style.display = 'none'
            p.ctl00$headerText$movetozip_sm.focus();
            return (false);
            }
          
        }
	  
  if (p.ctl00$headerText$movefromzip_sm.value != "")
	if (p.ctl00$headerText$movefromzip_sm.value.length != 5)
	{
		alert("Zip Code must be 5 digits in length.");
		xCnt++;
		p.ctl00$headerText$usrPortion$Button1.disabled=false;
		document.getElementById('proc').style.display = 'none'
		p.ctl00$headerText$movefromzip_sm.focus();
		return (false);
	}
	
	//check for numberic values for all zip boxes
    if (p.ctl00$headerText$movefromzip_sm.value != "")
      {
          var _x=p.ctl00$headerText$movefromzip_sm.value;
          var _exp = new RegExp(/^\d+$/);
          var _test=_exp.test(_x);
          
         if(!_test)
            {
            alert("Please enter a 5 digit zip code.");
            xCnt++;
	        p.ctl00$headerText$usrPortion$Button1.disabled=false;
      	    document.getElementById('proc').style.display = 'none'
            p.ctl00$headerText$movefromzip_sm.focus();
            return (false);
            }
          
        }
        
         if (p.ctl00$headerText$movefromzip_sm.value == "")
  {
    alert("Please enter a zip code.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$movefromzip_sm.focus();
    return (false);
  }
  
      if (p.ctl00$headerText$movetozip_sm.value == "")
  {
    alert("Please enter a zip code.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$movetozip_sm.focus();
    return (false);
  }
  
     /*   
    if (p.ctl00$headerText$movedatemonth_sm.value == "0")
  {
    alert("Please select a month.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$movedatemonth_sm.focus();
    return (false);
  }
  
      if (p.ctl00$headerText$movedateyear_sm.value == "0")
  {
    alert("Please select a year.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$movedateyear_sm.focus();
    return (false);
  }
  */
        if (p.ctl00$headerText$movetype_sm.value == "Select")
  {
    alert("Please select the type of move.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$movetype_sm.focus();
    return (false);
  }
  
        if (p.ctl00$headerText$movesize_sm.value == "Select")
  {
    alert("Please select the move size.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$movesize_sm.focus();
    return (false);
  }
  
 
  
  //user portion
        
	  
  if (p.ctl00$headerText$usrPortion$frmFName.value == "")
  {
    alert("Please enter your first name.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmFName.focus();
    return (false);
  }
  
  if (p.ctl00$headerText$usrPortion$frmFName.value.length < 2)
  {
    alert("First name must be at least 2 characters in length.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmFName.focus();
    return (false);
  }
	  
  if (p.ctl00$headerText$usrPortion$frmLName.value == "")
  {
    alert("Please enter your last name.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmLName.focus();
    return (false);
  }
  
  if (p.ctl00$headerText$usrPortion$frmLName.value.length < 2)
  {
    alert("Last name must be at least 2 characters in length.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmLName.focus();
    return (false);
  }
	  
  if (p.ctl00$headerText$usrPortion$frmAddress.value == "")
  {
    alert("Please enter your address.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmAddress.focus();
    return (false);
  }
	  
  if (p.ctl00$headerText$usrPortion$frmCity.value == "")
  {
    alert("Please enter your city.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmCity.focus();
    return (false);
  }
  
  if (p.ctl00$headerText$usrPortion$frmCity.value.length < 3)
  {
    alert("City must be at least 3 characters in length.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmCity.focus();
    return (false);
  }
  
  if (p.ctl00$headerText$usrPortion$frmState.value == "Select")
  {
    alert("Please enter your state.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmState.focus();
    return (false);
  }
	  
  if (p.ctl00$headerText$usrPortion$frmZip.value == "")
  {
    alert("Please enter your zip code.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmZip.focus();
    return (false);
  }
  
  if (p.ctl00$headerText$usrPortion$frmZip.value.length < 5)
  {
    alert("Please enter a valid zip code.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmZip.focus();
    return (false);
  }
  
  if (p.ctl00$headerText$usrPortion$frmZip.value.length = 5)
  {
      var _x=p.ctl00$headerText$usrPortion$frmZip.value;
      var _exp = new RegExp(/^\d+$/);
      var _test=_exp.test(_x);
      
     if(!_test)
        {
        alert("Please enter a 5 digit zip code.");
        xCnt++;
	    p.ctl00$headerText$usrPortion$Button1.disabled=false;
      	document.getElementById('proc').style.display = 'none'
        p.ctl00$headerText$usrPortion$frmZip.focus();
        return (false);
        }
      
    }
  
	  
  if (p.ctl00$headerText$usrPortion$frmDPhone1.value == "")
  {
    alert("Please enter your area code.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmDPhone1.focus();
    return (false);
  }
  
    if (p.ctl00$headerText$usrPortion$frmDPhone1.value != "")
    if (p.ctl00$headerText$usrPortion$frmDPhone1.value.length < 3)
  {
    alert("Please enter a 3 digit area code.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmDPhone1.focus();
    return (false);
  }

///////////////////////////////////////////////////////////

  if (p.ctl00$headerText$usrPortion$frmDPhone1.value == "000")
  {
    alert("Please enter a valid area code.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmDPhone1.focus();
    return (false);
  }  

  if (p.ctl00$headerText$usrPortion$frmDPhone1.value == "111")
  {
    alert("Please enter a valid area code.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmDPhone1.focus();
    return (false);
  }

  if (p.ctl00$headerText$usrPortion$frmDPhone1.value == "222")
  {
    alert("Please enter a valid area code.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmDPhone1.focus();
    return (false);
  }

  
  if (p.ctl00$headerText$usrPortion$frmDPhone1.value == "333")
  {
    alert("Please enter a valid area code.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmDPhone1.focus();
    return (false);
  }
  
  if (p.ctl00$headerText$usrPortion$frmDPhone1.value == "444")
  {
    alert("Please enter a valid area code.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmDPhone1.focus();
    return (false);
  }
  
  if (p.ctl00$headerText$usrPortion$frmDPhone1.value == "555")
  {
    alert("Please enter a valid area code.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmDPhone1.focus();
    return (false);
  }
  
  if (p.ctl00$headerText$usrPortion$frmDPhone1.value == "666")
  {
    alert("Please enter a valid area code.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmDPhone1.focus();
    return (false);
  }    
  
  if (p.ctl00$headerText$usrPortion$frmDPhone1.value == "777")
  {
    alert("Please enter a valid area code.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmDPhone1.focus();
    return (false);
  }  
  
  if (p.ctl00$headerText$usrPortion$frmDPhone1.value == "888")
  {
    alert("Please enter a valid area code.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmDPhone1.focus();
    return (false);
  }  
  
  if (p.ctl00$headerText$usrPortion$frmDPhone1.value == "999")
  {
    alert("Please enter a valid area code.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmDPhone1.focus();
    return (false);
  }  
  

  
  
  ////////////////////////////////////////////////////////
  
  
  if (p.ctl00$headerText$usrPortion$frmDPhone2.value == "000")
	if (p.ctl00$headerText$usrPortion$frmDPhone3.value == "0000")
  {
    alert("Please enter a valid phone number.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmDPhone1.focus();
    return (false);
  }
  
  if (p.ctl00$headerText$usrPortion$frmDPhone2.value == "111")
	if (p.ctl00$headerText$usrPortion$frmDPhone3.value == "1111")
  {
    alert("Please enter a valid phone number.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmDPhone1.focus();
    return (false);
  }
  
  if (p.ctl00$headerText$usrPortion$frmDPhone2.value == "222")
	if (p.ctl00$headerText$usrPortion$frmDPhone3.value == "2222")
  {
    alert("Please enter a valid phone number.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmDPhone1.focus();
    return (false);
  }
  
  if (p.ctl00$headerText$usrPortion$frmDPhone2.value == "333")
	if (p.ctl00$headerText$usrPortion$frmDPhone3.value == "3333")
  {
    alert("Please enter a valid phone number.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmDPhone1.focus();
    return (false);
  }
  
  if (p.ctl00$headerText$usrPortion$frmDPhone2.value == "444")
	if (p.ctl00$headerText$usrPortion$frmDPhone3.value == "4444")
  {
    alert("Please enter a valid phone number.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmDPhone1.focus();
    return (false);
  }
  
  if (p.ctl00$headerText$usrPortion$frmDPhone2.value == "555")
	if (p.ctl00$headerText$usrPortion$frmDPhone3.value == "5555")
  {
    alert("Please enter a valid phone number.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmDPhone1.focus();
    return (false);
  }
  
  if (p.ctl00$headerText$usrPortion$frmDPhone2.value == "666")
	if (p.ctl00$headerText$usrPortion$frmDPhone3.value == "6666")
  {
    alert("Please enter a valid phone number.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmDPhone1.focus();
    return (false);
  }
  
  if (p.ctl00$headerText$usrPortion$frmDPhone2.value == "777")
	if (p.ctl00$headerText$usrPortion$frmDPhone3.value == "7777")
  {
    alert("Please enter a valid phone number.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmDPhone1.focus();
    return (false);
  }
  
  if (p.ctl00$headerText$usrPortion$frmDPhone2.value == "888")
	if (p.ctl00$headerText$usrPortion$frmDPhone3.value == "8888")
  {
    alert("Please enter a valid phone number.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmDPhone1.focus();
    return (false);
  }
  
  if (p.ctl00$headerText$usrPortion$frmDPhone2.value == "999")
	if (p.ctl00$headerText$usrPortion$frmDPhone3.value == "9999")
  {
    alert("Please enter a valid phone number.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmDPhone1.focus();
    return (false);
  }
  
  ////////////////////////////////////////////////////////
  
  if (p.ctl00$headerText$usrPortion$frmDPhone2.value == "")
  {
    alert("Please enter your phone prefix.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmDPhone2.focus();
    return (false);
  }
  
    if (p.ctl00$headerText$usrPortion$frmDPhone2.value != "")
    if (p.ctl00$headerText$usrPortion$frmDPhone2.value.length < 3)
  {
    alert("Please enter a 3 digit phone prefix.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmDPhone2.focus();
    return (false);
  }
  
  if (p.ctl00$headerText$usrPortion$frmDPhone1.value == "123" && p.ctl00$headerText$usrPortion$frmDPhone2.value == "456" && p.ctl00$headerText$usrPortion$frmDPhone3.value == "7890")
  {
    alert("Please enter valid phone.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmDPhone1.focus();
    return (false);
  }
	  
  if (p.ctl00$headerText$usrPortion$frmDPhone3.value == "")
  {
    alert("Please enter your phone suffix.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmDPhone3.focus();
    return (false);
  } 
  
    if (p.ctl00$headerText$usrPortion$frmDPhone3.value != "")
    if (p.ctl00$headerText$usrPortion$frmDPhone3.value.length < 4)
  {
    alert("Please enter a 4 digit phone suffix.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmDPhone3.focus();
    return (false);
  } 
  
////////////////////////////////////////////////////////////////
var CPhone1,CPhone2,CPhone3,CPhoneloop
CPhone1 = 111;
CPhone2 = 111;
CPhone3 = 1111;
CPhoneS1 = 111;
CPhoneS2 = 111;
CPhoneS3 = 1111;
if (p.ctl00$headerText$usrPortion$frmCPhone1.value != "" || p.ctl00$headerText$usrPortion$frmCPhone2.value != "" || p.ctl00$headerText$usrPortion$frmCPhone3.value != "")
  {
	  if(p.ctl00$headerText$usrPortion$frmCPhone1.value == "" || p.ctl00$headerText$usrPortion$frmCPhone2.value == "" || p.ctl00$headerText$usrPortion$frmCPhone3.value == "")
	  {
			alert("Please enter cell phone.");
			xCnt++;
			p.ctl00$headerText$usrPortion$Button1.disabled=false;
			document.getElementById('proc').style.display = 'none'
			p.ctl00$headerText$usrPortion$frmCPhone1.focus();
			return (false);				
	  }
	  else
	  {
		if (p.ctl00$headerText$usrPortion$frmCPhone1.value == "123" && p.ctl00$headerText$usrPortion$frmCPhone2.value == "456" && p.ctl00$headerText$usrPortion$frmCPhone3.value == "7890")
		 {
			alert("Please enter valid cell phone.");
			xCnt++;
			p.ctl00$headerText$usrPortion$Button1.disabled=false;
			document.getElementById('proc').style.display = 'none'
			p.ctl00$headerText$usrPortion$frmCPhone1.focus();
			return (false);
	    }
	    if (p.ctl00$headerText$usrPortion$frmCPhone1.value.length < 3)
		 {
			alert("Please enter valid cell phone area code.");
			xCnt++;
			p.ctl00$headerText$usrPortion$Button1.disabled=false;
			document.getElementById('proc').style.display = 'none'
			p.ctl00$headerText$usrPortion$frmCPhone1.focus();
			return (false);
	    }
		for(CPhoneloop=0;CPhoneloop<=10;CPhoneloop++)
		{
			if(CPhoneloop==0)
			{
				if (p.ctl00$headerText$usrPortion$frmCPhone1.value == "000" && p.ctl00$headerText$usrPortion$frmCPhone2.value == "000" && p.ctl00$headerText$usrPortion$frmCPhone3.value == "0000")
				{
					alert("Please enter valid cell phone.");
					xCnt++;
					p.ctl00$headerText$usrPortion$Button1.disabled=false;
					document.getElementById('proc').style.display = 'none'
					p.ctl00$headerText$usrPortion$frmCPhone1.focus();
					return (false);				
				}
				if (p.ctl00$headerText$usrPortion$frmCPhone2.value == "000" && p.ctl00$headerText$usrPortion$frmCPhone3.value == "0000")
				{
					alert("Please enter valid cell phone.");
					xCnt++;
					p.ctl00$headerText$usrPortion$Button1.disabled=false;
					document.getElementById('proc').style.display = 'none'
					p.ctl00$headerText$usrPortion$frmCPhone2.focus();
					return (false);				
				}						
			}
			else if(CPhoneloop==1)
			{
				if(p.ctl00$headerText$usrPortion$frmCPhone1.value == "111" && p.ctl00$headerText$usrPortion$frmCPhone2.value == "111" && p.ctl00$headerText$usrPortion$frmCPhone3.value == "1111")
				{
					alert("Please enter valid cell phone.");
					xCnt++;
					p.ctl00$headerText$usrPortion$Button1.disabled=false;
					document.getElementById('proc').style.display = 'none'
					p.ctl00$headerText$usrPortion$frmCPhone1.focus();
					return (false);				
				}
				if (p.ctl00$headerText$usrPortion$frmCPhone2.value == "111" && p.ctl00$headerText$usrPortion$frmCPhone3.value == "1111")
				{
					alert("Please enter valid cell phone.");
					xCnt++;
					p.ctl00$headerText$usrPortion$Button1.disabled=false;
					document.getElementById('proc').style.display = 'none'
					p.ctl00$headerText$usrPortion$frmCPhone2.focus();
					return (false);				
				}
			}    			
			else
			{
				CPhone1 = CPhone1 + CPhoneS1;
				CPhone2 = CPhone2 + CPhoneS2;
				CPhone3 = CPhone3 + CPhoneS3;
				if(p.ctl00$headerText$usrPortion$frmCPhone1.value == CPhone1 && p.ctl00$headerText$usrPortion$frmCPhone2.value == CPhone2 && p.ctl00$headerText$usrPortion$frmCPhone3.value == CPhone3)
				{
					alert("Please enter valid cell phone.");
					xCnt++;
					p.ctl00$headerText$usrPortion$Button1.disabled=false;
					document.getElementById('proc').style.display = 'none'
					p.ctl00$headerText$usrPortion$frmCPhone1.focus();
					return (false);				
				}
				if (p.ctl00$headerText$usrPortion$frmCPhone2.value == CPhone2 && p.ctl00$headerText$usrPortion$frmCPhone3.value == CPhone3 )
				{
					alert("Please enter valid cell phone.");
					xCnt++;
					p.ctl00$headerText$usrPortion$Button1.disabled=false;
					document.getElementById('proc').style.display = 'none'
					p.ctl00$headerText$usrPortion$frmCPhone2.focus();
					return (false);				
				}
			}
		 }
	  }
  } 


	  
  if (p.ctl00$headerText$usrPortion$frmEmail.value == "")
  {
    alert("Please enter your e-mail address.");
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
    p.ctl00$headerText$usrPortion$frmEmail.focus();
    return (false);
  }
  
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(p.ctl00$headerText$usrPortion$frmEmail.value)){
	//return (true);
	}
	else
	{
	
	alert("Please submit your complete email address. For example, myname@aol.com or billsmith100@yahoo.com")
	xCnt++;
	p.ctl00$headerText$usrPortion$Button1.disabled=false;
	document.getElementById('proc').style.display = 'none'
	return (false);
	}
	
    btnSave_Click('ctl00$headerText$usrPortion$Button1');
	return true;
  
}
//end SM

function validate(field) {
var valid = "0123456789"
var ok = "yes";
var temp;
for (var i=0; i<field.value.length; i++) {
temp = "" + field.value.substring(i, i+1);
if (valid.indexOf(temp) == "-1") ok = "no";
}
if (ok == "no") {
alert("I'm sorry, invalid entry, only numbers are accepted in this field.");
field.focus();
field.select();
   }
}

function checkEmail() {
var p = document.aspnetForm;
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(p.ctl00$headerText$usrPortion$frmEmail.value)){
	return (true)
	}
	alert("Please submit your complete email address. For example, myname@aol.com or billsmith100@yahoo.com")
	p.ctl00$headerText$usrPortion$frmEmail.focus();
	return (false)
}
// -->
