function mouseUp(imgName) {
	if (document.images) {
		imgOn=eval(imgName + "on.src");
		document[imgName].src= imgOn;
	}
}

function mouseDown(imgName) {
	if (document.images) {
		imgOff=eval(imgName + "off.src");
		document[imgName].src= imgOff;
	}
}

function toggleLight(topic,setto) {
	var styleObj= document.getElementById(topic).style;
	var fulltopic = topic + 'div';
	var styleObjTest = document.getElementById(fulltopic).style;
	if (styleObjTest.display == 'none') {
		if (setto == 'on') styleObj.background = '#FFFA00';
		else styleObj.background = 'none';
	}
}

function toggleTopic(topic) {
	var topics = new Array('membership','educator','help','photos','about','contact','myaccount','mailing');
	var loops = topics.length;
	var counter = 0;
	var temptopic = '';
	var temptopicdiv = '';
	var styleObj = '';
	while (counter < loops) {
		temptopic = topics[counter];
		styleObj = document.getElementById(temptopic).style;
		temptopicdiv = temptopic + 'div';
		styleObjDiv = document.getElementById(temptopicdiv).style;
		if (topic == temptopic) {
			styleObj.background = '#FCB750';
			//styleObj.background = '#FFEB7F';
			styleObjDiv.display = '';
		} else {
			styleObj.background = '#FFFF99';
			styleObjDiv.display = 'none';
		}
		counter++;
	}
}

/*
function updateSample() {
	makeRequest('lib/trial_sample.php?' + string);
}
*/

function makeRequest(url) {
	var http_request = false;

	if (window.XMLHttpRequest) { // Mozilla, Safari, ...
		http_request = new XMLHttpRequest();
		if (http_request.overrideMimeType) {
			http_request.overrideMimeType('text/xml');
			// See note below about this line
		}
	} else if (window.ActiveXObject) { // IE
		try {
			http_request = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				http_request = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {}
		}
	}

	if (!http_request) {
		alert('Giving up :( Cannot create an XMLHTTP instance');
		return false;
	}
	http_request.onreadystatechange = function() { alertContents(http_request); };
	http_request.open('GET', url, true);
	http_request.send(null);
}

function alertContents(http_request) {
	if (http_request.readyState == 4) {
		if (http_request.status == 200) {
		//	alert(http_request.responseText);
		} else {
		//	alert('There was a problem with the request.');
		}
	}
}
