/*******************************************************
* 
* The first function will allow the user to submit a form 
* from a non-standard form button.  To use this function,
* the page must have only one form within it.
* 
*******************************************************/

function formSubmit(){
	
		/////////////////////////////////////////////
		//
		// Call the form and submit the users data
		// via the PHP function script defined in
		// the forms action.
		//
		/////////////////////////////////////////////
	
		document.page_form.submit();
	
}

/*******************************************************
* 
* The second function will allow the user to submit the 
* embeded form within the page by pressing the enter 
* (return) key.
* 
*******************************************************/

function submitViaEnter(evt){
	
	/////////////////////////////////////////////
	//
	// Retreive the event.
	//
	/////////////////////////////////////////////
	
	evt = (evt) ? evt : event;
	
	/////////////////////////////////////////////
	//
	// Define the target and the form as varaibles.
	//
	/////////////////////////////////////////////
	
	var target = (evt.target) ? evt.target : evt.srcElement;
	var form = target.form;
	var charCode = (evt.charCode) ? evt.charCode :
		(evt.which) ? evt.which : evt.keyCode;
		
	/////////////////////////////////////////////
	//
	// Check to see if the user pressed the enter
	// key.
	//
	/////////////////////////////////////////////
	
	if(charCode == 13 || charCode == 3){
		
		/////////////////////////////////////////
		//
		// The user pressed the enter key and we
		// need to submit the form.
		//
		/////////////////////////////////////////
		
		form.submit();
		return false;
	}
}