/**
 * JavaScript mini API 
 * This has PPK (quirksmode.org) origins
 */
 
/**
 * Usage: var myObj = new getObj('my_var_id');
 */
function getObj(name) {
	if (document.all) {
		this.obj = document.all[name];
		this.style = document.all[name].style;
	} else if (document.getElementById) {
		this.obj = document.getElementById(name);
		this.style = document.getElementById(name).style;
	} else if (document.layers) {
		this.obj = getObjNN4(document,name);
		this.style = this.obj;
	}
}

/**
 * toggleDisplay flips the display attribute of an object
 */
function toggleDisplay(objName, forceVal) {
	var theObj = new getObj(objName);
	if (forceVal != null) {
		theObj.style.display = (forceVal == true) ? '' : 'none';
	} else {
		theObj.style.display = (theObj.style.display == 'none') ? '' : 'none';
	}
}

/**
 * showObj and hideObj are good for bulk display/hides
 */
function showObj() {
	argv = showObj.arguments;
	for (i = 0; i < argv.length; i ++) {
		thisObj = new getObj(argv[i]);
		thisObj.style.display = '';
	}
}

function hideObj() {
	argv = hideObj.arguments;
	for (i = 0; i < argv.length; i ++) {
		thisObj = new getObj(argv[i]);
		thisObj.style.display = 'none';
	}
}