// RashMenu v5, author Martin Rasovsky, rasovsky@email.cz
var MenuOK = false;
if (navigator.userAgent.indexOf("MSIE") != -1 &&
navigator.appVersion.substring(0,1) > 3)
{ MenuOK = true; } else { window.open("nomsie.htm","nomsie"); }
if (MenuOK)
{
var GLColor = "#D0E0FF";
var LMColor = GLColor;
var LF = String.fromCharCode(10);
var char34 = String.fromCharCode(34);
var LastGLMenu = "";
var IsGLMenu = false;
var HTMLStr, MainGif, AltMain, FlyStyle;
var x = 0;
var y = 0;
var x2 = 0;
var y2 = 0;
var GLMenuWidth = 350;
var GLMenuLeft = 760 - GLMenuWidth;
var Menu;
var MaxMenu = 30;
var TotalMenu = 0;
var arrMenuInfo = new Array(MaxMenu);
var MaxGifs = 7;
var TotalGifs = 0;
var arrGifs = new Array(MaxGifs);
document.write("<SPAN ID='idNull' STYLE='display:none;'></SPAN>");
HTMLStr =
"<DIV ID='idMenu' STYLE='width:760;height:95'>" +
"<DIV ID='idRow1' STYLE='position:absolute;top:10;left:10;height:20'>" +
"<DIV ID='idBanner' STYLE='position:absolute;top:0;left:0;width:405;height:75;overflow:hidden;vertical-align:top'>" +
"<!--GMB-->" +
"<A HREF='"+MenuRoot+"index.htm'><IMG SRC='"+MenuRoot+"images/<!--MAINGIF-->' WIDTH=405 HEIGHT=75 ALT='<!--ALTMAIN-->' BORDER=0></A>" +
"</DIV>" +
"<DIV ID='idGM' STYLE='position:absolute;top:0;left:410;width:350;height:20;border-style:outset;border-width:2;float:right' NOWRAP>" +
"<!--GMT-->" +
"</DIV>" +
"</DIV>" +
"<DIV ID='idRow2' STYLE='position:absolute;top:30;left:410;width:350'>" +
"&nbsp;&nbsp;&nbsp;" +
"<!--MENUGIFS-->"+
"</DIV>" +
"<DIV ID='idRow3' STYLE='position:absolute;top:89;height:20'>" +
"<DIV ID='idLM' STYLE='position:absolute;top:0;left:0;width:760;height:20;border-style:outset;border-width:2' NOWRAP>" +
"<!--LMT-->" +
"</DIV>" +
"</DIV>" +
"</DIV>" +
"<SCRIPT TYPE='text/javascript'>" +
"var Menu = idNull;" +
"</SCRIPT>" +
"<DIV WIDTH=100%>";
}
function defFlyBan(FlyGif,FlyText,DefStyle)
{
if (MainGif != null) { HTMLStr = HTMLStr.replace("<!--MAINGIF-->", MainGif); }
if (AltMain != null) { HTMLStr = HTMLStr.replace("<!--ALTMAIN-->", AltMain); }
Banner = "";
for (i = 0; i < TotalGifs; i++)
{ Banner +=
"<A HREF='"+MenuRoot+arrGifs[10*i+1]+"'><IMG SRC='"+MenuRoot+"images/"+arrGifs[10*i+2]+
"' WIDTH="+arrGifs[10*i+3]+" HEIGHT=55 ALT='"+arrGifs[10*i+4]+"' BORDER=0 HSPACE="+
arrGifs[10*i+5]+" VSPACE=2></A>";
}
if (Banner != "") { HTMLStr = HTMLStr.replace("<!--MENUGIFS-->", Banner); }

if (FlyGif != null)
{
if (DefStyle == null) { DefStyle == ""; }
Banner = "<SPAN STYLE='"+DefStyle+"'>";
if (FlyGif != "") { Banner += "<img src='"+MenuRoot+"images/"+FlyGif+"'>"; }
if (FlyText != null) { Banner += FlyText; }
Banner += "</SPAN>";
HTMLStr = HTMLStr.replace("<!--GMB-->", Banner);
}
}
function drawMenu(FlyGif,FlyText)
{
defFlyBan(FlyGif,FlyText,(FlyStyle!=null)? FlyStyle : "")
HTMLStr += "</DIV>";
document.write(HTMLStr);
idGM.style.backgroundColor = GLColor;
idLM.style.backgroundColor = LMColor;
for (i = 0; i < TotalMenu; i++)
{
thisMenu = document.all(arrMenuInfo[i].IDStr);
if (thisMenu != null)
{
if (arrMenuInfo[i].IDStr == LastGLMenu && arrMenuInfo[i].type == "R")
{
arrMenuInfo[i].type = "A";
arrMenuInfo[i].unit = 200;
}
if (arrMenuInfo[i].type == "A")
thisMenu.style.width = arrMenuInfo[i].unit;
else
thisMenu.style.width = Math.round(arrMenuInfo[i].width * arrMenuInfo[i].unit) + 'em';
}
}
}
function set_LM (MenuIDStr, WidthType, WidthUnit)
{tempID = "LO_" + MenuIDStr;
set__M(tempID, WidthType, WidthUnit);
}
function set_GM (MenuIDStr, WidthType, WidthUnit)
{tempID = "GL_" + MenuIDStr;
set__M(tempID, WidthType, WidthUnit);
}
function set__M(MenuIDStr, WidthType, WidthUnit)
{
var fFound = false;
if (TotalMenu == MaxMenu)
{
return;
}
for (i = 0; i < TotalMenu; i++)
if (arrMenuInfo[i].IDStr == MenuIDStr)
{
fFound = true;
break;
}
if (!fFound)
{
arrMenuInfo[i] = new new__M(MenuIDStr);
TotalMenu += 1;
}
if (!fFound && WidthType.toUpperCase().indexOf("DEFAULT") != -1)
{
arrMenuInfo[i].type = "A";
arrMenuInfo[i].unit = 160;
}
else
{
arrMenuInfo[i].type = (WidthType.toUpperCase().indexOf("ABSOLUTE") != -1)? "A" : "R";
arrMenuInfo[i].unit = WidthUnit;
}
}
function new__M (MenuIDStr)
{
this.IDStr = MenuIDStr;
this.type = "";
this.unit = 0;
this.width = 0;
this.count = 0;
}
function add_LM (MenuIDStr, MenuDisplayStr, MenuHelpStr, MenuURLStr)
{
TargetStr = "_top";
tempID = "LO_" + MenuIDStr;
add__M(tempID, MenuDisplayStr, MenuHelpStr, MenuURLStr, TargetStr, true);
}
function add_GM (MenuIDStr, MenuDisplayStr, MenuHelpStr, MenuURLStr)
{
TargetStr = "_top";
tempID = "GL_" + MenuIDStr;
add__M(tempID, MenuDisplayStr, MenuHelpStr, MenuURLStr, TargetStr, false);
LastGLMenu = tempID;
}
function add__M (MenuIDStr, MenuDisplayStr, MenuHelpStr, MenuURLStr, TargetStr, bLOMenu)
{
cFont = "bold 8pt Arial";
cColor0 = (bLOMenu)? LMColor : GLColor;
cColor1 = "navy";
cColor2 = "red";
tagStr = (bLOMenu)? "<!--LMT-->" : "<!--GMT-->";
MenuStr = LF;
if (bLOMenu == false && LastGLMenu != "")
MenuStr += "<SPAN STYLE='font:" + cFont + ";color:" + cColor1 + "'>&nbsp;&nbsp;&nbsp;</SPAN>";
MenuStr += "<A TARGET='" + TargetStr + "' TITLE='" + MenuHelpStr + "'" +
" ID='AM_" + MenuIDStr + "'" +
" STYLE='text-decoration:none;cursor:hand;font:" + cFont + ";background-color:" + cColor0 + ";color:" + cColor1 + ";'";
if (MenuURLStr != "")
{
if (bLOMenu)
MenuStr += " HREF='" + MenuURLStr + "'";
else
MenuStr += " HREF='" + MenuURLStr + "'";
}
else
MenuStr += " HREF='' onclick='window.event.returnValue=false;'";
MenuStr += " onmouseout=" + char34 + "mouseMenu('out' ,'" + MenuIDStr + "'); hideMenu();" + char34 +
" onmouseover=" + char34 + "mouseMenu('over','" + MenuIDStr + "'); doMenu('"+ MenuIDStr + "');" + char34 + ">" +
"&nbsp;" + MenuDisplayStr + "&nbsp;</a>";
if (bLOMenu)
MenuStr += "<SPAN STYLE='font:" + cFont + ";color:" + cColor1 + "'>&nbsp;&nbsp;&nbsp;</SPAN>";
MenuStr += tagStr;
HTMLStr = HTMLStr.replace(tagStr, MenuStr);
set__M(MenuIDStr,"default",0);
}
function add_LI (MenuIDStr, SubMenuStr, SubMenuURLStr)
{
TargetStr = "_top";
tempID = "LO_" + MenuIDStr;
add__I(tempID,SubMenuStr,SubMenuURLStr,TargetStr,true);
}
function add_GI (MenuIDStr, SubMenuStr, SubMenuURLStr)
{
TargetStr = "_top";
tempID = "GL_" + MenuIDStr;
add__I(tempID,SubMenuStr,SubMenuURLStr,TargetStr,false);
}
function add__I (MenuIDStr, SubMenuStr, SubMenuURLStr, TargetStr, bLOMenu)
{
cFont = "bold 8pt Arial";
cColor0 = (bLOMenu)? LMColor : GLColor;
cColor1 = "navy";
cColor2 = "red";
var MenuPos = MenuIDStr.toUpperCase().indexOf("MENU");
if (MenuPos == -1) { MenuPos = MenuIDStr.length; }
InstrumentStr = MenuIDStr.substring(0 , MenuPos) + "|" + SubMenuStr;;
URLStr = SubMenuURLStr;
var LookUpTag = "<!--" + MenuIDStr + "-->";
var sPos = HTMLStr.indexOf(LookUpTag);
if (sPos <= 0)
{
HTMLStr += LF + LF +
"<SPAN ID='" + MenuIDStr + "'" +
" STYLE='display:none;position:absolute;width:160;background-color:" + cColor0 + ";padding-top:0;padding-left:0;padding-bottom:15;z-index:9;border-style:outset;border-width:2;'" +
" onmouseout='hideMenu();'>";
HTMLStr += "<DIV STYLE='position:relative;left:0;top:8;'>";
}
TempStr = LF +
"<A ID='AS_" + MenuIDStr + "'" +
" STYLE='text-decoration:none;cursor:hand;font:" + cFont + ";color:" + cColor1 + "'" +
" HREF='" + URLStr + "' TARGET='" + TargetStr + "'" +
" onmouseout=" + char34 + "mouseMenu('out' ,'" + MenuIDStr + "');" + char34 +
" onmouseover=" + char34 + "mouseMenu('over','" + MenuIDStr + "');" + char34 + ">" +
"&nbsp;" + SubMenuStr + "</A><BR>" + LookUpTag;
if (sPos <= 0)
HTMLStr += TempStr + "</DIV></SPAN>";
else
HTMLStr = HTMLStr.replace(LookUpTag, TempStr);
for (i = 0; i < TotalMenu; i++)
if (arrMenuInfo[i].IDStr == MenuIDStr)
{
if (arrMenuInfo[i].width < MenuIDStr.length)
arrMenuInfo[i].width = MenuIDStr.length;
arrMenuInfo[i].count = arrMenuInfo[i].count + 1;
break;
}
}
function add_LL (MenuIDStr)
{
tempID = "LO_" + MenuIDStr;
add__L(tempID,true);
}
function add_GL (MenuIDStr)
{
tempID = "GL_" + MenuIDStr;
add__L(tempID,false);
}
function add__L (MenuIDStr, bLOMenu)
{
var LookUpTag = "<!--" + MenuIDStr + "-->";
var sPos = HTMLStr.indexOf(LookUpTag);
if (sPos > 0)
{
cColor = "navy";
TempStr = LF + "<HR STYLE='color:" + cColor + "' SIZE=1>" + LookUpTag;
HTMLStr = HTMLStr.replace(LookUpTag, TempStr);
}
}
function mouseMenu(id, MenuIDStr)
{
IsGLMenu = (MenuIDStr.toUpperCase().indexOf("GL_") != -1);
IsMouseout = (id.toUpperCase().indexOf("OUT") != -1);
color = (IsMouseout)? "navy" : "red";
window.event.srcElement.style.color = color;
}
function doMenu(MenuIDStr)
{
var thisMenu = document.all(MenuIDStr);
if (Menu == null || thisMenu == null || thisMenu == Menu)
{
window.event.cancelBubble = true;
return false;
}
window.event.cancelBubble = true;
Menu.style.display = "none";
Menu = thisMenu;
IsGLMenu = (MenuIDStr.toUpperCase().indexOf("GL_") != -1);
x = 10 + window.event.srcElement.offsetLeft +
window.event.srcElement.offsetParent.offsetLeft;
x2 = x + window.event.srcElement.offsetWidth;
y = (IsGLMenu)?
10 + 0 + (idRow1.offsetHeight) :
10 - 3 + (idRow1.offsetHeight + idRow2.offsetHeight + idRow3.offsetHeight);
thisMenu.style.top = y;
thisMenu.style.left = x;
thisMenu.style.clip = "rect(0 0 0 0)";
thisMenu.style.display = "block";
window.setTimeout("showMenu()", 2);
return true;
}
function showMenu()
{
if (Menu != null)
{
y2 = y + Menu.offsetHeight;
Menu.style.clip = "rect(auto auto auto auto)";
}
}
function hideMenu()
{
if (Menu != null && Menu != idNull)
{
cY = event.clientY + document.body.scrollTop;
if (( event.clientX >= (x+5) && event.clientX <= x2) &&
( cY > (y-10) && cY <= y2))
{
window.event.cancelBubble = true;
return;
}
Menu.style.display = "none";
Menu = idNull;
window.event.cancelBubble = true;
}
}
function timeStamp()
{
var timeStr = "Změna";
var dateObj = new Date(document.lastModified);
var dateY = dateObj.getYear();
if (Date.parse(dateObj) != 0)
{
timeStr += ': ' + dateObj.getDate() + '.' +
(dateObj.getMonth()+1) + '.' +
((dateY < 100)? dateY+1900 : dateY);
}
return timeStr;
}
function add_Gif(_href,_src,_wid,_alt,_hspc)
{
if (TotalGifs == MaxGifs) { return; }
arrGifs[10*TotalGifs+1] = _href;
arrGifs[10*TotalGifs+2] = _src;
arrGifs[10*TotalGifs+3] = _wid;
arrGifs[10*TotalGifs+4] = _alt;
arrGifs[10*TotalGifs+5] = _hspc;
TotalGifs += 1;
}
function add_MainGif(_src,_alt,_style)
{
if (_src != null && _src != "") { MainGif = _src; }
if (_alt != null && _alt != "") { AltMain = _alt; }
if (_style != null && _style != "") { FlyStyle = _style; }
}

