// JavaScript Document

//*****************************************************************************************************************************************
// This function checks to make sure that all sections are enabled or disabled correctly
//*****************************************************************************************************************************************
function setFunctionality(){
// check below to make sure that cover cameos are still available

	found_it = getSelectedValue('coverSize');
	
	if(document.auBuilderForm.coverColor[0].checked == true){ // This will make sure that the capacity part of the form resets to re-enabled when coverColor is set to notSelected...
	
		enableSection('capacity', 6);
		document.auBuilderForm.capacity[6].disabled = false; // Enabling 50 Sides if it is disabled...
	
	}

	if ( found_it == 'e1010'){
		enableSection('cameoColor',4);
	}else if(found_it == "notSelected"){
		enableSection('cameo', 3);
		enableSection('cameoColor',4);
	}
	if ( found_it == '55' || found_it == '57' || found_it == '810' || found_it == 'e55' || found_it == 'e77'){
		disableSection('cameo',3);
		disableSection('cameoColor',4);
	}
	/* if ( found_it == '55' || found_it == '57' || found_it == 'e55' || found_it == 'e77'){
		disableSection('coverTitle',34);
		disableSection('titleColor',5);
	}
	else{
		enableSection('coverTitle',34);
		enableSection('titleColor',5);
	}*/
	
// check below to make sure that cover cameos are still available

	found_it = getSelectedValue('cameo');

	if ( found_it != 'none' && found_it != 'na' && found_it != 'sq'){
		enableSection('cameoColor',4);
	}
	else {
		disableSection('cameoColor',4);
	}

// check below to make sure that cover title attributes are still available

	found_it = getSelectedValue('coverTitle');

	if ( found_it != 'none'  && found_it != 'na'){
		enableSection('titleColor',5);
	}
	if ( found_it == 'none' ){
		disableSection('titleColor',5);
	}

// check below to make sure that studio imprint attributes are still available

	found_it = getSelectedValue('studioImprint');

	if ( found_it != 'none' && found_it == 'Die'){
		enableSection('studioImprintColor',4);
		disableSection('studioImprintText',3);
	}
	if ( found_it != 'none' && found_it != 'Die'){
		enableSection('studioImprintText',3);
		enableSection('studioImprintColor',4);
	}
	if ( found_it == 'none'){
		disableSection('studioImprintText',3);
		disableSection('studioImprintColor',4);
	}

// check below to make sure that name and date imprint attributes are still available

	found_it = getSelectedValue('nameImprint');

	if ( found_it != 'none' ){
		enableSection('nameImprintText',3);
		enableSection('nameImprintColor',5);
	}
	if ( found_it == 'none' ){
		disableSection('nameImprintText',3);
		disableSection('nameImprintColor',5);
	}
}

