function DemoBgr(what,where)
{

bgr = what.style.background;

document.getElementById("DemoBgr"+where).style.background = bgr;
document.getElementById("DemoBgr"+where).style.height = "100px";

//	document.getElementById(what).style.display = (a=="none") ? 'block' : 'none';
}


function SwitchMe(what)
{
a = document.getElementById(what).style.display;
	document.getElementById(what).style.display = (a=="none") ? 'block' : 'none';
}

function WriteTitle(elem,text)
{

e = "lbl"+elem;
document.getElementById(e).innerHTML = " - "+text;
}


function MapServido(que)
{
var kraje = Array('JC','JM','KH','KV','LI','MS','OL','PA','PL','ST','US','VY','ZL','PH');

$('InteraktivMap').className="map-"+kraje[que]+" WhiteBox";

var list = store[que];
var box2 = document.forms[0].lokalita;

box2.options.length = 0;

for(i=0;i<list.length;i++)
{
box2.options[i] = new Option(list[i],list[i]);
}


}






function populate(que)
{
if (!optionTest) return;
var box = document.forms[0].first;
var number = box.options[box.selectedIndex].value;

if (!number) return;
var list = store[number];
var box2 = document.forms[0].second;
box2.options.length = 0;

for(i=0;i<list.length;i+=2)
{
box2.options[i/2] = new Option(list[i],list[i+1]);
}
}





function smit()
{	
	var crossobj=document.getElementById ? document.getElementById('form') : document.all.content
	crossobj.submit();
}

function validator(form)
{

if (form.jmeno.value=="")
	{
	alert("Nevyplnil(a) jste jméno.")
	return false;
	}
	
else if (form.ico.value.length<8)
	{
	alert("Vyplňte prosím IČO vaší firmy.")
	return false;
	}

else if ((form.email.value=="") && (form.telefon.value==""))
	{
	alert("Vyplňtě prosím alespoň jeden kontaktní údaj.")
	return false;
	}	
else return true;

}



/*************************************************************************
  This code is from Dynamic Web Coding at http://www.dyn-web.com/
  Copyright 2003-5 by Sharon Paine 
  See Terms of Use at http://www.dyn-web.com/bus/terms.html
  regarding conditions under which you may use this code.
  This notice must be retained in the code as is!
*************************************************************************/

// This portion of the code should be placed in the head section of the document.  
// Script tags for the external JavaScipt files should be placed just before the end of the document.

function doTooltip(e, msg) {
//  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.show(e, msg);
}

function hideTip() {
  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.hide();
}
	

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 = externalLinks;


