function special_occasion_populate_for () {
	var textfor = document.getElementById('for');
	
	if (textfor.value == '') {
		textfor.value = 'Name of Person *';
		textfor.blur();
	}
	return true;
}

function special_occasion_clear_for () {
	var textfor = document.getElementById('for');
	
	if (textfor.value == 'Name of Person *') {
		textfor.value = '';
	}
	return true;
}

function special_occasion_card_cart_1_validate () {
	var textfor = document.getElementById('for');
	
	special_occasion_clear_for();

	if (textfor.value == '') {
		alert('Please enter the name of the person to enroll.');
		textfor.focus();
		return false;
	}
	return true;
}

function special_occasion_card_cart_2_occasion_change () {
	var occasion = document.getElementById('occasion');
	var otheroccasion = document.getElementById('otheroccasion');
	
	otheroccasion.disabled = (occasion[occasion.selectedIndex].value != 'other');
	if (!otheroccasion.disabled) {
		otheroccasion.focus();
	}
	return true;
}

function special_occasion_card_cart_2_validate () {
	var occasion = document.getElementById('occasion');
	var otheroccasion = document.getElementById('otheroccasion');
	var type = returnRadioValue('special_occasion_card_cart','type');
	var cardinstruction = returnRadioValue('special_occasion_card_cart','cardinstruction');
	
	if (occasion.value == '') {
		alert('Please click the down arrow under "Occasion" to select an occasion.');
		return false;
	}
	if ((occasion.value == 'other') && (otheroccasion.value == '')) {
		alert('Please type the occasion in the box provided.');
		otheroccasion.focus();
		return false;
	}
	if (type == null) {
		alert('Please select either an Annual or Perpetual Enrollment.');
		return false;
	}
	if (cardinstruction == null) {
		alert('Please select a Card Instruction.');
		return false;
	}
	return true;
}

function special_occasion_card_cart_3_validate () {
	var cover = returnRadioValue('special_occasion_card_cart','cover');
	
	if (!validateSignInstruction('special_occasion_card_cart')) {
		return false;
	}
	if (cover == null) {
		alert('Please select a picture.');
		return false;
	}
	return true;
}

function special_occasion_card_cart_4_validate () {
	var sign1 = document.getElementById('sign1');
	var cover = returnRadioValue('special_occasion_card_cart','cover');
	
	if (!validateAddress()) {
		return false;
	}
	if (sign1.value == '') {
		alert('Please type how we should sign the card beginning on the first line.');
		sign1.focus();
		return false;
	}
	if (!validateReturnAddress('special_occasion_card_cart')) {
		return false;
	}
	if (cover == null) {
		alert('Please select a picture.');
		return false;
	}
	return true;
}
