function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
} 

function SchowajLogowanie()
{
	document.getElementById('top_logowanie').style.display = "none";
}
function PokazLogowanie()
{
	var div=document.getElementById('top_logowanie');
	if(div.style.display=='none') 
	{
		div.style.display='block';
		document.getElementById('top_logowanie_przypomnij').style.display = "none";
		document.getElementById('top_logowanie_loguj').style.display = "block";	
	}
	else div.style.display='none';		
}

function PokazPrzypomnijHaslo()
{
	var div=document.getElementById('top_logowanie_loguj').style.display='none';
	var div=document.getElementById('top_logowanie_przypomnij').style.display='block';
}


function Gwiazdki_odzaznacz()
{
	var temp;
	for (i=1; i<=5; i++)
	{
		temp='gwiazdka'+i;
		document.getElementById(temp).setAttribute("src","images/gwiazdka_off.jpg");
	}

}

function Gwiazdki_zaznacz(obecny)
{
	var temp;
	var i=0;

	for (i=1;i<=obecny;i++)
	{
		temp='gwiazdka'+i;
		document.getElementById(temp).setAttribute("src","images/gwiazdka_on.jpg");
	}
	for (i=obecny; i<1; i--)
	{
		temp='gwiazdka'+i;
		document.getElementById(temp).setAttribute("src","images/gwiazdka_off.jpg");
	}
}

function SetCookie(cookieName,cookieValue,nDays) 
{
	var today = new Date();
	var expire = new Date();
	if (nDays==null || nDays==0) nDays=1;
	expire.setTime(today.getTime() + 3600000*24*nDays);
	document.cookie = cookieName+"="+escape(cookieValue) + ";  path=/" + ";expires="+expire.toGMTString();
}

function displayWindow(url, width, height) 
{

	var left=(screen.width/2)-width/2;
	if(left<200) left=200;	
	
	var top=(screen.height/2)-height/2;
	if(top<200) top=200;
	
	var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',top=' + top + ',left=' + left + 'resizable=no,scrollbars=no,menubar=no' );
}	

function maskujKlawisze(AEvent, AMaska)
{
	    if (window.Event) {
	        kodKlawisza = AEvent.which;
	    } else {
	        kodKlawisza = AEvent.keyCode;
	    }
	 
	 
	 // 8 - backspace
	 // 13 - enter
	 // 0 klawisze sterujace
	 // 39 , 37 strzalki
    if ( kodKlawisza == 8 || kodKlawisza == 13 || kodKlawisza == 0 ||kodKlawisza == 37 || kodKlawisza == 39)
	{
	        return true;  // Enter
	    };
	 
	    klawisz = String.fromCharCode(kodKlawisza);
	 
	    if (AMaska.indexOf(klawisz) == -1) {
	        return false;
	    } else {
	        return true;
	}
}
	 
