function WyswietlObrazek(link)
{
document.getElementById("obrazek").style.width= '100%';
document.getElementById("wszystko").style.opacity = '0.9';
document.getElementById("wszystko").style.filter = 'alpha(opacity=90)';
document.getElementById("wszystko").style.height = '100%';
document.getElementById("wszystko").style.width = '100%';
Obr(link);
}

function Obr(link)
{
document.getElementById("obrazek").style.visibility= 'visible';
document.getElementById("obrazek").innerHTML = '<table width="100%"><tr><td width="50%" valign="top" align="right"></td><td><table width="100%"><tr><td width="150" valign="bottom" align="left">&nbsp;</td><td align="center">&nbsp;</td><td width="150" align="right" valign="bottom"><div align="right" valign="bottom"><img onmouseover="this.style.cursor=\'pointer\';" onclick="ZamknijObrazek();" src="/images/b_zamknij.png" align="right" style=" margin:0px; padding:0px;"></div></td></tr></table><div id="obrazek_wew" style="padding:4px;margin-top:3px;"><img id="zdjecie" src="'+link+'" height="650" style="padding:3px;"></div></td><td width="50%" align="left" valign="top"></td></tr></table><font size=1 color=white><a href="http://www.stronownia.pl/simple_popup_image" target="_blank" style="color:#ffffff;">Simple Popup Image</a> by Paweł CowecheQ Kołodziej 2009.</font>';
}

function WyswietlPodstrone(src,naglowek)
{
var fnc = 'ZamknijPodstrone();';
document.getElementById("obrazek").style.top= '30px';
document.getElementById("obrazek").style.width= '100%';
document.getElementById("wszystko").style.opacity = '0.90';
document.getElementById("wszystko").style.filter = 'alpha(opacity=90)';
document.getElementById("wszystko").style.height = '100%';
document.getElementById("wszystko").style.width = '100%';
document.getElementById("obrazek").style.visibility= 'visible';
document.getElementById("obrazek").innerHTML = '<table width="100%"><tr><td width="50%" valign="middle" align="right">&nbsp;</td><td><table width="100%"><tr><td width="150" valign="bottom" align="left">&nbsp;</td><td align="center">'+naglowek+'</td><td width="150" align="right" valign="bottom"><div align="right" valign="bottom"><img onmouseover="this.style.cursor=\'pointer\';" onclick="ZamknijObrazek();" src="/styles/kolek/b_zamknij.png" align="right" style=" margin:3px; padding:0px;"></div></td></tr></table><div id="obrazek_wew" style="padding:0px;"><iframe src="'+src+'" width="640" height="480" frameborder="0"></iframe></div></td><td width="50%" align="left" valign="middle">&nbsp;</td></tr></table><font size=1>Simple PopUp System by CowecheQ for Liga f1Sim.pl 2009.</font>';
}

function ZamknijObrazek()
{
document.getElementById("obrazek").style.top= '5px';
window.parent.document.getElementById("wszystko").style.height = '0px';
window.parent.document.getElementById("wszystko").style.width = '0px';
window.parent.document.getElementById("obrazek").style.width= '0px';
window.parent.document.getElementById("obrazek").style.height= '0px';
window.parent.document.getElementById("obrazek").style.visibility= 'hidden';
window.parent.document.getElementById("obrazek").innerHTML = ''; 
}

function ZamknijPodstrone()
{
window.parent.document.getElementById("wszystko").style.height = '0px';
window.parent.document.getElementById("wszystko").style.width = '0px';
window.parent.document.getElementById("obrazek").style.width= '0px';
window.parent.document.getElementById("obrazek").style.height= '0px';
window.parent.document.getElementById("obrazek").style.visibility= 'hidden';
window.parent.document.getElementById("obrazek").innerHTML = ''; 
}


function Stop()
{
clearInterval(inter);
}

function WyswietlGaleria(n,l)
{
document.getElementById("obrazek").style.width= '100%';
document.getElementById("wszystko").style.opacity = '0.9';
document.getElementById("wszystko").style.filter = 'alpha(opacity=90)';
document.getElementById("wszystko").style.height = '100%';
document.getElementById("wszystko").style.width = '100%';
Obr_gal(n,l);
}

function Obr_gal(n,l)
{
var poprzednie;
var nastepne;
var pop;
pop = n-1;
nas = n+1;
if (n>0) poprzednie = '<img onmouseover="this.style.cursor=\'pointer\';this.src=\'/images/b_poprzednie_on.png\';" onmouseout="this.src=\'/images/b_poprzednie_off.png\';" onclick="Obr_gal('+pop+','+l+');" src="/images/b_poprzednie_off.png" align="right" style="float:right; margin-top:300px; padding:0px;">'; 
else poprzednie = '';
if (n<l-1) nastepne = '<img onmouseover="this.style.cursor=\'pointer\';this.src=\'/images/b_nastepne_on.png\';" onmouseout="this.src=\'/images/b_nastepne_off.png\';" onclick="Obr_gal('+nas+','+l+');" src="/images/b_nastepne_off.png" align="left" style=" margin-top:300px; padding:0px;">'; 
else nastepne = '';
document.getElementById("obrazek").style.visibility= 'visible';
document.getElementById("obrazek").innerHTML = '<table width="100%"><tr><td width="50%" valign="top" align="right">'+poprzednie+'</td><td><table width="100%"><tr><td width="150" valign="bottom" align="left">&nbsp;</td><td align="center" style="color:#ffffff;">'+tytul_galerii+'<font size=1>Zdjęcie '+nas+' z '+l+'.</font></td><td width="150" align="right" valign="bottom"><div align="right" valign="bottom"><img onmouseover="this.style.cursor=\'pointer\';" onclick="ZamknijObrazek();" src="/images/b_zamknij.png" align="right" style=" margin:0px; padding:0px;"></div></td></tr></table><div id="obrazek_wew" style="padding:4px;margin-top:3px;"><img id="zdjecie" src="'+zdjecia[n]+'" height="650" style="padding:3px;"></div></td><td width="50%" align="left" valign="top">'+nastepne+'</td></tr></table><font size=1 color=#ffffff><a href="http://www.stronownia.pl/simple_gallery_system" target="_blank" style="color:#ffffff;">Simple Gallery System</a> by CowecheQ for f1Sim.pl 2009.</font>';
}

