function ZmenaMenu(objekt)
{
	var hodnota = objekt.options[objekt.selectedIndex].value;

    window.parent.frames["big"].location.href = "tab_cz" + hodnota + ".htm";

	var hodnota_chk = document.forms[0].chcKraj.checked;
	
	if (hodnota_chk) {
		fncNewWin("tab_cz" + hodnota + "p.htm", 900, 700, 10, 10, 0, 0, 1, "nazev1");
	}

    ResetMenu();
}

function ZmenaMenuPovodi(objekt)
{
	var hodnota = objekt.options[objekt.selectedIndex].value;

    window.parent.frames["big"].location.href = "" + hodnota + ".htm";

	var hodnota_chk = document.forms[0].chcKraj.checked;
	
	if (hodnota_chk) {
		fncNewWin("" + hodnota + "p.htm", 900, 700, 10, 10, 0, 0, 1, "nazev1");
	}

    ResetMenu();
}






function ResetMenu()
{
 window.parent.menu.VUSCForm.reset();
 window.parent.menu.PovodiForm.reset();
 
}

function DoExterOkna(linka)  {
	w=window.open (linka,"Male","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=900,height=650,top=0,left=0");
	if (w.top) setTimeout("w.top.focus()",5);
}


//------------------------------------------------------------------------------------

function GetVer() {
	if (document.getElementById) {
	  return "dom";
	}
	else if (document.layers) {
	  return "nn";
	}
	else if (document.all) {
	  return "ie";
	}
}

function viewMap(ukaz,schovej,volic) {
	var BrVer = GetVer();
	var uk = "overview" + ukaz;
  var sch = "overview" + schovej;
  var vol = volic;
	if (BrVer == "nn")
    {
     document.layers[uk].visibility = "show";
     document.layers[sch].visibility = "hidden";
     document.layers["volba"].elements [vol].checked=false;
    } 
	if (BrVer == "dom")
    {
     document.getElementById(uk).style.visibility = "visible";
     document.getElementById(sch).style.visibility = "hidden";
     document.getElementById("volba").elements [vol].checked=false;
    } 
	
  if (BrVer == "ie")
    {
     eval("document.all." + uk).style.visibility = "visible";
     eval("document.all." + sch).style.visibility = "hidden";
     eval("document.all.volba." + vol).checked=false;
    }
}

function viewMap2(ukaz,schovej,schovej2,volic,volic2) {
	var BrVer = GetVer();
	var uk = "overview" + ukaz;
  	var sch = "overview" + schovej;
	var sch2 = "overview" + schovej2;
  	var tab_uk = "legenda_" + ukaz;
  	var tab_sch = "legenda_" + schovej;
	var tab_sch2 = "legenda_" + schovej2;
  	var vol = volic;
	var vol2 = volic2;
	if (BrVer == "nn")
    {
     document.layers[uk].visibility = "show";
     document.layers[sch].visibility = "hidden";
     document.layers[sch2].visibility = "hidden";
     document.layers[tab_uk].visibility = "show";
     document.layers[tab_sch].visibility = "hidden";
     document.layers[tab_sch2].visibility = "hidden";
     document.layers["volba"].elements [vol].checked=false;
     document.layers["volba"].elements [vol2].checked=false;
    } 
	if (BrVer == "dom")
    {
     document.getElementById(uk).style.visibility = "visible";
     document.getElementById(sch).style.visibility = "hidden";
     document.getElementById(sch2).style.visibility = "hidden";
     document.getElementById(tab_uk).style.visibility = "visible";
     document.getElementById(tab_sch).style.visibility = "hidden";
     document.getElementById(tab_sch2).style.visibility = "hidden";
     document.getElementById("volba").elements [vol].checked=false;
     document.getElementById("volba").elements [vol2].checked=false;
    } 
	
  if (BrVer == "ie")
    {
     eval("document.all." + uk).style.visibility = "visible";
     eval("document.all." + sch).style.visibility = "hidden";
     eval("document.all." + sch2).style.visibility = "hidden";
     eval("document.all." + tab_uk).style.visibility = "visible";
     eval("document.all." + tab_sch).style.visibility = "hidden";
     eval("document.all." + tab_sch2).style.visibility = "hidden";
     eval("document.all.volba." + vol).checked=false;
     eval("document.all.volba." + vol2).checked=false;
    }
}

