/**
 * Validate Dealer search
 */
function dealerSearch_validate(form) {
	if( form.hiddenSearchType.value == 'loc' ) { 
		return form.region.value != '-' 
		    && form.province.value != '-'
		    && form.city.value != '-';
	} else {
		return notNull( form.text );	
	}
}

function dealerSearch_chooseSearchType(form, type) {
	document.getElementById("hiddenSearchType").value = type;
}

/**
 * Validate Dealer choice
 */
function dealerChoice_validate(form) {
	return radioIsChecked(form.dealerCode);
}


/**
 * Validate Appointment input
 */
function appointment_validate(form) {
	return radioIsChecked(form.timeFrame)
	    && notNull( form.day ) 
	    && notNull( form.month )
	    && notNull( form.year )
	    && notNull( form.notes );
}


