document.documentElement.className="jsp";

function vybal(id,vyska){
	var kdo = document.getElementById(id);
	if(kdo.animujeSe) return false;
	kdo.animujeSe = true;	
	var krok = function(pozice){
		return function(){
			kdo.style.height = Math.round(vyska * Math.pow(pozice / 100, 2)) + "px";
		};
	};
	for(var i = 0; i <= 100; i++){
		if(kdo.rozbaleno) {
			setTimeout(krok(100 - i), i * 10);
		} else {
			setTimeout(krok(i), i * 10);
		}
	}
	setTimeout(function() {
		kdo.animujeSe = false;
	}, i * 10);
	kdo.rozbaleno = !kdo.rozbaleno;	
	return false;
}

function OpenIframe (IdOdkazu,VyskaIframe){
	var a = document.getElementById(IdOdkazu);
	var f = document.createElement("iframe");
	f.src = "about:blank";
	f.name = a.target;
	f.height = "0";
	f.id = a.target;
	f.style.display = "none";
	f.scrolling = "no";
	f.allowTransparency = "true";
	f.frameBorder = "0";
	a.parentNode.insertBefore(f, a.nextSibling);
	a.onclick = function(){
		if(f.style.display != "none"){
			f.style.display = "none";
		} else {
			f.contentWindow.location.href = this.href + "?iframe=cm";
		} return false;
	}
	f.nacetloSe = function(){
		f.style.height = "0";
		f.style.display = "block";
		for(var i = 1; i <= 10; i++){
			(function(i){
				setTimeout(function(){
					f.style.height = VyskaIframe * i / 10 + "px";
				}, i * 50)
			})(i);
		}
	}
}
