/*
     IpaScript
     Copyright (c) - Ipanema Software
                     Erwin De Grande
                     http://www.ipanema.de
                     info@ipanema.de
     All rights reserved. Alle Rechte vorbehalten
*/

function LyBoxPrintCaption(Caption)
{   Text="";
     Text+='<p style="font-weight:bold">'+Caption+'</p>';
    return Text;
}

function InfoBoxAn(e,xText,xLeft,xTop,xWidth)
    {   if (xLeft) {xLeft=xLeft;} else {xLeft=20;}
        if (xTop) {xTop=xTop;} else {xTop=0;}
        if (xWidth) {xWidth='width="'+xWidth+'"' } else { xWidth=''}
        var PositionX = 0;
        var PositionY = 0;
        if (!e) var e = window.event;
        if (e.pageX || e.pageY)
        {
                PositionX = e.pageX;
                PositionY = e.pageY-window.pageYOffset;
        }
        else if (e.clientX || e.clientY)
        {
                PositionX = e.clientX + document.body.scrollLeft;
                PositionY = e.clientY + document.body.scrollTop;
        }
        thisLeft=PositionX+xLeft
        thisTop=PositionY+xTop
        document.getElementById("InfoBoxText").innerHTML='<table '+xWidth+' border="0" cellspacing="0" cellpadding="0"><tr><td>'+xText+'</td></tr></table>';
        document.getElementById('InfoBox').style.left = thisLeft+"px";
        document.getElementById('InfoBox').style.top = thisTop+"px";
        document.getElementById('InfoBox').style.display = "block";
    }




function InfoBoxAus()
  {
    document.getElementById('InfoBox').style.display = "none";

  }

function BrowserScroolTop()
  {
		  var scrollPos;
		if (typeof window.pageYOffset != 'undefined') {
		   scrollPos = window.pageYOffset;
		}
		else if (typeof document.compatMode != 'undefined' &&
		     document.compatMode != 'BackCompat') {
		   scrollPos = document.documentElement.scrollTop;
		}
		else if (typeof document.body != 'undefined') {
		   scrollPos = document.body.scrollTop;
		}
		return (scrollPos);
}

function FotoZoomStart()
 {
   zoomWidth = 150;
   zoomAktiv=true;
   FotoZoom();
 }
function FotoZoom()
  {  if(zoomAktiv==false) { return;}
     if (zoomWidth < 401)
       {
         zoomWidth += 10;
         document.getElementById("thisFoto").style.width=zoomWidth+"px";

          window.setTimeout("FotoZoom()",0);
       }
   }

function FotoZoomClose()
{  zoomAktiv=false;
   //document.getElementById('LayerShow').style.width='10px'
   document.getElementById("thisFoto").style.width="156px";
}


function FotoModellAn(FotoName)
 {
    document.getElementById('FotoModelle').style.visibility='visible'
    document.getElementById('Fotosrc').src=FotoName
 }
function FotoModellAus()
 { document.getElementById('Fotosrc').src="images/global/blanc.gif"
   document.getElementById('FotoModelle').style.visibility='hidden'
 }

function OptionValue(objName)
  { for (var i=0; i<objName.length; i++)
      {if (objName[i].checked) { return objName[i].value;  }
      }
      return false
  }

function IsChecked(objName)
{ return objName.checked
}

function toSubmitWarten(AktionValue)
  { toWarten()
    toSubmit(AktionValue)

  }

function ESC()
  {
  }
function LayerAn(obj)
  {
    document.getElementById(obj).style.display='block';
  }
  
  
  function LayerAus(obj)
  {
    document.getElementById(obj).style.display='none';
  }
