// function to replace target="" in xhtml
function openNewWindow(URLtoOpen, windowName, windowFeatures) {
  newWindow = window.open(URLtoOpen, windowName, windowFeatures + "resizable=1,scrollbars=1,toolbar=1");
}

// sets attribute for any html tag
function setAttr(id, attr, attrValue){
	if (document.getElementById && document.getElementById(id)){
		if (attr == 'class' && document.all) attr = 'className';
		document.getElementById(id).setAttribute(attr, attrValue);
	}
}

// function to turn an element "on / off"
function toggleEl(id) {
	el = document.getElementById(id);
	if (el.style['display'] == 'none') {
		el.style['display'] = 'block';
	} else {
		el.style['display'] = 'none';
	}
}