$('#btn_continue').click(function()
{
  if( $('#zip').attr('value').length == 5  && IsNumeric( $('#zip').attr('value') ) )
  {
      var _href = $("#dest").attr("value");
      $("#dest").attr("value", _href + '&zip=' + $('#zip').attr('value') );
  }else{
      $('#error-message').html("Product availability is based on ZIP code for your current residence. Please enter your home ZIP code to continue.");
      return false;
  }
}
);

$('#zip-go').click(function()
{
  if( $('#zipcode-prompt-input').attr('value').length == 5  && IsNumeric( $('#zipcode-prompt-input').attr('value') ) )
  {
  }else{
      $('#error-message').html("Product availability is based on ZIP code for your current residence. <br />Please enter your home ZIP code to continue.");
      return false;
  }
}
);

function IsNumeric(sText)

{
   var ValidChars = "0123456789";
   var IsNumber=true;
   var Char;

 
   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
      }
   return IsNumber;
   
   }


