
function do_sIFR_title() {
  if ( lang == '') lang = 'gb';

  if(typeof sIFR == "function") {
	sIFR.setup();
  }

  var lubalin = {
    src: 'img/lubalin_' + lang + '.swf'
    ,ratios: [6,1.41,9,1.35,15,1.29,21,1.25,22,1.22,27,1.24,29,1.21,34,1.22,41,1.21,45,1.2,46,1.21,59,1.2,68,1.19,69,1.2,96,1.19,97,1.18,102,1.19,103,1.18,107,1.19,108,1.18,112,1.19,114,1.18,116,1.19,120,1.18,121,1.19,1.18]
  };
  sIFR.useStyleCheck = true;
  sIFR.compatMode = true;
  sIFR.activate( lubalin);
  sIFR.replace( lubalin, {
    selector: 'h1.title_' + lang
    ,css: [
      '.sIFR-root { color: #C09447; font-size: 18px; margin: 0px; padding: 0px; } '
      ,'a { text-decoration: none; } '
      ,'a:link { color: #C09447; } '
      ,'a:hover { color: #C09447; text-decoration: underline; } '
    ]
	,wmode: 'transparent'
  });
  
  return true;
}





function do_sIFR_title2() {
  if ( lang == '') lang = 'gb';

  if(typeof sIFR == "function") {
	sIFR.setup();
  }

  var lubalin = {
    src: 'img/lubalin_' + lang + '.swf'
    ,ratios: [6,1.41,9,1.35,15,1.29,21,1.25,22,1.22,27,1.24,29,1.21,34,1.22,41,1.21,45,1.2,46,1.21,59,1.2,68,1.19,69,1.2,96,1.19,97,1.18,102,1.19,103,1.18,107,1.19,108,1.18,112,1.19,114,1.18,116,1.19,120,1.18,121,1.19,1.18]
  };
  sIFR.useStyleCheck = true;
  sIFR.compatMode = true;
  sIFR.activate( lubalin);
  sIFR.replace( lubalin, {
    selector: 'h2.title2_' + lang
    ,css: [
      '.sIFR-root { color: #6B6B68; font-size: 16px; margin: 0px; padding: 0px; } '
      ,'a { text-decoration: none; } '
      ,'a:link { color: #6B6B68; } '
      ,'a:hover { color: #6B6B68; text-decoration: underline; } '
    ]
	,wmode: 'transparent'
  });
  
  return true;
}


		


function SendRequest( id_aktualnosci, wybrany) {
// http://www.mintajax.pl/forum/
    var req = mint.Request();
	req.AddParam("action", "pobierz_aktualnosc");
    req.AddParam("element", id_aktualnosci);
    req.Send("request.php", "response");
	req.OnSuccess = function() { 
	   do_sIFR_news();
	} 
	req.OnError = function () {
		document.getElementById("response").innerHTML = "Wystąpił błąd !!! <br />" + this.responseText + "<br />" + req.xmlHttpRequest.statusText ;
	} 

	  if (document.getElementById("image_01") && wybrany != "image_01") document.getElementById("image_01").src = "img/but_off.gif";
	  if (document.getElementById("image_02") && wybrany != "image_02") document.getElementById("image_02").src = "img/but_off.gif";
	  if (document.getElementById("image_03") && wybrany != "image_03") document.getElementById("image_03").src = "img/but_off.gif";
	  if (document.getElementById("image_04") && wybrany != "image_04") document.getElementById("image_04").src = "img/but_off.gif";
	  if (document.getElementById("image_05") && wybrany != "image_05") document.getElementById("image_05").src = "img/but_off.gif";
	  if (document.getElementById("image_06") && wybrany != "image_06") document.getElementById("image_06").src = "img/but_off.gif";
	  if (document.getElementById("image_07") && wybrany != "image_07") document.getElementById("image_07").src = "img/but_off.gif";
	  if (document.getElementById("image_08") && wybrany != "image_08") document.getElementById("image_08").src = "img/but_off.gif";
	  if (document.getElementById("image_09") && wybrany != "image_09") document.getElementById("image_09").src = "img/but_off.gif";
	  if (document.getElementById("image_10") && wybrany != "image_10") document.getElementById("image_10").src = "img/but_off.gif";
	  if (document.getElementById("image_11") && wybrany != "image_11") document.getElementById("image_11").src = "img/but_off.gif";
	
	  if (document.getElementById( wybrany)) document.getElementById( wybrany).src = "img/but_on.gif";

	return false;
} 



function jump_glowa(dopisek) {
  eval( "parent.location=\'" + dopisek + "\'");
}

