function on_load()
{
/*
var o_w=document.getElementById("oferta_wczytuje");
var o_t=document.getElementById("oferta_tresc");

if( o_w )
{
  o_w.style.visibility="hidden";
  o_t.style.visibility="visible";
}
*/
    if (document.layers)
        document.getElementById("pasek_klosow").style.height= document.layers["main_window"].document.height+"px";
    else if (document.all)
        document.getElementById("pasek_klosow").style.height= document.all["main_window"].offsetHeight+"px";


//wczytanie w tle obrazkow duzych


return true;
}

function hide_img()
{
var fruwacz=document.getElementById("fruwacz");

fruwacz.style.visibility="hidden";

return true;
}

function show_img(event, img_name)
{
var fruwacz=document.getElementById("fruwacz");
var innerHeight, innerWidth, kursorX, kursorY,optX, optY;
var img_o=document.getElementById("fruwacz_img");
var img_n=document.createElement('img');

img_n.setAttribute("id", "fruwacz_img");
img_n.setAttribute("src", img_name);
fruwacz.replaceChild(img_n, img_o);

fruwacz.style.visibility="visible";

//ustalenie w zalezności od przegladarki pozycji kursora w stos. do dokumentu
if( event.pageY )
{
  kursorY=event.pageY;
  kursorX=event.pageX;
  innerWidth = self.innerWidth;
  innerHeight = self.innerHeight;
}
else if( document.body.scrollTop )
{
  kursorY=document.body.scrollTop + event.clientY;
  kursorX=document.body.scrollLeft + event.clientX ;
  innerWidth = document.body.clientWidth;
  innerHeight = document.body.clientHeight;
}
else
{
  kursorY=document.documentElement.scrollTop + event.clientY;
  kursorX=document.documentElement.scrollLeft + event.clientX;
  innerWidth = document.documentElement.clientWidth;
  innerHeight = document.documentElement.clientHeight;
}
//ustalenie pozycji okna (jak za połową okna, to rysuj po przeciwnej stronie)
  if( event.clientY > innerHeight/2 ) optY=-150; else optY=0;
  if( event.clientX > innerWidth/2 ) optX=-242; else optX=50;

fruwacz.style.top= kursorY + optY + "px";
fruwacz.style.left= kursorX + optX + "px";

return true;
}


function popup(mylink, windowname, xsize, ysize)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, "width="+xsize+",height="+ysize+",left=100,top=10,scrollbars=yes,resizable=yes,status=no,toolbar=no,menubar=no,location=no");
return false;
}


