function checkboxclick(element){
	id=element.id;

	if ((element.id.substr(0,3)=='tc_')||(element.id.substr(0,3)=='tf_')){ //clicknato na text-a
		id=element.id.substr(3,element.id.length);
		document.getElementById(id).checked=!document.getElementById(id).checked;
	}

	if (id.substr(id.length-1,1)=='_'){
		idd=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,idd.length)==idd)	{
					if (!node.disabled)
						node.checked=document.getElementById(idd).checked;
				}
			}
		}
	}else{
		rx=new RegExp('(_[^\_]*?)+_([^\_]*?)$');
		if (rx.exec(id)){
			rx=new RegExp('_([^\_]*?)$');
			idd=id.replace(rx,'_');
			document.getElementById(idd).checked=false;
			chk=true;
			if (document.all || document.getElementById) {
				navRoot = document.getElementsByTagName("input");
				if (navRoot.length>1)for (i=0; i<navRoot.length; i++) {
					node = navRoot[i];
					if ((node.id.substr(0,idd.length)==idd)&&(node.id!=idd))	{
						if (!node.disabled){
							chk=chk&&node.checked;
						}
					}
				}
			}
			document.getElementById(idd).checked=chk;
		}
	}
}

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);
        }
    }
}

function startList2() {
		if (document.all&&document.getElementById) {
			navRoot = document.getElementsByTagName("div");
			for (i=0; i<navRoot.length; i++) {
				node = navRoot[i];
					node.onmouseover=function() {
						this.className+=" over";
						status=(this.className);
					}
					node.onmouseout=function() {
						this.className=this.className.replace(" over", "");
					}
			}
			navRoot = document.getElementsByTagName("li");
			for (i=0; i<navRoot.length; i++) {
				node = navRoot[i];
					node.onmouseover=function() {
						this.className+=" over";
						status=(this.className);
					}
					node.onmouseout=function() {
						this.className=this.className.replace(" over", "");
					}
			}
		}
}

function popup(url, width, height){
	var winpops=window.open(url,"","width="+width+",left=80,top=80,height="+height);
}

function init(){
startList2();
}