function resetStyles() {
	//Create an array
	var allPagetags = new Array();
	//Populate the array with all the page tags
	var allPagetags=document.getElementsByTagName("*");
	//Cycle through the tags using a for loop
	for (i=0; i<allPagetags.length; i++) {
		//Pick out the tags with our class name
		if (allPagetags[i].className == "on") {
			//Manipulate this in whatever way you want
			allPagetags[i].className ="off";
			
		}
	}
}

function showHide (itemId,flag)
{
    resetStyles();
    document.getElementById(itemId).className = (flag) ? 'on' : 'off';
}






