// This buckle menu option works for collars that have Large & Medium plastic, metal, martingale and leash option.
// This is the complete menu and works best with any collar that has all of the Large and Medium buckle options.

// This pertains to: multicollarpage.html
// medium&lagenylon.html,



// **************************************************************************************************************

var itemList=document.classic.itemCh				//saves select itemCh to a variable
var buckleChoice=document.classic.buckledata			//saves select buckles to a variable

//	Create a new array to change the elements stored in the selected variable for buckles

var buckles=new Array()

// 	FIRST OPTION IS NULL NO CHANGES ARE EVER NEEDED.
buckles[0]="";

//	THIS OPTION HANDLES ALL OF THE BUCKLE COLORS AVAILABLE.

buckles[1]=["Select Your Buckle|", "Black $14.95|Black Plastic Buckle s1=0 s2=0 @14.95","Army Green $15.95|Army Green Plastic Buckle s1=0 s2=0 @15.95",
	"Brown $15.95|Brown Plastic Buckle s1=0 s2=0 @15.95","Grass Green $15.95|Grass Green Plastic Buckle s1=0 s2=0 @15.95", "Hot Pink $15.95|Hot Pink Plastic Buckle s1=0 s2=0 @15.95",
	"Khaki $15.95|Khaki Plastic Buckle s1=0 s2=0 @15.95","Light Pink $15.95|Light Plastic Buckle s1=0 s2=0 @15.95","Lime $15.95|Lime Plastic Buckle s1=0 s2=0 @15.95",
	"Navy Blue $15.95|Navy Blue Plastic Buckle s1=0 s2=0 @15.95","Orange  $15.95|Orange Plastic Buckle s1=0 s2=0 @15.95","Purple $15.95|Purple Plastic Buckle s1=0 s2=0 @15.95",
	"Red $15.95|Red Plastic Buckle s1=0 s2=0 @15.95","Turquoise $15.95|Turquoise Plastic Buckle s1=0 s2=0 @15.95","Yellow $15.95|Yellow Plastic Buckle s1=0 s2=0 @15.95",
	"White $15.95|White Plastic Buckle s1=0 s2=0 @15.95"];
	

//	THIS OPTION HANDLES ALL OF THE COLORED BUCKLE AND LEASH SET PRICES.

buckles[2]=["Select Your Buckle|", "Black $29.95|Black Plastic Buckle & Leash Set s1=0 s2=0 @29.95",
	"Army Green $30.95|Army Green Plastic Buckle & Leash Set s1=0 s2=0 @30.95","Brown $30.95|Brown Plastic Buckle & Leash Set s1=0 s2=0 @30.95",
	"Grass Green $30.95|Grass Green Plastic Buckle & Leash Set s1=0 s2=0 @30.95","Hot Pink $30.95|Hot Pink Plastic Buckle & Leash Set s1=0 s2=0 @30.95",
	"Khaki $30.95|Khaki Plastic Buckle & Leash Set s1=0 s2=0 @30.95","Light Pink $30.95|Light Pink Plastic Buckle & Leash Set s1=0 s2=0 @30.95",
	"Lime $30.95|Lime Plastic Buckle & Leash Set s1=0 s2=0 @30.95","Navy Blue $30.95|Navy Blue Plastic Buckle & Leash Set s1=0 s2=0 @30.95",
	"Orange $30.95|Orange Plastic Buckle & Leash Set s1=0 s2=0 @30.95","Purple $30.95|Purple Plastic Buckle & Leash Set s1=0 s2=0 @30.95",
	"Red $30.95|Red Plastic Buckle & Leash Set s1=0 s2=0 @30.95","Turquoise $30.95|Turquoise Plastic Buckle & Leash Set s1=0 s2=0 @30.95",
	"Yellow $30.95|Yellow Plastic Buckle & Leash Set s1=0 s2=0 @30.95","White $30.95|White Plastic Buckle & Leash Set s1=0 s2=0 @30.95"];

//	THIS OPTIONS HANDLES THE MARTINGALE COLLAR OPTIONS.

buckles[3]=["Select Your Buckle|", "Regular Martingale (No Buckle) $15.95|Martingale w/out buckle s1=0 s2=0 @15.95","w/Black Plastic $19.95|Martingale with a Black Plastic Buckle s1=0 s2=0 @19.95",
	"w/Army Green Plastic $20.95|Martingale with a Army Green Plastic Buckle s1=0 s2=0 @20.95","w/Brown Plastic $20.95|Martingale with a Brown Plastic Buckle s1=0 s2=0 @20.95",
	"w/Grass Green Plastic $20.95|Martingale with a Grass Green Plastic Buckle s1=0 s2=0 @20.95","w/Hot Pink Plastic $20.95|Martingale with a Hot Pink Plastic Buckle s1=0 s2=0 @20.95",
	"w/Khaki Plastic $20.95|Martingale with a Khaki Plastic Buckle s1=0 s2=0 @20.95","w/Light Pink Plastic $20.95|Martingale with a Light Pink Plastic Buckle s1=0 s2=0 @20.95",
	"w/Lime Plastic $20.95|Martingale with a Lime Plastic Buckle s1=0 s2=0 @20.95","w/Navy Blue Plastic $20.95|Martingale with a Navy Blue Plastic Buckle s1=0 s2=0 @20.95",
	"w/Orange Plastic $20.95|Martingale with a Orange Plastic Buckle s1=0 s2=0 @20.95","w/Purple Plastic $20.95|Martingale with a Purple Plastic Buckle s1=0 s2=0 @20.95",
	"w/Red Plastic $20.95|Martingale with a Red Plastic Buckle s1=0 s2=0 @20.95","w/Turquoise Plastic $20.95|Martingale with a Turquoise Plastic Buckle s1=0 s2=0 @20.95",
	"w/Yellow Plastic $20.95|Martingale with a Yellow Plastic Buckle s1=0 s2=0 @20.95","w/White Plastic $20.95|Martingale with a White Plastic Buckle  s1=0 s2=0 @20.95",
	"w/Black Metal $23.95|Martingale with a Black Metal Buckle s1=0 s2=0 @23.95","w/Silver Metal $23.95|Martingale with a Silver Metal Buckle s1=0 s2=0 @23.95"];

