/*** FORMS LOADING AND FOCUSSING ***/

var sFocus = "";
function _focusOnLoad()
{
  var oForms = window.document.forms, oElm;
  try
  {
    if (oForms.length && (sFocus != "") && (oElm = window.document.forms[oForms.length-1].elements[sFocus]))
      if (oElm.length)
        oElm.item(0).focus();
      else if (/text|password|file/i.test(oElm.type))
        oElm.select();
      else
        oElm.focus();
  }
  catch(vErr)
  {
    1; /* ignore */
  }
}

if (window.document.attachEvent)
  window.attachEvent("onload", _focusOnLoad);
else if (window.addEventListener)
  window.addEventListener("load", _focusOnLoad, true);
