var zobrazit=0;

var act='KK';

//var root='http://www.koberce.biz/htmlclient/';

var root='http://www.koberce-breno.cz/htmlclient/';



function focuse(e) {

    document.getElementById(this.act).style.background="#FFF";

	document.getElementById(this.act).style.fontWeight="normal";

	document.getElementById(this.act).style.lineHeight="14px";    

	document.getElementById(this.act).style.marginTop="5px";

	document.getElementById(this.act).style.borderBottom="1px solid #CCCCCC";	



    document.getElementById(e).style.background="#FFF203";

	document.getElementById(e).style.fontWeight="bold";

	document.getElementById(e).style.lineHeight="20px";    

	document.getElementById(e).style.marginTop="0px";

	document.getElementById(e).style.borderBottom="none";	

	

	if(this.act!=e){

		var sf = document.getElementById('search_frame');

		var bn1 = document.getElementById('banner1');

		var bn2 = document.getElementById('banner2');

		var bn3 = document.getElementById('banner3');

		var bn4 = document.getElementById('banner4');	

		switch(e){

			case 'KK':

			//sf.src=root+"katalog/search.php?typ=sortimentkus";

			sf.src=root+"katalog-search.php?t=1";

			bn1.style.visibility='visible';

			bn2.style.visibility='hidden';

			bn3.style.visibility='hidden';

			bn4.style.visibility='hidden';			

			break;

			case 'KM':

			//sf.src=root+"katalog/search.php?typ=sortimentmetr";

			sf.src=root+"katalog-search.php?t=2";

			bn1.style.visibility='hidden';

			bn2.style.visibility='visible';

			bn3.style.visibility='hidden';

			bn4.style.visibility='hidden';			

			break;

			case 'PVC':

			//sf.src=root+"katalog/search.php?typ=sortimentpvc";

			sf.src=root+"katalog-search.php?t=4";

			bn1.style.visibility='hidden';

			bn2.style.visibility='hidden';

			bn3.style.visibility='visible';

			bn4.style.visibility='hidden';			

			break;

			case 'DP':

			//sf.src=root+"katalog/search.php?typ=sortimentdoplnky";

			sf.src=root+"katalog-search.php?t=3";

			bn1.style.visibility='hidden';

			bn2.style.visibility='hidden';

			bn3.style.visibility='hidden';

			bn4.style.visibility='visible';			

			break;						

		}

		this.act=e;

	}

}



function ShowMenu(n, ncelk) {

  var i;

  var menuid;



  if (zobrazit!=n) {

    zobrazit=n;

    for (i=1; i<=ncelk; i++) {

      menuid=('menu'+i);

      if (i==n) {

        document.getElementById(menuid).style.visibility='visible';

      }

      else {

        document.getElementById(menuid).style.visibility='hidden';

      }

    }

  }

}



function OverMenu(n) {

  zobrazit=n;

}



function HideMenuAction(n) {

  if (zobrazit==0) {

    menuid=('menu'+n);

    document.getElementById(menuid).style.visibility='hidden';

  }

}



function HideMenu(n) {

  zobrazit=0;

  window.setTimeout("HideMenuAction("+eval(n)+")", 1000);

}



function HideMenuBox(n) {

  menuid=('menu'+n);

  window.setTimeout("document.getElementById(menuid).style.visibility='hidden';", 1000);

  otevrene=0;

}



function Hidden(id) {

    document.getElementById(id).style.visibility = 'hidden';

    UnSelected(id);

}



function UnSelected(id) {

    document.getElementById(id+'-city').style.fontWeight="normal"

    //document.getElementById(id+'-city').style.textDecoration = 'none';

  //  document.getElementById(id+'-city').style.background = '#404040';

}



function Selected(id) {

    document.getElementById(id+'-city').style.fontWeight = 'bold';

    //document.getElementById(id+'-city').style.textDecoration = 'underline';

    //document.getElementById(id+'-city').style.background= '#FF0000';

    

}

  

function Visible(id) {

    Hidden('Usti');

    Hidden('Chomutov');

    Hidden('Prostejov');

    Hidden('Kladno');

    Hidden('Liberec');

    Hidden('Boleslav');

    Hidden('Praha');

    Hidden('Plzen');

    Hidden('Pardubice');

    Hidden('Hradec_Kralove');

    Hidden('Brno');

    Hidden('Olomouc');

    Hidden('Kolin');

    Hidden('Opava');

    Hidden('Hlucin');

    Hidden('Prerov');

    Hidden('Mesto');

    Hidden('Sternberk');

    Hidden('Zlin');

    Hidden('Jesenik');

    Hidden('Sumperk');

    Hidden('Frydek_Mistek');

    Hidden('Hranice');

    Hidden('Postrelmov');

    Hidden('Svitavy');

    Hidden('Ceske_Budejovice');

    Hidden('Unicov');

	Hidden('Breclav');

	Hidden('Ceska_Lipa');

    

  // Hidden('Bratislava');

  // Hidden('Nitra');

  // Hidden('Trencin');

    

    if (id!='0') document.getElementById(id).style.visibility = "visible";

    if (id!='0') Selected(id);

}



