function HX_getImgObj(name){
    if (document.images) {
        if (document.images[name]) {
            return document.images[name];
        }
    }
    return null;
}

function HX_changeImg(name, src){
    var img = HX_getImgObj(name);
    document.HX_i = new Array();
    document.HX_i[0] = name;

    if (img != null) {
        document.HX_i[1] = img.src;
        img.src = src;
    }
}

function HX_restoreImg(name){
    var img = HX_getImgObj(document.HX_i[0]);
    if (img != null) {
        img.src = document.HX_i[1];
    }
}

function HX_preloadImg(){
    var d=document; if(d.images){ if(!d.HX_p) d.HX_p=new Array();
    var i,j=d.HX_p.length,a=HX_preloadImg.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.HX_p[j]=new Image; d.HX_p[j++].src=a[i];}}
}

var min=12;
var max=16;
function increaseFontSize() {
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s += 1;
      }
      p[i].style.fontSize = s+"px"
   }
}
function decreaseFontSize() {
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s -= 1;
      }
      p[i].style.fontSize = s+"px"
   }
}

function taEllenorzes(){
    var szh = document.frmUfal.szoveg.value;
    if (szh.length !=0 ){
       document.frmUfal.rogzit.disabled = false;
    }else{
       document.frmUfal.rogzit.disabled = true;
    }
}