var isNS4	= (document.layers) ? true : false;
var isIE4	= (document.all && !document.getElementById) ? true : false;
var isIE5	= (document.all && document.getElementById) ? true : false;
var isNS6	= (!document.all && document.getElementById) ? true : false;

var numOvals = 5;
var about = new Array("mission","vision","values","bio");
var numAbouts = about.length;

var softwareLink = "B"; //the default page

function showDetails(id) {
	//show the details for this rollover oval
	//first restore any other ovals that are on
	MM_swapImgRestore();
	//now hide any details that are displayed
	for (i = 0; i < numOvals; i++) {
		hideDiv("oval"+(i+1));
	}
	//show the current details
	showDiv(id);
	showDiv("servicesLinks");
	
	//softwareLink = page;
}

function showService(id) {
	showDiv(id+"Text");
}

function hideService(id) {
	hideDiv(id+"Text");
}

function showAbout(id) {
	//now hide any divs that are displayed
	for (i = 0; i < numAbouts; i++) {
		hideDiv(about[i]+"Text");
	}
	showDiv(id+"Text");
}

function hideAbout(id) {
	hideDiv(id+"Text");
}
	
	
function doSoftware() {
	document.location = "services_software" + softwareLink + ".html";	
}

function swapDivs(showDivName, hideDivName) {
	hideDiv(hideDivName);
	showDiv(showDivName);
}

function hideDiv(divName) {
//alert("divName: " + divName);
	getElement(divName).style.display = "none";
}

function showDiv(divName) {
//alert("showing: " + divName);
	getElement(divName).style.display = "block";
}

function getElement(id) {
	//return a reference to an element (div, image, form, etc) given is id
	var elem;
	if (id == "") { return null; }
	if (isNS4) {												   // NS4 is not supported
	} 
	else if (isNS6) {											   // Netscape 6 +
		elem = document.getElementById(id);
	} 
	else {													   // IE and everything else
		elem = document.all[id];
	}

	return elem;
}