function changeImage(element, image) {
	if (document.getElementById(element)) {
		document.getElementById(element).src = image
	}
}

function changeMenuDescription(str) {
	if (document.getElementById('MenuDescription')) {
		switch (str)
		{
		case 'Version6': {document.getElementById('MenuDescription').innerHTML = 'An overview, improvements, and timeline of the newest version in development'; break;}
		case 'History': {document.getElementById('MenuDescription').innerHTML = 'Learn about previous versions of WordSurv'; break;}
		case 'Linguistics': {document.getElementById('MenuDescription').innerHTML = 'Information about the linguistics tools used in WordSurv'; break;}
		case 'PalmSurv': {document.getElementById('MenuDescription').innerHTML = 'The Palm OS program for word list collection'; break;}
		case 'Downloads': {document.getElementById('MenuDescription').innerHTML = 'Download files related to WordSurv'; break;}
		default: {document.getElementById('MenuDescription').innerHTML = ''; break;}
		}
	}
}

function preloadDownButtons() {
	if (document.images) {
		pre_WSBDownloadsDown = newImage('images/WSBDownloadsDown.jpg');
		pre_WSBVersion6Down = newImage('images/WSBVersion6Down.jpg');
		pre_WSBLinguisticsDown = newImage('images/WSBLinguisticsDown.jpg');
		pre_WSBPalmSurvDown = newImage('images/WSBPalmSurvDown.jpg');
		pre_WSBHistoryDown = newImage('images/WSBHistoryDown.jpg');
	}
}
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}