//*****************************************************************************************************************************************
// This function is used ro reset all those sections that follow the most recently selected one
//*****************************************************************************************************************************************
function resetValues(val) { //v3.0

	if ( val < 14 ){
			document.all.NameImprintColorTD.style.backgroundColor='#E8E5EC';
	}
	if ( val < 13 ){
			document.all.NameImprintTextTD.style.backgroundColor='#E8E5EC';
			document.auBuilderForm.nameImprintColor[0].checked = true;
			document.all.NameImprintColorTD.style.backgroundColor='#FFFFFF';
	}
	if ( val < 12 ){
			document.all.NameImprintTD.style.backgroundColor='#E8E5EC';
			document.auBuilderForm.nameImprintText[0].checked = true;
			document.all.NameImprintTextTD.style.backgroundColor='#FFFFFF';
	}
	if ( val < 11 ){
			document.all.StudioImprintColorTD.style.backgroundColor='#E8E5EC';
			document.auBuilderForm.nameImprint[0].checked = true;
			document.all.NameImprintTD.style.backgroundColor='#FFFFFF';
	}
	if ( val < 10 ){
			document.all.StudioImprintTextTD.style.backgroundColor='#E8E5EC';
			document.auBuilderForm.studioImprintColor[0].checked = true;
			document.all.StudioImprintColorTD.style.backgroundColor='#FFFFFF';
	}
	if ( val < 9 ){
			document.all.StudioImprintTD.style.backgroundColor='#E8E5EC';
			document.auBuilderForm.studioImprintText[0].checked = true;
			document.all.StudioImprintTextTD.style.backgroundColor='#FFFFFF';
	}
	if ( val < 8 ){
			document.all.TitleColorTD.style.backgroundColor='#E8E5EC';
			document.auBuilderForm.studioImprint[0].checked = true;
			document.all.StudioImprintTD.style.backgroundColor='#FFFFFF';
	}
	if ( val < 7 ){
			document.all.CoverTitleTD.style.backgroundColor='#E8E5EC';
			document.auBuilderForm.titleColor[0].checked = true;
			document.all.TitleColorTD.style.backgroundColor='#FFFFFF';
	}
	if ( val < 6 ){
			document.all.CameoColorTD.style.backgroundColor='#E8E5EC';
			document.auBuilderForm.coverTitle[0].checked = true;
			document.all.CoverTitleTD.style.backgroundColor='#FFFFFF';
	}
	if ( val < 5 ){
			document.all.CameoTD.style.backgroundColor='#E8E5EC';
			document.auBuilderForm.cameoColor[0].checked = true;
			document.all.CameoColorTD.style.backgroundColor='#FFFFFF';
	}
	if ( val < 4 ){
			document.all.CapacityTD.style.backgroundColor='#E8E5EC';
			document.auBuilderForm.cameo[0].checked = true;
			document.all.CameoTD.style.backgroundColor='#FFFFFF';
	}
	if ( val < 3 ){
			document.all.CoverColorTD.style.backgroundColor='#E8E5EC';
			document.auBuilderForm.capacity[0].checked = true;
			document.all.CapacityTD.style.backgroundColor='#FFFFFF';
	}
	if ( val < 2 ){
			document.all.CoverSizeTD.style.backgroundColor='#E8E5EC';
			document.auBuilderForm.coverColor[0].checked = true;
			document.all.CoverColorTD.style.backgroundColor='#FFFFFF';
	}
	if ( val < 1 ){ // Nothing has been selected on 
			document.all.CoverSizeTD.style.backgroundColor='#FFFFFF';
	}

	setFunctionality();

}

