/*Author/Modifier: Kwadwo Gyamfi OSAFO-MAAFO (kgosafomaafo@ashesi.edu.gh or kgosfaomaafo@gmail.com)
	NOTE: Commenting code is good, but depending on server settings
	Purpose:
		This is a general purpose function used to 
		a) change an image and 
		b) display a message in the status bar (this is read from the alt tag).
	
	Usage:
		function interface is 
			switchImage(imageObject, imageLocation, showAlt)
		The parameters of the function are
			imageObject used to tell the function which object (i.e. image) to use.
			imageLocation used to specify the location of the image.
			showAlt is a boolean (set to true or false) to determine whether to display window status message.
			
	Example: Menu overlay (e.g. you put your mouse over and it changes the image).
			<img 
				src="default.gif" 
				onmouseover="switchImage(this,'mouseOver.gif',true)"
				onmouseout="switchImage(this,'mouseOut.gif',false)"
				showAlt="true"
			/>
			
			Original image is "default.gif", but when the mouse is over it changes to mouseOver.gif.
			Note that when the mouse is out, it is told to change back to mouseOut.git.
			
			For the window status message, we set showAlt (third parameter or option) to true when the mouse
			is over the image to make it display an image.
	
	Warnings:
		If you make sure that all the images are the same size, then the page will not 
		be affected, but if your images are not of the same size (e.g. where one is larger than original),
		it could cause the page to look disorganized.
		
		One solution is to set the width and height properties of the image tag.
			<img width="100px" height="20px"/>
	
	Compatability and wierd behavior:
		Obviously, if javascript is not enabled on the person's browser, you will not see the changes take place.
		Depending on the security settings of browser, not all effects may show. In particular, some mozilla browsers like firefox 1.2+ don't allow web pages to change the window status message. It is possible, but the browser simply ignored it unless permissions have been changed. Most users won't notice it.
	
	Emjoy :-)
*/

function switchImage(imageObject, imageLocation, showAlt)
{
	//Image object.src is changeed to the image location specified by imageLocation.
	imageObject.src = imageLocation;
	
	//ShowAlt is a boolean (true/false) that determines whether to display window status message.
	if(showAlt)
		window.status = imageObject.alt;
	else
		window.status = "";
	
}
function switchMessage(message)
{
	
}