function GetObject(jaki){
  if (!document.layers&&!document.all){
    if (document.getElementById) {
      return (document.getElementById(jaki));
    }
  }
  if (document.all) {
    return (document.all[jaki]);
  }
  if (document.layers) {
     return (document.layers[jaki]);
  }
  return (jaki);
}

function zm_nod(kto,div_show_n) {
  kto.blur();
  div_show=document.getElementById(div_show_n);
 //
  if (kto.className=="pocz")
     return false;
  pr=kto.parentNode;
  divs=pr.parentNode.getElementsByTagName('div');
  divs_l=divs.length;
  while(divs_l--)
   if( divs[divs_l].style.visibility=='visible' || (divs[divs_l].style.visibility=='' && divs[divs_l].className=='strona_1')){
     div_show.style.visibility='visible';
     divs[divs_l].style.visibility='hidden';
     break;
   }
  if(div_show.style.visibility!='visible'){
  forms=pr.parentNode.getElementsByTagName('form');
  forms_l=forms.length;
  while(forms_l--)
   if( forms[forms_l].style.visibility=='visible' || (forms[forms_l].style.visibility=='' && forms[forms_l].className=='strona_1')){
     div_show.style.visibility='visible';
     forms[forms_l].style.visibility='hidden';
     break;
   }
  }


  //imgs=pr.getElementsByTagName('i');
  //btts=pr.getElementsByTagName('button');
  //alert(btts[1].className);
  pr_nodes=pr.childNodes.length;
  while (pr_nodes--){
    tmp=pr.childNodes[pr_nodes].tagName+'A';
    tmp=tmp.toLowerCase();
    if(tmp=='ia'){
     switch(pr.childNodes[pr_nodes].className){
     case 'p-sz':
     case 'p-bl':
      pr.childNodes[pr_nodes].className='p-sz';
     break;
     case 'sz-k':
     case 'bl-k':
      pr.childNodes[pr_nodes].className='sz-k';
     break;
     default:
       pr.childNodes[pr_nodes].className='sz-sz';
     }
    }else if(tmp=='buttona' || tmp=='aa')
     pr.childNodes[pr_nodes].className='';
  }
  kto.className="pocz";
  var p= new Object;
  var n= new Object;
  p=kto.previousSibling;
  if(p==pr.firstChild)
    p.className='p-bl';
  else
    p.className='sz-bl';
  n=kto.nextSibling;
  if(n==pr.lastChild)
    n.className='bl-k';
  else
    n.className='bl-sz';
/**/
}

google_ad_client = "pub-2723831730891480";
google_ad_channel ="8275601239";
/*
google_ad_width = 125;
google_ad_height = 140;
google_ad_format = "125x125_as";
google_ad_type = "text";
//2006-10-11: meteor.turystyka

google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "A8DBEC";
google_color_text = "4D4D4D";
google_color_url = "EAC4C7";
*/
//


/*
function daj_tlo_googlom(){
//r_g=document.getElementById('reklamy google');
//iframe=r_g.getElementsByTagName('iframe');//frames
//alert(iframe.childNodes.length);

iframe=frames['google_ads_frame'];
//html=iframe.document.childNodes;
alert(iframe.document.styleSheets.length);
//document.i
//google_ads_frame
}

<script type="text/javascript">
setTimeout("daj_tlo_googlom();",1000);
</script>
*/

function r_cl(e,href){
    window.open(href,"odg","");
}
function ff(){
  return false;
}
//RAMKA

function tr_onclick(e,href){

}
/* //function ramka(div_id){

//    div=document.getElementById(div_id);
    tr=div.getElementsByTagName('TR');
    len=tr.length-2;
    for(i=2;i<len;i++){
       a=tr[i].getElementsByTagName('A');
       a[0].onclick=function(e){return false}
       a[0].href="#";
       a[0].removeAttribute('href');
       if(a.length>1){
       a[1].onclick=function(e){return false}
       a[1].href="#";
       a[1].removeAttribute('href');
       }
    //   alert(a[0].getAttribute('href'));
       td=tr[i].getElementsByTagName('TD');
       td[1].onclick=function(e){
                a=this.getElementsByTagName('A');
                o_id=a[0].getAttribute('id');
                newwindow=window.open('szczegoly.php?jezyk='+jezyk, "odg", "");
                if (!newwindow.opener) newwindow.opener = self;
       }
       td[1].onmouseover=function(e){this.style.cursor="pointer"}
       tr[i].onmouseover=function(e){this.style.backgroundColor="#e9e9d1";}
       if(i%2)
         tr[i].onmouseout=function(e){this.style.backgroundColor="white";}
       else
         tr[i].onmouseout=function(e){this.style.backgroundColor="#f8f8f1";}
    }
}
*/

function p_miasta(e){
  a=document.getElementById('lista-planow-miast');
  txt=this.innerHTML;
  txt=txt.substr(8);
  if(a.style.display=='none'||a.style.display==''){
    this.innerHTML="<b>-</b> "+txt;
    a.style.display='block';
  }else{
    this.innerHTML="<b>+</b> "+txt;
    a.style.display='none';
  }
  this.blur();
}


//---------------------
function wezReklame(czas){
  a=GetObject("reklamy1");
  if (a) {
  makeRequest('reklama_curl.php?fake=fake',function(text){
    a.innerHTML=''+text+'';
    document.getElementById('reklamy1').style.display="block";
  });
  setTimeout("wezReklame(20)",czas*1000);
}
}
