///window.onerror=chyba;
function erjs(a,b,c) {
 objekt_obr = new Image;
 objekt_obr.src = 'errjs.php?chyba='+escape(a)+'&soubor='+escape(b)+'&radek='+escape(c)+'&location='+
 escape(window.location)+'&width='+escape(screen.width)+'&height='+escape(screen.height)+
 '&referrer='+escape(document.referrer)+'&titulek='+escape(document.title);
 return true;  
}
window.onerror = erjs;

//cache
function cache1(){
 im4 = new Image().src='obr/pozadimenu.gif';
}

//impulsy
var chb, citac=0, interimpuls, interimpuls1, checkimpuls=true;
interimpuls=setInterval('zacimpuls()',500);

function zacimpuls(){
         if (citac==0 || !checkimpuls) pretoceni();
         if (citac>0 && checkimpuls) {
             interimpuls1=setInterval('pretoceni()',6000);
             clearInterval(interimpuls);
            }
         citac++;
}

function pretoceni(){//return;
try {checkimpuls=true;
 var cestaflash=window.document;
 cestaflash.logo4blk.GotoFrame(1);
 cestaflash.ruchflash2.GotoFrame(1);
 cestaflash.ruchflash3.GotoFrame(1);
 cestaflash.ruchflash4.GotoFrame(1);
 cestaflash.logo4blk.Play();
 cestaflash.ruchflash2.Play();
 cestaflash.ruchflash3.Play();
 cestaflash.ruchflash4.Play();
  }
catch(chb){ checkimpuls=false;
 }
}

function newWindowLink(URI, nazev, width, height) {
    if (width && height) {
        newWin = window.open(URI, nazev, 'width=' + width + ', height=' + height + ', scrollbars, resizable');
    } else {
        newWin = window.open(URI);
    }
    return (typeof(newWin) == 'object') ? false : true;
}
