// JavaScript Document
var min=8;
var max=18;
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"
   }   
}

sfHover = function() {
	var sfEls = document.getElementById("topnav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);


function swap(id, id2, gr) {
	if($(id).style.display=='none'){
    $(id2).innerHTML='<img src="i/minus.png" />&nbsp;&nbsp;Скрии всички мачове';
    show(id);
	}
	else{
    $(id2).innerHTML='<img src="i/plus.png" />&nbsp;&nbsp;Виж всички мачове';
	  hide(id)
	}
}

function show(id) {
    $(id).style.display = navigator.userAgent.indexOf('MSIE') == -1? 'table-row' : 'block';
}

function hide(id) {
    $(id).style.display = 'none';
}

