if (document.implementation &&
    document.implementation.hasFeature &&
    document.implementation.hasFeature("html", "1.0")) {

  //browser is compliant

} else {
  // browser does not support dom 1
  document.writeln("<div id=\"scriptWarning\">" +
                 "<em><strong>Note:</strong> This site is best viewed with browsers that support the W3C Internet standard " +
                 "Document Object Model level one. Since this browser is not compliant, it may be more presentable without JavaScript support.<br />Examples of compliant browsers are <a title=\"Link to Mozilla website\" href=\"http://www.mozilla.org/products/firefox/\">Mozilla Firefox</a> " + 
                 "1.0 or higher and <a title=\"Link to Microsoft website\" href=\"http://www.microsoft.com/windows/ie/\">Microsoft " +
                 "Internet Explorer</a> 6 or higher.</em></div>") ;
}