/* -----------------------------------------------
   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)
{
	obj = document.getElementById(obj);
	przenies('popup');
	obj.style.visibility = (obj.style.visibility == 'visible') ? 'hidden' : 'visible';
	
}
function przenies(obj)
{
	obj = document.getElementById(obj);
	var theTop = 70;
  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    var theTop = window.pageYOffset + 70;
    theLeft = window.pageXOffset;
  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
    //DOM compliant
    var theTop = document.body.scrollTop + 70;
    theLeft = document.body.scrollLeft;
  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    var theTop = document.documentElement.scrollTop +70;
    theLeft = document.documentElement.scrollLeft;
  }
	var myWidth = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
  }

	
	theLeft = (myWidth - obj.clientWidth)/2;
	obj.style.left = theLeft + 'px' ;
	obj.style.top = theTop + 'px' ;
	setTimeout("przenies('popup')",10);
}
window.onscroll = function() { setTimeout("przenies('popup')",10) };
