<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_controlShockwave(objStr,x,cmdName,frameNum) { //v3.0
  var obj=MM_findObj(objStr);
  if (obj) eval('obj.'+cmdName+'('+((cmdName=='GotoFrame')?frameNum:'')+')');
}

var formular=null;

function validate(formular) //kontrola formularu

{

  if(formular=="objednavka") {
    if(document.objednavka.celkem.value==0) {
    alert("Váše objednávka je prázdná.");
    return(false); }
	else
    if(document.objednavka.jmeno.value=="") {
    alert("Váše jméno - údaj nebyl zadán.");
    document.objednavka.jmeno.focus();
    return(false); }
	else
    if(document.objednavka.ulice.value=="") {
    alert("Váše ulice - údaj nebyl zadán.");
    document.objednavka.ulice.focus();
    return(false); }
	else
    if(document.objednavka.obec.value=="") {
    alert("Váše obec - údaj nebyl zadán.");
    document.objednavka.obec.focus();
    return(false); }
	else
    if(document.objednavka.email.value=="") {
    alert("Váš e-mail - údaj nebyl zadán.");
    document.objednavka.email.focus();
    return(false); }
	else
    if(!document.objednavka.email.value.match(/^[\w\.-]+@([a-z0-9-]+\.)+[a-z]{2,}$/i)) {
    alert("Váš e-mail - špatný formát.");
    document.objednavka.email.focus();
    return(false); }
	else
    if(document.objednavka.telefon.value=="") {
    alert("Váš telefon - údaj nebyl zadán.");
    document.objednavka.telefon.focus();
    return(false); }
  }
  if(formular=="diskuze") {
    if(document.diskuze.email.value=="") {
    alert("Váš e-mail - údaj nebyl zadán.");
    document.diskuze.email.focus();
    return(false); }
	else
    if(!document.diskuze.email.value.match(/^[\w\.-]+@([a-z0-9-]+\.)+[a-z]{2,}$/i)) {
    alert("Váš e-mail - špatný formát.");
    document.diskuze.email.focus();
    return(false); }
   if(document.diskuze.comment.value=="") {
    alert("Text - údaj nebyl zadán.");
    document.diskuze.comment.focus();
    return(false); }
   if(document.diskuze.CaptchaNumber.value=="") {
    alert("Kontrola - opište číslo z obrázku.");
    document.diskuze.CaptchaNumber.focus();
    return(false); }
  }
  if(formular=="mailing") {
    if(document.mailing.email.value=="e-mail...") {
    alert("Váš e-mail - údaj nebyl zadán.");
    document.mailing.email.focus();
    return(false); }
	else
    if(!document.mailing.email.value.match(/^[\w\.-]+@([a-z0-9-]+\.)+[a-z]{2,}$/i)) {
    alert("Váš e-mail - špatný formát.");
    document.mailing.email.focus();
    return(false); }
  }
  else if(formular=="vyhledavani") {
    if(document.vyhledavani.query.value=="hledaný výraz...") {
    alert("Hledaný výraz - údaj nebyl zadán.");
    document.vyhledavani.query.focus();
    return(false); }  
  }
  else if(formular=="anketa") {
	ok = false;	
	 for(id=0;id<document.anketa.nazor.length;id++)
	 {
	 	if(document.anketa.nazor[id].checked) ok = true;
	 }
		// if(!document.anketa.nazor[0].checked && !document.anketa.nazor[1].checked && !document.anketa.nazor[2].checked)
	if(ok == false)
	{
    alert("Nemáte názor?!!!");
    return(false); }
  }
  else {	
  return(true); }
}

/*function enlarge(objpath)  //otevre okno
{
   var win=open(objpath,"window",'scrollbars=no,resizable=no,width=100,height=100');
   win.focus();
}*/

var okno, x, y  //otevre okno s rozmery

function enlarge(objpath, x, y)
{
  if (okno) {
    okno.close(); }
  okno = window.open(objpath,"window",'scrollbars=no,resizable=no,width=' + x + ',height=' + y + '');
  okno.focus();
}

function winclose()  //zavre okno
{
  if(okno) {
    okno.close(); }
}

/*function winprint()  //zajisti tiskovy dialog nebo alert
{
  if(window.print) {
    window.print(); }
  else {
    alert("Pro vytisknutí stiskněte CTRL-P!"); }
}*/

/*function checkframe()  //zjisti, zda stranka je/neni soucasti ramu
{
  if(self==parent) {
    document.write('Tento dokument je pouze součást rámu: <A HREF=index.html>zde</A> přejděte na hlavní stranu.') };
}*/

/*function updateframes(url1,url2)  //updatuje x ramu ve framesetu, cisla ramu dle poradi ve framesetu
{
  parent.frames[2].location=url2;
  parent.frames[0].location=url1;
}*/

