title: Validate site/domain via javascript
body: <p>I have a standard html form where the user can specify a website/domain:</p>
  
  <p>favourite website: [           ]</p>
  
  <p>I expect the user to type things like: </p>
  
  <p>[www.google.com] 
  [www.yahoo.com] 
  [www.example.co.jp] </p>
  
  <p>I want to validate the domain/site via javascript so if a user had typed something wrong:</p>
  
  <p>[www...google.com] [www.-example.com] </p>
  
  <p>I tell them straight away.</p>
  
  <p>Can anybody post this javascript ? </p>
  
  <p>Alternatively can anybody point me to a site where I can look at their javascript ?</p>
  
  <p>Many Thanks</p>