// ------------------------------------------ funkce pro otevirani novych oken
function okno(soubor) {
  window.open(soubor,'','toolbar=yes,scrollbars=yes,location=yes,status=yes,resizable=1,menubar=yes')
}

// ------------------------------------------ funkce pro zaskrtnuti vsech polozek
function CheckAll(f,el) {
	for (var i=0;i<f.elements.length;i++)
	{
		var e=f.elements[i];
		if (e.id==el) e.checked=f.check_all.checked;
	}
}

// ------------------------------------------ funkce pro presun z formularoveho prvku SELECT
function jdi_na() {
	location=document.skoc.go.options[document.skoc.go.selectedIndex].value
}

// ------------------------------------------ funkce pro pridani mezi oblibene
function addBookmark(title,url) {
	if (window.sidebar) {
		window.sidebar.addPanel(title, url,"");
	} else if( document.all ) {
		window.external.AddFavorite( url, title);
	} else if( window.opera && window.print ) {
		return true;
	}
}

// ------------------------------------------ funkce pro pridani smajliku do fora
function insert_smile(type) {
	document.getElementById("cely_text").value=document.getElementById("cely_text").value+" "+type+" ";
}


// ------------------------------------------ zmeni tridu (class) objektu s danym ID
function ZmenTridu(trida,id)  {
  document.getElementById(id).className = trida;
}


function online(id)   {
  window.open('http://www.onlajny.cz/detail.php?id='+id+'&hra=hokej','','toolbar=no,scrollbars=yes,location=no,status=yes,width=790,height=530,resizable=1')
}

function online_zap(id) {
  window.open('http://www.onlajny.cz/detail.php?id='+id+'&hra=hokej&zobrazit=vsechno','','toolbar=no,scrollbars=yes,location=no,status=no,width=790,height=590,resizable=1')
}

// ------------------------------------------ fce pro vysouvaci menu

function Show(CisMenu)    {
	var PocetMenu = 9;
	for(i=1; i<=PocetMenu; i++) {
      document.getElementById('submenu'+i).className="hidden";	
	  document.getElementById('menu'+i).className="";	
	}	
	document.getElementById('submenu'+CisMenu).className="";	
	document.getElementById('menu'+CisMenu).className="show";	
}

// ------------------------------------------ fce zmenu TOP story
var top_count=4;
var class_image="top_image"; class_text="box_articles";
	
function switch_top(id_top){
 if (document.getElementById("text"+id_top).className!=class_image+" show"){
	 for(i=1; i<=top_count; i++) {
		document.getElementById("text"+i).className="hidden";
		document.getElementById("thumb"+i).className="";
	 }
	 document.getElementById("text"+id_top).className=class_text+" show";
	 document.getElementById("thumb"+id_top).className="selected";
 }
}


function Hide(){}
