//
// loading-gizmo.js
//
// Functions for 'Comet' loading widget.
//
//
// @author James Ronan { james.ronan@pipex.net }
//




//
// Function: startLoading()
//
// Outputs the "Loading" div to the page and shows it.
// 
// @param		String				- Message to display
// @param		String				- Image URL (site relative)
// @param		int					- Image witdh (in px)
// @param 		int					- Image height (in px)
// @param		String				- ID tag to allow styling
//
function startLoading(message, image_src, image_width, image_height, id_tag) {

	document.write('<div style="text-align:center;" id="'+id_tag+'">'+
					'<img src="'+image_src+'" width="'+image_width+'" height="'+image_height+'" border="0" align="bottom" alt="" /></td>'+
					'</div>'
					);
	document.getElementById(id_tag).style.display='block';

} // End of Function startLoading();


//
// Function: finishLoading()
//
// Hides the loading div. Job done.
// 
// @param		String				- ID tag to finish. 
//
function finishLoading(id_tag) {
	
	document.getElementById(id_tag).style.display='none';
	
} // End of Function: finishLoading()