javascripts for validating dns and domains