
function sendContactForm()
{
  var e = document.forms["contactForm"].elements;
  loadContent(
    "contactForm",
    "contact.php",
    "name="+e["name"].value+"&email="+e["email"].value+"&subject="+e["subject"].value+"&message="+e["message"].value
  );
}




function onInfoPageLoad()
{
  loadContent(
    "contactForm",
    "contact.php"
  );
}




setOnLoad( onInfoPageLoad );

// merge of http://www.hedgerwow.com/360/dhtml/ie-dom-ondocumentready.html and
//  http://dean.edwards.name/weblog/2006/06/again/
function setOnLoad( func )
{
  try
  {
    document.addEventListener( "DOMContentLoaded", func, false );
  }
  catch( e )
  {
    // Safari
    if( /WebKit/i.test(navigator.userAgent) )
    {
      var _timer = setInterval(
        function()
        {
          if( /loaded|complete/.test(document.readyState) )
            func();
        },
        10
      );
      return;
    }

    // non IE
    if( !document.uniqueID && document.expando )
    {
      window.onload = func;
      return;
    }

    //you can create any tagName, even customTag like <document:ready />
    var tempNode = document.createElement('document:ready');

    (function()
    {
      try
      {
        if( document.readyState != 'complete' )
          return setTimeout( arguments.callee, 0 );
        tempNode.doScroll( 'left' );
        func();
        tempNode = null;
      }
      catch( e )
      {
        setTimeout( arguments.callee, 100 );
      }
    })();
  }
}