function zoom( plik, xxx, yyy, id)
{o = null;
 if (window.screen) {
  aw = screen.availWidth;
  ah = screen.availHeight;}
 else {
  aw = 640;
  ah = 480;
 }
 xxx += 40;
 if (xxx>screen.availWidth - 15) xxx = screen.availWidth - 15;
 if (yyy>screen.availHeight - 30) yyy = screen.availHeight - 30;
u="width="+xxx+",height="+yyy+",left="+Math.round(((aw-xxx)/2)-5)+",top="+Math.round(((ah-yyy)/2)-14)+",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no";
 o = window.open( plik, 'zoom', u);
}
function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0 && parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n]) && d.all) x=d.all[n]; 
  for (i=0;!x && i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_changeProp(objName,x,theProp,theValue) { //v3.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)) eval("obj."+theProp+"='"+theValue+"'");
}

function podmen() {
  if (document.getElementById("nazwa_okna")) {
       document.getElementById("menu_glowne").innerHTML=document.getElementById("nazwa_okna").innerHTML;
  } else if (document.all["nazwa_okna"]) {
       document.all["menu_glowne"].innerHTML=document.all["nazwa_okna"].innerHTML;
  };
}
function MM_findObj(n, d) { //v4.0
  var p,i,x;
  if(!d) d=document;
  if((p=n.indexOf("?"))>0 && parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document;
    n=n.substring(0,p);
  }
  if(!(x=d[n]) && d.all) x=d.all[n];
  for (i=0;!x && i<d.forms.length;i++)
       x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++)
      x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById)
      x=document.getElementById(n);
  return x;
}
                function stripLeads(aString) {
                        var c = 0;
                        if (aString.charAt(0) == ".") { c++; var negative = true; }
                        while ((c < aString.length) && (aString.charAt(c) == '0')) c++;
                        return((negative ? "." : "") + aString.substring(c, aString.length));
                }

                function isInteger(aNumber) {
                        return (stripLeads(aNumber) == stripLeads("" + parseInt(aNumber, 10)));
                }

                function checkChar(aChar) {
                        return ((aChar < "0") || (aChar > "9"));
                }

                function findNext(aStr, Idx) {
                        while ((Idx <= aStr.length) && (!checkChar(aStr.charAt(Idx)))) Idx++;
                        return (Idx <= aStr.length ? Idx : aStr.length+1);
                }

                function findPart(aString, Which) {
                        Which--;
                        var C = 0;
                        while ((Which > 0) && (C <= aString.length)) {
                                C = findNext(aString, C) + 1;
                                Which--;
                        }
                        if (C > aString.length)
                            return "";
                        else
                            return aString.substring(C,findNext(aString, C));
                }

function MM_validateForm() { //v4.0
var i,p,q,nm,test,num,min,max,errors="",args=MM_validateForm.arguments;
for (i=0; i<(args.length-2); i+=3) {
  test=args[i+2];
  val=MM_findObj(args[i]);

  if (val) {
    nm=val.name;
    if ((val=val.value)!="") {
      if (test.indexOf("isEmail")!=-1) {
          p=val.indexOf("@");
          if (p<1 || p==(val.length-1)) errors+="- \'"+nm+"\' musi zawierać adres e-mail.\n";
      } else if (test!="R") {

      if (test=="N" && val.indexOf(',')!=-1) {
         val = val.substring( 0, val.indexOf(',')) + '.' + val.substring( val.indexOf(',')+1, val.length);
         MM_findObj(args[i]).value = val;
      }

        if (isNaN(val) && test=="N") errors+="- \'"+nm+"\' musi zawierać liczbę.\n";

        if (test.indexOf("inRange") != -1) {
          p=test.indexOf(":");
          min=test.substring(8,p);
          max=test.substring(p+1);
          if (parseInt(val)<min || max<parseInt(val)) errors+="- \'"+nm+"\' musi zawierać liczbę pomiędzy "+min+" a "+max+".\n";
        } else if (test=="D") {

            n = 0;
            jesterror = false;
            while (n < val.length) {
              if (isNaN(val.substring(n,n+1)) && val.substring(n,n+1)!=".") jesterror = true;
              n++;
            }
            if (jesterror) {
               errors+="- \'"+nm+"\' musi zawierać cyfry\n oddzielone kropkami (np: 25.12.2002).\n";
            } else {

               var day = findPart( val, 1);
               var month = findPart( val, 2);
               var year = findPart( val, 3);

               if (isInteger(day) && isInteger(month) && isInteger(year)) {
                   var theDay = new Date( year+"/"+month+"/"+day);
                   if (day != theDay.getDate()) errors+="- \'"+nm+"\' zła ilość dni w miesiącu.\n";
                   if (month > 12) errors+="- \'"+nm+"\' Ľle podany miesiąc (maks. 12).\n";
                   if (year < 1900 || year > 2100) errors+="- \'"+nm+"\' Ľle podany rok (min. 1900, maks. 2100).\n";
               } else {
                   errors+="- \'"+nm+"\' zły format daty (dd.mm.yyyy).\n";
               }
            }
        }
      }
    } else if (test!="D" && test!="N" && test!="isEmail") errors += "- \'"+nm+"\' jest niewypełnione.\n";
  }
 } if (errors) alert("Wystąpiły następujące błędy:\n"+errors);
 document.MM_returnValue = (errors == "");
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}