function eventClass()
{
  this.oElement = new Object();

  this.aClickPosition = new Array();
  this.aPositionInElement = new Array();
  this.aMovePosition = new Array();

  this.sElementId = '';

  this.STYLE_POSITION_SCALE = 'px';
  this.EVENT_ON = 'on';
  this.CHAR_POINT = '.';
  this.CHAR_EQUAL = '=';
  this.CHAR_SEMICOLON = ';'
}




eventClass.prototype =
{
  getElementObjectById: function(oEvent)
  {
    this.setElementObjectById(oEvent)

    return this.oElement;
  },

  setElementObjectById: function(oEvent)
  {
    if(!document.all)
    {
      this.oElement = document.getElementById(oEvent.target.id);
    }
     else
     {
       this.oElement = document.getElementById(event.srcElement.id);
     }
  },

  getElementObjectByName: function(oEvent)
  {
    this.setElementObjectByName(oEvent)

    return this.oElement;
  },

  setElementObjectByName: function(oEvent)
  {
    if(!document.all)
    {
      this.oElement = document.getElementsByName(oEvent.target.name);
    }
     else
     {
       this.oElement = document.getElementsByName(event.srcElement.name);
     }
  },

  getElementId: function(oEvent)
  {
    this.setElementId(oEvent);

    return this.sElementId;
  },

  setElementId: function(oEvent)
  {
    this.setElementObjectById(oEvent);

    this.sElementId = this.oElement.id;
  },

  getClickPosition: function(oEvent)
  {
    this.setClickPosition(oEvent);

    return this.aClickPosition;
  },

  setClickPosition: function(oEvent)
  {
    if(!document.all)
    {
      this.aClickPosition['x'] = oEvent.pageX;
      this.aClickPosition['y'] = oEvent.pageY;
    }
     else
     {
       this.aClickPosition['x'] = window.event.clientX;
       this.aClickPosition['y'] = window.event.clientY;
     }
  },

  getPositionInElement: function(oEvent)
  {
    this.setPositionInElement(oEvent);

    return this.aPositionInElement;
  },

  setPositionInElement: function(oEvent)
  {
    this.setClickPosition(oEvent);
    this.setElementObjectById(oEvent);

    this.aPositionInElement['x'] = this.aClickPosition['x'] - parseInt(this.oElement.style.left);
    this.aPositionInElement['y'] = this.aClickPosition['y'] - parseInt(this.oElement.style.top);
  },

  getMovePosition: function(oEvent, aPositionInElement)
  {
    this.setMovePosition(oEvent, aPositionInElement);

    return this.aMovePosition;
  },

  setMovePosition: function(oEvent, aPositionInElement)
  {
    this.setClickPosition(oEvent);

    this.aMovePosition['x'] = this.aClickPosition['x'] - aPositionInElement['x'];
    this.aMovePosition['y'] = this.aClickPosition['y'] - aPositionInElement['y'];
  },

  setElementMove: function(oEvent, aPositionInElement)
  {
    this.setMovePosition(oEvent, aPositionInElement);

    this.oElement.style.left = this.aMovePosition['x'] + this.STYLE_POSITION_SCALE;
    this.oElement.style.top =  this.aMovePosition['y'] + this.STYLE_POSITION_SCALE;
  },

  setEventModel3: function(oElement , sEventType, sEventMethod)
  {
		if(oElement && sEventType && sEventMethod){ // EM 29.04.2009 hinzugefügt
			if(oElement.addEventListener)
			{
			  oElement.addEventListener(sEventType, sEventMethod, false);
			}
			 else if(oElement.attachEvent)
			 {
			   oElement.attachEvent(this.EVENT_ON + sEventType, sEventMethod);
			 }
		}
  },

  setEventModel2: function(oElement, sEventType, sEventMethod)
  {
    eval('oElement'+ this.CHAR_POINT + this.EVENT_ON + sEventType + ' '+ this.CHAR_EQUAL + ' sEventMethod' + this.CHAR_SEMICOLON);
  }
};