/*
  Datei:        $RCSfile: tools.js,v $
  Revision:     $Revision: 1.1 $ / $Name:  $
  Last-Checkin: $Date: 2007/03/18 20:50:03 $ / $Author: Falk $
  CVS-ID:       $Id: tools.js,v 1.1 2007/03/18 20:50:03 Falk Exp $
  Creator:      Falk Pruefer
*/

function TDim(pX, pY)
{
  this.X = pX;
  this.Y = pY;
}

function getWindowDims()
{
  var dims = new TDim(0, 0);
  if (self.innerHeight) // all except Explorer
  {
    dims.X = self.innerWidth;
    dims.Y = self.innerHeight;
  }
  else if (document.documentElement && document.documentElement.clientHeight)
    // Explorer 6 Strict Mode
  {
    dims.X = document.documentElement.clientWidth;
    dims.Y = document.documentElement.clientHeight;
  }
  else if (document.body) // other Explorers
  {
    dims.X = document.body.clientWidth;
    dims.Y = document.body.clientHeight;
  }
  return dims;
}

function fc364ml(user, domain, subject)
{
  user = user.replace(/-/, ".");
  user = user.replace(/\/./, "-");
  domain = domain.replace(/-/, ".");
  domain = domain.replace(/\/./, "-");
  address = "mailto:" + user + "@" + domain;
  if (subject != "")
    address = address + "?subject=\"" + subject + "\"";
  window.location = address;
}