//rollover efekt v bunce (C) Tom Dolezal

function MakeState() {
  this.over = '';
  this.out  = '';
  return this;
}

function MakeStateArray(pocet) {
  for (var i = 1; i <= pocet; i++)
    this[i]= new MakeState();
  return this;
}

pocet_menu = 2;
var sub;

sub = new MakeStateArray(pocet_menu);

sub[1].over = '#FFFFFF';
sub[1].out  = '#FFA306';
sub[2].over = '#FFFFFF';
sub[2].out  = '#FAE7A3';

function CellOver(cell,sub_id) {
	cell.style.backgroundColor = sub[sub_id].over;
}

function CellOut(cell,sub_id) {
	cell.style.backgroundColor = sub[sub_id].out;
}

//rozpadavaci menu (C) Tom Dolezal

var VisibleMenu = null;
var Timer = null

function FindObj(id)
{
	if (document.all)
		return document.all.item(id);
	else if (document.getElementById)
		return document.getElementById(id);
	else
		return null;
}
	
function ShowMenu(id, first)
{
	if (VisibleMenu)
	{
		if (Timer)
		{
			window.clearTimeout(Timer);
			Timer = null;
		}
		if (VisibleMenu == id)
			return;

		HideMenuNow(VisibleMenu);
	}
	
	var obj = FindObj(id);
	if (obj && obj.style)
	{
		var bar = FindObj('menu');
		var anch = FindObj(id+'_anch');
		if (anch && bar)
		{
			obj.style.left = bar.offsetLeft + anch.offsetLeft - 1;
			obj.style.top = bar.offsetTop + 17;
			if (obj.offsetWidth < anch.offsetWidth)
				obj.style.width = anch.offsetWidth;
		}
		obj.style.visibility = 'visible';
		VisibleMenu = id;
	}
}

function HideMenuNow(id)
{
	var obj = FindObj(id);
	if (obj && obj.style)
	{
		obj.style.visibility = 'hidden';
		VisibleMenu = null;
	}
}

function HideMenu(id)
{
	Timer = window.setTimeout('HideMenuNow("'+id+'")', 200);
}

//iframe script by Dynamicdrive.com

//Specify speed of scroll. Larger=faster (ie: 5)
var scrollspeed=cache=1

function initialize(){
  marqueeheight=document.all? parent.document.all.aktuality.height : parent.document.getElementById("aktuality").getAttribute("height")
  dataobj=document.all? document.all.aktualitycontainer : document.getElementById("aktualitycontainer")
  dataobj.style.top=5
  thelength=dataobj.offsetHeight
  scrolltest()
}

function scrolltest() {
  dataobj.style.top=parseInt(dataobj.style.top)-scrollspeed
  if (parseInt(dataobj.style.top)<thelength*(-1))
  dataobj.style.top=5
  setTimeout("scrolltest()",50)
}

function showlink() {
	var poradi;
	poradi = window.event.srcElement.sourceIndex;
	poradi = poradi - 0;
	if("red" == document.all(poradi).style.color)
	{
 		document.all(poradi).style.color = "black";
	}
	else
	{
 		document.all(poradi).style.color = "red";
	}
	poradi = poradi + 1;
	if("none" == document.all(poradi).style.display)
	{
		document.all(poradi).style.display = "";
	}
	else
	{
 		document.all(poradi).style.display = "none";
	}
}

function AccountBlink()
{
	if(document.getElementById('AccountNumber'))
	{
		switch(document.getElementById('AccountNumber').className)
		{
			case 'account-number fc-red':
			{
				document.getElementById('AccountNumber').className = 'account-number fc-red2';
// 				document.getElementById('AccountImportant').className = 'account-important fc-red2';
				break;
			}
// 			case 'account-number fc-red2':
// 			{
// 				document.getElementById('AccountNumber').className = 'account-number fc-red3';
// 				document.getElementById('AccountImportant').className = 'account-important fc-red3';
// 				break;
// 			}
			case 'account-number fc-red3':
			{
				document.getElementById('AccountNumber').className = 'account-number fc-red4';
// 				document.getElementById('AccountImportant').className = 'account-important fc-red4';
				break;
			}
			case 'account-number fc-red4':
			{
				document.getElementById('AccountNumber').className = 'account-number fc-red5';
// 				document.getElementById('AccountImportant').className = 'account-important fc-red5';
				break;
			}
			case 'account-number fc-red5':
			default:
			{
				document.getElementById('AccountNumber').className = 'account-number fc-red';
// 				document.getElementById('AccountImportant').className = 'account-important fc-red';
				break;
			}	
		}
	}
}

function spamBotControl()
{
	var spamBlockElement = document.getElementById('SpamBlock');
	if (spamBlockElement)
	{
		spamBlockElement.style.display = "none";
	}
}

function init()
{
	winclose();
	spamBotControl();
}

//-->