<!--
//******************************************************
//
//Copyright (c) 2006, T2B&H
//
//Source: control_submit.js
//
//Revision: KERNEL 2.0
//
//Date: 2002/04/09
//
//Author: T2B&H
//
//Description: Validation de formulaire par touche Entrée
//			  
//*******************************************************

var isNetscape = false;
var isIE = false;
var isWhoKnows = false;
	
//This determines which browser the user is using
if (parseInt(navigator.appVersion) >= 4) {
  if(navigator.appName == "Netscape") {
    isNetscape = true;
  }else if (navigator.appName == "Microsoft Internet Explorer"){
    isIE = true;
  }else {
    isWhoKnows = true;
  }
}
	
//This stuff captures the events of the user
if(isNetscape) {
	document.captureEvents(Event.KEYUP);
}
document.onkeyup = checkValue



function checkValue(evt){
  var theButtonPressed;
  if (isNetscape) {
	//if(evt.target.type == "text"){ 
		//--> you can specify which type of element
		//    you want this to trigger for
	//if(evt.target.name == "myText"){
		//--> or you can specify the actual name of
		//    the element
		theButtonPressed = evt.which;
	//}
  }else if(isIE) {
	//if (window.event.srcElement.type == "text") {
		//--> same as above, but for IE
		theButtonPressed = window.event.keyCode;
	//}
  }else if(isWhoKnows) {
	alert("Please hit the submit button to process form");
  }
		
  if (theButtonPressed == 13) {
	document.myform.submit();
  }
}
	
//This little script is the key to all the submitting...As you
//can see it can be highly customized to allow you to do whatever
//you want!  I leave it up to your own imagintation to figure out
//what else you can do with it.
//Happy programming!!!

/ -->
