

function ukryjReklamy()
 {
 document.getElementById('Ad_Billboard').style.visibility = 'hidden';
 }

function pokazReklamy()
 {
 document.getElementById('Ad_Billboard').style.visibility = 'visible';
 }

function dodajDoIcoColor(nameobj)
 { 
 var newIco = new Image(); 
 newIco.src="Obrazki/dodaj_do_"+nameobj+"_c.gif";
 document.images[nameobj].src = newIco.src;
 }

function dodajDoIcoNoColor(nameobj)
 {
 var newIco = new Image(); 
 newIco.src="Obrazki/dodaj_do_"+nameobj+"_g.gif";
 document.images[nameobj].src = newIco.src;
 }

function dodajDo()
 {

var a=window;
var b=document;
var c=encodeURIComponent;
var link_wykop="http://www.wykop.pl/dodaj?url="+c(b.location)+"&title="+c(b.title);
var link_blip="http://blip.pl/dashboard?body="+c(b.location)+""+c(b.title);
var link_flaker="http://flaker.pl/add2flaker.php?title="+c(b.title);
var link_facebook="http://www.facebook.com/share.php?u="+c(b.location)+"&t="+c(b.title);
var link_google="http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk="+c(b.location)+"&title="+c(b.title);
var link_sfora="http://www.sfora.pl/Link/Wysforuj/?Link="+c(b.location)+"&Tytul="+c(b.title)+"&Opis="; 
var link_myspace="http://www.myspace.com/Modules/PostTo/Pages/?u="+c(b.location)+"&t="+c(b.title);
var link_spis="http://www.spis.pl/story-add/?url="+c(b.location)+"&title="+c(b.title);
var link_linkologia="http://www.linkologia.pl//link-add/?url="+c(b.location)+"&title="+c(b.title);

 document.write("<p class='linki_footer_dodaj_do' style='margin:0px;text-align:left;'><font style='vertical-align:middle;font-weight:bold;font-size:14px;'>Dodaj do:</font>");
 document.write("<a href='javascript:void(0);' onclick=window.open('"+link_wykop+"'); onmouseover=dodajDoIcoColor('wykop'); onmouseout=dodajDoIcoNoColor('wykop');><img name='wykop' src='Obrazki/dodaj_do_wykop_g.gif' style='vertical-align:middle;border:0px;margin-left:15px;'> Wykop.pl</a>");
 document.write("<a href='javascript:void(0);' onclick=window.open('"+link_blip+"'); onmouseover=dodajDoIcoColor('blip'); onmouseout=dodajDoIcoNoColor('blip');><img name='blip' src='Obrazki/dodaj_do_blip_g.gif' style='vertical-align:middle;border:0px;margin-left:15px;'> Bllip.pl</a>");
 document.write("<a href='javascript:void(0);' onclick=window.open('"+link_flaker+"'); onmouseover=dodajDoIcoColor('flaker'); onmouseout=dodajDoIcoNoColor('flaker');><img name='flaker' src='Obrazki/dodaj_do_flaker_g.gif' style='vertical-align:middle;border:0px;margin-left:15px;'> Flaker.pl</a>");
 document.write("<a href='javascript:void(0);' onclick=window.open('"+link_facebook+"'); onmouseover=dodajDoIcoColor('facebook'); onmouseout=dodajDoIcoNoColor('facebook');><img name='facebook' src='Obrazki/dodaj_do_facebook_g.gif' style='vertical-align:middle;border:0px;margin-left:15px;'> Facebook.pl</a>");
 document.write("<a href='javascript:void(0);' onclick=window.open('"+link_sfora+"'); onmouseover=dodajDoIcoColor('sfora'); onmouseout=dodajDoIcoNoColor('sfora');><img name='sfora' src='Obrazki/dodaj_do_sfora_g.gif' style='vertical-align:middle;border:0px;margin-left:15px;'> Sfora.pl</a>");
 document.write("<a href='javascript:void(0);' onclick=window.open('"+link_linkologia+"'); onmouseover=dodajDoIcoColor('linkologia'); onmouseout=dodajDoIcoNoColor('linkologia');><img name='linkologia' src='Obrazki/dodaj_do_linkologia_g.gif' style='vertical-align:middle;border:0px;margin-left:15px;'> Linkologia.pl</a>");
 document.write("<a href='javascript:void(0);' onclick=window.open('"+link_myspace+"'); onmouseover=dodajDoIcoColor('myspace'); onmouseout=dodajDoIcoNoColor('myspace');><img name='myspace' src='Obrazki/dodaj_do_myspace_g.gif' style='vertical-align:middle;border:0px;margin-left:15px;'> MySpace.com</a>");
 document.write("<a href='javascript:void(0);' onclick=window.open('"+link_google+"'); onmouseover=dodajDoIcoColor('google'); onmouseout=dodajDoIcoNoColor('google');><img name='google' src='Obrazki/dodaj_do_google_g.gif' style='vertical-align:middle;border:0px;margin-left:15px;'> Google Bookmarks</a>");
 document.write("</p>");
 }

