// JavaScript Document

function buildSelect(x) {
  if (x == "1") { 
    /* set choices 1 and 2 */
    option10 = new Option("","")
	option0 = new Option(" No hem $0","No Hem $0")
    option1 = new Option(" 1\" hem +$10","1 inch hem ($10)")
    option2 = new Option("No Grommets $0","No grommets $0")
    option3 = new Option("Grommets in corners $0", "Corner Grommets $0")
    option4 = new Option("Grommets every 2ft $0","Grommets every 2 ft $0")
    option5 = new Option("No Pole pockets $0", "No Pole Pockets $0")
    option6 = new Option("2\" pole pockets +$15","2 inch Pole Pockets +$15")
    option7 = new Option("4\" pole pockets +$25","4 inch Pole pockets +$25")
    // write them
    document.getElementById('none').style.display='none'
	document.getElementById('select').style.display='none'
	document.getElementById('pole').style.display='inline'
	document.getElementById('max1').style.display='inline'
	document.getElementById('max2').style.display='none'
	document.getElementById('max3').style.display='none'
	document.getElementById('max4').style.display='none'
	document.getElementById('max5').style.display='inline'
	document.getElementById('max6').style.display='none'
	document.getElementById('max7').style.display='none'
	document.getElementById('max8').style.display='none'
	document.getElementById('max9').style.display='none'
	document.order.fieldB.style.display='inline'
	document.order.fieldB.options[0] = option0
    document.order.fieldB.options[1] = option1
	document.order.fieldC.style.display='inline'
    document.order.fieldC.options[0] = option2
	document.order.fieldC.options[1] = option3
    document.order.fieldC.options[2] = option4
	document.order.fieldD.style.display='none'
	document.order.fieldF.style.display='none'
	document.order.fieldE.style.display='inline'
    document.order.fieldE.options[0] = option5
	document.order.fieldE.options[1] = option6
    document.order.fieldE.options[2] = option7
	document.order.fieldD.options[0] = option10
    document.order.fieldD.options[1] = option10
	document.order.fieldF.options[0] = option10
    document.order.fieldF.options[1] = option10
    return;
    }

  if (x == "2") { 
    /* set choices 1 and 2 */
	option10 = new Option("","")
	option2 = new Option("No Grommets $0","No grommets $0")
    option3 = new Option("Grommets in corners $0", "Corner Grommets $0")
    option4 = new Option("Grommets every 2ft $0","Grommets every 2 ft $0")
    // write them
    document.getElementById('none').style.display='none'
	document.getElementById('select').style.display='none'
	document.getElementById('pole').style.display='none'
	document.getElementById('max1').style.display='none'
	document.getElementById('max2').style.display='inline'
	document.getElementById('max3').style.display='none'
	document.getElementById('max4').style.display='none'
	document.getElementById('max5').style.display='none'
	document.getElementById('max6').style.display='inline'
	document.getElementById('max7').style.display='none'
	document.getElementById('max8').style.display='none'
	document.getElementById('max9').style.display='none'
	document.order.fieldB.style.display='none'
	document.order.fieldB.options[0] = option10
    document.order.fieldB.options[1] = option10
	document.order.fieldE.options[0] = option10
	document.order.fieldE.options[1] = option10
    document.order.fieldE.options[2] = option10
	document.order.fieldD.style.display='none'
	document.order.fieldE.style.display='none'
	document.order.fieldF.style.display='none'
	document.order.fieldC.style.display='inline'
    document.order.fieldC.options[0] = option2
	document.order.fieldC.options[1] = option3
    document.order.fieldC.options[2] = option4
	document.order.fieldD.options[0] = option10
    document.order.fieldD.options[1] = option10
	document.order.fieldE.options[0] = option10
	document.order.fieldE.options[1] = option10
    document.order.fieldE.options[2] = option10
	document.order.fieldF.options[0] = option10
    document.order.fieldF.options[1] = option10
    return;
    }
	
 if (x == "3") { 

    option10 = new Option("","")
	
	document.getElementById('none').style.display='inline'
	document.getElementById('select').style.display='none'
	document.getElementById('pole').style.display='none'
	document.getElementById('max1').style.display='none'
	document.getElementById('max2').style.display='none'
	document.getElementById('max3').style.display='inline'
	document.getElementById('max4').style.display='none'
	document.getElementById('max5').style.display='none'
	document.getElementById('max6').style.display='none'
	document.getElementById('max7').style.display='inline'
	document.getElementById('max8').style.display='none'
	document.getElementById('max9').style.display='none'
	document.order.fieldB.style.display='none'
    document.order.fieldC.style.display='none'
	document.order.fieldD.style.display='none'
	document.order.fieldE.style.display='none'
	document.order.fieldF.style.display='none'
	document.order.fieldB.options[0] = option10
    document.order.fieldB.options[1] = option10
	document.order.fieldC.options[0] = option10
	document.order.fieldC.options[1] = option10
    document.order.fieldC.options[2] = option10
	document.order.fieldD.options[0] = option10
    document.order.fieldD.options[1] = option10
	document.order.fieldE.options[0] = option10
	document.order.fieldE.options[1] = option10
    document.order.fieldE.options[2] = option10
	document.order.fieldF.options[0] = option10
    document.order.fieldF.options[1] = option10
    return;
    }

  if (x == "4") { 
    /* set choices 3 and 4 */ 
    option10 = new Option("","")
	option0 = new Option(" No H-Stakes $0","No H-stakes $0")
    option1 = new Option(" H-stakes included $0","Add H stakes $0")
    option2 = new Option(" One sided Printing $0","One sided Printing $0")
    option3 = new Option(" Two sided printing $0","Two sided Printing $0")
    // write them
    document.getElementById('none').style.display='none'
	document.getElementById('select').style.display='none'
	document.getElementById('pole').style.display='none'
	document.getElementById('max1').style.display='none'
	document.getElementById('max2').style.display='none'
	document.getElementById('max3').style.display='none'
	document.getElementById('max4').style.display='inline'
	document.getElementById('max5').style.display='none'
	document.getElementById('max6').style.display='none'
	document.getElementById('max7').style.display='none'
	document.getElementById('max8').style.display='inline'
	document.getElementById('max9').style.display='inline'
	document.order.fieldD.style.display='inline'
	document.order.fieldD.options[0] = option0
    document.order.fieldD.options[1] = option1
	document.order.fieldF.style.display='inline'
	document.order.fieldF.options[0] = option2
    document.order.fieldF.options[1] = option3
    document.order.fieldB.style.display='none'
	document.order.fieldC.style.display='none'
	document.order.fieldE.style.display='none'
	document.order.fieldB.options[0] = option10
    document.order.fieldB.options[1] = option10
	document.order.fieldC.options[0] = option10
	document.order.fieldC.options[1] = option10
    document.order.fieldC.options[2] = option10
	document.order.fieldE.options[0] = option10
	document.order.fieldE.options[1] = option10
    document.order.fieldE.options[2] = option10
    return;
    }






  if (x == "1234") { 
    /* set choices 1,2, 3, and 4 */ 
    option0 = new Option("  Please Select  ",0)
    option1 = new Option("Value 1",1)
    option2 = new Option("Value 2",2)
    option3 = new Option("Value 3",3)
    option4 = new Option("Value 4",4)
    // write them
    document.order.fieldB.options[0] = option0
    document.order.fieldB.options[1] = option1
    document.order.fieldB.options[2] = option2
    document.order.fieldB.options[3] = option3
    document.order.fieldB.options[4] = option4
    return;
    }

  if (x == "00") { 
    /* set choices to none */ 
    option0 = new Option("  None  ",0)
    option1 = new Option("",1)
    option2 = new Option("",2)
    option3 = new Option("",3)
    option4 = new Option("",4)
    // write them
    document.order.fieldB.options[0] = option0
    document.order.fieldB.options[1] = option1
    document.order.fieldB.options[2] = option2
    document.order.fieldB.options[3] = option3
    document.order.fieldB.options[4] = option4
    return;
    } 
}
