/* -------------------------------------------------------
 :: kwadrat.js 1.0 :: e4u functions set
                                                            
-------------------------[ (c)2010 marek@activestie.pl ]--- */

function alertSize() 
{
  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+ in '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 myHeight;
}
function getScrollXY() 
{
      var scrOfX = 0, scrOfY = 0;
      if( typeof( window.pageYOffset ) == 'number' ) {
        //Netscape compliant
        scrOfY = window.pageYOffset;
        scrOfX = window.pageXOffset;
      } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
        //DOM compliant
        scrOfY = document.body.scrollTop;
        scrOfX = document.body.scrollLeft;
      } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
        //IE6 standards compliant mode
        scrOfY = document.documentElement.scrollTop;
        scrOfX = document.documentElement.scrollLeft;
      }
      return [ scrOfX, scrOfY ];
}

function SetSize()
{
    var myHeight = alertSize();
    if(myHeight>721)
    {
                     
            var html = '<div id="logo"><a href="http://www.activesite.pl/podkwadratem/"><img src="repository/thumbnails/logo.14102.250x150.png" border="0"/></a></div><img src="img/strona_startowa_mp3_04.jpg" width="271" height="150" alt="logo-text" id="header-text">';
            document.getElementById('header').innerHTML=html;
            document.getElementById('header').style.height = '150px';
            var px = 540;
            document.getElementById('left-image').style.height = px +'px';
            document.getElementById('left-column').style.height = px +'px'; 
            document.getElementById('right-column').style.height = px +'px'; 
            var px = 490; 
            document.getElementById('inner-wrapper').style.height = px +'px'; 
            document.getElementById('title').style.top = '193px';   
        

    }
    else 
    {
       var html = '<div id="logo"><a href="http://www.activesite.pl/podkwadratem/"><img src="repository/thumbnails/logo.14102.250x100.png" border="0"/></a></div><img src="img/strona_startowa_mp3_04.jpg" width="271" height="100" alt="logo-text" id="header-text">';          
        document.getElementById('header').style.height = '100px';
        document.getElementById('header').innerHTML=html;
        //document.getElementById('id-body').style.backgroundImage = 'url("img/bgd2.gif")';         
          var myHeight = alertSize();
          var height = 671-parseFloat(myHeight);
          if(height>0)
          {
            height = parseFloat(height) + 2 ;
            var px = 540 - parseFloat(height);  
            document.getElementById('left-image').style.height = px +'px';
            document.getElementById('left-column').style.height = px +'px'; 
            document.getElementById('right-column').style.height = px +'px'; 
            var px = 490 - height; 
            document.getElementById('inner-wrapper').style.height = px +'px'; 
            document.getElementById('title').style.top = '143px';   
           
          }
    }
}
document.observe('dom:loaded', function () { new SetSize(); });
window.onresize = SetSize;  
