/* Additional Validation Routines by Page
*
*
*	if(NoneWithCheck(document.registrant.attending))
*		{ errormessage += "\n\nPlease check Yes or No for attending."; }
*	if(WithoutContent(document.registrant.number_attendies.value) && document.registrant.attending[0].checked)
*		{ errormessage += "\n\nPlease confirm the number of attendees."; }
*	//if(NoneWithCheck(document.exampleform.radioOne))
*		{ errormessage += "\n\nPlease click one radio button of the set of three."; }
*	if(WithoutCheck(document.exampleform.radioLoner))
*		{ errormessage += "\n\nThe \"Loner\" radio button must be clicked."; }
*	if(NoneWithCheck(document.exampleform.checkOne))
*		{ errormessage += "\n\nPlease check one or more check boxes of the set of three."; }
*	if(WithoutCheck(document.exampleform.checkLoner))
*		{ errormessage += "\n\nThe \"Loner\" check box must be checked."; }
*	if(WithoutContent(document.exampleform.sometext.value))
*		{ errormessage += "\n\nPlease type something in the \"Some text\" text field."; }
*	if(NoneWithContent(document.exampleform.oneOrTheOther))
*		{ errormessage += "\n\nSomething must be typed in one or both of the set of form text fields."; }
*	if(WithoutContent(document.exampleform.areaName.value))
*		{ errormessage += "\n\nSomething must be typed in the textarea box."; }
*	if(WithoutContent(document.exampleform.FileGet.value))
*		{ errormessage += "\n\nA file name must be provided for uploading."; }
*	if(WithoutSelectionValue(document.exampleform.dropname))
*		{ errormessage += "\n\nYou must select a meal choice for yourself & everyone else in your group."; }	
*
*/

function validateRegistrant() {

	var errormessage = new String();
	// Name Field
	if(WithoutContent(document.nomForm.enduser_name.value))
	{ errormessage += "\n\nPlease type something in the \"Name\" text field."; }
	
	if(defaultFullName(document.nomForm.enduser_name.value))
	{ errormessage += "\n\nPlease type something in the \"Name\" text field."; }
	
	
	// Email Address Field
	if(WithoutContent(document.nomForm.enduser_addy.value))
	{ errormessage += "\n\nPlease type something in the \"Email Address\" text field."; }
	
	if(defaultAddressName(document.nomForm.enduser_addy.value))
	{ errormessage += "\n\nPlease type something in the \"Email Address\" text field."; }
	
	
	// End of Rules.
	if(errormessage.length > 2) {
		alert('Required Field:' + errormessage);
		return false;
		}
return true;
}

function defaultFullName(ss) {
if(ss == 'Your Full Name') { return true; }
return false;
}

function defaultAddressName(ss) {
if(ss == 'Your E-Mail Address') { return true; }
return false;
}

function WithoutContent(ss) {
if(ss.length > 0) { return false; }
return true;
}

function CreditCardActive(ss) {
if(ss.value = 'credit') { return false; }
return true;
}

function NoneWithContent(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].value.length > 0) { return false; }
	}
return true;
}

function NoneWithCheck(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].checked) { return false; }
	}
return true;
}

function WithoutCheck(ss) {
if(ss.checked) { return false; }
return true;
}

function WithoutSelectionValue(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].selected) {
		if(ss[i].value.length) { return false; }
		}
	}
return true;
}
