function imageSwap(obj, img) {
	if(typeof(obj)=="string"){obj = document.images[obj];}
	if(!obj) return;
	obj.setAttribute("src", img);
}


function deselectTab(obj) {
	if(typeof(obj)=="string"){obj = document.getElementById(obj);}
	if(!obj) return;
	var group = obj.getAttribute("group");
	group = document.getElementById(group);
	if(!group) return;
	
	var childNormalClass = group.getAttribute("childNormalClass");
	obj.className = childNormalClass;
}


function selectTab(obj) {
	if(typeof(obj)=="string"){obj = document.getElementById(obj);}
	if(!obj) return;
	var group = obj.getAttribute("group");
	group = document.getElementById(group);
	if(!group) return;

	var childSelectedClass = group.getAttribute("childSelectedClass");
	obj.className = childSelectedClass;	

	if(!window[group.getAttribute("id")]){window[group.getAttribute("id")] = new Object();}
	if(window[group.getAttribute("id")].selected){deselectTab(window[group.getAttribute("id")].selected);}
	window[group.getAttribute("id")].selected = obj;
}