//*****************************************************************************************************************************************
// This function is used to check that the Cover Color selected is valid
//*****************************************************************************************************************************************
function checkCoverColor(val) { //v3.0
	resetValues(2);
	var found_it;
	var change = 1;
   
   	found_it = getSelectedValue('coverSize');
   
   	if(found_it == '57'){ // First checking to see if Imperial Princess 5X7 or 8X10 are selected...
		
		if(val == 'BBm'){ // Now checking to see if BBm is being selected also...
		
				disableSection('capacity', 6); // Now disabling the capacity section...
			document.auBuilderForm.capacity[0].checked = true; // Setting the selected state to select/notSelected for validation purposes...
			document.auBuilderForm.capacity[0].disabled = false; // Enabling select/notSelected...
			document.auBuilderForm.capacity[1].disabled = false; // Enabling 10 Sides...
			document.auBuilderForm.capacity[2].disabled = false; // Enabling 20 Sides...
			document.auBuilderForm.capacity[3].disabled = false; // Enabling 24 Sides...
			document.auBuilderForm.capacity[4].disabled = false; // Enabling 30 Sides...
			document.auBuilderForm.capacity[5].disabled = true; // Disabling 36 Sides...
			document.auBuilderForm.capacity[6].disabled = true; // Disabling 40 Sides...
			document.auBuilderForm.capacity[7].disabled = true; // Disabling 50 Sides...
	
		}
		
		if(val == 'BGg' || val == 'BuGg'){ // If BBm is notSelected also then make sure the capacity section is enabled...
		
			enableSection('capacity', 6);
			document.auBuilderForm.capacity[0].checked = true; // Setting the selected state to select/notSelected for validation purposes...
			document.auBuilderForm.capacity[0].disabled = false; // Enabling select/notSelected...
			document.auBuilderForm.capacity[1].disabled = true; // Disabling 10 Sides...
			document.auBuilderForm.capacity[2].disabled = false; // Enabling 20 Sides...
			document.auBuilderForm.capacity[3].disabled = true; // Enabling 24 Sides...
			document.auBuilderForm.capacity[4].disabled = true; // Enabling 30 Sides...
			document.auBuilderForm.capacity[5].disabled = true; // Disabling 36 Sides...
			document.auBuilderForm.capacity[6].disabled = true; // Disabling 40 Sides...
			document.auBuilderForm.capacity[7].disabled = true; // Disabling 50 Sides...
		
		}
		
		if(val == 'IGg'){ // If BBm is notSelected also then make sure the capacity section is enabled...
		
			enableSection('capacity', 6);
			document.auBuilderForm.capacity[0].checked = true; // Setting the selected state to select/notSelected for validation purposes...
			document.auBuilderForm.capacity[0].disabled = false; // Enabling select/notSelected...
			document.auBuilderForm.capacity[1].disabled = true; // Disabling 10 Sides...
			document.auBuilderForm.capacity[2].disabled = false; // Enabling 20 Sides...
			document.auBuilderForm.capacity[3].disabled = false; // Enabling 24 Sides...
			document.auBuilderForm.capacity[4].disabled = false; // Enabling 30 Sides...
			document.auBuilderForm.capacity[5].disabled = true; // Disabling 36 Sides...
			document.auBuilderForm.capacity[6].disabled = true; // Disabling 40 Sides...
			document.auBuilderForm.capacity[7].disabled = true; // Disabling 50 Sides...
		
		}
		
			
	}
	
		if(found_it == '810'){ // First checking to see if Imperial Princess 5X7 or 8X10 are selected...
		
		if(val == 'BBm'){ // Now checking to see if BBm is being selected also...
		
			disableSection('capacity', 6); // Now disabling the capacity section...
			document.auBuilderForm.capacity[0].checked = true; // Setting the selected state to select/notSelected for validation purposes...
			document.auBuilderForm.capacity[0].disabled = false; // Enabling select/notSelected...
			document.auBuilderForm.capacity[1].disabled = true; // Disabling 10 Sides...
			document.auBuilderForm.capacity[2].disabled = false; // Enabling 20 Sides...
			document.auBuilderForm.capacity[3].disabled = false; // Enabling 24 Sides...
			document.auBuilderForm.capacity[4].disabled = false; // Enabling 30 Sides...
			document.auBuilderForm.capacity[5].disabled = true; // Disabling 36 Sides...
			document.auBuilderForm.capacity[6].disabled = true; // Disabling 40 Sides...
			document.auBuilderForm.capacity[7].disabled = true; // Disabling 50 Sides...
	
		}
		
		if(val == 'BGg' || val == 'BuGg'){ // If BBm is notSelected also then make sure the capacity section is enabled...
		
			enableSection('capacity', 6);
			document.auBuilderForm.capacity[0].checked = true; // Setting the selected state to select/notSelected for validation purposes...
			document.auBuilderForm.capacity[0].disabled = false; // Enabling select/notSelected...
			document.auBuilderForm.capacity[1].disabled = true; // Disabling 10 Sides...
			document.auBuilderForm.capacity[2].disabled = false; // Enabling 20 Sides...
			document.auBuilderForm.capacity[3].disabled = true; // Enabling 24 Sides...
			document.auBuilderForm.capacity[4].disabled = true; // Enabling 30 Sides...
			document.auBuilderForm.capacity[5].disabled = true; // Disabling 36 Sides...
			document.auBuilderForm.capacity[6].disabled = true; // Disabling 40 Sides...
			document.auBuilderForm.capacity[7].disabled = true; // Disabling 50 Sides...
		
		}
		
		
			
	}
	
	if(found_it == 'e1010'){
	
		if(val == 'ISm'){
	
			disableSection('cameo', 3);
			document.auBuilderForm.cameo[1].checked = true;
			document.auBuilderForm.capacity[1].disabled = true; // Disabling 10 Sides
			document.auBuilderForm.capacity[7].disabled = true; // Disabling 50 Sides do to it not already being disabled...
		
		}
		
		if(val == 'IGm' || val == 'BGm' || val == 'BSm' || val == 'BuBm'){
		
			enableSection('capacity', 6);
			enableSection('cameo', 3);
			document.auBuilderForm.capacity[1].disabled = true; // Disabling 10 Sides
			document.auBuilderForm.capacity[7].disabled = true; // Disabling 50 Sides do to it not already being disabled...
		
		}
		
		if(val == 'BBm'){
		
			enableSection('capacity', 6);
			enableSection('cameo', 3);
			document.auBuilderForm.capacity[1].disabled = true; // Disabling 10 Sides
			document.auBuilderForm.capacity[7].disabled = false; // Disabling 50 Sides do to it not already being disabled...
		
		}
	
	}
	
	if (found_it == "notSelected"){
		alert("You must first select a Cover Size.");
		document.auBuilderForm.coverColor[0].checked = true;
		change = 0;
	}
	if ((found_it == "e55" || found_it == 'e77') && (val == 'ISm' || val == 'BGg' || val == 'IGg' || val == 'BuGg')){
		alert("The Cover Color selected is not available for Elite Prince or Elite Princess Albums.");
		document.auBuilderForm.coverColor[0].checked = true;
		change = 0;
	}
	if (found_it == "e1010" && (val == 'BGg' || val == 'IGg' || val == 'BuGg')){
		alert("Elite Empress Albums are not available in the Cover Color you selected.");
		document.auBuilderForm.coverColor[0].checked = true;
		change = 0;
	}
	if (found_it == "55" && (val == 'BuGg' || val == 'BBm' || val == 'IGm' || val == 'BGm' || val == 'BuBm' || val == 'Bsm' || val == 'ISm')){
		alert("5x5 Princess Albums are not available in the Cover Color you selected.");
		document.auBuilderForm.coverColor[0].checked = true;
		change = 0;
	}
	if ((found_it == "57" || found_it == '810') && (val == 'IGm' || val == 'BGm' || val == 'BuBm' || val == 'BSm' || val == 'ISm')){
		alert("The Cover Color selected is not available for 5x7 or 8x10 Princess Albums.");
		document.auBuilderForm.coverColor[0].checked = true;
		change = 0;
	}
	
	setBackgroundColors(change,val,'CoverColorTD');
}

