// order.foam.checkEntries.js JavaScript Document
      function checkEntries()
      {
       if (Number(document.entry.quantity.value) < 1)
       {
           alert("Please specify the Quantity");
           document.entry.quantity.focus();
           return false;
       }
       if (document.entry.KoozieColor.selectedIndex < 1)
       {
           alert("Please select a Koozie Color");
           document.entry.KoozieColor.focus();
           return false;
       }
       if (document.entry.KoozieColor.value == 'Mixed' &&
           document.entry.MixBreakdown.value == "")
       {
           alert("Please give the Koozie Color mix breakdown");
           document.entry.MixBreakdown.focus();
           return false;
       }
       if ((document.entry.InkColor.selectedIndex < 1) && (document.entry.Metallic_InkColor.selectedIndex < 1))
       {
			alert(document.entry.InkColor.selectedIndex + ":" + document.entry.Metallic_InkColor.selectedIndex);
           alert("Please select an Ink Color");
           document.entry.InkColor.focus();
           return false;
       }
       if (document.entry.PrintDesign.selectedIndex < 1)
       {
           alert("Please select a PrintDesign");
           document.entry.PrintDesign.focus();
           return false;
       }
       if (document.entry.ddmonth.selectedIndex < 1)
       {
           alert("Please select a delivery month");
           document.entry.ddmonth.focus();
           return false;
       }
       if (document.entry.ddday.selectedIndex < 1)
       {
           alert("Please select the day when you need them");
           document.entry.ddday.focus();
           return false;
       }
	  /////////////////////////////////////////////////////////////////////////////
	  
	  			//find checked radio button
			for (i=0;i<document.entry.ArtWork.length;i++) {
				if (document.entry.ArtWork[i].checked) {
					level = document.entry.ArtWork[i].value;
				}
			}
		
			//give appropriate alert
			if(level=="$0 - No artwork fee") {
				input_box=confirm("You have selected NO ARTWORK. This means you are using a Kustom Koozies design or are submitting your camera-ready art that does not require resizing or other editing. The cost is $0. Click Cancel to change your selection, or OK to confirm.");
			}
			if(level=="$20 - Minimal artwork") {
				input_box=confirm("You have selected MINIMAL ARTWORK. This means that your submitted design requires editing. The cost is $20. Click Cancel to change your selection, or OK to confirm.");
			}
			if(level=="$40 - Full artwork") {
				input_box=confirm("You have selected FULL ARTWORK. This means Kustom Koozies will create a design for you. The cost is $40. Click Cancel to change your selection, or OK to confirm.");
			}
			
		//do the appropriate action
		if (input_box==false) { 
			return false;
		}
		
		//////////////////////////////////////////////////////////////
			
				  
	  //this one is for screen charge
	  //find checked radio button
			for (i=0;i<document.entry.ScreenCharge.length;i++) {
				if (document.entry.ScreenCharge[i].checked) {
					level = document.entry.ScreenCharge[i].value;
				}
			}
		
			//give appropriate alert
			if(level=="$0 - I am only ordering BLANKS") {
				input_box=confirm("This is the last Pop Up, we just want to make sure your order is perfect. We promise!!! You are ordering BLANKS. There is NO screen charge. Click Cancel to change your selection, or OK to confirm.");
			}
			if(level=="$20 - This is an Exact REPEAT ORDER") {
				input_box=confirm("This is the last Pop Up, we just want to make sure your order is perfect. We promise!!! This is an Exact REPEAT ORDER within 12 months of your previous order. The screen charge is $20. Click Cancel to change your selection, or OK to confirm.");
			}
			if(level=="$40 - This is a NEW order") {
				input_box=confirm("This is the last Pop Up, we just want to make sure your order is perfect. We promise!!! This is a NEW ORDER. The screen charge is $40. Click Cancel to change your selection, or OK to confirm.");
			}
		
		//do the appropriate action
		if (input_box==true) { 
			return true;
		}
		
		else {
			return false;
		}
		
		/////////////////////////////////////////////////////////////////////////////
       return true;
     }
