//blikání
/*
function switchClasses(class1, class2) {
	elements = (document.all) ? document.all : document.getElementsByTagName("*");
	for (i=0; i<elements.length; i++) {
		if (elements[i].getAttribute('class') == class1) {
		elements[i].setAttribute('class', class2);
		}
		else if (elements[i].getAttribute('class') == class2) {
		elements[i].setAttribute('class', class1);
		}
	}
}
*/
//setInterval("switchClasses('round', 'round_hide')", 700);  



//entities that should never be unicoded
function replaceamp(str) {
  str = str.replace(" &amp; ", " & ");
  str = str.replace("&amp;", "&amp;amp;").replace("&amp;lt;", "&amp;amp;lt;").replace("&amp;gt;", "&amp;amp;gt;").replace("&amp;quot;", "&amp;amp;quot;").replace("&amp;apos;", "&amp;amp;apos;");
  str = str.replace("&minus;", "&amp;minus;").replace("&times;", "&amp;times;");
 
  str = str.replace("&nbsp;", "&amp;nbsp;").replace("&thinsp;", "&amp;thinsp;").replace("&shy;", "&amp;shy;");
  str = str.replace("&prime;", "&amp;prime;");
  str = str.replace(/&(#0?9[13];)/, "&amp;$1");
  str = str.replace(/&(#0?12[345];)/, "&amp;$1");
 
  return str;
}
 



function zobraz(co) {
	document.getElementById(co).className="visible";
}
function skryj(co){
	document.getElementById(co).className="hidden";
}



function zobrazSkryj_visibility(co) {
	elv=document.getElementById(co);
	if (elv) elv.style.visibility=(elv.style.visibility == 'visible')?'hidden':'visible';
}  

function zobrazSkryj(co) {
	el=document.getElementById(co).style;
	el.display=(el.display == 'block')?'none':'block';
}

function rozbalStrom(co) {
	document.getElementById(co).className="group-header-open";
}


function zobraz(id)
{
	document.getElementById(id).style.display="block";
}
function skryj(id)
{
	document.getElementById(id).style.display="none";
}


function OpenWindow(theURL, winName, features) {
   wino=window.open(theURL, winName, features);
   //winName.focus()
}


function FlexiWindow(theURL, winName, features) {
   var x=(screen.width-140);
   var y=(screen.height-300);
   winpa='height='+y+',width='+x+',top='+150+',left='+70+',scrollbars=yes,toolbar=no,resizable=yes,menubar=no';
   winf=window.open(theURL, winName, winpa, features);
   //winName.focus()   
}


function CenterWindow(theURL, winName, wi, he, features) {
   var x=(screen.width-wi)/2;
   var y=(screen.height-he)/2;
   winpa='height='+he+',width='+wi+',top='+y+',left='+x+',scrollbars=yes,toolbar=no,resizable=yes,menubar=no';
   winc=window.open(theURL, winName, winpa, features);
   //winName.focus()   
}



function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}



function fadeIn(where, endColor, which) {
                  Color= new Array();
                  //Color[1] = "fff9ee";
                  //Color[2] = "fff9ee";
                  Color[1] = "fff6ee";
                  Color[2] = "fff6ee";
                  Color[3] = "fff3dd";
                  Color[4] = "ffeecc";
                  Color[5] = "ffe9bb";
                  Color[6] = "ffe3aa";
                  Color[7] = "ffdd99";

              if (where >= 1)
        	    {
        		    document.getElementById(which).style.backgroundColor = "#" + Color[where];

        		    if (where == 7)
        		    {
        			    iWait = 600;
        		    } else {
        			    iWait = 300-(where*20);
        		    }

        		    if (where > 1)
        		    {
        			    where -= 1;
        			    setTimeout("fadeIn("+where+",'" + endColor + "','" + which + "')", iWait);
        		    } else {
        			    where -= 1;
        			    setTimeout("fadeIn("+where+",'" + endColor + "','" + which + "')", iWait);
        			    document.getElementById(which).style.backgroundColor = endColor;
        		    }
                }
            }