function viewMap3(ukaz,schovej,volic) {
	var BrVer = GetVer();
	var uk = "overview" + ukaz;
  var sch = "overview" + schovej;
  var tab_uk = "legenda_" + ukaz;
  var tab_sch = "legenda_" + schovej;
  var cudl_uk = "cudl_" + ukaz;
  var cudl_sch = "cudl_" + schovej; 
  var vol = volic;
	if (BrVer == "nn")
    {
     document.layers[uk].visibility = "show";
     document.layers[sch].visibility = "hidden";
     document.layers[tab_uk].visibility = "show";
     document.layers[tab_sch].visibility = "hidden";
     document.layers[cudl_uk].visibility = "show";
     document.layers[cudl_sch].visibility = "hidden";
     document.layers["volba"].elements [vol].checked=false;
    } 
	if (BrVer == "dom")
    {
     document.getElementById(uk).style.visibility = "visible";
     document.getElementById(sch).style.visibility = "hidden";
     document.getElementById(tab_uk).style.visibility = "visible";
     document.getElementById(tab_sch).style.visibility = "hidden";
     document.getElementById(cudl_uk).style.visibility = "visible";
     document.getElementById(cudl_sch).style.visibility = "hidden";
     document.getElementById("volba").elements [vol].checked=false;
    } 
	
  if (BrVer == "ie")
    {
     eval("document.all." + uk).style.visibility = "visible";
     eval("document.all." + sch).style.visibility = "hidden";
     eval("document.all." + tab_uk).style.visibility = "visible";
     eval("document.all." + tab_sch).style.visibility = "hidden";
     eval("document.all." + cudl_uk).style.visibility = "visible";
     eval("document.all." + cudl_sch).style.visibility = "hidden";
     eval("document.all.volba." + vol).checked=false;
    }
}

function viewMap4(ukaz,schovej,volic) {
	var BrVer = GetVer();
	var uk = "overview" + ukaz;
  var sch = "overview" + schovej;
  var tab_uk = "legenda_" + ukaz;
  var tab_sch = "legenda_" + schovej;
  var vol = volic;
	if (BrVer == "nn")
    {
     document.layers[uk].visibility = "show";
     document.layers[sch].visibility = "hidden";
     document.layers[tab_uk].visibility = "show";
     document.layers[tab_sch].visibility = "hidden";
     document.layers["volba"].elements [vol].checked=false;
    } 
	if (BrVer == "dom")
    {
     document.getElementById(uk).style.visibility = "visible";
     document.getElementById(sch).style.visibility = "hidden";
     document.getElementById(tab_uk).style.visibility = "visible";
     document.getElementById(tab_sch).style.visibility = "hidden";
     document.getElementById("volba").elements [vol].checked=false;
    } 
	
  if (BrVer == "ie")
    {
     eval("document.all." + uk).style.visibility = "visible";
     eval("document.all." + sch).style.visibility = "hidden";
     eval("document.all." + tab_uk).style.visibility = "visible";
     eval("document.all." + tab_sch).style.visibility = "hidden";
     eval("document.all.volba." + vol).checked=false;
    }

}

function open_popup(page) {
//	var w = screen.width;
//	var h = screen.availHeight;
	var w = 1000;
	var h = 700;
	var l = 0;
	var t = 0;
	var w=window.open(page,'aplportal','toolbar=0,scrollbars=0,location=0,resizable=1,width=' + w + ',height=' + h + ',left=' + l + ',top=' + t + ',status=0');
	w.self.focus();

}
function open_pop(page) {
//	var w = screen.width;
//	var h = screen.availHeight;
	var w = 1000;
	var h = 700;
	var l = 0;
	var t = 0;
	var w=window.open(page,'aplportal','toolbar=0,scrollbars=0,location=0,resizable=1,width=' + w + ',height=' + h + ',left=' + l + ',top=' + t + ',status=0');
	w.self.focus();

}

function OpenWindow(url, jmeno, w, h)
{
    Fokus = window.open(url, jmeno,'resizable=1,location=0,menubar=0,status=0,scrollbars=1,toolbar=0,location=0,top=20,left=20,menubar=0,width=' + w + ',height=' + h);
    Fokus.focus()
}

