
 function hidesubs() {
    if (document.getElementById) {
      for (i=0;i<document.getElementsByTagName('ul').length; i++) {
        if(document.getElementsByTagName('ul').item(i).id.substring(0,4) == 'Menu' && document.getElementsByTagName('ul').item(i).id.substring(4) != '0') {
          if(document.getElementsByTagName('ul').item(i).innerHTML.indexOf('current') == -1) { document.getElementById(document.getElementsByTagName('ul').item(i).id).style.display = "none"; }
        }
      }
    }
  }



/*
  // zbalovanie a rozbalovanie ako na upsvar
  function hidesubs() {
    if (document.getElementById) {

      if(document.getElementById('Menu1').innerHTML.indexOf('current') != -1 ) {
        var Block = document.getElementById('Menu1').innerHTML.toLowerCase();
        var Fstart = Block.indexOf('current');
        var Fstop = Block.indexOf('begin',Fstart);
        var SearchStr = Block.substring(Fstart,Fstop);
        var Sstart = SearchStr.indexOf('toggle(\'',SearchStr.indexOf('current'));
        var Sstop = SearchStr.indexOf('\')',SearchStr.indexOf('current'));
        var jump = SearchStr.substring(Sstart,Sstop);
        var jumpId = jump.substring(12,jump.length);
      }


      for (i=0;i<document.getElementsByTagName('ul').length; i++) {
        if(document.getElementsByTagName('ul').item(i).id.indexOf('Menu') != -1) { // ak ma id MenuXXX
          if(document.getElementsByTagName('ul').item(i).id != 'Menu1') { // nie je to id Menu1
            if(document.getElementsByTagName('ul').item(i).innerHTML.indexOf('current') != -1) { // obsahuje currentmenu
              jumpId = 0;
            }
            else {
              if(document.getElementsByTagName('ul').item(i).id == 'Menu'+jumpId) { // vyratane preskocenie vnoreneho submenu
              }
              else { document.getElementById(document.getElementsByTagName('ul').item(i).id).style.display = "none"; }
            }
          }
        }
      }

  }
}
*/


  function toggle(w) {
    if (document.getElementById) {
      document.getElementById(w).style.display = document.getElementById(w).style.display == "none" ? "block" : "none";
    }
  }

  function Zoom(img,w,h) {
	  var myWindow = window.open("","","width="+w+",height="+h);
	  myWindow.document.open();
  	myWindow.document.write("<HTML><HEAD>");
  	myWindow.document.write("<TITLE>Detail</TITLE><link rel='stylesheet' type='text/css' href='Templates/newwin.css'>");
  	myWindow.document.write("</HEAD><BODY onload='focus();'>");
  	myWindow.document.write("<a href='#' onclick='window.close();'><IMG  HEIGHT='"+h+"' WIDTH='"+w+ "' SRC='" + img + "'></a>");
  	myWindow.document.write("</BODY></HTML>");
  	myWindow.document.close();
	}
