<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

var myWin=null;
function openWin(myURL,x,y)
{
  if (myWin!=null) if (myWin.closed);
  myWin = window.open(myURL,"window","statusbar=0,menubar=0,location=0,scrollbars=1,width="+x+",height="+y);
  // return myWin;
}

function showImage(url,x,y)
{
  if (myWin!=null) if (myWin.closed);
  if (!x) x=300; if (!y) y=200;
  myWin = window.open("/projects/imageWin.php?img="+url,"window","statusbar=0,menubar=0,location=0,scrollbars=1,resizable=1,width="+x+",height="+y);
  // return myWin;
}

var isDOM  = (document.getElementById) ? true : false;
var isFIRE = (navigator.userAgent.indexOf("Firefox") != -1);
var isNS4  = (document.layers) ? true : false;
var isIE   = (document.all) ? true : false;
var isIE4  = isIE && !isDOM;
var isMac  = (navigator.appVersion.indexOf("Mac") != -1);
var isIE4M = isIE4 && isMac;
var isMenu = (isDOM || isNS4 || (isIE4 && !isIE4M));
var browserString = isNS4 ? "NS4" : isDOM ? "DOM" : "IE4";
var eventX, eventY;
var timerID = null;
var helpObj = null;
var myEvent = new Array();
var test = true;

if (isNS4)        { self.captureEvents(Event.MOUSEMOVE); self.onmousemove=move; }
function move(e)  { self.routeEvent(e); myEvent['clientX'] = e.pageX; myEvent['clientY'] = e.pageY; }
document.onmousemove = moveIE;
function moveIE(event)        
{ 
  if (isIE) {
    myEvent['eventX'] = window.event.clientX; 
    myEvent['eventY'] = window.event.clientY; 
  } else {
    myEvent['eventX'] = event.pageX; 
    myEvent['eventY'] = event.pageY; 
  } 
  return true;
}
function tips(text,win)   { if (!isFIRE){myEvent['clientX']=window.event.clientX;myEvent['clientY']=window.event.clientY;}else{myEvent['clientX']=myEvent['eventX'];myEvent['clientY']=myEvent['eventY']}timerID=setTimeout("chkObject('"+text+"',300,'"+win+"')",500);}
function tipp2(text,x)    { if (!isFIRE){myEvent['clientX']=window.event.clientX;myEvent['clientY']=window.event.clientY;}else{myEvent['clientX']=myEvent['eventX'];myEvent['clientY']=myEvent['eventY']}tipp(text,x,0); }
var wndHandle = 0;

