function changeBgColor(elemId, color) //Changes background colour
{
	elem = document.getElementById(elemId);
	elem.style.backgroundColor = color;
}

/*
function youraccount(aElem){ //Loads pages in two frames
parent.frames['navmenu'].location.href="youraccountmenu.html";
parent.frames['main'].location.href="manageusers.html";
aElem.focus();
}
function yourfleet(aElem){ //Loads pages in two frames
parent.frames['navmenu'].location.href="yourfleetmenu.html";
parent.frames['main'].location.href="mainframe.html";
aElem.focus();
}
function mappingtools(aElem){ //Loads pages in two frames
parent.frames['navmenu'].location.href="mappingtoolsmenu.html";
parent.frames['main'].location.href="plotmobiles.html";
aElem.focus();
}
function activitymanagement(aElem){ //Loads pages in two frames
parent.frames['navmenu'].location.href="activitymanagementmenu.html";
parent.frames['main'].location.href="fleetstatus.html";
aElem.focus();
}
function messaging(aElem){ //Loads pages in two frames
parent.frames['navmenu'].location.href="messagingmenu.html";
parent.frames['main'].location.href="mainframe.html";
aElem.focus();
}
*/

/*
 * Change Check Boxes
 * 
 * Checks the status of the check boxes (checked or unchecked) and 
 * if checked, checks all the other boxes in the list.
 * if unchecked, unchecks all the other boxes in the list.
 */
function changeCheckBoxes(status, list)
{
	if (status.checked == 1) checkAll(list);
	else uncheckAll(list);
}

/*
 * Check All
 * 
 * Checks all the boxes in the given list of checkboxes.
 */
function checkAll(list)
{
	for (i = 0; i < list.length; i++)
		list[i].checked = true ;
}

/*
 * Uncheck All
 * 
 * Unchecks all the boxes in the given list of checkboxes.
 */
function uncheckAll(list)
{
for (i = 0; i < list.length; i++)
	list[i].checked = false ;
}

/* Jump Main Frame
 *
 * Sets the location of the main window frame.
 */
function jumpMainFrame(url)
{
	parent.frames["main"].location.href=url;	
}

/* Auto Size Form
 *
 * Auto sizes parent iframe to dynamically match form size.
 */
function autoSizeForm(iFrameId)
{
	moz = document.getElementById && !document.all;
	mozHeightOffset = 20;
	
	document.getElementById(iFrameId).height = 280; // required for Moz bug, value can be "", null, or integer
	var heightPx = window.frames[iFrameId].document.body.scrollHeight + (moz?mozHeightOffset:0);
	if (heightPx < 230)
		document.getElementById(iFrameId).height = 230;
	else
		document.getElementById(iFrameId).height = heightPx;
}

/*
 * Select Radio Button 
 * 
 * Selects a radio button with the given id.
 */
function SelectRadioButton(radiobuttonId)
{
	document.getElementById(radiobuttonId).checked = true;
}

/*
*	Tableaux.
*/

function HighlightRow(trTag, styleClass)
{
	trTag.className = styleClass;
}

