function getElem(divToGet){
    var objToGet = null;
  if (document.getElementById) {
    objToGet = document.getElementById(divToGet);
  } else if (document.all){ 
    objToGet = document.all[divToGet];
  } else if (document.layers) {
    objToGet = document.layers[divToGet].style;
  }
 return(objToGet); 
}		

function hideFla(divToHide){
 var myObject = null;
 myObject = getElem(divToHide);  
		
  if (myObject != null){
    myObject.style.display = "none";
  }
}		

function showFla(divToShow){
 var myObject = null;
 myObject = getElem(divToShow);  
		
  if (myObject != null){
    myObject.style.display = "block";
  }
}

function porownajUrl(nazwa, zapis){ 
	var rozmiar_nazwa = nazwa.length;
	var indeks_nazwa=document.cookie.indexOf(nazwa);
	var wartosc;

	if (indeks_nazwa==-1)   
  		return(false);

	var koniec_cookie=document.cookie.indexOf(";", indeks_nazwa + rozmiar_nazwa);

	if (koniec_cookie==-1)
  		koniec_cookie = document.cookie.length;

	wartosc = document.cookie.substring(indeks_nazwa+rozmiar_nazwa+1,koniec_cookie);

	if (wartosc==zapis) 
		return(true);

	return(false);  
}

function RedirectTo(givenUrl) {
	//alert(givenUrl);
	location.href = givenUrl;
}	

