function onl()
{
   showMore();
}

// POPUP
function popup (adr, szer, wys){

      var iH = window.innerHeight;
      var iW = window.innerWidth;

      if (!iH){
         var wh = document.body.clientHeight/2;
      } else {
         var wh = iH/2;
      }

      if (!iW){
         var ww = document.body.clientWidth/2;
      } else {
         var ww = iW/2;
      }
      
      var h = wh - (wys/2);
      var w = ww - (szer/2);

   noweOkno = window.open(adr ,'okno' , 'width='+szer+', height='+wys+', top='+h+', left='+w+', menubar=no, status=no, locationbar=no, scrollbars=yes, resizeable=no');

}

function showMore()
{
   if($('more'))
   {      
      $('showMore').onclick = function()
      {
         $('more').style.display=$('more').style.display=='block'?'none':'block';                    
      }
   }
}

// ajax

function dlaCiebie(id, type) 
{
   advAJAX.get({
      url: "inc/dla_ciebie.php?id="+id+"&type="+type,
      onInitialization : function() {
         document.getElementById('dlaCiebie').innerHTML = '<h1><a title="Dla Ciebie">Dla Ciebie</a></h1><img src="images/loading.gif" alt="" class="loading" /><div class="galNav"><ul><li><a title="" class="aL"></a></li><li><a title="" class="name"></a></li><li><a title="" class="aR"></a></li></ul></div><div class="img"></div>';
      },
      onSuccess : function(obj) {         
         document.getElementById('dlaCiebie').innerHTML = obj.responseText; 
      }
      ,onError : function(obj) { alert("Error: " + obj.status);  }
   });  
}

window.onload=onl;
