function remove()
{
for(i=0;i<4;i++)
  {document.getElementById("shirtcolor").remove(0)}
}

function remove2()
{
for(i=0;i<2;i++)
  {document.getElementById("rad1").remove(0)}
  {document.getElementById("rad2").remove(0)}
  {document.getElementById("rad3").remove(0)}
  {document.getElementById("rad4").remove(0)}
}

function changePic(name)
{
var x1=document.getElementById('shirt').innerHTML = "<img src=" + name + ">"
}

function total()
{
var price = "199"
var model = document.getElementById("shirtmodel")
switch (model.selectedIndex)
  {
case 0: 
  price="199"
  break
case 1:
  price="199"
  break
case 2:
  price="479"
  break
 }

var table=document.getElementById("table1").rows	
var antal=document.getElementById("antal").value
var sum=(price * antal)
var cell = table[11].cells

cell[1].innerHTML = sum + "SEK (inkl. frakt och moms)"
document.getElementById("sum").value = sum
}

function model()
  { 
    var model = document.getElementById("shirtmodel")
    var color = document.getElementById("shirtcolor")
    var rad1 = document.getElementById("rad1")
    var rad2 = document.getElementById("rad2")
    var rad3 = document.getElementById("rad3")
    var rad4 = document.getElementById("rad4")
    var x = document.getElementById("table1").rows
    var y = x[10].cells
    
    switch (model.selectedIndex)
      { 
	case 0: remove()
		remove2()
		rad1[0] = new Option("Bröst", "Bröst")
		rad1[1] = new Option("Rygg ", "Rygg ")
		rad2[0] = new Option("Bröst", "Bröst")
		rad2[1] = new Option("Rygg ", "Rygg ")
		rad3[1] = new Option("Bröst", "Bröst")
		rad3[0] = new Option("Rygg ", "Rygg ")
		rad4[1] = new Option("Bröst", "Bröst")
		rad4[0] = new Option("Rygg ", "Rygg ")
		color[0]= new Option("01-Vit", "01 - Vit")
		color[1]= new Option("65-Röd", "65 - Röd")
		color[2]= new Option("99-Svart", "99 - Svart")
		color[3]= new Option("22-Ljusblå", "22 - Ljusblå")
		color[4]= new Option("25-Blå", "25 - Blå")
		changePic("vanlig.jpg")
		total("10")
		break

        case 1: remove()
		remove2()
                rad1[0] = new Option("Bröst", "Bröst")
                rad1[1] = new Option("Rygg ", "Rygg ")
                rad2[0] = new Option("Bröst", "Bröst")
                rad2[1] = new Option("Rygg ", "Rygg ")
                rad3[1] = new Option("Bröst", "Bröst")
                rad3[0] = new Option("Rygg ", "Rygg ")
                rad4[1] = new Option("Bröst", "Bröst")
                rad4[0] = new Option("Rygg ", "Rygg ")
		color[0]= new Option("01-Vit", "01 - Vit")
		color[1]= new Option("28-Marin", "28 - Marin")
		color[2]= new Option("65-Röd", "65 - Röd")
		color[3]= new Option("99-Svart", "99 - Svart")
		
		total("199")
		changePic("flicka.jpg")
		break

        case 2: remove()
		remove2()
                rad1[0] = new Option("Bröst", "Bröst")
                rad1[1] = new Option("Rygg ", "Rygg ")
                rad2[0] = new Option("Bröst", "Bröst")
                rad2[1] = new Option("Rygg ", "Rygg ")
                rad3[1] = new Option("Bröst", "Bröst")
                rad3[0] = new Option("Rygg ", "Rygg ")
                rad4[1] = new Option("Bröst", "Bröst")
                rad4[0] = new Option("Rygg ", "Rygg ")
		color[0]=new Option("01-Vit", "01 - Vit")
		color[1]=new Option("25-Blå", "25 - Blå")
		color[2]=new Option("65-Röd", "65 - Röd")
		color[3]=new Option("99-Svart", "99 - Svart")
                
				total("479")
		changePic("hood.jpg")
		break

        case 3: remove()
		remove2()
                rad1[0] = new Option("Höger", "Höger")
                rad1[1] = new Option("Vänster", "Vänster")
                rad2[0] = new Option("Höger", "Höger")
                rad2[1] = new Option("Vänster", "Vänster")
                rad3[1] = new Option("Höger", "Höger")
                rad3[0] = new Option("Vänster", "Vänster")
                rad4[1] = new Option("Höger", "Höger")
                rad4[0] = new Option("Vänster", "Vänster")
                color[0]=new Option("Svart", "Svart")
                changePrice("89")
		changePic("vantar.jpg")
                break

      }

  }
