// JavaScript Document
// updated 2006-08-20 vd
// updated 2006-09-07 vd (pridana fce changeClass, changeBGColor)


function changeClass( obj, cls )
{
	if( obj )
	{
		obj.className = cls;
	}
}

function changeBGColor( obj, clr )
{
	if( obj )
	{
		obj.style["background-color"] = clr;
	}
}


function zoom(id, zoomw, zoomh, zoompath, zoomtitle, charset ){
  var closeInfo = 'click to close the window';
  if ( charset == '' ) charset = 'iso-8859-2';  
	zoom_console = window.open("",id,"left=120, top=120, width="+zoomw+",height="+zoomh+",scrollbars=no");
	zoom_console.document.write('<html><title>'+zoomtitle+'<\/title><meta http-equiv="content-type" content="text/html; charset='+charset+'" /><body marginheight=0 marginwidth=0 leftmargin=0 topmargin=0 bgcolor=#ffffff>');
	zoom_console.document.write('<img onclick="window.close()" style="cursor:hand" src="'+zoompath+'" width="'+zoomw+'" height="'+zoomh+'" alt="'+zoomtitle+'" title="'+zoomtitle+' -||- '+closeInfo+'"  />');
	zoom_console.document.write("<\/body><\/html>");
	zoom_console.document.close();
	return true;
}


function novyokno( odkaz )
{
    try
	{
		var test;
		
		test = ! window.open( odkaz );
		return test;
	}
	
	catch (e)
	{
		alert( "Při otvírání nového okna došlo k vnitřní chybě JavaScriptu. Zkuste povolit otevírání nových oken nebo kontaktujte správce webu! Odkaz se otevře ve stávajícím okně" );
		return true;
	}
}
