/***************************** widgetFunctions.js ****************************** 

********ADD APPLICATION SPECIFIC FUNCTIONS TO THIS FILE (remove this line) *****

Author: 
Creation Date: 
Description: 
Dependencies: 

********************************************************************************/


/*********************************** CONTENTS ***********************************
Eg functionName(param1, param2) - Description of what the function does

		1.  exampleFunction(parameter) - Carries out a specific piece of functionality
		2.  keyHandler(e) - Example demonstrating how to set up key handlers
		3.  
		4.  
		5.  
		6.  
		7.  
		8.  
		9.  
		10. 
		11. 
		12. 
		13. 
		14. 
		15. 

*********************************** END CONTENTS ***********************************/

//Uncomment the following line to check the file is being loaded
//alert("Loaded Javascript file: Widget functions");


//1. Carries out a specific piece of functionality
function exampleFunction(parameter){
	alert(parameter);
}

//2. Example for setting up key handlers
function keyHandler(e)
{
	var pressedKey;
	if (document.all)	{ e = window.event; }
	if (document.layers || e.which) { pressedKey = e.which; }
	if (document.all)	{ pressedKey = e.keyCode; }
	pressedCharacter = String.fromCharCode(pressedKey);
	alert(' Character = ' + pressedCharacter + ' [Decimal value = ' + pressedKey + ']');
}
//put this bit of code into the page
//document.onkeypress = keyHandler;