//*****************************************************************************************************************************************
// This function is used to check that the Cover Color selected is valid
//*****************************************************************************************************************************************
function checkCapacity(val) { //v3.0
	resetValues(3);
	var found_it;
	var found_it2;
	var change = 1;
    
	found_it = getSelectedValue('coverSize');
    found_it2 = getSelectedValue('coverColor');

	if (found_it2 == "notSelected"){
		alert("You must first select a Cover Color.");
		document.auBuilderForm.capacity[0].checked = true;
		change = 0;
	}
//	if ((found_it == '55') && (val != '20') ){ // Removed found_it == '810'/found_it == "57" 
//		alert("The Capacity selected is not available for Imperial Princess Albums, they are only available in 20 sides capacity.");
//		document.auBuilderForm.capacity[0].checked = true;
//		change = 0;
//	}
	if ((found_it == "e55" || found_it == 'e77') && (val == '50' || val =='10') ){
		alert("The Capacity selected is not available for  Elite Prince or Elite Princess Albums.");
		document.auBuilderForm.capacity[0].checked = true;
		change = 0;
	}
	if (found_it == "55" && (val == '50' || val == '40' || val == '10' )){
		alert("5x5 Princess Albums are not available in the Capacity you selected.");
		document.auBuilderForm.capacity[0].checked = true;
		change = 0;
	}
	if ((found_it == "57" ) && (val == '36' || val == '40' || val == '50')){
		alert("5x7 and 8x10 Princess Albums are only available with 20 sides, or with 24 or 30 sides and Black/Black Mylar Cover Color.");
		document.auBuilderForm.capacity[0].checked = true;
		change = 0;
	}
	if ((found_it == '810') &&  (val == '36' || val == '40' || val == '50' || val == '10') ){
		alert("8x10 Princess Albums are only available with 20 sides, or with 24 or 30 sides and Black/Black Mylar Cover Color.");
		document.auBuilderForm.capacity[0].checked = true;
		change = 0;
	}
	if ((found_it2 == 'V') && (val == '20') ){
		alert("Ivory/Silver Mylar is not available in the size you selected with the capacity you selected.");
		document.auBuilderForm.capacity[0].checked = true;
		change = 0;
	}
	if ((found_it2 == 'BGm' || found_it2 == 'BSm' || found_it2 == 'BuBm') && (val == '50') ){
		alert("The capacity you selected is not available in the Cover Color and Size you selected.");
		document.auBuilderForm.capacity[0].checked = true;
		change = 0;
	}

	setBackgroundColors(change,val,'CapacityTD');
}

//*****************************************************************************************************************************************
// This function is used to check that the Cover Cameo selected is valid
//*****************************************************************************************************************************************
function checkCameo(val) { //v3.0
	resetValues(4);
	var found_it;
	var change = 1;

	found_it = getSelectedValue('capacity');
	found_it2 = getSelectedValue('coverSize');
	found_it3 = getSelectedValue('coverColor');

	if (found_it == "notSelected"){
		alert("You must first select a Capacity.");
		document.auBuilderForm.cameo[0].checked = true;
		change = 0;
	}
	if (found_it2 == "e1010" && found_it3 == "BGm"){
		alert("Elite Empress 10x10 Black/Gold Mylar albums are only available in an Oval Cameo");
		document.auBuilderForm.cameo[0].checked = true;
		change = 0;
	}
	
	setBackgroundColors(change,val,'CameoTD');
}

