var d=document;d.l=d.layers;d.a=d.all;d.g=d.getElementById;ie=(d.a&&!d.opera);mz=d.getElementById;

for(a=0;a<d.links.length;a++) {
  d.links[a].onfocus=d.links[a].blur;
}

function ubn(id,init) {
  var w;
  if(typeof(init)=='undefined')init='block';
  with(d)w=g?g(id):a?a[id]:l[id];w=w.style?w.style:w;if(w.display=='')w.display=init;w.display=='none'?w.display='block':w.display='none';
}

function b(id) {
  var w;
  with(d)w=g?g(id):a?a[id]:l[id];w=w.style?w.style:w;w.display='block';
}

function n(id) {
  var w;with(d)w=g?g(id):a?a[id]:l[id];w=w.style?w.style:w;w.display='none';
}


function exp(id) {
  con(id);
  var h,l;
  h=parseInt(d.g(id).style.height);
  l=d.a?d.body.clientHeight:window.innerHeight;
  if(h*4>l) {
    d.g(id).style.height=l-60+"px";
  } else {
    d.g(id).style.height=h*4+"px";
  }
}

function con(id) {
 var h,l;
 l=60;h=parseInt(d.g(id).style.height);
 if(h/2>l){d.g(id).style.height=h/2+"px"}else{d.g(id).style.height=l+"px"}
}

function chbx_on(id) {
  d.g(id).checked = true;
}

function chbx_off(id) {
  d.g(id).checked = false;
}

function chbx_tgl(id) {
  d.g(id).checked = !d.g(id).checked;
}

function nl2() {
 var uls = document.getElementsByTagName("ul");
 for (i=0;i>uls.length;i++ ) {
  if (uls[i].className=="l2") {
   this.style.display="none";
  }
 }
}

function ukryjzakladki() {
 this.className="h";
 navRoot = document.getElementById("container");
 for (i=0; i<navRoot.childNodes.length; i++) {
  node = navRoot.childNodes[i];
  if (node.className=="z") {
   node.style.display="none";
  }
  else if (node.className=="tab-clicked") {
   node.className="tab-default";
  }
 }
}

function pokaz(id) {
 document.getElementById(id).style.display="block";
}

function pokazZakladke(id,tabId) {
 document.getElementById(id).style.display="block";
 document.getElementById(tabId).className="tab-clicked";
}

var ukryjFiltry = false;
 
function naprawZakladki(formId, tabId) {
 if (document.all && !window.opera) {
  if (typeof tabOffset == 'undefined') tabOffset = 0;
  var f = document.getElementById(formId);
  var z = document.getElementById(tabId);
  f.style.display = 'block';
  z.style.display = 'block';
  z.style.position = 'absolute';
  z.style.left = tabOffset + 'px';
  tabOffset += z.offsetWidth;
  if (ukryjFiltry) f.style.display = 'none';
 }
}

function windowSize() {
 var w=0, h=0;
 if (typeof window.innerWidth == 'number') {
  // Non-IE
  w = window.innerWidth;
  h = window.innerHeight;
 } 
 else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
  // IE 6+ in 'standards compliant mode'
  w = document.documentElement.clientWidth;
  h = document.documentElement.clientHeight;
 } 
 else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
  // IE 4 compatible
  w = document.body.clientWidth;
  h = document.body.clientHeight;
 }
 var o = new Object;
 o.width = w;
 o.height = h;
 return o;
}
