//---------------------------------------------//
// Bestimmung des Browsertyps                  //
//---------------------------------------------//
var IE4 = IE5 = NS4 = NN4 = NS6 = false;             // Initialisierung der Browserflags

var IE4 = (document.all && !document.getElementById) ? true : false;
var IE5 = (document.all && document.getElementById) ? true : false;
var NS4 = (document.layers) ? true : false;
var NS6 = (document.getElementById && !document.all) ? true : false;
var DOM = (document.childNodes) ? true : false;
var NN4 = NS4;

// ---------------------------------------------------
// toggle an HTML element 
// ---------------------------------------------------
function dc_toggle(idObj, isTr) {

	this.isUndefined = function(obj) {
  		return (typeof(obj) == "undefined");
	};
	this.isNull = function(obj) {
  		return ((typeof(obj) == "object") && (obj === null));
	};
	this.isNative = function(obj) {
		return (!isUndefined(obj) && !isNull(obj) && (typeof(obj.constructor) == "function"));
	};
	this.isBoolean = function(obj) {
		return (isNative(obj) && (obj.constructor == Boolean));
	};
	this.isString = function(obj) {
  		return (isNative(obj) && (obj.constructor == String));
	};
	this.isArray = function(obj) {
  		return (isNative(obj) && (obj.constructor == Array));
	};
	
	
	var isTrs = new Array();
	if(isArray(isTr)) {
		isTrs = isTr;
	}
	else if(isString(isTr)) {
		isTrs.push(isTr);
	}

	
	var ids = new Array();
	if(isArray(idObj)) {
		ids = idObj;
	}
	else if(isString(idObj)) {
		ids.push(idObj);
	}
	
	for(var i=0; i < ids.length; ++i) {

		target = document.getElementById(ids[i]);
		
        if (target.style.display == "none") {
				if( (isTrs[i] == true || isTrs[i] == "true") &&
				        !IE5) {
						
					target.style.display = "table-row";
				}
				else {
					target.style.display = "inline";
				}
        } 
        else {
                target.style.display = "none";
        } 
    }
}
