function initMenu(menuid) {
	if (document.all && document.getElementById) {
		navRoot = document.getElementById(menuid);
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName == "LI") {
				node.onmouseover = function() {
					this.className += " over";
  				}
  				node.onmouseout = function() {
  					this.className = this.className.replace(" over", "");
   			}
   		}
  		}
 	}
}

tmpopth = null;
tmpoptd = null;
function initHotove()
{

	sel = document.getElementsByName('platba')[0];
	for(var i = 0; i < sel.options.length; i++)
	{
		if(sel.options[i].value == '2')
		{
		tmpopth = sel.options[i];
		}
		if(sel.options[i].value == '1')
		{
		tmpoptd = sel.options[i];
		}
	}

	sel.options[0] = null;
	sel.options[1] = null;
}

	prevopt = null;
function checkHotove(val)
{
	if(tmpopth == null || tmpoptd == null)return;

	sel = document.getElementsByName('platba')[0];

	try
	{
		sel.options[0] = null;
	}
	catch(ex){}
	try
	{
		sel.options[1] = null;
	}
	catch(ex){}

	try
	{
	if(val=="107993"||val=="105164")
	{
		//alert(tmpopth);
		sel.options.add(tmpopth);
	}
	if(val=="107965"||val=="106902")
	{
		sel.options.add(tmpoptd);
		//alert(tmpoptd);
	}
	}
	catch(ex){}
}

function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}

window.onload = function() {
	initMenu("topmenu");
	externalLinks();
}

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_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_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 swapImages(strThisObjName){
	this.knownAs=strThisObjName;
	this.iWaitMillis=4000;
	this.swapImages=Array();
	this.imageSizes=Array();
	this.swapTitles=Array();
	this.swapLinks=Array();
	this.openSizes=Array();
	this.imageID="";
	this.titleID="";
	this.LinkID="";
	this.prevImage=-1;
	this.currImage=0;
	this.showFilter=(parseFloat(navigator.appVersion.split("MSIE")[1])>=5.5)?1:0;
}

swapImages.prototype.addImage=function(strURL,strTitle,strLink,imgWidth,imgHeight,linkHeight,linkWidth){
	if(document.images){
		var temp=new Image()
		temp.src=strURL;
	}
	this.swapImages[this.swapImages.length]=strURL;
	this.swapTitles[this.swapTitles.length]=strTitle;
	this.imageSizes[this.imageSizes.length]=new Array(imgWidth,imgHeight);
	this.swapLinks[this.swapLinks.length]=strLink?strLink:'#';
	this.openSizes[this.openSizes.length]=new Array(linkWidth,linkHeight);

}

swapImages.prototype.setOpacity=function(obj, opacity) {
  opacity = (opacity == 100)?99.999:opacity;
  // IE/Win
  obj.style.filter = "alpha(opacity:"+opacity+")";
  // Safari<1.2, Konqueror
  obj.style.KHTMLOpacity = opacity/100;
  // Older Mozilla and Firefox
  obj.style.MozOpacity = opacity/100;
  // Safari 1.2, newer Firefox and Mozilla, CSS3
  obj.style.opacity = opacity/100;
}

swapImages.prototype.fade=function(objId,opacity,increment,delay) {
  increment=increment?increment:10;
  delay=delay?delay:100;
  if (document.getElementById) {
    obj = document.getElementById(objId);
    if (opacity <= 100 && opacity >= 0) {
      this.setOpacity(obj, opacity);
      opacity += increment;
      window.setTimeout(this.knownAs+".fade('"+objId+"',"+opacity+","+increment+","+delay+")", delay);
    }else{
		document.getElementById(this.imageID).src=document.getElementById(this.imageID+'_over').src;
		document.getElementById(this.imageID+'_over').style.visibility='hidden';
	}
  }
}


swapImages.prototype.transImage=function(oImg) {
	oImg.filters(0).Apply();
    oImg.style.visibility = "visible";
    oImg.filters(0).Play();
}

swapImages.prototype.switchImage=function() {
	this.prevImage=this.currImage;
	this.currImage++;
	newImage = this.swapImages[this.currImage];
	if (this.showFilter == 1) {
		this.transImage(document.getElementById(this.imageID));
		document.getElementById(this.imageID).src = newImage;
	}else{
		this.swapImage(this.imageID,'',newImage);
	}if(document.getElementById(this.linkID))
		if(this.swapLinks[this.currImage])
			document.getElementById(this.linkID).href = this.swapLinks[this.currImage];
		else{
			if(document.getElementById(this.linkID))
				document.getElementById(this.linkID).href = '#';
		}
	if(document.getElementById(this.titleID))
		if(this.swapTitles[this.currImage])
			document.getElementById(this.titleID).innerHTML = this.swapTitles[this.currImage];
		else
			document.getElementById(this.titleID).innerHTML = '&nbsp;';

}

swapImages.prototype.swapImage=function() {
	var i,j=0,x,a=this.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];}
}

swapImages.prototype.swap=function() {
	if(this.currImage==this.swapImages.length-1) this.currImage=-1;
	this.switchImage();
}

swapImages.prototype.getRealLeft=function(obj) {
    xPos = obj.offsetLeft;
    tempEl = obj.offsetParent;
    while (tempEl != null) {
        xPos += tempEl.offsetLeft;
        tempEl = tempEl.offsetParent;
    }
    return xPos;
}

swapImages.prototype.getRealTop=function(obj) {
    yPos = obj.offsetTop;
    tempEl = obj.offsetParent;
    while (tempEl != null) {
        yPos += tempEl.offsetTop;
        tempEl = tempEl.offsetParent;
    }
    return yPos;
}