//	THIS OPTION HANDLES THE MARTINGALE COLLAR & LEASH OPTIONS.

buckles[4]=["Select Your Buckle|", "Regular Martingale (No Buckle) $31.95|Martingale & Leash Set with No Buckle s1=0 s2=0 @31.95",
	"w/Black Plastic $34.95|Martingale & Leash Set with a Black Plastic Buckle s1=0 s2=0 @35.95","w/Army Green Plastic $35.95|Martingale & Leash Set with a Army Green Plastic Buckle s1=0 s2=0 @35.95",
	"w/Brown Plastic $35.95|Martingale & Leash Set with a Brown Plastic Buckle s1=0 s2=0 @35.95","w/Grass Green Plastic $35.95|Martingale & Leash Set with a Grass Green Plastic Buckle s1=0 s2=0 @35.95",
	"w/Hot Pink Plastic $35.95|Martingale & Leash Set with a Hot Pink Plastic Buckle s1=0 s2=0 @35.95","w/Khaki Plastic $35.95|Martingale & Leash Set with a Khaki Plastic Buckle s1=0 s2=0 @35.95",
	"w/Light Pink Plastic $35.95|Martingale & Leash Set with a Light Pink Plastic Buckle s1=0 s2=0 @35.95","w/Lime Plastic $35.95|Martingale & Leash Set with a Lime Plastic Buckle s1=0 s2=0 @35.95",
	"w/Navy Blue Plastic $35.95|Martingale & Leash Set with a Navy Blue Plastic Buckle s1=0 s2=0 @35.95","w/Orange Plastic $35.95|Martingale & Leash Set with a Orange Plastic Buckle s1=0 s2=0 @35.95",
	"w/Purple Plastic $35.95|Martingale & Leash Set with a Purple Plastic Buckle s1=0 s2=0 @35.95","w/Red Plastic $35.95|Martingale & Leash Set with a Red Plastic Buckle s1=0 s2=0 @35.95",
	"w/Turquoise Plastic $35.95|Martingale & Leash Set with a Turquoise Plastic Buckle s1=0 s2=0 @35.95","w/Yellow Plastic $35.95|Martingale & Leash Set with a Yellow Plastic Buckle s1=0 s2=0 @35.95",
	"w/White Plastic $35.95|Martingale & Leash Set with a White Plastic Buckle s1=0 s2=0 @35.95","w/Black Metal $38.95|Martingale & Leash Set with a Black Metal Buckle s1=0 s2=0 @38.95",
	"w/Silver Metal $38.95|Martingale & Leash Set with a Silver Metal Buckle s1=0 s2=0 @38.95"];	 
	 
//	THIS OPTION HANDLES THE METAL BUCKLES OPTIONS.

buckles[5]=["Select Your Buckle|","Black Metal $19.95|Black Metal Buckle s1=0 s2=0 @19.95","Silver Metal $19.95|Silver Metal Buckle s1=0 s2=0 @19.95"];

//	THIS OPTIONS HANDLES THE METAL BUCKLES & LEASH OPTIONS.

buckles[6]=["Select Your Buckle|","Black Metal $34.95|Black Metal Buckle & Leash Set s1=0 s2=0 @34.95","Silver Metal $34.95|Silver Metal Buckle & Leash Set s1=0 s2=0 @34.95"];

//	THIS OPTIONS HANDLES LEASHES.

buckles[7]=["Select Your Item|","Leash Only $19.95|Leash Only s1=0 s2=0 @19.95"];




	
	
// Function loops through the array in order to change the buckledata select elements
// name function "updatebuckles, declare variable-paramater "selectbucklegroup"

function updatebuckles(selectbucklegroup)	
	{
	buckleChoice.options.length=0					// set select elements stored in buckleChoice to 0
	if (selectbucklegroup>0)
		{
		// set the array variable "buckles[i]" into the function variable-parameter.
		for (i=0; i<buckles[selectbucklegroup].length; i++)
		
		buckleChoice.options[buckleChoice.options.length]=new Option(buckles[selectbucklegroup][i].split("|")[0],
		buckles[selectbucklegroup][i].split("|")[1])
		}
	}
	
	
	// three final steps.
	// retrive the "buckledat" which was saved to the buckleChoice varialbe and set it to an .options() construcor.
	// split it using the (|) the buckles[variable] array. fist the text set to [0]
	// then the values set to [1].
	

	// Make sure a selection is choosen.


function validateform()
	{
		valid = true;
	if (document.classic.buckledata.selectedIndex == 0)
	    {
	        alert ("Please select your a buckle color!");
	        valid = false;
	    }
	else if (document.classic.itemsCh.selectedIndex == 0)
	    {
	        alert ("Please select an item!");
	        valid = false;
	    }
	    
	    	return valid;
	}
	
	
function checkpullon()
	{
	if (document.classic.itemsCh !=='0')
		{
		document.classic.buckledata.disabled=false;
		document.classic.nylonselect.disabled=false;
		}
	}
	
	
	
