function startMenu(){
 if(document.all&&document.getElementById){
  navmenu=document.getElementById('nav');
  for(i=0;i<navmenu.childNodes.length;i++){
   node=navmenu.childNodes[i];
   if(node.nodeName=='LI'){
    node.onmouseover=function(){this.className+=' over';}
    node.onmouseout=function(){this.className=this.className.replace(' over','');}
   }
  }
 }
}

//if(window.attachEvent){window.attachEvent('onload',startMenu);}else{window.onload=startMenu;}


function showDep(id){
  obj = document.getElementById(id);
  if(obj.style.display=="")
    obj.style.display = 'none';
  else
    obj.style.display = ''; 
}

// rozpocitani
function openRozpWindow(cena){
domena = location.hostname; 

if(domena=='localhost')
  domena = domena+'/netdevelo/uzijsito';

domena += '/'  

if(navigator.appName == 'Microsoft Internet Explorer') {
	width = 220;
	height = 410;
}else{
	width = 200;
	height = 420;
}	

 Fokus = window.open('http://'+domena+'rozpocet.php?cena:'+cena, '', 'scrollbars=no, width='+width+', height='+height+', resizable=yes,left=20, top=20, screenX=20, screenY=20');

	Fokus.focus();
}

// blahoprani
function openBlahWindow(id){
domena = location.hostname; 

if(domena=='localhost')
  domena = domena+'/netdevelo/uzijsito';

domena += '/'  
  
	Fokus = window.open('http://'+domena+'blahoprani_ukazka.php?basketId:'+id, '', 'scrollbars=yes, width=359, height=503, resizable=no,left=20, top=20, screenX=20, screenY=20');

	Fokus.focus();
	return false;
}

function mail_replace(){
var protocol = 'send';

var name, server, i; 
for (i = 0; i < document.links.length; i++) {
	link = document.links[i];
	if(link.protocol=='send:'||link.protocol==''){
	href = link.href;
	name = link.href.substring((protocol.length+1), link.href.indexOf(')'));
	server = link.href.substring((link.href.indexOf(')')+1), link.href.indexOf('('));

	finalHref = name+'@'+server;
	link.firstChild.nodeValue=finalHref;
	link.href='mailto:'+finalHref;
	}
}
}

function do_after_page_load() {
startMenu();
mail_replace();
}