function jsMenu (parametr) {
   var soubor2;
   var soubor3;
    var soubor4;
 if (parametr == 'vt') {
    soubor2 = 'vt_nadrze_n.htm'
	soubor3 = '../zahlavi.htm'
	soubor4= '../zapati.htm'
    }
if (parametr == 'vt1') {
    soubor2 = 'vt_nadrze.htm'
	soubor3 = '../zahlavi.htm'
	soubor4= '../zapati.htm'
    }
  if (parametr == '4') {
    soubor2 = 'vt_nadrze_n.htm'
	soubor3 = '../zahlavi.htm'
	soubor4= '../zapati.htm'
    }
 if (parametr == '5') {
     
        soubor2 = 'odbery_vypousteni.htm'
	soubor3 = '../zahlavi.htm'
	soubor4 = '../zapati.htm'

    }

 if (parametr == '6') {
     
        soubor2 = 'oblasti_povodi.htm'
	soubor3 = '../zahlavi.htm'
	soubor4 = '../zapati.htm'

    }
   
 if (parametr == '7') {
     
        soubor2 = 'jakost_monitor.htm'
	soubor3 = '../zahlavi1.htm'
	soubor4= '../zapati1.htm'

    }
 if (parametr == 'jak') {
     
        soubor2 = 'jakost_monitor.htm'
	soubor3 = '../zahlavi1.htm'
	soubor4= '../zapati1.htm'

    }
	
	if (parametr == '8') {
     
        soubor2 = 'jakost_profily.htm'
	soubor3 = '../zahlavi.htm'
	soubor4= '../zapati.htm'

    }

	if (parametr == '9') {
     
        soubor2 = 'jakost_zvhs.htm'
	soubor3 = '../zahlavi.htm'
	soubor4= '../zapati.htm'

    }
   if (parametr == 'p') {
        soubor2 = 'p_nadrze.htm'
	soubor3 = '../zahlavi.htm'
	soubor4= '../zapati.htm'
    }
   if (parametr == 'zvhs') {
        soubor2 = 'zvhs_nadrze.htm'
	soubor3 = '../zahlavi.htm'
	soubor4= '../zapati.htm'
    }
    if (parametr == 'lcr') {
     
        soubor2 = 'lcr_nadrze.htm'
	soubor3 = '../zahlavi.htm'
	soubor4 = '../zapati.htm'

    }
    if (parametr == '3') {
    soubor2 = 'jakost_monitor.htm'
	soubor3 = '../zahlavi1.htm'
	soubor4= '../zapati1.htm'
    }
	if (parametr == 'zpv') {
        soubor2 = 'zdroje_pv.htm'
	soubor3 = '../zahlavi.htm'
	soubor4= '../zapati.htm'
    }
    if (parametr == 'vpr') {
        soubor2 = 'vr.htm'
	soubor3 = '../zahlavi.htm'
	soubor4= '../zapati.htm'
    }
	if (parametr == 'vu') {
        soubor2 = 'vuv_vodut.htm'
	soubor3 = '../zahlavi1.htm'
	soubor4= '../zapati1.htm'
   }
    if (parametr == 'chopav') {
        soubor2 = 'vuv_chopav.htm'
	soubor3 = '../zahlavi1.htm'
	soubor4= '../zapati1.htm'
    }
   if (parametr == 'co') {
    soubor2 = 'vuv_citlob.htm'
	soubor3 = '../zahlavi1.htm'
	soubor4= '../zapati1.htm'
   }
 	if (parametr == 'zo') {
        soubor2 = 'vuv_zranob.htm'
	soubor3 = '../zahlavi1.htm'
	soubor4= '../zapati1.htm'
    }
	if (parametr == 'ko') {
        soubor2 = 'vuv_koupob.htm'
	soubor3 = '../zahlavi1.htm'
	soubor4= '../zapati1.htm'
    }
	if (parametr == 'rv') {
        soubor2 = 'vuv_rybvod.htm'
	soubor3 = '../zahlavi1.htm'
	soubor4= '../zapati1.htm'
    }
	if (parametr == 'zu') {
        soubor2 = 'vuv_zapluz.htm'
	soubor3 = '../zahlavi1.htm'
	soubor4= '../zapati1.htm'
    }
	if (parametr == 'op') {
        soubor2 = 'vuv_ochrpas.htm'
	soubor3 = '../zahlavi1.htm'
	soubor4= '../zapati1.htm'
    }
	if (parametr == 'ra') {
        soubor2 = 'vuv_hydrorajon.htm'
	soubor3 = '../zahlavi1.htm'
	soubor4= '../zapati1.htm'
    }
	if (parametr == 'svu') {
        soubor2 = 'vuv_stavut.htm'
	soubor3 = '../zahlavi1.htm'
	soubor4= '../zapati1.htm'
   }
	if (parametr == 'eko') {
        soubor2 = 'vuv_ekopot.htm'
	soubor3 = '../zahlavi1.htm'
	soubor4= '../zapati1.htm'
    }
if (parametr == 'me') {
        soubor2 = 'meliorace.htm'
	soubor3 = '../zahlavi.htm'
	soubor4= '../zapati.htm'
    }

 window.parent.frames['main'].location.href = soubor2;
 window.parent.frames['zahlavi'].location.href = soubor3;
 window.parent.frames['zapati'].location.href = soubor4;
}
function DoCevt(povodi)  {
	var page = "http://voda.gov.cz/mapsphere/mze/?uloha=cevt&povodi="+povodi;

	var toppx = 10;
	var leftpx = screen.availWidth - 900;
	whn = window.open(page, "CEVT", "Width=850,Height=680,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,top="+toppx+",left="+leftpx);
	whn.self.focus();
}

function DoCtej(povodi)  {
	var page = "http://voda.gov.cz/mapsphere/mze/?uloha=ctej&povodi="+povodi;

	var toppx = 10;
	var leftpx = screen.availWidth - 900;
	whn = window.open(page, "CEVT", "Width=850,Height=680,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,top="+toppx+",left="+leftpx);
	whn.self.focus();
}

function DoMelio(povodi)  {
	var page = "http://voda.gov.cz/mapsphere/mze/?uloha=melio&povodi="+povodi;

	var toppx = 10;
	var leftpx = screen.availWidth - 900;
	whn = window.open(page, "CEVT", "Width=850,Height=680,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,top="+toppx+",left="+leftpx);
	whn.self.focus();
}

