

function swapClass(obj, new_style) {
    obj.className = new_style;
}
function go11() {
	first.filters('Alpha').Opacity=100;
}
function down11() {
	first.filters('Alpha').Opacity=50;
}

nn4=(document.layers)?true:false;
ie4=(document.all)?true:false;
niemac=(navigator.appVersion.indexOf("Macintosh")==-1);
ie4=ie4 && niemac;
v4 = ie4 || nn4;

ie4 = true;

isExpanded=false;
function reDo(){window.location.reload()}


function isie() {
	stan = (document.all)?true:false;
	return(stan);
}

function getele(id_ele) {
	if(isie()) {
		return(document.all[id_ele]);
	} else {
		return(document.getElementById(id_ele));
	}
}

function gettags(id_ele) {
	if(isie()) {
		return(document.all.tags(id_ele));
	} else {
		return(document.getElementsByTagName(id_ele));
	}
}


function getIndex(el) {
	var ind=null;
	for (i=0; i<document.layers.length; i++) {
		whichEl=document.layers[i];
		if (whichEl.id==el) {
			ind=i;
			break;
		}
	}
	return ind;
}

var prev_link = null;

function expandIt2(el, id_up) {
	if(!isie() && id_up!=null) {
		window.location = 'menu.html?id_up=' + id_up;		
	} else {
		parentE1 = getele(el + "link");
		if(parentE1 != null) {
			parentE1.style.color = 'red';
			parentE1.style.fontWeight = 'bold';
		}
		if(prev_link != null) {
			prev_link.style.color = '#000000';
			prev_link.style.fontWeight = 'normal';
		}
		prev_link = parentE1;
	}
}

function expandIt(el, id_up) {

	if(!isie() && id_up!=null) {
		window.location = 'menu.html?id_up=' + id_up;
	} else {
//	if (!v4) {return}
//	if (nn4) {expandNN(el);
	//moveTo("stopka",-5,oknoH-70);
//	} else {
		isOpen= 1;

//		whichEl=eval(el + "child");
		whichEl = getele(el + "child");
		parentE1 = getele(el + "link");
//		alert(parentE1);

		if(prev_link != null) {
			prev_link.style.color = '#000000';
			prev_link.style.fontWeight = 'normal';
		}

		if(parentE1 != null) {
			parentE1.style.color = 'red';
			parentE1.style.fontWeight = 'bold';
		}

		prev_link = parentE1;

		if(whichEl == null) {
			closeAll();
			return(0);
		}
/*
		if (!whichEl.isExpanded) {
			isOpen = 1;
		} else {
			isOpen = 2;
		}
*/
//alert(isOpen);

		closeAll();

		if (isOpen == 1) {
			whichEl.style.display="block";
//			whichEl.setAttribute('isExpanded' ,'true');
			whichEl.isExpanded = true;
		} else {
			whichEl.style.display="none";
//			whichEl.setAttribute('isExpanded', 'teu');
			whichEl.isExpanded = false;
		}
	}
}


function closeAll() {
//	divColl=document.all.tags("TD");
//	divColl=document.getElementsByTagName("TD");
	divColl=gettags("TABLE");
	for (i=0; i<divColl.length; i++) {
//		if (divColl(i).className == "child") {
		if (divColl[i].getAttribute('nametd') == "child") {
			divColl[i].style.display="none";
//			divColl[i].style.visibility="show";
			divColl[i].setAttribute('isExpanded', false);
		}
	}
}

function closeAllDIV() {
	divColl=document.all.tags("DIV");
	for (i=0; i<divColl.length; i++) {
		if (divColl(i).className == "child") {
			divColl(i).style.display="none";
			divColl(i).setAttribute('isExpanded' , 'false');
		}
	}
}

function expandIE(el) {
	whichEl=eval(el + "child");
	if (!whichEl.getAttribute('isExpanded')) {
		whichEl.style.display="block";
		whichEl.setAttribute('isExpanded', 'true');
	} else {
		whichEl.style.display="none";
		whichEl.setAttribute('isExpanded', 'false');
	}
}

function expandNN(el) {
	whichEl= document.layers[el + "child"];
	if (whichEl.visibility == "hide") {
		whichEl.visibility="show";
		whichEl.isExpanded=true;
	} else {
		whichEl.visibility="hide";
		whichEl.isExpanded=false;
	}
}
