document.form.onsubmit = myFun; 
	//note that we don't use myFun(), and everything 
	// is lower cased, including the event name

function myFun(e){

alert ("Event of type: " + e.type);

}