<!--
function checkKeywords() {
	if (document.getElementById("sKeywords").value.length < 3 && document.getElementById("sKeywords").value.length > 0) {
		alert("Fraza do wyszukania musi składać się z conajmniej 3 znaków!");
	} else fSubmit("seekFrm");
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function my_show_div(obj) {
	 obj = document.getElementById(obj);
	 obj.style.display == 'none' ? obj.style.display = '' : obj.style.display = 'none';
}

function my_divs_init(ajdi) {
	 objs = document.getElementsByTagName('div');

	 for(i = 0, i2 = 0; i < objs.length; i++) {
	 	   if(objs[ i ].id == ajdi) {
		   			objs[ i ].id = ajdi + i2.toString();
					i2++;
		   }
	 }

	 objs = document.getElementsByTagName('a');
	 
	 for(i = 0, i2 = 0; i < objs.length; i++) {
	 	   if(unescape(objs[ i ].href) == "javascript: my_show_div('" + ajdi + "');") {
		   			objs[ i ].href = "javascript: my_show_div('" + ajdi + i2.toString() + "')";
					i2++;
		   }
	 }
}

function zazodz(prefix) { // zaznaczenie i odznaczenie checkboxow o wspolnych prefixach
	 chkbx = document.getElementsByName('dz_idx[]');
	 chkbx_length = chkbx.length;
	 if (document.getElementById('rem_all').checked)
	 	for(i = 0; i < chkbx_length; i++) chkbx[ i ].checked = true;
	 	else for(i = 0; i < chkbx_length; i++) chkbx[ i ].checked = false;
} // function



// do sklepu
  function nowaWartosc(fieldname, wartosc){
  	document.getElementById(fieldname).value = wartosc;
  }


// warstwy
window.onerror = null;
var ns6 = (!document.all && document.getElementById);
var ie4 = (document.all);


function hide_linki(){
  if ( ie4 ) document.all.red_menu.style.zIndex = 3;
  if ( ns6 ) document.getElementById('red_menu').style.zIndex = 3;
}


function show_linki(){
  if ( ie4 ) document.all.red_menu.style.zIndex = 0;
  if ( ns6 ) document.getElementById('red_menu').style.zIndex = 0;
}


function check_form() {
  if (this.document.forms.rekord.id_kategorii.value == 0) {
    this.window.alert("Nie wybrano kategorii!!!");
  } else this.document.forms.rekord.Submit();
}

function falseSubmit(frm, sbm) {
  if (sbm == 0) { document.getElementById("akcja").value = 0; }

  if (document.getElementById(frm).submit()) document.getElementById(frm).submit();
  this.document.getElementById(frm).Submit();
}


// sprawdzenie poprawnosci podania kolejnosci
function sprawdzPole(formularz, pole)	{

	var blad='';
	validNum=/^[0-9]*$/;
					
    with (formularz) {
		if (pole.value=='') blad+='\n- (pole wymagane)';
		if (pole.value != '' && pole.value.search(validNum) == -1)
			blad+='\n- (dopuszczalne tylko cyfry od 0-9)';
				
		if (blad!='') {
			alert('błąd wypełnienia.\n'+blad);
			pole.value = zmienianaPoz.value;
			return false;
		}  else  {
			 return true;
		   }
	} // while
} // sprawdzPole


// sprawdzenie poprawnosci podania ceny
function sprawdzCene(formularz, pole)	{
//document.writeln(formularz);
	var blad='';
	validNum=/[0-9\.,]*/;
					
    with (formularz) {
		if (pole.value=='') blad+='\n- (pole wymagane)';
		if (pole.value != '' && pole.value.search(validNum) == -1)
			blad+='\n- (dopuszczalne tylko liczby cyfry od 0-9 oraz znaki: . ,)';
				
		if (blad!='') {
			alert('błąd wypełnienia.\n'+blad);
//			pole.value = zmienianaPoz.value;
			return false;
		}  else  {
			 return true;
		   }
	} // while
} // sprawdzCene


function fSubmit(formularz) {
  if (document.getElementById(formularz).submit()) document.getElementById(formularz).submit();
  	else document.getElementById(formularz).Submit();  
}
--> 

