function GetElement(jmeno)
{
	return window.document.getElementById(jmeno);
}

function popUpWindow(URL,WIDTH,HEIGHT,PARAM) 
{
    day = new Date();
    id = day.getTime();
    if (PARAM=='') PARAM = 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1';
    eval("page" + id + " = window.open(URL, '" + id + "', '"+PARAM+",width=" + WIDTH + ",height=" + HEIGHT + ",left = 100,top = 30');");
}

function popUpIdWindow(ID,URL,WIDTH,HEIGHT,PARAM) 
{
    id = ID;
    if (PARAM=='') PARAM = 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1';
    eval("page" + id + " = window.open(URL, '" + id + "', '"+PARAM+",width=" + WIDTH + ",height=" + HEIGHT + ",left = 100,top = 30');");
}

function DelRow(i,r)
{
	if(r.value=='D')
	{
		r.value='U';
		i.src='./images/wwfdel.gif';
		i.alt='smazat záznam';
	}
	else
	{
		r.value='D';
		i.src='./images/wdrop.gif';
		i.alt='obnovit záznam';
	}
}


function SetCookie(cookieName,cookieValue, nMin) {
 var today = new Date();
 var expire = new Date();
 
 if (nMin==null || nMin==0) nMin=30;
 expire.setTime(today.getTime() + nMin*60*1000);
 document.cookie = cookieName+"="+escape(cookieValue)+ ";expires="+expire.toGMTString();
}


function simpleAJQuery(url, html){
	jQuery(html).load(url);
}

function simpleToggle(html){
	 jQuery(html).slideToggle("fast");
}

/*skryje polozku*/
function hide_html(html){
	jQuery(html).hide("slow");
}

/*zobrazi polozku*/
function show_html(html){
	jQuery(html).show("slow");
}

function confirm_delete(WARNING) {
		if (confirm(WARNING)) {return true;}
    	else {return false;}
}

function slideSwitch(id,elm) {var active = jQuery('#'+id+' '+elm+'.active');if ( active.length == 0 ) active = jQuery('#'+id+' '+elm+':last');var next =  active.next().length ? active.next() : jQuery('#'+id+' '+elm+':first');active.addClass('last-active');next.css({opacity: 0.0}).addClass('active').animate({opacity: 1.0}, 800, function() {active.removeClass('active last-active');});}

/*Nastavi CSS vlastnost xhtml elementu*/
function setCssPropertyToElement(html_element,arr_css_id,arr_css_val)
{
	/*alert(arr_css_id.length);*/
	for (i = 0; i < arr_css_id.length; i++){
		
		jQuery(html_element).css(arr_css_id[i],arr_css_val[i]);
		
	}
}


