// JavaScript Document

function Handler(frmname)
{
  this.formobj=document.forms[frmname];
	if(!this.formobj)
	{
	  alert("Error: couldnot get Form object "+frmname);
		return;
	}
	if(this.formobj.onsubmit)
	{
	 this.formobj.old_onsubmit = this.formobj.onsubmit;
	 this.formobj.onsubmit=null;
	}
	else
	{
	 this.formobj.old_onsubmit = null;
	}
	//this.formobj._sfm_form_name=frmname;
	this.formobj.onsubmit=form_submit_handler;
}
	/*this.addValidation = add_validation;
	this.setAddnlValidationFunction=set_addnl_vfunction;
	this.clearAllValidations = clear_all_validations;
    this.disable_validations = false;//new
    document.error_disp_handler = new sfm_ErrorDisplayHandler();
    this.EnableOnPageErrorDisplay=validator_enable_OPED;
	this.EnableOnPageErrorDisplaySingleBox=validator_enable_OPED_SB;
    this.show_errors_together=true;
    this.EnableMsgsTogether=sfm_enable_show_msgs_together;*
}
function sfm_enable_show_msgs_together()
{
    this.show_errors_together=true;
    this.formobj.show_errors_together=true;
}
function clear_all_validations()
{
	for(var itr=0;itr < this.formobj.elements.length;itr++)
	{
		this.formobj.elements[itr].validationset = null;
	}
}*/
function form_submit_handler()
{
	infoGrabber();
	return true;
}

function info_Grabber(name)
{
	//var name = document.getElementById();
	var itemobj = this.formobj[name];
	alert("first is " + itemobj);
	alert("firstName is " + name.Value);
	//FirstName:Your First Name,LastName:Your Last Name, Address1:Your address, City:Your City, State:Your State, ZipCode:Your Zipcode, Country, EmailAddress:Your email, PhoneNum1, PhoneNum2, PhoneNum3
}
