// JavaScript Document
var  j=0;
var maxPodp=4; //количество слоев, содержащих меню второго уровня

function newColor(idCell) {
if (document.all) eval('document.all.'+idCell+'.style.background = "#328e0d"');
else eval('document.getElementById("' + idCell + '").style.background = "#328e0d"')
}

function backColor(idCell) {
if (document.all) eval('document.all.'+idCell+'.style.background = ""');
else eval('document.getElementById("' + idCell + '").style.background = ""')
}

function podmenu(idTD, newHREF,act) {
if (idTD >= maxPodp) top.location.href=newHREF; 
else
	if (idTD==act)   {
		for (i=1; i<maxPodp; i++)  if (idTD!=i) eval('document.getElementById("m' + i + '").style.display= "none"'); 
		j=0;}
	else  
		if (j!=idTD)     {
				j=idTD;
				for (i=1; i<maxPodp; i++)     if (idTD!=i) { if (i!=act) eval('document.getElementById("m' + i + '").style.display= "none"');}
															  else            eval('document.getElementById("m' + idTD+ '").style.display= ""');}
         else {eval('document.getElementById("m' + idTD+ '").style.display= "none"'); j=0;}
}