//*****************************************************************************************************************************************
// This function is used to check that the Cover Cameo Color selected is valid
//*****************************************************************************************************************************************
function checkCameoColor(val) { //v3.0
	resetValues(5);
	var found_it;
	var change = 1;

	found_it = getSelectedValue('cameo');
	found_it2 = getSelectedValue('coverSize');
	found_it3 = getSelectedValue('coverColor');
	found_it4 = getSelectedValue('capacity');

	if (found_it == "notSelected"){
		alert("You must first select a Cameo.");
		document.auBuilderForm.cameoColor[0].checked = true;
		change = 0;
	}
	
	if(found_it4 == "notSelected"){
	
		alert("You must first select a Capacity");
		document.auBuilderForm.cameoColor[0].checked = true;
		change = 0;
	
	}
	
	if (found_it2 == "e1010" && found_it3 == "BGm" && val != "Wa"){
		alert("Elite Empress 10x10 Black/Gold Mylar albums are only available in Wrap Around");
		document.auBuilderForm.cameo[0].checked = true;
		change = 0;
	}
	
	setBackgroundColors(change,val,'CameoColorTD');
}

//*****************************************************************************************************************************************
// This function is used to check that the Cover Title selected is valid
//*****************************************************************************************************************************************
function checkCoverTitle(val) { //v3.0
	resetValues(6);
	var found_it;
	var change = 1;

	found_it = getSelectedValue('cameoColor');
	found_it2 = getSelectedValue('capacity');
   
   	if (found_it == "notSelected"){
		alert("You must first select a Cameo Color.");
		document.auBuilderForm.coverTitle[0].checked = true;
		change = 0;
	}
	
	if(found_it2 == "notSelected"){
		alert("You must first select a Capacity.");
		document.auBuilderForm.coverTitle[0].checked = true;
		change = 0;
	}
	
	if ( val == "Monogram" ){
		document.auBuilderForm.monogramText1.disabled = false;
		document.auBuilderForm.monogramText2.disabled = false;
		document.auBuilderForm.monogramText3.disabled = false;
	}
	if ( val != "Monogram" ){
		document.auBuilderForm.monogramText1.value = "";
		document.auBuilderForm.monogramText2.value = "";
		document.auBuilderForm.monogramText3.value = "";
		document.auBuilderForm.monogramText1.disabled = true;
		document.auBuilderForm.monogramText2.disabled = true;
		document.auBuilderForm.monogramText3.disabled = true;
	}

	setBackgroundColors(change,val,'CoverTitleTD');
}

//*****************************************************************************************************************************************
// This function is used to check that the Title Color selected is valid
//*****************************************************************************************************************************************
function checkTitleColor(val) { //v3.0
	resetValues(7);
	var found_it;
	var change = 1;
	
	found_it = getSelectedValue('coverTitle');
   
	if (found_it == "notSelected"){
		alert("You must first select a Cover Title.");
		document.auBuilderForm.titleColor[0].checked = true;
		change = 0;
	}
	
	setBackgroundColors(change,val,'TitleColorTD');
}

//*****************************************************************************************************************************************
// This function is used to check that the Studio Imprint selected is valid
//*****************************************************************************************************************************************
function checkStudioImprint(val) { //v3.0
	resetValues(8);
	var found_it;
	var change = 1;

	found_it = getSelectedValue('titleColor');
   
	if (found_it == "notSelected"){
		alert("You must first select a Title Color.");
		document.auBuilderForm.studioImprint[0].checked = true;
		change = 0;
	}
	if ( val == "Die" ){
		document.auBuilderForm.customImprint1.value = "";
		document.auBuilderForm.customImprint2.value = "";
		document.auBuilderForm.customImprint1.disabled = true;
		document.auBuilderForm.customImprint2.disabled = true;
	}
	else {
		document.auBuilderForm.customImprint1.disabled = false;
		document.auBuilderForm.customImprint2.disabled = false;
	}
	
	
	setBackgroundColors(change,val,'StudioImprintTD');
}

