    function placeFooter(){
/* this function puts the common footer at bottom of the page
   it is used in body.onLoad() body.onResize()

   Igor Chemnitz June 2006
   many thanks to www.quirksmode.org
*/

    var x,y;
    if (self.innerHeight) // all except Explorer
    {
        x = self.innerWidth;
        y = self.innerHeight;
    }
    else if (document.documentElement && document.documentElement.clientHeight)
        // Explorer 6 Strict Mode
    {
        x = document.documentElement.clientWidth;
        y = document.documentElement.clientHeight;
    }
    else if (document.body) // other Explorers
    {
        x = document.body.clientWidth;
        y = document.body.clientHeight;
    }

        var mainHeight= document.getElementById('main').offsetHeight;
        /*var mainHeight= y-109;*/

        var footerTop, footerHeight;
        footerHeight=document.getElementById('footer').offsetHeight;

        footerTop=y-footerHeight;
        if(footerTop < mainHeight) footerTop=mainHeight;
        document.getElementById('footer').style.position='absolute';
        document.getElementById('footer').style.top=footerTop;
        // for debugging:
       //window.status= 'footerTop:'+footerTop+'  mainheight:'+mainHeight+ '   y:'+y+'  footerHeight:'+footerHeight;
    }

/* Stanley Sy August 11, 2006
   Added the following for show/hide (collapse/expand) functionality
*/
    var imgPath="/spl/lsot/layout/img";
    var openImg = new Image();
    openImg.src = imgPath+"/zu.gif";
    var closeImg = new Image();
    closeImg.src = imgPath+"/auf.gif";

 
 	/* This function expands/collapses a table */
	/* Steffen Grimm April, 17th 2007
 	/* Updated version: table now works also with */
 	/* <colgroup> and comboboxes */
 	/* IMPORTANT: Correct naming of swapimage, tbody and comboboxes!*/
    function expandTable(branch){
        var obj = document.getElementById(branch);
        
        if (obj != null)
        {
	        var combolist = document.getElementsByName(branch+'_combo')
	        
	        if(obj.style.display=="none")
	        {
	            /* Show table*/
	            obj.style.display="";
	            /* Show explicitly all comboboxes -> workarround for IE*/
	            for (i=0;i<combolist.length;i++)
	        	{
	        		combolist[i].style.display="";
	        	}
		    }
	        else
	        {
	            obj.style.display="none";
	            for (i=0;i<combolist.length;i++)
	        	{
	        		combolist[i].style.display="none";
	        	}
	        }
	        swapIcon(branch+'_img');
	    }
	    
	    placeFooter(); // moves down footer
    }

    function swapIcon(img){
        /*This function swaps the icon depending on the action being performed in
        the table/tree, whether expand or collapse.*/
        objImg = document.getElementById(img);
        if (objImg)
        {
	        if(objImg.src.indexOf(closeImg.src)>-1)
	            objImg.src = openImg.src;
	        else
	            objImg.src = closeImg.src;
		}
    }

    function popupWindow(url,title){
        var w = window.open(url, title, 'left=0,top=0,height=300,width=383,resizable=yes,scrollbars=1');
        w.focus();
    }

    /**Igor Chemnitz, Oct 2006
      This function does intentionally nothing.
      But it is included and executed in "page_base.jsp".
      If a page wants to show a popup message after load,
      for example "Storno was successfull",
      this jsp must define a JS function  "afterLoad()"
      which will overwrite the one below.
      The page_base makes sure, that the popup will pop up,
      after the whole page is already displayed.
    */
    function afterLoad(){
        ;
    }
