function toggleMenu(menuid){
	var theElement;
	if(document.all){theElement=document.all(menuid);} // IE4+
	else if(document.getElementById){theElement=document.getElementById(menuid);} // W3C browser
	if(theElement && theElement.style){
		if(theElement.style.display == 'none'){theElement.style.display='inline';}
		else{theElement.style.display='none';}
		}
	}

function hideMenu(menuid){
	var theElement;
	if(document.all){theElement=document.all(menuid);} // IE4+
	else if(document.getElementById){theElement=document.getElementById(menuid);} // W3C browser
	if(theElement && theElement.style){theElement.style.display='none';}
	}

function showMenu(menuid){
	var theElement;
	if(document.all){theElement=document.all(menuid);} // IE4+
	else if(document.getElementById){theElement=document.getElementById(menuid);} // W3C browser
	if(theElement && theElement.style){theElement.style.display='inline';}
	}

function toggleImage(imgID){ // toggles section image between + and -
	var theElement;
	if(document.all){theElement=document.all(imgID);} // IE4+
	else if(document.getElementById){theElement=document.getElementById(imgID);} // W3C browser
	if(theElement && theElement.src){
		if(theElement.src.indexOf('/planning4minerals/assets/menu/section.gif') != -1){theElement.src = '/planning4minerals/assets/menu/section2.gif';}
		else{theElement.src = '/planning4minerals/assets/menu/section.gif';}
		}
	}
function swapBtnImg(imgRef,newSrc){
	if(imgRef.src){imgRef.src=newSrc;}
	}
function collapseMenu(){
	var allImages=document.images; // reset all images to closed (+)
	for(var i=0;i < allImages.length;i++){
			if(allImages[i].src.indexOf('/planning4minerals/assets/menu/section2.gif') != -1){
					allImages[i].src = '/planning4minerals/assets/menu/section.gif';}
					}
	hideMenus(); // hide all menus

	}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function clickImg(menuid,imgID){
	var imgRef;
	if(document.all){imgRef=document.all(imgID);} // IE4+
	else if(document.getElementById){imgRef=document.getElementById(imgID);} // W3C browser
	if(imgRef && imgRef.src){
		if(imgRef.src.indexOf('/planning4minerals/assets/menu/section2.gif') != -1){
			// got + : collapse all
			collapseMenu();
			// toggleImage(imgRef.id);
			}
		else{
			// got - : show menu
			collapseMenu();
			showMenu(menuid);
			toggleImage(imgRef.id);
			}
		}
	}	

function mOverPage(tdRef){
	if(document.getElementById){tdRef.style.backgroundColor="";}
	}

function mOutPage(tdRef){
	if(document.getElementById){tdRef.style.backgroundColor="";}
	}
	
function mOverSection(tdRef){
	if(document.getElementById){tdRef.style.borderColor=""}
	}

function mOutSection(tdRef){
	if(document.getElementById){tdRef.style.borderColor="";tdRef.style.backgroundColor="";}
	}


