// Copyrighted © ParGolf Supply, Inc. 2006-2007 || Author Bryan Seeds (generated110@yahoo.com)
//		
//
// Tee Color Variables to use set as type Arrays.
		
		var novalue = new Array("Please Select Tee Color First!");
		var White = new Array("Black","Red","Reflex Blue","Dark Blue","Orange","Red","Burgundy","Teal","Green","Brown","Violet","2 Color Logo - Minimum 3,000");
		var Natural = new Array("Black","Red","Reflex Blue","Dark Blue","Orange","Red","Burgundy","Teal","Green","Brown","Violet","2 Color Logo - Minimum 3,000");
		var Mix_of_all_Colors = new Array("Black");
		var Dark_Mix = new Array("White");
		var Regular_Mix = new Array("Black");
		var Designer_Mix = new Array("Black");
		var Neon_Mix = new Array("Black");
		var Carnival_Mix = new Array("Black");
		var Tropical_Mix = new Array("Black");
		var Metallic_Mix = new Array("Black");
		var Copper = new Array("Black", "White - Adds $5.00");
		var Cream = new Array("Black","Red","Reflex Blue","Dark Blue","Red","Burgundy","Green","Brown","Violet");
		var Gray = new Array("Black","Red","Reflex Blue","Dark Blue","Red","Burgundy","Green","Violet");
		var Black = new Array("White - Adds $5.00");
		var Dark_Blue = new Array("White - Adds $5.00");
		var Cranberry = new Array("White - Adds $5.00");
		var Cranbery = new Array("White");
		var Dark_Green = new Array("White - Adds $5.00");
		var Orange = new Array("Black","White - Add $5.00");
		var Yellow = new Array("Black","Red","Reflex Blue","Dark Blue","Red","Burgundy","Green","Brown","Violet");
		var Light_Green = new Array("Black","White - Add $5.00");
		var Silver = new Array("Black","Red","Reflex Blue","Dark Blue","Red","Burgundy","Green","Brown","Violet");
		var Metallic_Yellow = new Array("Black","Red","Reflex Blue","Dark Blue","Red","Burgundy","Green","Brown","Violet");
		var Designer_Blue = new Array("Black","White - Adds $5.00");
		var Passion_Fruit = new Array("Black","White - Adds $5.00");
		var Teal = new Array("Black","White - Adds $5.00");
		var Peach = new Array("Black","Red","Reflex Blue","Dark Blue","Red","Burgundy","Green","Brown","Violet");
		var Purple = new Array("Black", "White - Adds $5.00");
		var Dark_Purple = new Array("White - Adds $5.00");
		var Sage = new Array("Black","Green","Brown");
		var Light_Blue = new Array("Black","Reflex Blue","Dark Blue","Brown","Violet");
		var Pink = new Array("Black","Red","Burgundy","Dark Blue");
		var Neon_Orange = new Array("Black");
		var Neon_Green = new Array("Black");
		var Neon_Pink = new Array("Black");
		var Red = new Array("Black","White - Adds $5.00");
		var Dark_Yellow = new Array("Black","Red","Reflex Blue","Dark Blue","Red","Burgundy","Green","Brown","Violet");

		
		// Declaration of functions to handle the onChange event in the Tee Color Select Form options.
		
		
		function swapOptions(the_array_name)
		{
			var numbers_select = window.document.the_form.IMPRINT_COLOR;
			var the_array = eval(the_array_name);
			
			
			setOptionText(window.document.the_form.IMPRINT_COLOR, the_array);
			
			if(((the_array_name == "Black") || (the_array_name == "Cranberry") || (the_array_name == "Dark_Blue") || (the_array_name == "Dark_Green") || (the_array_name == "Dark_Purple"))){
			 for (loop=0; loop < the_array.length; loop++)
			  {
			    numbers_select.options[loop].value = "White|5.00";
			  }
			 } else 
			 
			if(((the_array_name == "Red") || (the_array_name == "Teal") || (the_array_name == "Passion_Fruit") || (the_array_name == "Designer_Blue") || (the_array_name == "Light_Green") || (the_array_name == "Orange") || (the_array_name == "Copper") || (the_array_name == "Purple"))){
			     
				 numbers_select.options[1].value = "White|5.00";
			  
			} else 
			 for (loop=0; loop < the_array.length; loop++)
			  {
			    numbers_select.options[loop].value = the_array[loop];
			  }
			 
		return ;}

		function setOptionText(the_select, the_array)
		{		     
				
				
				for (loop=0; loop < the_array.length; loop++)
			    {
			    the_select.options.length = the_array.length;
				the_select.options[loop].text = the_array[loop];
						    
			    
			    }
		return;
		}
		
		
		function check(radio)
		{
		    x = window.document.the_form.elements['option4|IMPRINT LINE 1:'].value;
			y = window.document.the_form.elements['option5|IMPRINT LINE 2:'].value;
			z = window.document.the_form.elements['option6|IMPRINT LINE 3:'].value;
			q = window.document.the_form.elements['option7|IMPRINT LINE 4:'].value;		  
		  
		  if((x != "") && (y != "") && (z != "") && (q != "") && (radio.checked == true)){
		     alert('We\'re sorry, you have chosen to have four imprint lines with IMPACT type style and that combination is not recommended by our printing department! Please reduce your imprint lines to three or less or choose a different type style. NOTE: You may continue with these options, however, they are not recommended!');
			  
			  return;	
		
		  }
		}
		
		function checkColor(imprint)
		{
		   x = window.document.the_form.elements['IMPRINT_COLOR'].value;
		   
		   if(x == "White|5.00"){
		   alert('We\'re sorry, you have chosen to get four imprint lines with WHITE ink. This combination is not recommended by our printing department! You may continue with this, however, please note that combination is not recommended');
		   return;
		   }
		
		}
		
		
		function changeNames() // this function declaration is for the func. that changes the option names back to shopping
		                       // cart compatible names.
		{			
		
		window.document.the_form.TEE_COLOR.name = "option1|TEE COLOR:";
		window.document.the_form.IMPRINT_COLOR.name = "option2|IMPRINT COLOR:";
		window.document.the_form.TEE_CUP_LOGO.name = "option10|Tee Cup Logo:";
		
		
		return;
		}
			
	    
	    function inputEnable() // this function declaration is for the func. that enables and disables the TEE_CUP_LOGO input field
	    					   // According to what the users clicks on the checkbox for that option
	    {
	      if(window.document.the_form.elements['option9|'].checked == true){
	      
	      window.document.the_form.elements['TEE_CUP_LOGO'].disabled = false;
	      
	      }
	      else
	      	      
	      window.document.the_form.elements['TEE_CUP_LOGO'].disabled = true;
	      	      
	    
	    }
	
	
	    function checkDisable() // Function Declaration for the CheckBox Enabler
	    {
	        // if the checkBox is checked the following one is disabled
	        if(window.document.the_form.elements['option11|Rush Options:'].checked == true){
	        window.document.the_form.elements['option12|Rush Options:'].disabled = true;
	        }
	        
	        // if the checkbox is turned OFF then the following checkBox is enabled
	        if(window.document.the_form.elements['option11|Rush Options:'].checked == false){
	        window.document.the_form.elements['option12|Rush Options:'].disabled = false;
	        }
	        
	        // if the checkBox is checked the following one is disabled
	        if(window.document.the_form.elements['option12|Rush Options:'].checked == true){
	        window.document.the_form.elements['option11|Rush Options:'].disabled = true;
	        }
	        
	        // if the checkbox is turned OFF then the following checkBox is enabled
	        if(window.document.the_form.elements['option12|Rush Options:'].checked == false){
	        window.document.the_form.elements['option11|Rush Options:'].disabled = false;
	        }
	    
	    }
	
	
	     function changeFields1()
	     {
	        
	        if(window.document.the_form.elements['option4|IMPRINT LINE 1:'].value != false){
			 window.document.the_form.elements['option5|IMPRINT LINE 2:'].disabled = false;
			 window.document.the_form.elements['option5|IMPRINT LINE 2:'].select();
			 window.document.the_form.elements['option5|IMPRINT LINE 2:'].focus();
	        }
	        else window.document.the_form.elements['option5|IMPRINT LINE 2:'].disabled = true;  	        
	     }
	     
	     function changeFields2()
	     {
	         if(window.document.the_form.elements['option5|IMPRINT LINE 2:'].value != false){
			 window.document.the_form.elements['option6|IMPRINT LINE 3:'].disabled = false;
			 window.document.the_form.elements['option6|IMPRINT LINE 3:'].select();
			 window.document.the_form.elements['option6|IMPRINT LINE 3:'].focus();
	         }
	         else window.document.the_form.elements['option6|IMPRINT LINE 3:'].disabled = true;	     
	     }
	     
	     function changeFields3()
	     {
	         if(window.document.the_form.elements['option6|IMPRINT LINE 3:'].value != false){	
			 window.document.the_form.elements['option7|IMPRINT LINE 4:'].disabled = false;
			 window.document.the_form.elements['option7|IMPRINT LINE 4:'].select();
			 window.document.the_form.elements['option7|IMPRINT LINE 4:'].focus();
	         }
	         else window.document.the_form.elements['option7|IMPRINT LINE 4:'].disabled = true;
	     }
		 
		 function validateText()
		 {
		     
	         window.document.the_form.elements['option4|IMPRINT LINE 1:'].disabled = false;
			 window.document.the_form.elements['option5|IMPRINT LINE 2:'].disabled = false;
			 window.document.the_form.elements['option6|IMPRINT LINE 3:'].disabled = false;
			 window.document.the_form.elements['option7|IMPRINT LINE 4:'].disabled = false;
			 
			 if(window.document.the_form.elements['option4|IMPRINT LINE 1:'].value == "Artwork Being Sent"){
			 window.document.the_form.elements['option4|IMPRINT LINE 1:'].value = "";
			 }
			 
		 }
		 
		 function validateText2()
		 {
		     
	         window.document.the_form.elements['option4|IMPRINT LINE 1:'].disabled = false;
			 window.document.the_form.elements['option5|IMPRINT LINE 2:'].disabled = false;
			 window.document.the_form.elements['option6|IMPRINT LINE 3:'].disabled = false;
			 window.document.the_form.elements['option7|IMPRINT LINE 4:'].disabled = false;
			 window.document.the_form.elements['option4|IMPRINT LINE 1:'].value = "Artwork Being Sent";
			 
	      
		 }
		 
		 function checkAndDo()
		 {
			window.document.the_form.elements['IMPRINT_COLOR'].disabled = true;
			
			
			if(window.document.the_form.elements['option3|'].checked == true){
			window.document.the_form.elements['option4|IMPRINT LINE 1:'].disabled = false;
			window.document.the_form.elements['option5|IMPRINT LINE 2:'].disabled = false;
			window.document.the_form.elements['option6|IMPRINT LINE 3:'].disabled = false;
			window.document.the_form.elements['option7|IMPRINT LINE 4:'].disabled = false;
			}
			
			if(window.document.the_form.elements['option3|'].checked == false){
			window.document.the_form.elements['option4|IMPRINT LINE 1:'].disabled = true;
			window.document.the_form.elements['option5|IMPRINT LINE 2:'].disabled = true;
			window.document.the_form.elements['option6|IMPRINT LINE 3:'].disabled = true;
			window.document.the_form.elements['option7|IMPRINT LINE 4:'].disabled = true;
			}
			
			//if(window.document.the_form.elements['option3|'].checked == null){
			///window.document.the_form.elements['option4|IMPRINT LINE 1:'].disabled = false;
			//window.document.the_form.elements['option5|IMPRINT LINE 2:'].disabled = true;
			//window.document.the_form.elements['option6|IMPRINT LINE 3:'].disabled = true;
			//window.document.the_form.elements['option7|IMPRINT LINE 4:'].disabled = true;
			//}
			
			
			if(window.document.the_form.elements['option9|'].checked == true){
			window.document.the_form.elements['TEE_CUP_LOGO'].disabled = false;			
			}
			
			if(window.document.the_form.elements['option9|'].checked == false){
			window.document.the_form.elements['TEE_CUP_LOGO'].disabled = true;
			}
			
			 window.document.the_form.elements['option4|IMPRINT LINE 1:'].disabled = false;
			 
			 if(window.document.the_form.elements['option5|IMPRINT LINE 2:'].value != ""){
			 window.document.the_form.elements['option5|IMPRINT LINE 2:'].disabled = false;
			 }
			 
			 if(window.document.the_form.elements['option6|IMPRINT LINE 3:'].value != ""){
			 window.document.the_form.elements['option6|IMPRINT LINE 3:'].disabled = false;
			 }
			 
			 if(window.document.the_form.elements['option7|IMPRINT LINE 4:'].value != ""){
			 window.document.the_form.elements['option7|IMPRINT LINE 4:'].disabled = false;
			 }
			 
		 
		 }
		 
		 function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
		 
