/* -----------------------------------------------
   Floating layer - v.1
   (c) 2006 www.haan.net
   contact: jeroen@haan.net
   You may use this script but please leave the credits on top intact.
   Please inform us of any improvements made.
   When usefull we will add your credits.
  ------------------------------------------------ 
*/

function setVisible(obj,visibleflag)
{
    obj_background = document.getElementById(obj+'_background');
    obj = document.getElementById(obj);
    if (visibleflag)
    {
        obj_background.style.visibility = 'visible';
        obj.style.visibility = 'visible';
    } else {
        obj_background.style.visibility = 'hidden';
        obj.style.visibility = 'hidden';
    }
}

function placeIt(obj)
{
    var h, h1, l, w;
    var dd=document;
    var ww=window;
                 
    if( typeof( window.innerWidth ) == 'number' ) { 
        //Non-IE 
        h = window.innerHeight;
        w = window.innerWidth;  
    } else if( document.documentElement && document.documentElement.clientHeight )  { 
        //IE 6+ in 'standards compliant mode' 
        h = document.documentElement.clientHeight; 
        w = document.documentElement.clientWidth;
    } else if( document.body && document.body.clientHeight  ) { 
        //IE 4 compatible 
        h = document.body.clientHeight; 
        w = document.body.clientWidth; 
    }
    
    var mainpage_background = MM_findObj("mainpage_background");
    if (!mainpage_background) {
         var mainlayer_background_w = mainpage_background.style.pixelWidth;
    }
    
    h = h - 20;        
    
    if (fotolayer) { 
//        document.getElementById(obj).style.left = l + "px";
        document.getElementById(obj).style.height = h + "px";
        document.getElementById(obj).style.width = mainlayer_background_w + "px";
    }  
}

window.onscroll = setTimeout("placeIt('fotolayer_background')",500);

