function Validate( thisForm ){
	var returnValue = false;
	var commType = "E-mail";
	
	if( thisForm.elements[16].checked )
		commType = "Phone";
	else if( thisForm.elements[17].checked )
		commType = "Mail";
		
	if( !RequireString( thisForm.firstName.value ) ){
		alert( "Please provide your first name." );
		thisForm.firstName.focus();
	}
	else if( !RequireString( thisForm.lastName.value ) ){
		alert( "Please provide your last name." );
		thisForm.lastName.focus();
	}
	
	else if( commType == "Mail" && !RequireString( thisForm.address1.value ) ){
		alert( "Please provide your address." );
		thisForm.address1.focus();
	}
	else if( commType == "Mail" && !RequireString( thisForm.city.value ) ){
		alert( "Please provide your city." );
		thisForm.city.focus();
	}
	else if( commType == "Mail" && thisForm.state.selectedIndex == 0 ){
		alert( "Please provide the state." );
		thisForm.state.focus();
	}
	else if( commType == "Mail" && !RequireString( thisForm.zipcode.value ) ){
		alert( "Please provide your zip code." );
		thisForm.zipcode.focus();
	}
	else if( commType == "E-mail" && !ValidEmail( thisForm.email.value ) ){
		alert( "Please provide a valid e-mail address." );
		thisForm.email.focus();
	}
	else if( commType == "Phone" && !RequireString( thisForm.phone.value ) ){
		alert( "Please provide your telephone number." );
		thisForm.phone.focus();
	}
	else
		returnValue = true;
	
	return returnValue;
}

// Function Returns True if the String has a value
// Other Wise Returns False
function RequireString( stringValue ){
	if( stringValue.replace(/(^\s+)|(\s+$)/g, '').length < 1 )
		return false;
	else
		return true;
}

// Uses Regular Expressions to check for a valid E-mail Address
// If valid returns true
// Other Wise it returns false
function ValidEmail(strValue){
    var valid = true;
    var regExp = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/;
    var regExp2 = /(\s+)|(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/;

    if ( (strValue.search(regExp)) == -1 || strValue.search(regExp2) != -1)
            valid = false;

    return valid;
}