function sidebarSelect() {
	if (typeof page != 'undefined') { /* we've found it */
		var mmp = document.getElementById('mmp');
		mmpLinks = mmp.getElementsByTagName('a');

		var mmpSelected = document.getElementById('mmp-'+page);

		if (typeof mmpSelected == 'object') {
			//mmpSelected.className='selected';
			//mmpSelected.href='javascript:;';
			var r = new RegExp('<A id='+mmpSelected.id+' href="(.*)">(.*)</A>', "i");
			var r2 = new RegExp('<a id=\"*'+mmpSelected.id+'\*" href="(.*)">(.*)</a>', "i");
			var replacement = '<strong>'+mmpSelected.innerHTML+'</strong>';
			mmp.innerHTML = mmp.innerHTML.replace(r,replacement);
			mmp.innerHTML = mmp.innerHTML.replace(r2,replacement);
		}
	} else { /* loop through the elements */
		var mmp = document.getElementById('mmp');
		mmpLinks = mmp.getElementsByTagName('a');
	
		var documentLocation = document.location.href;
		var paramPosition = documentLocation.indexOf("?");
		if  (paramPosition > -1) documentLocation = documentLocation.substring(0, paramPosition);

		for (i=0;i<mmpLinks.length;i++) {
			linkLocation = mmpLinks[i].href;
			var paramPosition = linkLocation.indexOf("?");
			if  (paramPosition > -1) linkLocation = linkLocation.substring(0, paramPosition);
			if (linkLocation == documentLocation) {
				// mmpLinks[i].className='selected';
				//mmpLinks[i].href='javascript:;';
				var r = new RegExp('<A id='+mmpLinks[i].id+' href="(.*)">(.*)</A>', "i");
				var r2 = new RegExp('<a id=\"*'+mmpLinks[i].id+'\*" href="(.*)">(.*)</a>', "i");
				var replacement = '<strong>'+mmpLinks[i].innerHTML+'</strong>';
				mmp.innerHTML = mmp.innerHTML.replace(r,replacement);
				mmp.innerHTML = mmp.innerHTML.replace(r2,replacement);
				break;
			}
		}
	}
}

