function DoLoad()
{
  if ("function" == typeof (inputFocus))
    inputFocus();
}

function DoUnLoad()
{
  if ("function" == typeof(closeHelp))
    closeHelp();
  if ("function" == typeof(closeCalendar))
    closeCalendar();
  if ("function" == typeof(closeDdi))
    closeDdi();
  if ("function" == typeof(closeInfo))
    closeInfo();
  if ("function" == typeof(closeDataXInfo))
    closeDataXInfo();
  //if ("function" == typeof(forceLogOut))
    //forceLogOut();
}

function forceLogOut(uri)
{  
  //if msie and user press close, doesn't handle entries typed into address bar
  if (window.event.clientX < 0 && window.event.clientY < 0)
  {
    self.location = (null != uri) ? uri : '/webportal3/logout';
  }
  //TODO howto replicate in mozilla, opera??
}

function DoUnLoad_Popup()
{
    //This function will be used by the pop up windows 
    //where we dont want to close the user session

    if ("function" == typeof(closeHelp))
      closeHelp();
    if ("function" == typeof(closeCalendar))
      closeCalendar();
    if ("function" == typeof(closeDdi))
      closeDdi();
    if ("function" == typeof(closeInfo))
      closeInfo();
    if ("function" == typeof(closeDataXInfo))
      closeDataXInfo();
}
