<!-- <![CDATA[

function reloadAjaxData(boxik,label_id){
	var adres = "zawartosc/" + boxik + ".php?lang=" + document.getElementById("lang_js").value;

	advAJAX.get({
    url: 'lib/php/get_label.php?lang=' + document.getElementById("lang_js").value + '&dzial_url='+label_id,
    onSuccess : function(obj) {document.getElementById("ajax_label").innerHTML = obj.responseText;}
  });

	if (boxik == 'ulsugi' || boxik == 'glowna') {
		document.getElementById("box_wysyp").className='box_wysyp_gl';
	}
	else {
		document.getElementById("box_wysyp").className='box_wysyp_st box_wysyp_';
	}
	document.getElementById("box_wysyp").innerHTML = '<br />Data base conected - loading data ...<br /><br /><br />';
	advAJAX.get({
    url: adres,
    onSuccess : function(obj) {
			document.getElementById("box_wysyp").innerHTML = obj.responseText;
     }
  });
}

function ladujFlasz(urlStr,f_width,f_height,backGround,zmienne) {
  var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
  if(hasRightVersion){
    var tmp = 	'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+f_width+'" height="'+f_height+'" id="index" align="middle">'
              + '<param name="allowScriptAccess" value="sameDomain" />'
              + '<param name="movie" value="'+urlStr+'.swf?'+zmienne+'"/>'
              + '<param name="menu" value="false" />'
              + '<param name="quality" value="high" />';
    if (backGround != undefined && backGround != 'transparent') {tmp += '<param name="bgcolor" value="'+backGround+'" />';}
    else {tmp += '<param name="wmode" value="transparent"/>';}
    tmp += '<embed src="'+urlStr+'.swf?'+zmienne+'" quality="high" ';
    if (backGround != undefined && backGround != 'transparent') {tmp += 'bgcolor="'+backGround+'" ';}
    else {tmp += 'wmode="transparent"';}
    tmp += 'width="'+f_width+'" height="'+f_height+'" name="index" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" />'
        + '</object>';
    document.write(tmp);
  }
  else {
    var alternateContent = '<a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash"><img src="'+urlStr+'.jpg" style="width: "'+f_width+'"px; height: "'+f_height+'"px;" alt="'+urlStr+'" title="'+urlStr+'" border="0"/></a>';
    document.write(alternateContent);
  }
}


function nowe_okno(url,w,h) {
  var opcje = 'left=50,top=20, menubar=no, toolbar=no, location=no, directories=no, status=no, scrollbars=yes, resizable=yes, fullscreen=no, channelmode=no, width='+w+', height='+h+'';
  new_window = window.open( url ,'popup', opcje);
  if (window.focus) {new_window.focus();}
}

function go_url(newURL, new_window) {
	if (new_window) {nowe_okno(newURL, 760, 600);}
	else {location.href=newURL;}
}

function set_jezyk(id_jezyka) {
  document.getElementById('lang').value = id_jezyka;
  document.getElementById('form_jezyki').submit();
}

function display_element(id, akcja) {
  switch (akcja) {
    case 'block': if (document.getElementById) {document.getElementById(id).style.display = 'block';}
                  else if (document.all) {document.all[id].style.display = 'block';}
                  break;
    case 'none':  if (document.getElementById) {document.getElementById(id).style.display = 'none';}
                  else if (document.all) {document.all[id].style.display = 'none';}
                  break;
	  default :     if (document.getElementById) {
	                  if (document.getElementById(id).style.display == 'block') {document.getElementById(id).style.display = 'none';}
	                  else {document.getElementById(id).style.display = 'block';}
	                }
	                else if (document.all) {
	                  if (document.all[id].style.display == 'block') {document.all[id].style.display = 'none';}
	                  else {document.all[id].style.display = 'block';}
                  }
	}
}

function komunikaty(komunikat, form) {
  if (komunikat) {alert(komunikat);}
  else {document.forms[form].submit();}
}

function sprawdz_znak(numeryczne, max_lenght, pole_value, pole_name) {
  // sposub użycia
  // onKeyUp="sprawdz_znak(true, 0, this.value, this.name)"

  var tmp=0;
  var i=0;
  var wynik='';
  str = new String();

  var dobrytext = /^[0-9]$/i;

  if (numeryczne) {
    str = pole_value;
    while (str.charAt(i)) {
      tmp = str.charAt(i);
      if (dobrytext.test(tmp)) {wynik = wynik + tmp;}
      i++;
    }
    str = wynik;
  }
  else {str = pole_value;}

  i=0; wynik='';

  if (max_lenght > 0) {
    for (j=0; i < max_lenght; i++) {
      tmp = str.charAt(i);
      wynik = wynik + tmp;
    }
    document.getElementById(pole_name).value = wynik;
  }
  else {
    document.getElementById(pole_name).value = str;
  }
}

function nowy_element(element_html, type, src, class_name, name, id, value, display) {
  var element = document.createElement(element_html);
  if (type) {element.type = type;}
  if (src) {element.setAttribute('src', src);}
  if (class_name) {element.className = class_name;}
  if (name) {element.name = name;}
  if (id) {element.id = id;}
  if (value) {element.value = value;}
  if (display) {element.style.display = display;}
  return element;
}

// ]]> -->