<!--
function changeImage (imageName,imageState) {
	var currentSource;
	if (document.images) {

		// Figure out the current .src of the image to change
		if (document[imageName]) {
			currentSource=document[imageName].src;
		}
		else if (top.activeMenuID) {
			currentSource = eval('document.menuBackground'+activeMenuID+'.document.images[imageName].src');
		}

		// Replace that .src with a new .src based on the passed imageState
		// (if imageState="on", for example, "button_off.gif" will be parsed into "button_on.gif")
		newSource=currentSource.substring( 0,currentSource.lastIndexOf("_") ) + "_" + imageState + currentSource.substring( currentSource.lastIndexOf("."), currentSource.lastIndexOf(".")+5)
		
		if (document[imageName]) {
			document[imageName].src = newSource;
		}
		else if (top.activeMenuID) {
			eval('document.menuBackground'+activeMenuID+'.document.images[imageName].src = newSource;');
		}
	}		
}

function changeSubImage (imageName,imageState) {
	//alert('here');
	var currentSource;
	if (document.images) {

		// Figure out the current .src of the image to change
		if (document[imageName]) {
			currentSource=document[imageName].src;
		}
		else if (top.activeSubMenuID) {
			currentSource = eval('document.menuBackground'+activeSubMenuID+'.document.images[imageName].src');
		}

		// Replace that .src with a new .src based on the passed imageState
		// (if imageState="on", for example, "button_off.gif" will be parsed into "button_on.gif")
		newSource=currentSource.substring( 0,currentSource.lastIndexOf("_") ) + "_" + imageState + currentSource.substring( currentSource.lastIndexOf("."), currentSource.lastIndexOf(".")+5)
		
		if (document[imageName]) {
			document[imageName].src = newSource;
		}
		else if (top.activeSubMenuID) {
			eval('document.menuBackground'+activeSubMenuID+'.document.images[imageName].src = newSource;');
		}
	}		
}


// -->
