var attys=new Array(); // Number in original array + 1 // build the arrays for the dropdown options var groups=5; // Number in original array + 1 var price=new Array(groups); var stan=new Array(groups); var group=new Array(groups); var group2=new Array(); var group3=new Array(); var i=1; group[i] = new Array(); group2[i] = new Array(); group3[i] = new Array(); group[i][0] = new Option("Choose Size -"," "); price[i] = new Array(); stan[i] = new Array(); j=1; group[i][j] = new Option("30mL (One Ounce)","30mL (One Ounce)"); // group[i][j] = new Option("30mL (One Ounce) - (In Stock)","30mL (One Ounce)"); group2[i][j] = new Array(); group3[i][j] = new Array(); group2[i][j][0] = new Option("Choose -"," "); price[i][j] = '19.95'; stan[i][j] = '19.95'; k=1; j++; group[i][j] = new Option("15mL (Half Ounce)","15mL (Half Ounce)"); // group[i][j] = new Option("15mL (Half Ounce) - (In Stock)","15mL (Half Ounce)"); group2[i][j] = new Array(); group3[i][j] = new Array(); group2[i][j][0] = new Option("Choose -"," "); price[i][j] = '9.95'; stan[i][j] = '9.95'; k=1; j++; i++; group[i] = new Array(); group2[i] = new Array(); group3[i] = new Array(); group[i][0] = new Option("Choose Size -"," "); price[i] = new Array(); stan[i] = new Array(); j=1; group[i][j] = new Option("30mL (One Ounce)","30mL (One Ounce)"); // group[i][j] = new Option("30mL (One Ounce) - (In Stock)","30mL (One Ounce)"); group2[i][j] = new Array(); group3[i][j] = new Array(); group2[i][j][0] = new Option("Choose -"," "); price[i][j] = '19.95'; stan[i][j] = '19.95'; k=1; j++; group[i][j] = new Option("15mL (Half Ounce)","15mL (Half Ounce)"); // group[i][j] = new Option("15mL (Half Ounce) - (In Stock)","15mL (Half Ounce)"); group2[i][j] = new Array(); group3[i][j] = new Array(); group2[i][j][0] = new Option("Choose -"," "); price[i][j] = '9.95'; stan[i][j] = '9.95'; k=1; j++; i++; group[i] = new Array(); group2[i] = new Array(); group3[i] = new Array(); group[i][0] = new Option("Choose Size -"," "); price[i] = new Array(); stan[i] = new Array(); j=1; group[i][j] = new Option("30mL (One Ounce)","30mL (One Ounce)"); // group[i][j] = new Option("30mL (One Ounce) - (In Stock)","30mL (One Ounce)"); group2[i][j] = new Array(); group3[i][j] = new Array(); group2[i][j][0] = new Option("Choose -"," "); price[i][j] = '19.95'; stan[i][j] = '19.95'; k=1; j++; group[i][j] = new Option("15mL (Half Ounce)","15mL (Half Ounce)"); // group[i][j] = new Option("15mL (Half Ounce) - (In Stock)","15mL (Half Ounce)"); group2[i][j] = new Array(); group3[i][j] = new Array(); group2[i][j][0] = new Option("Choose -"," "); price[i][j] = '9.95'; stan[i][j] = '9.95'; k=1; j++; i++; group[i] = new Array(); group2[i] = new Array(); group3[i] = new Array(); group[i][0] = new Option("Choose Size -"," "); price[i] = new Array(); stan[i] = new Array(); j=1; group[i][j] = new Option("30mL (One Ounce)","30mL (One Ounce)"); // group[i][j] = new Option("30mL (One Ounce) - (In Stock)","30mL (One Ounce)"); group2[i][j] = new Array(); group3[i][j] = new Array(); group2[i][j][0] = new Option("Choose -"," "); price[i][j] = '19.95'; stan[i][j] = '19.95'; k=1; j++; group[i][j] = new Option("15mL (Half Ounce)","15mL (Half Ounce)"); // group[i][j] = new Option("15mL (Half Ounce) - (In Stock)","15mL (Half Ounce)"); group2[i][j] = new Array(); group3[i][j] = new Array(); group2[i][j][0] = new Option("Choose -"," "); price[i][j] = '9.95'; stan[i][j] = '9.95'; k=1; j++; i++; attys[73] = Array(); attys[73]['groups'] = groups; attys[73]['group'] = group; attys[73]['group2'] = group2; attys[73]['group3'] = group3; attys[73]['prices'] = price; attys[73]['stan_prices'] = stan; function populate_options(pid,num,y) { var opt1='option1_'+pid; var opt2='option2_'+pid; var opt3='option3_'+pid; var opt4='option4_'+pid; x = document.getElementById(opt1).options.selectedIndex; w = y+2; var dropdowns=new Array(); dropdowns[3] = document.getElementById(opt3); dropdowns[4] = document.getElementById(opt4); while (w<=num) { dropdowns[w].options[0].selected=true; w++; } if (y==1) { tmp_group = attys[pid]['group'][x]; var formfield=document.getElementById(opt2); document.getElementById(opt2).options[0].selected=true; } else if (y==2) { z = document.getElementById(opt2).options.selectedIndex; tmp_group = attys[pid]['group2'][x][z]; var formfield=document.getElementById(opt3); } else if (y==3) { z = document.getElementById(opt2).options.selectedIndex; w = document.getElementById(opt3).options.selectedIndex; tmp_group = attys[pid]['group3'][x][z][w]; var formfield=document.getElementById(opt4); } for(m=formfield.options.length-1;m>0;m--) { formfield.options[m]=null; } for(i=0;i