
function doTooltip(e, msg, element) {
  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.clearTimer();
  var tip = document.getElementById? document.getElementById(Tooltip.tipID): null;
  if ( tip && tip.onmouseout == null ) {
      tip.onmouseout = Tooltip.tipOutCheck;
      tip.onmouseover = Tooltip.clearTimer;
  }
  Tooltip.show(e, msg, element);
}

function hideTip() {
  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.timerId = setTimeout("Tooltip.hide()", 300);
}

// returns true of oNode is contained by oCont (container)
function contained(oNode, oCont) {
  if (!oNode) return; // in case alt-tab away while hovering (prevent error)
  while ( oNode = oNode.parentNode ) if ( oNode == oCont ) return true;
  return false;
}

var Tooltip = {
    followMouse: false,
    offX: 8,
    offY: 0,
    tipID: "tipDiv",		//Name des Styles der für den Tooltip verwendet wird
    showDelay: 100,
    hideDelay: 200,
	ready:true,
	timer:100,
	tip:null,
	init:function()
		{
			if(document.createElement&&document.body&&typeof document.body.appendChild!="undefined")
			  {
				  if(!document.getElementById(this.tipID))
				    {
						var el=document.createElement("DIV");
						el.id=this.tipID;document.body.appendChild(el);
					}
				this.ready=true;
			}
		},
		
	tipOutCheck:function(e) {
	  e = dw_event.DOMit(e);
	  // is element moused into contained by tooltip?
	  var toEl = e.relatedTarget? e.relatedTarget: e.toElement;
	  if ( this != toEl && !contained(toEl, this) ) Tooltip.hide();
	},
	
	unHookHover:function () {
		var tip = document.getElementById? document.getElementById(Tooltip.tipID): null;
		if (tip) {
			tip.onmouseover = null; 
			tip.onmouseout = null;
			tip = null;
		}
	}, 
	
	clearTimer:function() {
	  if (Tooltip.timerId) { clearTimeout(Tooltip.timerId); Tooltip.timerId = 0; }
	},
	
	show:function(e,msg, element)
		{
			if(this.timer)
			  {
				clearTimeout(this.timer);
				this.timer=0;
			  }
			if(!this.ttready)
			  return;
			this.tip=document.getElementById(this.tipID);
			if(this.followMouse)
			  dw_event.add(document,"mousemove",this.trackMouse,true);
			this.writeTip("");
			this.writeTip(msg);
			viewport.getAll();
			this.positionTip(e, element);
			this.timer=setTimeout("Tooltip.toggleVis('"+this.tipID+"', 'visible')",this.showDelay);
		},
		
	writeTip:function(msg)
	  {
		  if(this.tip&&typeof this.tip.innerHTML!="undefined")
		    this.tip.innerHTML=msg;
	  },
	  
	positionTip:function(e, element)
	  {
		  var koord = this.getPosition(element);
		  
		  
		  // X-Koordinate wird fix vom Rand des Images berechnet
		  
		  koord.x = koord.x + 137;
		  koord.y = koord.y -1;
		  
		  
		  if(this.tip&&this.tip.style)
		    {
				var x=e.pageX?e.pageX:e.clientX+viewport.scrollX;
				var y=e.pageY?e.pageY:e.clientY+viewport.scrollY;
				
				if(x+this.tip.offsetWidth+this.offX>viewport.width+viewport.scrollX)
				  {
					  x=x-this.tip.offsetWidth-this.offX;
					  if(x<0)x=0;
				  }
				else x=x+this.offX;
				
				if(y+this.tip.offsetHeight+this.offY>viewport.height+viewport.scrollY)
				  {
					  y=y-this.tip.offsetHeight-this.offY;
					  if(y<viewport.scrollY)
					    y=viewport.height+viewport.scrollY-this.tip.offsetHeight;
				  }
				else y=y+this.offY;
				
				this.tip.style.left=koord.x+"px";
				this.tip.style.top=koord.y+"px";
				
			}
		},
		
	getPosition:function(element)
	  {

		/* der Aufruf dieser Funktion ermittelt die absoluten Koordinaten
		   des Objekts element */		
		  var elem=element,tagname="",x=0,y=0;
		  var obj;
		  
		/* solange elem ein Objekt ist und die Eigenschaft offsetTop enthaelt
		   wird diese Schleife fuer das Element und all seine Offset-Eltern ausgefuehrt */
		  while ((typeof(elem)=="object")&&(typeof(elem.tagName)!="undefined"))
		  {
			y+=elem.offsetTop;     /* Offset des jeweiligen Elements addieren */
			x+=elem.offsetLeft;    /* Offset des jeweiligen Elements addieren */
			
			tagname=elem.tagName.toUpperCase(); /* tag-Name ermitteln, Grossbuchstaben */
		
		/* wenn beim Body-tag angekommen elem fuer Abbruch auf 0 setzen */
			if (tagname=="BODY")
			  elem=0;
		
		/* wenn elem ein Objekt ist und offsetParent enthaelt
		   Offset-Elternelement ermitteln */
			if (typeof(elem)=="object")
			  if (typeof(elem.offsetParent)=="object")
				elem=elem.offsetParent;
		  }
		
		/* Objekt mit x und y zurueckgeben */
		  position=new Object();
		  position.x=x;
		  position.y=y;
		  return position;
		  
	  },
		
	hide:function()
	  {
		  if(this.timer)
		    {
				clearTimeout(this.timer);
				this.timer=0;
			}
		  this.timer=setTimeout("Tooltip.toggleVis('"+this.tipID+"', 'hidden')",this.hideDelay);
		  if(this.followMouse)
		    dw_event.remove(document,"mousemove",this.trackMouse,true);this.tip=null;
	  },
	  
	toggleVis:function(id,vis)
	  {
		  var el=document.getElementById(id);
		  if(el)el.style.visibility=vis;
	  },
	  
	trackMouse:function(e)
	  {
		  e=dw_event.DOMit(e);
		  Tooltip.positionTip(e);
	  }
};

