$(document).ready(function () {
  
 //   $("a[href^='http']").attr('target', '_blank');
    $("a[href$='pdf']").attr('target', '_blank');
  
  //Alleen maximaal 5 cijfers
  $("p.Berekening input").keypress(function (e)
  { 
    //Max characters
    var len = this.value.length;
    if (len >= 4) {
        this.value = this.value.substring(0, 4);
    }
    
    //if the letter is not digit then display error and don't type anything
    if( e.which!=8 && e.which!=0 && (e.which<48 || e.which>57))
    {
    //display error message
  //  $("#ContentPlaceHolderDefault_content_CostCalculationControl_5_QuantityTextBox").after("<span id=\"errmsg\"></span>");
  //  $("#errmsg").html("Alleen cijfers").show(10000).fadeOut("slow"); 
      return false;
      }  
  });
  
    //Alleen maximaal 5 cijfers
  $("#ContentPlaceHolderDefault_content_CostCalculationControl_4_PhoneNoTextBox, #ContentPlaceHolderDefault_content_ContactControl_5_PhoneNoTextBox").keypress(function (e)
  {
    //Max characters
    var len = this.value.length;
    
    var code = (e.keyCode ? e.keyCode : e.which);
    
    //if the letter is not digit then display error and don't type anything
    if ((code >= 65 && code <= 90) || (code >= 97 && code <= 122))
    {
        return false;
    }  
  });
  

  
});

