

/*
 *	Fix for problems in IE
 */

function
MM_reloadPage(init)
{

  var getRoutine = null;
  
  /*   
   *	IE 4 compatibility 
   */
  
  if (document.all) {
    getRoutine = document.all;
  }

  /*
   *	IE 5 / 5.5 compatibility
   */
  theTop = 0;
  if (document.documentElement && document.documentElement.clientWidth)
    theTop = document.documentElement.clientWidth - document.documentElement.offsetWidth - 10;
	

  if (document.getElementById) {
    getRoutine = document.getElementById;
  }

  if (getRoutine) {
      if (getRoutine("body")) {

      getRoutine("body").style.position = "absolute";
      getRoutine("body").style.left     = 0;
        
      // Code to be un-commented once problem with drop down menu code positioning is sorted
      // getRoutine("body").style.left     = ((document.body.clientWidth - theTop) - 640 ) / 2 + "px";
        
      alert( document.body.clientWidth - theTop );
    }
  }
}


if (document.getElementsByTagName) {

  if ( navigator.userAgent.toLowerCase().indexOf("opera") != -1 ) {

    a       = navigator.userAgent.toLowerCase().indexOf("opera");
    version = parseInt ( navigator.userAgent.toLowerCase().substring(a + 6)  );
  
    if (version == 5) {
      document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"/media/pages/fixes/pm_opera5.css\">");
    }

  }
}

if ((navigator.appName                                  == "Microsoft Internet Explorer") &&
    (navigator.userAgent.toLowerCase().indexOf("opera") == -1))                           {

  ver = parseFloat(navigator.appVersion.substring( navigator.appVersion.indexOf("MSIE") + 4));
  
  // Only really interested in IE 5 & 5.5. Left code in to cover 4 as its CSS support should be 
  // at least as bad as IE 5.

  if ((ver >  4) && (ver <  5.60)){
    if (document.all) {
      if (document.getElementById) {
        // Code to be un-commented once problem with drop down menu code positioning is sorted
        // window.onresize = MM_reloadPage;
        // window.onload   = MM_reloadPage
        MM_reloadPage;
        document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"/media/pages/fixes/pm_ie5.css\" />");
      }
    }
  }
}


if ((navigator.appName                 == "Netscape") &&
    ((parseFloat(navigator.appVersion) >  4.49)       && 
     (parseFloat(navigator.appVersion) <  5.00)))     {
  if (document.layers) {
    document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"/media/fixes/pages/pm_nn4.css\" />");
  }
}
