    var debug = false;//true;
	var isResizing = 0;   
    var today = new Date();
    var today2 = today;
    var interval = 100;
    var odd = 0;		
   
   function onResize() {
    //eksperyment, resize przestanie sie odpalac 20 razy przy resize..
      odd++;
      if (odd&1 == 1) {
      today = new Date();
      interval = today - today2;
      } else {
      today2 = new Date();
      interval = today2 - today;
      }
      if (interval > 300) {//ms to rozsadny czas chyba
        setTimeout("resize()",1);
        
      }
      return;
    }
   
   
   function windowSize() {
//pobiera wymiary okna [nie uwzglednia scrollBarow]
	var isIE6 = (navigator.userAgent.indexOf("MSIE 6.0") != -1);
	var isIE7 = (navigator.userAgent.indexOf("MSIE 7.0") != -1);
	//alert(navigator.userAgent);
	// jezeli IE to ma zawsze ma scrola
	if (isIE7 || isIE6) {
		//alert(navigator.userAgent);
		;
	}
	else {
	var myWidth = 0, myHeight = 0;
   if( typeof( window.innerWidth ) == 'number' ) {
      //Non-IE
      myWidth = window.innerWidth;
      myHeight = window.innerHeight;
    } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
      //IE 6+ 'standards compliant mode'
      myWidth = document.documentElement.clientWidth;
      myHeight = document.documentElement.clientHeight;
    } else if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
      //IE 4 compatible
      myWidth = document.body.clientWidth;
      myHeight = document.body.clientHeight;
    }
    //return [myWidth,myHeight]; 
   //alert("Width: " + myWidth + "\nHeight: " + myHeight );     
   
   body=document.getElementById('body');

   var iScrollWidth = body.scrollWidth;
   var iOffsetWidth = body.offsetWidth;
   var iScrollHeight = body.scrollHeight;
   var iOffsetHeight = body.offsetHeight;
   //alert("Width: " + iOffsetWidth + "\nContent Width: " + iScrollWidth + "\nHeight: " + iOffsetHeight    + "\nContent Height: " + iScrollHeight); 
   //alert(navigator.userAgent);
   //alert("Wysokosc okna:" + myHeight + "\nWysokosc body: " + iOffsetHeight);     
   marginBox=document.getElementById('marginBox');
   if (myHeight>iOffsetHeight) {
   //marginBox.style.margin='0px';
   }
   else {

   if(navigator.userAgent.indexOf('Opera/9') >= 0 ){	
        marginBox.style.marginLeft=iScrollWidth; // tu jest problem
   }
}

    
}
}

function showGoTop() {
	var myHeight = 0;
	var body;
	var top;
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myHeight = window.innerHeight;
	}
	else if (document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ 'standards compliant mode'
		myHeight = document.documentElement.clientHeight;
    }
	else if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myHeight = document.body.clientHeight;
    }
	
	body=document.getElementById('body');
	var iScrollHeight = body.scrollHeight;
	var iOffsetHeight = body.offsetHeight;
	top=document.getElementById('goTop');
	//alert("Wysokosc okna:" + myHeight + "\nWysokosc body: " + iOffsetHeight);
	if (myHeight>iOffsetHeight) {
		top.style.display="none";
	}
	else {
		top.style.display="block";	
	}
}


function resize()
{
if (isResizing != 1){
        isResizing = 1;
        var tStart, tEnd, tInterval,tInfo;
        tStart = new Date(); 
                
 		showGoTop();
		
        tEnd = new Date();
        tInterval = new Date(tEnd - tStart);
        tInfo = "Resize: " + tInterval.getMinutes() + ":" + tInterval.getSeconds() + ":" + tInterval.getMilliseconds();
        if(debug == true)
        EHaddInfo(tInfo);
        isResizing = 0;
    } 
    else 
    {
        
    }

}