function open_map1() { mapWindow = window.open(""); }

function open_map2() { mapWindow = window.open(""); }

function open_map3() { mapWindow = window.open(""); }

function open_map4() { mapWindow = window.open("http://maps.google.sk/maps?hl=cs&georestrict=input_srcid:d2e144ea3c373d5c&ie=UTF8&view=map&cid=15201575798212038485&q=KOBERCE+BRENO&iwloc=A&ved=0CBwQpQY&sa=X&ei=BjYrTauRC9OY_QaIo-SBDQ"); }

function open_map5() { mapWindow = window.open(""); }

function open_map6() { mapWindow = window.open(""); }

function open_map7() { mapWindow = window.open(""); }

function open_map8() { mapWindow = window.open(""); }

function open_map9() { mapWindow = window.open(""); }

function open_map10() { mapWindow = window.open(""); }

function open_map11() { mapWindow = window.open(""); }

function open_map12() { mapWindow = window.open(""); }

function open_map13() { mapWindow = window.open(""); }

function open_map14() { mapWindow = window.open(""); }

function open_map15() { mapWindow = window.open(""); }

function open_map16() { mapWindow = window.open(""); }

function open_map17() { mapWindow = window.open(""); }

function open_map18() { mapWindow = window.open(""); }

function open_map19() { mapWindow = window.open(""); }

function open_map20() { mapWindow = window.open(""); }

function open_map21() { mapWindow = window.open("http://maps.google.sk/maps?hl=cs&georestrict=input_srcid:7ff1fc9a4b84a888&ie=UTF8&view=map&cid=16970664677962317603&q=KOBERCE+BRENO&iwloc=A&ved=0CBsQpQY&sa=X&ei=GzcrTchzkaP-BqzZ0P0M"); }

function open_map22() { mapWindow = window.open(""); }

function open_map24() { mapWindow = window.open(""); }

function open_map25() { mapWindow = window.open(""); }

function open_map26() { mapWindow = window.open(""); }

function open_map27() { mapWindow = window.open(""); }

function open_map28() { mapWindow = window.open(""); }

function open_map29() { mapWindow = window.open(""); }

function open_map30() { mapWindow = window.open("http://maps.google.sk/maps?hl=cs&georestrict=input_srcid:24a8d32c64700226&ie=UTF8&view=map&cid=17615226192629583345&q=KOBERCE+BRENO&iwloc=A&ved=0CBsQpQY&sa=X&ei=hDgrTaLsLNOY_QbwnIiADQ"); }

function open_map31() { mapWindow = window.open("http://maps.google.sk/maps?hl=cs&georestrict=input_srcid:40cf969c6385319e&ie=UTF8&view=map&cid=1412611812855705771&q=KOBERCE+BRENO&iwloc=A&ved=0CBsQpQY&sa=X&ei=8jcrTaGUEI69_galvJGRBQ"); }

function open_map32() { mapWindow = window.open("http://maps.google.sk/maps?hl=cs&georestrict=input_srcid:65a2165740ee97c1&ie=UTF8&view=map&cid=11133488135075475544&q=KOBERCE+BRENO&iwloc=A&ved=0CBwQpQY&sa=X&ei=cGosTYPoLNaM_gbW3sypCg"); }

function open_map33() { mapWindow = window.open("http://maps.google.sk/maps?hl=cs&georestrict=input_srcid:ee5575417c4b12b7&ie=UTF8&view=map&cid=2034883667686516320&q=BRENO&iwloc=A&ved=0CBwQpQY&sa=X&ei=nDYrTaKXCZGj_gas2dD9DA"); }

function otevrit(druh) {

	var wWidth = window.screen.availWidth;

	var wHeight = window.screen.availHeight;

  	var xpos, ypos = 0;

	var w = 500, h = 350;

  

  	if(wWidth > w) {

    	xpos = (wWidth - w)/2;

  	}

  	if(wHeight > h) {

    	ypos = (wHeight - h)/2;

  	}

window.open("./virtual/" +druh + ".html", "_blank", "status=yes, top=0, left=0, width=350, height=500, status=no, top=" + ypos + ", left=" + xpos);

}