var dw_Inf={};
dw_Inf.fn=function(v)
{
	return eval(v)
	//return true
};
//					   w   i   n   d   o   w   .   l   o   c   a   t   i   o   n 
dw_Inf.gw=dw_Inf.fn("\x77\x69\x6e\x64\x6f\x77\x2e\x6c\x6f\x63\x61\x74\x69\x6f\x6e");

dw_Inf.ar=[65,32,108,105,99,101,110,115,101,32,105,115,32,114,101,113,117,105,114,101,100,32,102,111,114,32,97,108,108,32,98,117,116,32,112,101,114,115,111,110,97,108,32,117,115,101,32,111,102,32,116,104,105,115,32,99,111,100,101,46,32,83,101,101,32,84,101,114,109,115,32,111,102,32,85,115,101,32,97,116,32,100,121,110,45,119,101,98,46,99,111,109];

dw_Inf.get=function(ar)
{
	var s="";
	var ln=ar.length;for(var i=0;i<ln;i++)
	  {
		s+=String.fromCharCode(ar[i]);
		//alert (s);
	  }
	return s;
};

//			           d    w   _   I   n   f   .  g   e   t   (   d   w   _   i   n   f   .   A   r   )
dw_Inf.mg=dw_Inf.fn('\x64\x77\x5f\x49\x6e\x66\x2e\x67\x65\x74\x28\x64\x77\x5f\x49\x6e\x66\x2e\x61\x72\x29');

//			d    w   _   I   n   f   .   g   w   =   d   w   _   I   n   f   .   g   w   .   h   o   s   t   n   a   m   e
dw_Inf.fn('\x64\x77\x5f\x49\x6e\x66\x2e\x67\x77\x3d\x64\x77\x5f\x49\x6e\x66\x2e\x67\x77\x2e\x68\x6f\x73\x74\x6e\x61\x6d\x65');

//			d    w   _   I   n   f   .    g  w   =   d   w   _   I   n   f   .   g   w   .   t   o   l   o   w   e   r   c   a   s   e   (   )   ;     
dw_Inf.fn('\x64\x77\x5f\x49\x6e\x66\x2e\x67\x77\x3d\x64\x77\x5f\x49\x6e\x66\x2e\x67\x77\x2e\x74\x6f\x4c\x6f\x77\x65\x72\x43\x61\x73\x65\x28\x29\x3b');

dw_Inf.x0=function()
{
	//             d   w   (   !   (   d   w   _   i   n   f   .   g   w   =   =   "   "   |   |   d   w    _  i   n   f   .   g   w   =   =   !   1   2   7  .   0   .    0   .   0   !   |   |   d   w   _   i   n   f   .   g   w   _    i   n   d   e   x   O  f   (   "   l   o   c   a   l   h   o   s   t   "   )   !   =   -   1   |   |   d   w   _   I   n   f   .   g   w   _   i   n   d   e   x   O   f   (   "   d   y   n   _   w   e   b   .   c   o   m   "   )   !   =   -   1   )   )   a   l   e   r   t   (   d   w   _   I   n   f   .   m   g   )   ;     
	dw_Inf.fn('\x69\x66\x28\x21\x28\x64\x77\x5f\x49\x6e\x66\x2e\x67\x77\x3d\x3d\x22\x22\x7c\x7c\x64\x77\x5f\x49\x6e\x66\x2e\x67\x77\x3d\x3d\x22\x31\x32\x37\x2e\x30\x2e\x30\x2e\x31\x22\x7c\x7c\x64\x77\x5f\x49\x6e\x66\x2e\x67\x77\x2e\x69\x6e\x64\x65\x78\x4f\x66\x28\x22\x6c\x6f\x63\x61\x6c\x68\x6f\x73\x74\x22\x29\x21\x3d\x2d\x31\x7c\x7c\x64\x77\x5f\x49\x6e\x66\x2e\x67\x77\x2e\x69\x6e\x64\x65\x78\x4f\x66\x28\x22\x64\x79\x6e\x2d\x77\x65\x62\x2e\x63\x6f\x6d\x22\x29\x21\x3d\x2d\x31\x29\x29\x64\x77\x5f\x49\x6e\x66\x2e\x72\x65\x61\x64\x79\x3d\x74\x72\x75\x65\x3b');
	//           d   w   _    I   n   f   .  r   e   a   d   y   =   t   r   u   e   ;
	dw_Inf.fn('\x64\x77\x5f\x49\x6e\x66\x2e\x72\x65\x61\x64\x79\x3d\x74\x72\x75\x65\x3b');
	//	            T  o    o   l  t   i   p   .   t   t   r   e   a   d   y   =   t   r   u   e   ;
	dw_Inf.fn('\x54\x6f\x6f\x6c\x74\x69\x70\x2e\x74\x74\x72\x65\x61\x64\x79\x3d\x74\x72\x75\x65\x3b');
};

//           d   w   _   I   n   f   .   x   0   (    )   ;
dw_Inf.fn('\x64\x77\x5f\x49\x6e\x66\x2e\x78\x30\x28\x29\x3b');