function check_all(id) { //checkva vsi4ki enabled checkboxove na koito id-to zapo4va s "id"
	
	if (document.all || document.getElementById) {
		navRoot = document.getElementsByTagName("input");
		for (i=0; i<navRoot.length; i++) {
			node = navRoot[i];
			if (node.id.substr(0,id.length)==id)	{
				if (!node.disabled)
					node.checked=document.getElementById(id).checked;
			}
		}
	}
}

function uncheck_all(id) { //checkva vsi4ki enabled checkboxove na koito id-to zapo4va s "id"
	var p=true;
	if (document.all || document.getElementById) {
		navRoot = document.getElementsByTagName("input");
		for (i=0; i<navRoot.length; i++) {
			node = navRoot[i];
			if (node.id.substr(0,id.length)==id && node.id!=id){
				if (!node.checked) p=false;
			}
		}
		document.getElementById(id).checked=p;
	}
}

function getObjectById(id) {
    for (i=0; i<document.all.length; i++) {
        if (document.all(i).id==id) {
            return document.all(i);
        }
    }
}

startList2 = function() {
	if (navigator.userAgent.indexOf('Opera') == -1) {
		if (document.all&&document.getElementById) {
			navRoot = document.getElementsByTagName("tr");
			for (i=0; i<navRoot.length; i++) {
				node = navRoot[i];
				if ((node.className=='ktr_1')||(node.className=='ktr_2')){
					node.onmouseover=function() {
						this.className+=" over";
					}
					node.onmouseout=function() {
						this.className=this.className.replace(" over", "");
					}
				}
			}
		}
	}
}

function popup(url,width,height){
	var winpops=window.open(url,"","scrollbars, width="+width+",left=5,top=5,height="+height);
}

function popup_imgs(url,width,height){
	var winpops=window.open(url,"","'toolbar=no,scrollbars=yes,resizable=1', width="+width+",left=5,top=5,height="+height);
}

function popup_notes(url,width,height){
	var winpops=window.open(url,"","'toolbar=no,scrollbars=yes,resizable=1', width="+width+",left=5,top=5,height="+height);
}

function showhide(what,what2) {
	if (what.style.display=='none')	{
		what.style.display='';
		what2=open.src
	}else{
		what.style.display='none'
		what2=closed.src
	}
}

function hide(what) {
	what.style.display='none'
	what2=closed.src
}