function chkObject(text,x,win)
{
  if (timerID != null) tipp(text,x,win);
  timerID = null;
}
function tipp(text,x,win)
{
  var extraSpace = 20;
  if (text == "") return true;
  
  if (!isFIRE) {
    if (!myEvent['clientX'] || myEvent['clientX']<0) myEvent['clientX'] = window.event.clientX;
    if (!myEvent['clientY'] || myEvent['clientY']<0) myEvent['clientY'] = window.event.clientY;
  } else {
    if (!myEvent['clientX'] || myEvent['clientX']<0) myEvent['clientX'] = myEvent['eventX'];
    if (!myEvent['clientY'] || myEvent['clientY']<0) myEvent['clientY'] = myEvent['eventY'];
  }

  if (isNS4) {
    if(navigator.appVersion.substring(0,1) > "3") {
      if (window.name != "0") {
        text="<div class=\"tipp\">"+text+"</div>"
        document.Tip.document.open();
        document.Tip.document.write(text);
        document.Tip.document.close();

        document.Tip.bgColor = "fffff0";
        document.Tip.left = myEvent['clientX'] - document.Tip.clip.right/2;
        document.Tip.top  = myEvent['clientY'] - document.Tip.clip.bottom - 15;
        document.Tip.visibility="visible";
      }
    }
    return true;
  } 
  
  if (isIE) {
    if(navigator.appVersion.substring(0,1) > "3") {
      
      if (window.name != "0" && win) {
        var myLeft=0, myTop=0;
        var myHeight=50;
        x += 100;
        
        myLeft  = myEvent['clientX'] - x/2 - 2*extraSpace;
        myTop   = myEvent['clientY'] - 50;
        //if ((parseInt(myLeft) + x) > document.body.clientWidth) myLeft = document.body.clientWidth - x - extraSpace;
        // wndHandle = window.open("/b2b/dummy.html","Hilfe","menubar=0,statusbar=0,scrollbars=1,location=0,directories=0,toolbar=0,titlebar=0,width="+x+",height="+myHeight+",top="+myTop+",left="+myLeft);

        domain = document.location.protocol+"//"+document.location.host;
        wndHandle = window.open("","Hilfe","menubar=0,statusbar=0,scrollbars=1,location=0,directories=0,toolbar=0,titlebar=0,width="+x+",height="+myHeight+",top="+myTop+",left="+myLeft);
        wndHandle.document.open();
        wndHandle.document.writeln("<html>");
        
        wndHandle.document.writeln("<script language=\"javascript\">");
        wndHandle.document.writeln("function checkSize()");
        wndHandle.document.writeln("{ y = document.body.scrollHeight-"+myHeight+"; if (y>0) {window.moveBy(0,-y); window.resizeBy(0,y);}} ");
        wndHandle.document.writeln("</script>");
        
        wndHandle.document.writeln("<style type='text/css'>body,td{background-color:#FAFAFA;border-right:none;border-left:none;border-top:none;border-bottom:none;margin:5px;font-family:arial,helvetica;font-size:10px;}</style>");
        wndHandle.document.writeln("<body bgcolor='#FAFAFA' onLoad='checkSize()'>");
        wndHandle.document.writeln("<table cellPadding=0 cellSpacing=0 border=0><tr><td>"+text+"</td></tr></table>");
        wndHandle.document.writeln("</body>");
        wndHandle.document.writeln("</html>");
        wndHandle.document.close();
        return;
      }  
      
      if (window.name != "0") {
        document.all.Tip.innerHTML=text;
        if(navigator.appVersion.substring(22,23)==5)
          if (!obj || obj == null || obj == undefined) return;
          obj = document.all.Tip;
          obj.style.width = x;
          obj.style.left  = myEvent['clientX'] + document.body.scrollLeft - (obj.offsetWidth-40);
          obj.style.top   = myEvent['clientY'] + document.body.scrollTop - (obj.offsetHeight+extraSpace);
          obj.style.top   = parseInt(obj.style.top) <= 0 ? '10px':obj.style.top;
          if ((parseInt(obj.style.left) + parseInt(obj.style.width)) > document.body.clientWidth) obj.style.left = document.body.clientWidth - x - extraSpace;
          obj.style.visibility = "visible";
      }
    }
    return true;
  } 
  
  if (browserString == "DOM") {
    obj = document.getElementById("Tip");
    if (!obj || obj == null || obj == undefined) return;
    if (obj.style.visibility == "visible") return true;
    obj.innerHTML   = text;
    var WindowLeftEdge = (isIE) ? document.body.scrollLeft   : window.pageXOffset;
    var WindowTopEdge  = (isIE) ? document.body.scrollTop    : window.pageYOffset;
    var WindowWidth    = (isIE) ? document.body.clientWidth  : window.innerWidth;
    var WindowHeight   = (isIE) ? document.body.clientHeight : window.innerHeight;
    var WindowRightEdge  = (WindowLeftEdge + WindowWidth) - extraSpace;
    var WindowBottomEdge = (WindowTopEdge + WindowHeight) - extraSpace;    
  
    obj.style.left  = (myEvent['eventX'] + WindowLeftEdge - obj.offsetWidth) + "px";
    obj.style.top   = (myEvent['eventY'] + WindowTopEdge  - obj.offsetHeight);
    obj.style.top   = (obj.style.top <= 0 ? '10px':obj.style.top) + "px";
    obj.style.visibility =  "visible";  
    return true;
  }
  
}

function ende() 
{ 
  if (timerID) { clearTimeout(timerID); timerID = null; }
  myEvent['clientX'] = -1; myEvent['clientY'] = -1;
  if (isNS4) { if(navigator.appVersion.substring(0,1) > "3") { document.Tip.visibility = "hidden"; return; } }
  if (isIE) { 
    if (wndHandle) { wndHandle.close(); wndHandle = 0; }
    if(navigator.appVersion.substring(0,1) > "3") { document.all.Tip.style.visibility = "hidden"; return; }
  }
  if (browserString == "DOM") { document.onmousemove = ""; obj = document.getElementById("Tip"); obj.style.visibility = "hidden"; return; }  
}

function setPointer(theRow,thePointerColor,cells)
{
  if (!cells) cells=0;
  // if (thePointerColor == '' || typeof(theRow.style) == 'undefined') return false;
  if (typeof(theRow.style) == 'undefined') return false;
  if (typeof(document.getElementsByTagName) != 'undefined') {
    var theCells = theRow.getElementsByTagName('td');
  } else if (typeof(theRow.cells) != 'undefined') {
    var theCells = theRow.cells;
  } else {
    return false;
  }

  var rowCellsCnt  = theCells.length;
  for (var c = 0; c < rowCellsCnt-cells; c++) {
    theCells[c].style.backgroundColor = thePointerColor;
    theCells[c].style.cursor = "hand";
  }

  return true;
}

function getElById(idVal) 
{
  if (document.getElementById != null) {
    /*
    try { obj = document.getElementById(idVal); }
    catch (e) { alert("upps"); return null; }
    */
    obj = document.getElementById(idVal);
    return obj;
  }
  
  if (document.all != null) {
    /*
    try { obj = document.all[idVal]; }
    catch (e) { alert("upps"); return null; }
    */
    obj = document.all[idVal];
    return obj;
  }  
  
  alert("Problem getting element by id")
  return null
}

var printWin = 0;
function openPrint(url)
{
  self.print();
  return;
  if (printWin) printWin.close();
  if (url.indexOf("?") == -1) url += "?";
  printWin = window.open(url+"&print=1","print","scrollbars=1,menubar=0,statusbar=0,width=620,height=400");
  printWin.focus();
}

function go2URL(obj)
{
  if (obj.options[obj.selectedIndex].value == "") {
    obj.selectedIndex = 0;
    return;
  }
  window.location.href = obj.options[obj.selectedIndex].value;
}
//-->

