//-------------------------------------------------------------------------------------------------------------------
// systemove funkce - ruzne funkce zajistujici javascriptovou obsluhu stranek
//-------------------------------------------------------------------------------------------------------------------

function wnd_open(img_url, target) {
	var new_wnd = window.open(img_url, target, "resizable=yes, toolbar=no, menubar=no, scrollbars=no, status=yes");
}

function mov_qm(id) {
	var obj = document.getElementById(id);
	obj.style.visibility = "visible";
	obj.style.display = "inline";
	obj.style.zindex = 1;
}

function mou_qm(id) {
	var obj = document.getElementById(id);
	obj.style.visibility = "hidden";
	obj.style.display = "none";
	obj.style.zindex = -1;
}

//funkce na dynamicke efekty polozek menu pro najeti/odjeti mysi
var prev_mit_bg = "";

function mov(obj) {
	//barva pozadi menupolozky
	prev_mit_bg = obj.style.backgroundColor;
	obj.style.backgroundColor = '#FFE680';
	obj.style.borderColor = '#FFE680';
	
	//barva textu menupolozky
	var atxt = obj.firstChild;
	//atxt.style.color = "#FFFFFF";
	
	//var bullet_obj = obj.firstChild;
	//bullet_obj.style.width = 0;
}

function mou(obj) {
	//barva pozadi menupolozky
	obj.style.backgroundColor = prev_mit_bg;
	obj.style.borderColor = prev_mit_bg;
	prev_mit_bg = "transparent";
	
	//barva textu menupolozky
	var atxt = obj.firstChild;
	//atxt.style.color="#000000";
	
	//var bullet_obj = obj.firstChild;
	//bullet_obj.style.width = 0;
}


//funkce na zabarvovani radku v tabulkach
var prev_bg = "";

function trmov(obj) {
	prev_bg = obj.style.backgroundColor;
	obj.style.backgroundColor = "#E1E8FF";
}

function trmou(obj) {
	obj.style.backgroundColor = prev_bg;
	prev_bg = "transparent";
}


//nevim... asi obraykz preyentace nacitane do pameti
var itmp = new Image();
itmp.src = "img/mi_bg_repeat.png";


//testovaci fce pro nahrani obsahu stranky pres ajax do elemenu s id
function ajax_load_content(section_id) {
	//alert("ok");
	
	if (!section_id) section_id = 10;
	
	//api url
	//var api_url = './content.php?lng=cs&sid=24&cid=79&tmprand=' + (1000000000 * Math.random());
	var api_url = "./content.php?lng=cs&sid=" + section_id + "&tmprand=" + (1000000000 * Math.random());
	
	//ajax odeslani event
	loadContent(api_url, 'ContentBox');
	
	//nastaveni zavreni boxu pro novou udalost s vysledkem
	//window.setTimeout('close_new_event_box()', 3500);
}