function write_email(user, domain, text){
  document.write('<a href="mailto:' + user + '@' + domain + '">' + text + '</a>');
}

/* <![CDATA[ */
/* Hack because using $(document).ready doesn't work with IE and OpenLayers
 * because our mapping code creates a new namespace when creating the vector
 * layer, and IE can't create new namespaces before the onload event has fired.
 * */
function runOnLoad(func) {
  if ($.browser.msie) {
    if (typeof(window.onload) == 'function') {
      var old_init = window.onload;
      window.onload = function() {
        old_init();
        func();
      };
    } else {
      window.onload = func;
    }
  } else { // Not IE
    $(document).ready(func);
  }
}

