
function switchid(id,maxid) { 
//	alert("prepnu "+id);
	hideallids(maxid);
	showdiv(id);
	
	
	
}

function ZmenBarvu(id,maxid,nova,puvodni) {
  //if (maxid>6) {
  
  //var idlabel=new Array('vypuc_lista1','vypuc_lista2','vypuc_lista3','vypuc_lista4','vypuc_lista5','vypuc_lista6','vypuc_lista7','vypuc_lista8','vypuc_lista9');
  /*}
  else
  { */
  var idlabel=new Array('zaznam_lista1','zaznam_lista2','zaznam_lista3','zaznam_lista4','zaznam_lista5','zaznam_lista6','zaznam_lista7','zaznam_lista8','zaznam_lista9');
  //}
  
  
 
 
	//loop through the array and hide each element by id
	for (var j=0;j<idlabel.length;j++) {
	
	 //alert(nova);
	
	 if (id==idlabel[j]) {
	   //document.getElementById(id).style.backgroundColor=puvodnibarva;
	   //document.getElementById(id).style.backgroundColor='#FFF0A4';
	   document.getElementById(id).style.backgroundColor=nova;
	   document.getElementById(id).style.top="-3px";
	   document.getElementById(id).style.height="40px";
	 }
	 else
	 {
	   //background-color:#FFFFE9;
	   document.getElementById(idlabel[j]).style.backgroundColor=puvodni;
	   document.getElementById(idlabel[j]).style.top="0px";
	   document.getElementById(idlabel[j]).style.height="35px";
	   
	 } 
	  
	}
	
	
}


function ZmenBarvuV(id,maxid,nova,puvodni) {
  //if (maxid>6) {
  
  var idlabel=new Array('vypuc_lista1','vypuc_lista2','vypuc_lista3','vypuc_lista4','vypuc_lista5','vypuc_lista6','vypuc_lista7','vypuc_lista8','vypuc_lista9');
  /*}
  else
  { */
  //var idlabel=new Array('zaznam_lista1','zaznam_lista2','zaznam_lista3','zaznam_lista4','zaznam_lista5','zaznam_lista6','zaznam_lista7','zaznam_lista8','zaznam_lista9');
  //}
  
  
 
 
	//loop through the array and hide each element by id
	for (var j=0;j<idlabel.length;j++) {
	
	 //alert(nova);
	
	 if (id==idlabel[j]) {
	   //document.getElementById(id).style.backgroundColor=puvodnibarva;
	   
	   //document.getElementById(id).style.backgroundColor='#FFF0A4';
	   document.getElementById(id).style.backgroundColor=nova;
	   document.getElementById(id).style.top="-3px";
	   document.getElementById(id).style.height="40px";
	 }
	 else
	 {
	     //background-color:#FFFFE9;
	   document.getElementById(idlabel[j]).style.backgroundColor=puvodni;
	   document.getElementById(idlabel[j]).style.top="0px";
	   document.getElementById(idlabel[j]).style.height="35px";
	   
	 } 
	  
	}
	
	
}


function hideallids(maxid) {
	//loop through the array and hide each element by id

	var ids=new Array('view_rec1','view_rec2','view_rec3','view_rec4','view_rec5','view_rec6','view_rec7','view_rec8','view_rec9' );

  

	for (var i=0;i<ids.length;i++){
		hidediv(ids[i]);
	}		  
}

function hidediv(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById(id)) { // DOM3 = IE5, NS6
	document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			//document.all.id.style.display = 'none';
		}
	}
}

function showdiv(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			//document.all.id.style.display = 'block';
		}
	}
}



