var Visible=0;
function changeDisp(tagid) {
	tagobj=document.getElementById(tagid);
	if (tagobj) {
		if (tagobj.style.display=='none') {

			tagobj.style.display= "";
		} else {
			tagobj.style.display= "none";
		}
	}
}
function toggle(tagid,modul,root_id) {
	var tagobj;
	var src;
	tagobj=document.getElementById('nav' + tagid);
	if (tagobj) {
		if (tagobj.style.display=='none') {

			tagobj.style.display= "";
		} else {
			tagobj.style.display= "none";
		}
	}
	tagobj=document.getElementById('i1_' + tagid);
	src=tagobj.src;
	if (src.search(/_ex\.gif/)!=-1) {
		src=src.replace(/_ex\.gif/,"_co.gif");
	} else if (src.search(/_co\.gif/)!=-1) {
		src=src.replace(/_co\.gif/,"_ex.gif");
	}
	tagobj.src=src;

	tagobj=document.getElementById('i2_' + tagid);
	src=tagobj.src;
	if (src.search(/ex_/)!=-1) {
		src=src.replace(/ex_/,"co_");
	} else if (src.search(/co_/)!=-1) {
		src=src.replace(/co_/,"ex_");
	}
	if (src.search(/expand/)!=-1) {
		src=src.replace(/expand/,"collapse");
	} else if (src.search(/collapse/)!=-1) {
		src=src.replace(/collapse/,"expand");
	}
	tagobj.src=src;
	return false;
}

function setClass(tagid, theAction)
{
    if (Visible!=1 && typeof(document.getElementById) != 'undefined' && document.getElementById(tagid)) {
    	theObj=document.getElementById(tagid);
    }
    else return false;

    var theDefaultClass=theObj.getAttribute("nC");
    var thePointerClass=theObj.getAttribute("oC");

    var currentClass = null;
    var newClass     = null;

    //         valid values with "getAttribute"
    if (typeof(theObj.getAttribute) != 'undefined') {
        currentClass = theObj.getAttribute('class');
    }

    // 4.1 Current color is the default one

    if (currentClass == '' || currentClass == theDefaultClass) {

        if (theAction == 'over' && thePointerClass != '') {
            newClass = thePointerClass;
            marked_row = tagid;
        }

    }   // 4.1.2 Current color is the pointer one
    else if (currentClass == thePointerClass) {
        if (theAction == 'out') {
            newClass = theDefaultClass;
            if (marked_row==tagid) marked_row=0;

        }
    }

    // 5. Sets the new color...
    if (newClass) {
    	theObj.setAttribute('class', newClass, 0);
    }
    return true;
}