
function createCookie(name,value,days) 
 {
 if (days) 
  {
  var date = new Date();
  date.setTime(date.getTime()+(days*24*60*60*1000));
  var expires = "; expires="+date.toGMTString();
  }
 else var expires = "";
 document.cookie = name+"="+value+expires+"; path=/";
 }

function readCookie(name) 
 {
 var nameEQ = name + "=";
 var ca = document.cookie.split(';');
 for(var i=0;i < ca.length;i++) 
  {
  var c = ca[i];
  while (c.charAt(0)==' ') c = c.substring(1,c.length);
  if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  }
 return null;
}

function eraseCookie(name) 
 {
 createCookie(name,"",-1);
 }

function gEBI( objId )
 {
 return document.getElementById( objId );
 }

function zmien(ident) { if (gEBI(ident).style.display == "block") {hide(ident)} else {show (ident)};}
function show(ident) { gEBI(ident).style.display = "block";createCookie(ident,'block',7);}
function hide(ident) { gEBI(ident).style.display = "none";createCookie(ident,'none',7);}

function inttostr(n)
 {
 var int = "";
 int = int.concat(parseInt(n));
 return int;
 }

function sprawdz_widocznosc (ident)
 {
 if (readCookie(ident) == "block") 
  {
  show(ident);
  }
 else if (readCookie(ident) == "none")
  {
  hide(ident);
  }
 }

function zmienrozmiary (a,b)
 {
 var dx;
 if (a==0) dx=document.body.clientWidth; else dx=a;
 //gEBI('calosc').style.width = inttostr(dx)+"px";
 //gEBI('calosc1').style.width = inttostr(dx-4)+"px";
 //gEBI('calosc2').style.width = inttostr(dx)+"px";
 //gEBI('calosc3').style.width = inttostr(dx)+"px";
 //gEBI('calosc4').style.width = inttostr(dx)+"px"; 
 //gEBI('stopka_dol1').style.width = inttostr(dx)+"px";
 //gEBI('stopka_dol2').style.width = inttostr(dx)+"px"; 
 //gEBI('srodek_prawy1').style.width = inttostr(dx-184-184)+"px"; 
 //gEBI('srodek_prawy2').style.width = inttostr(dx-184-23-184)+"px"; 
 //gEBI('logo1').style.width = inttostr((dx-229-589)/2)+"px";
 //gEBI('logo2').style.width = inttostr((dx-229-589)/2)+"px";
 }
