
/**
  * winOpen:			Erstellt ein Popup 'ohne' Scrollbalken
  *
  * @param      url		URL die geöffnet werden soll
  * @param      name	Name des Popups
  * @param      breite	Breite des Popups
  * @param      hoehe	Höhe des Popups
  */
function winOpen(url, name, breite, hoehe) {
	links = (screen.width/2)-(breite/2);
	oben = (screen.height/2)-(hoehe/2);
	window.open(url, name,"height="+hoehe+",width="+breite+",status = no,toolbar = no,menubar = no,location = no,resizable = no,titlebar = no,scrollbars = no,fullscreen = no,top ="+oben+",left ="+links);
}


/**
  * winOpenScroll:		Erstellt ein Popup 'mit' Scrollbalken
  *
  * @param      url		URL die geöffnet werden soll
  * @param      name	Name des Popups
  * @param      breite	Breite des Popups
  * @param      hoehe	Höhe des Popups
  */
function winOpenScroll(url, name, breite, hoehe) {
	links = (screen.width/2)-(breite/2);
	oben = (screen.height/2)-(hoehe/2);
	window.open(url, name,"height="+hoehe+",width="+breite+",status = no,toolbar = no,menubar = no,location = no,resizable = no,titlebar = no,scrollbars = yes,fullscreen = no,top ="+oben+",left ="+links);
}


/**
  * findObj:			Findet ein Objekt mit dem gegebenen Namen
  *
  * @param      theObj	Name des zu suchenden Objekts	
  */
function findObj(theObj, theDoc){
	  var p, i, foundObj;
	
	  if(!theDoc) theDoc = document;
	
	  if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
	  {
		theDoc = parent.frames[theObj.substring(p+1)].document;
		theObj = theObj.substring(0,p);
	  }
	
	  if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
	
	  for (i=0; !foundObj && i < theDoc.forms.length; i++) 
		foundObj = theDoc.forms[i][theObj];
	
	  for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
		foundObj = findObj(theObj,theDoc.layers[i].document);
	
	  if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
	
	  return foundObj;
	}


/**
  * ToolTip:			Funktionen zum anzeigen eines ToolTips
  *
  */
  tooltip = null;
  descO = null;
  document.onmousemove = updateTooltip;

  function updateTooltip(e) {
	try {
      x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
      y = (document.all) ? window.event.y + document.body.scrollTop : e.pageY;
      if (tooltip != null) {
		  if(descO != 'img'){
          	tooltip.style.left = (x -290) + "px";
			tooltip.style.top = (y) + "px";
		  }else{
			tooltip.style.left = (x -450) + "px";
			tooltip.style.top = (y - 380) + "px";
			tooltip.style.width = 440 + "px";
		  }
            
      }
    } catch (error) { error=null; }
  }
  function showTooltip(id, name, desc) {
    try {		  	
		writeContent(name, desc);			
		descO = desc;
		tooltip = document.getElementById(id);
	    tooltip.style.display = "block";		
    } catch (error) { error=null; } 
  }

var writeContent = function (name, desc){
	document.getElementById('tooltip_head').innerHTML = name;
	if(desc != 'img'){	
	    document.getElementById('tooltip_content').innerHTML = desc;	
	   }else{
		document.getElementById('tooltip_content').innerHTML =	'<img src="/backend/tpl/help/images/screens/table.jpg" border="0" alt="" /> ';  
	   }
}

  function hideTooltip() {
    try {
      tooltip.style.display = "none";
    } catch (error) { error=null; } 
  }