
// used for the message submission switch

function shn_switch(id,roomNum) {
	var elm = document.getElementById(id);
	elm.value = 1;
	cleanTabSend(roomNum);
}
function shn_switchOff(id) {
	var elm = document.getElementById(id);
	elm.value = 0;
}
function changeClass(id,newClass){
	var elm = document.getElementById(id);
	elm.className = newClass;
}
//This removes a class (theClass) from all elements with that class from within a given id (ObjContainer)

var allPageTagsB = new Array(); 

function cleanTabSend(roomNum) {
//Populate the array with all the page tags
var Obj = document.getElementById('sendMsgOpt'+roomNum);
var allPageTagsB=Obj.getElementsByTagName("a");
//Cycle through the tags using a for loop
	for (i=0; i<allPageTagsB.length; i++) {
	//Pick out the tags with our class name
		if (allPageTagsB[i].className=='submitChoice') {
		//Manipulate this in whatever way you want
		allPageTagsB[i].className='submitChoiceOff';
		}
	}
}
//This removes a class (theClass) from all elements with that class from within a given id (ObjContainer)

var allPageTagsC = new Array(); 

function switchOffTabs(roomName) {
//Populate the array with all the page tags
var Obj = document.getElementById('sendMsgOpt'+roomName);
var allPageTagsC=Obj.getElementsByTagName("input");
//Cycle through the tags using a for loop
	for (i=0; i<allPageTagsC.length; i++) {
	//Pick out the tags with our class name
		if (allPageTagsC[i].className=='rdo'+roomName+'TabSelect') {
		//Manipulate this in whatever way you want
		allPageTagsC[i].value=0;
		}
	}
}