function sesionTimeStarts(DoKoncaSesji)
 {
var SecDoKoncaSesji = parseInt(DoKoncaSesji);
var newSecDoKoncaSesji = SecDoKoncaSesji-1;
godzin = Math.floor(DoKoncaSesji/3600);
godzin_txt = "0"+godzin;

minut = Math.floor((SecDoKoncaSesji-(godzin*3600))/60);
if(minut>=10)
 minut_txt = minut;
else
 minut_txt = "0"+minut

sekund = Math.floor(SecDoKoncaSesji-(godzin*3600)-(minut*60));
if(sekund>=10)
 sekund_txt = sekund;
else
 sekund_txt = "0"+sekund

if(minut>=30)
 color="#86BC27;";
if(minut<30 && minut>=10)
 color="#F47A00;";
if(minut<10)
 color="#CB010C;";

if(newSecDoKoncaSesji>=300)
 komunikat_czasu="<p style='margin:2px 10px 2px;'>Do końca sesji pozostało: <font style='color:"+color+"'><b>"+godzin_txt+":"+minut_txt+":"+sekund_txt+"</b></font></p>";
else
 komunikat_czasu="<p style='margin:2px 10px 2px;'>Do końca sesji pozostało: <font style='color:"+color+"'><b><blink>"+godzin_txt+":"+minut_txt+":"+sekund_txt+"</blink></b></font></p>";

document.getElementById('DivDoKoncaSesji').innerHTML=komunikat_czasu;
document.getElementById('DivDoKoncaSesji_informator').innerHTML=komunikat_czasu;

if(newSecDoKoncaSesji==0)
 document.location="http://www.zdjecia-z-wakacji.pl/Inlogout.html";

if(newSecDoKoncaSesji==300)
 {
 scroll(0,0);
 document.getElementById('Info_end_sesjon_1').style.display='block';
 document.getElementById('Info_end_sesjon_2').style.display='block';
 }

if(newSecDoKoncaSesji>0)
 setTimeout("sesionTimeStarts('"+newSecDoKoncaSesji+"')",1000);
 }

function isLoged()
 {
 var num=0;
 var Backlen=history.length;
 o=0-Backlen+1;
cofnij(o);
 }


function cofnij(o_ile)
 {alert(o_ile);
 history.go(o_ile);
 }



function poczta_zaznacz(id)
{
var do_dodania_id = id+",";
var wartosc = document.poczta.zaznaczenie.value;

if(wartosc.indexOf(do_dodania_id,0)==-1)
 document.poczta.zaznaczenie.value+=do_dodania_id;
else
 {
 str=document.poczta.zaznaczenie.value;
 str2=str.replace(do_dodania_id,"");
 document.poczta.zaznaczenie.value=str2;
 }
}

function pokaz_odpowiedzi(id)
 {
 document.getElementById('div_info_odp_'+id).className='ukryty';
 document.getElementById('div_form_odp_na_koment_'+id).className='ukryty';
 document.getElementById('div_odp_na_koment_'+id).className='widoczny';
 document.getElementById('div_info_2_odp_'+id).className='widoczny';
 }

function ukryj_odpowiedzi(id)
 {
 document.getElementById('div_form_odp_na_koment_'+id).className='ukryty';
 document.getElementById('div_odp_na_koment_'+id).className='ukryty';
 document.getElementById('div_info_odp_'+id).className='widoczny';
 document.getElementById('div_info_2_odp_'+id).className='ukryty';
 }

function pokaz_form_odp_na_koment(id)
 {
 if(document.getElementById('div_form_odp_na_koment_'+id).className=='ukryty')
  {
  document.getElementById('div_odp_na_koment_'+id).className='ukryty';
  document.getElementById('div_info_odp_'+id).className='ukryty';
  document.getElementById('div_form_odp_na_koment_'+id).className='widoczny';
  document.getElementById('div_info_2_odp_'+id).className='ukryty';
  }
 else
  {
  document.getElementById('div_odp_na_koment_'+id).className='ukryty';
  document.getElementById('div_form_odp_na_koment_'+id).className='ukryty';
  document.getElementById('div_info_odp_'+id).className='widoczny';
  document.getElementById('div_info_2_odp_'+id).className='ukryty';
  }
 }



