


// Show / hide a sub-menu
function MenuShowHide(obj)
{

	if(obj.style.display == 'none'){
		obj.style.display = 'block';
	}else{
		obj.style.display = 'none';
	}
	
}


// Toggle expanded / collapsed versions of items' Images
function SwapImg(imgDiv,srcImg,srcAltImg){

	/* Update by Christian Vallee <cv@valtechnologie.com> 
	   ==> No need to specify absolute URL for Images anymore, this feature will find it on its own */
		
		// looking for the Images' root URL based on the current image
		var str = imgDiv.src;		
		var pos = str.search(srcImg);
		// if the URL root wasn't found using the first image, try with the alternative one
		if ( pos == -1 ) { pos = str.search(srcAltImg); }
		// extracting the URL root
		var root = str.substring(0,pos);
		// adding the root the image path supplied
		srcImg = root.concat(srcImg);
		srcAltImg = root.concat(srcAltImg);
		
	/* End Update */

	if(imgDiv.src == srcImg){			
		imgDiv.src = srcAltImg;
	}else{			
		imgDiv.src = srcImg;
	}

}


