var sUrl = "../includes/sign-up-submit.asp";
var div = document.getElementById('bottomsignup');

var handleSuccess = function(o){
	

	
	if(o.responseText !== undefined){
		div.innerHTML = o.responseText;
	}
	
}

var handleFailure = function(o){
		alert('there was problem with your form submission');
};

var callback =
{
  success:handleSuccess,
  failure: handleFailure,
  argument: ['foo','bar']
};

function sendsignup(){
	
 var formObject = document.getElementById('bsignup');   
 YAHOO.util.Connect.setForm(formObject);   

if (document.bsignup.su_name.value=='First Name' || document.bsignup.su_lname.value=='Last Name' || document.bsignup.su_email.value=='Email' || document.bsignup.su_phone.value=='Phone' || document.bsignup.su_zip.value=='Zip' || document.bsignup.su_name.value=='' || document.bsignup.su_email.value=='' || document.bsignup.su_phone.value=='' || document.bsignup.su_zip.value=='' || document.bsignup.su_lname.value==''){
	alert('Your name, email, phone number, and zipcode are required');
} else {

 var cObj = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback); 
 
}

}
function initPage()
{
  document.bsignup.su_name.value='First Name';
  document.bsignup.su_lname.value='Last Name';
  document.bsignup.su_email.value='Email';
  document.bsignup.su_phone.value='Phone' ;
  document.bsignup.su_zip.value='Zip';
}