//*****************************************************************************************************************************************
// This function is used to check that the Studio Imprint Text selected is valid
//*****************************************************************************************************************************************
function checkStudioImprintText(val) { //v3.0
	resetValues(9);
	var found_it;
	var change = 1;

	found_it = getSelectedValue('studioImprint');

	if (found_it == "notSelected"){
		alert("You must first select a Studio Imprint.");
		document.auBuilderForm.studioImprintText[0].checked = true;
		change = 0;
	}
	customImprint1 = document.auBuilderForm.customImprint1.value;
	customImprint2 = document.auBuilderForm.customImprint2.value;
	
	if (found_it == "Cus" && customImprint1 == "" && customImprint2 == ""){
		alert("Please fill in the Custom Studio Imprint above before selecting a text.");
		document.auBuilderForm.studioImprintText[0].checked = true;
		change = 0;
	}
	
	setBackgroundColors(change,val,'StudioImprintTextTD');
}

//*****************************************************************************************************************************************
// This function is used to check that the Studio Imprint Color selected is valid
//*****************************************************************************************************************************************
function checkStudioImprintColor(val) { //v3.0
	resetValues(10);
	var found_it;
	var change = 1;

	found_it = getSelectedValue('studioImprintText');

	if (found_it == "notSelected"){
		alert("You must first select a Studio Imprint Text.");
		document.auBuilderForm.studioImprintColor[0].checked = true;
		change = 0;
	}
	
	setBackgroundColors(change,val,'StudioImprintColorTD');
}

//*****************************************************************************************************************************************
// This function is used to check that the Name Imprint selected is valid
//*****************************************************************************************************************************************
function checkNameImprint(val) { //v3.0
	resetValues(11);
	var found_it;
	var change = 1;

	found_it = getSelectedValue('studioImprintColor');

	if (found_it == "notSelected"){
		alert("You must first select a Studio Imprint Color.");
		document.auBuilderForm.nameImprint[0].checked = true;
		change = 0;
	}
	if ( val == "Cus" ){
		document.auBuilderForm.nameDate1.disabled = false;
		document.auBuilderForm.nameDate2.disabled = false;
		document.auBuilderForm.nameDate3.disabled = false;
	}
	if ( val == "none" ){
		document.auBuilderForm.nameDate1.value = "";
		document.auBuilderForm.nameDate2.value = "";
		document.auBuilderForm.nameDate3.value = "";
		document.auBuilderForm.nameDate1.disabled = true;
		document.auBuilderForm.nameDate2.disabled = true;
		document.auBuilderForm.nameDate3.disabled = true;
	}

	setBackgroundColors(change,val,'NameImprintTD');
}

//*****************************************************************************************************************************************
// This function is used to check that the Name Imprint Text selected is valid
//*****************************************************************************************************************************************
function checkNameImprintText(val) { //v3.0
	resetValues(12);
	var found_it;
	var change = 1;

	found_it = getSelectedValue('nameImprint');

	nameDate1 = document.auBuilderForm.nameDate1.value;
	nameDate2 = document.auBuilderForm.nameDate2.value;
	nameDate3 = document.auBuilderForm.nameDate3.value;

	if (found_it == "notSelected"){
		alert("You must first select a Name & Date Imprint.");
		document.auBuilderForm.nameImprintText[0].checked = true;
		change = 0;
	}
	if (found_it == "Cus" && (nameDate1 == "" && nameDate2 == "" && nameDate3 == "")){
		alert("Please Fill out at least one line for your Name and Date Imprint before selecting a text.");
		document.auBuilderForm.nameImprintText[0].checked = true;
		change = 0;
	}
	setBackgroundColors(change,val,'NameImprintTextTD');
}


//*****************************************************************************************************************************************
// This function is used to check that the Name Imprint Color selected is valid
//*****************************************************************************************************************************************
function checkNameImprintColor(val) { //v3.0
	resetValues(13);
	var found_it;
	var change = 1;

	found_it = getSelectedValue('nameImprintText');

	if (found_it == "notSelected"){
		alert("You must first select a Name & Date Imprint Text.");
		document.auBuilderForm.nameImprintColor[0].checked = true;
		change = 0;
	}
	
	setBackgroundColors(change,val,'NameImprintColorTD');
}


//*****************************************************************************************************************************************
// This function checks to make sure that all selections have been made before submitting
//*****************************************************************************************************************************************
function checkComplete(){
	found_it = getSelectedValue('nameImprintColor');
	
	if ( found_it != "notSelected" ){
		document.auBuilderForm.submit();
	}
	else{
		alert("Please Finish all necessary selections before submitting album to basket.");
	}

}
