function paintCouch(colour)
{
	switch (colour)
	{
		case 1:
			this.divano.src = "../pictures/ds_p1.gif";
			this.divano.alt = "Rivestimento: Bianco, Struttura: Bianca";
			couch_colour = "Rivestimento: Bianco\nStruttura: Bianca"
			break;
		case 2:
			this.divano.src = "../pictures/ds_p2.gif";
			this.divano.alt = "Rivestimento: Bianco, Struttura: Grigio Alluminio";
			couch_colour = "Rivestimento: Bianco\nStruttura: Grigio Alluminio";
			break;
		case 3:
			this.divano.src = "../pictures/ds_p3.gif";
			this.divano.alt = "Rivestimento: Bianco, Struttura: Nera";
			couch_colour = "Rivestimento: Bianco\nStruttura: Nera";		
			break;
		case 4:
			this.divano.src = "../pictures/ds_p4.gif";
			this.divano.alt = "Rivestimento: Senape, Struttura: Bianca";
			couch_colour = "Rivestimento: Senape\nStruttura: Bianca";
			break;
		case 5:
			this.divano.src = "../pictures/ds_p5.gif";
			this.divano.alt = "Rivestimento: Senape, Struttura: Grigio Alluminio";
			couch_colour = "Rivestimento: Senape\nStruttura: Grigio Alluminio";
			break;
		case 6:
			this.divano.src = "../pictures/ds_p6.gif";
			this.divano.alt = "Rivestimento: Senape, Struttura: Nera";
			couch_colour = "Rivestimento: Senape\nStruttura: Nera";
			break;
		case 7:
			this.divano.src = "../pictures/ds_p7.gif";
			this.divano.alt = "Rivestimento: Grigio, Struttura: Bianca";
			couch_colour = "Rivestimento: Grigio\nStruttura: Bianca";
			break;
		case 8:
			this.divano.src = "../pictures/ds_p8.gif";
			this.divano.alt = "Rivestimento: Grigio, Struttura: Grigio Alluminio";
			couch_colour = "Rivestimento: Grigio\nStruttura: Grigio Alluminio";
			break;
		case 9:
			this.divano.src = "../pictures/ds_p9.gif";
			this.divano.alt = "Rivestimento: Grigio, Struttura: Nera";
			couch_colour = "Rivestimento: Grigio\nStruttura: Nera";
			break;
		case 10:
			this.divano.src = "../pictures/ds_p10.gif";
			this.divano.alt = "Rivestimento: Nero, Struttura: Bianca";
			couch_colour = "Rivestimento: Nero\nStruttura: Bianca";
			break;
		case 11:
			this.divano.src = "../pictures/ds_p11.gif";
			this.divano.alt = "Rivestimento: Nero, Struttura: Grigio Alluminio";
			couch_colour = "Rivestimento: Nero\nStruttura: Grigio Alluminio";
			break;
		case 12:
			this.divano.src = "../pictures/ds_p12.gif";
			this.divano.alt = "Rivestimento: Nero, Struttura: Nera";
			couch_colour = "Rivestimento: Nero\nStruttura: Nera";
			break;
	}
	// Check Size
	if (CouchForm_D.F_Dim[0].checked) {
      couch_dim = "Small";
      couch_price = "145.00 Euro";
  }
	if (CouchForm_D.F_Dim[1].checked) {
      couch_dim = "Medium";
      couch_price = "164.00 Euro";
  }
	if (CouchForm_D.F_Dim[2].checked) {
      couch_dim = "Large";
      couch_price = "192.00 Euro";
  }
	if (CouchForm_D.F_Dim[3].checked) {
      couch_dim = "Extra Large";
      couch_price = "264.00 Euro";
  }
	// Create choice string
	CouchForm.F_Choice.value = couch_colour + "\nDimensione: " + couch_dim + "\nPrezzo: " + couch_price;
}

function dimCouch(dimension)
{
	switch (dimension)
	{
		case 1:
			couch_dim = "Small";
			couch_price = "145.00 Euro";
			break;
		case 2:
			couch_dim = "Medium";
			couch_price = "164.00 Euro";
			break;
		case 3:
			couch_dim = "Large";
			couch_price = "192.00 Euro";
			break;
		case 4:
			couch_dim = "Extra Large";
			couch_price = "264.00 Euro";
			break;
	}
	// Check the current colour
	if (CouchForm_Colors.F_Colours[0].checked) couch_colour = "Rivestimento: Bianco\nStruttura: Bianca";
	if (CouchForm_Colors.F_Colours[1].checked) couch_colour = "Rivestimento: Bianco\nStruttura: Grigio Alluminio";
	if (CouchForm_Colors.F_Colours[2].checked) couch_colour = "Rivestimento: Bianco\nStruttura: Nera";
	if (CouchForm_Colors.F_Colours[3].checked) couch_colour = "Rivestimento: Senape\nStruttura: Bianca";
	if (CouchForm_Colors.F_Colours[4].checked) couch_colour = "Rivestimento: Senape\nStruttura: Grigio Alluminio";
	if (CouchForm_Colors.F_Colours[5].checked) couch_colour = "Rivestimento: Senape\nStruttura: Nera";
	if (CouchForm_Colors.F_Colours[6].checked) couch_colour = "Rivestimento: Grigio\nStruttura: Bianca";
	if (CouchForm_Colors.F_Colours[7].checked) couch_colour = "Rivestimento: Grigio\nStruttura: Grigio Alluminio";
	if (CouchForm_Colors.F_Colours[8].checked) couch_colour = "Rivestimento: Grigio\nStruttura: Nera";
	if (CouchForm_Colors.F_Colours[9].checked) couch_colour = "Rivestimento: Nero\nStruttura: Bianca";
	if (CouchForm_Colors.F_Colours[10].checked) couch_colour = "Rivestimento: Nero\nStruttura: Grigio Alluminio";
	if (CouchForm_Colors.F_Colours[11].checked) couch_colour = "Rivestimento: Nero\nStruttura: Nera";
	// Create choice string
	CouchForm.F_Choice.value = couch_colour + "\nDimensione: " + couch_dim + "\nPrezzo: " + couch_price;
}

function createOrderData() {
	// Assign default values
	couch_colour = "R. Bianco, S. Bianca";
	couch_dim = "Small";
    couch_price = "145.00 Euro";
    // Determine colour
	if (CouchForm_Colors.F_Colours[0].checked) { 
	  couch_colour = "R. Bianco, S. Bianca";
	  couch_colour_code = "01";
  }	
	if (CouchForm_Colors.F_Colours[1].checked) {
	 couch_colour = "R. Bianco, S. Grigio Alluminio";
	  couch_colour_code = "02";
  }	
	if (CouchForm_Colors.F_Colours[2].checked) {
	  couch_colour = "R. Bianco, S. Nera";
	  couch_colour_code = "03";
  }	
	if (CouchForm_Colors.F_Colours[3].checked) {
	  couch_colour = "R. Senape, S. Bianca";
	  couch_colour_code = "04";
  }	
	if (CouchForm_Colors.F_Colours[4].checked) {
	  couch_colour = "R. Senape, S. Grigio Alluminio";
	  couch_colour_code = "05";
  }	
	if (CouchForm_Colors.F_Colours[5].checked) {
	  couch_colour = "R. Senape, S. Nera";
	  couch_colour_code = "06";
  }	
	if (CouchForm_Colors.F_Colours[6].checked) {
	  couch_colour = "R. Grigio, S. Bianca";
      couch_colour_code = "07";
  }	
	if (CouchForm_Colors.F_Colours[7].checked) {
	  couch_colour = "R. Grigio, S. Grigio Alluminio";
	  couch_colour_code = "08";
  }	
	if (CouchForm_Colors.F_Colours[8].checked) {
	  couch_colour = "R. Grigio, S. Nera";
	  couch_colour_code = "09";
  }	
	if (CouchForm_Colors.F_Colours[9].checked) {
	  couch_colour = "R. Nero, S. Bianca";
	  couch_colour_code = "10";
  }	
	if (CouchForm_Colors.F_Colours[10].checked) {
	  couch_colour = "R. Nero, S. Grigio Alluminio";
	  couch_colour_code = "11";
  }	
	if (CouchForm_Colors.F_Colours[11].checked) {
	  couch_colour = "R. Nero, S. Nera";
    couch_colour_code = "12";
  }	
    // Determine Size and price
	if (CouchForm_D.F_Dim[0].checked) {
      couch_dim = "Small";
      couch_dim_code = "S";
      couch_price = "145.00";
  }
	if (CouchForm_D.F_Dim[1].checked) {
      couch_dim = "Medium";
      couch_dim_code = "M";
      couch_price = "164.00";
  }
	if (CouchForm_D.F_Dim[2].checked) {
      couch_dim = "Large";
      couch_dim_code = "L";
      couch_price = "192.00";
  }
	if (CouchForm_D.F_Dim[3].checked) {
      couch_dim = "Extra Large";
      couch_dim_code = "X";
      couch_price = "264.00";
  }
  // Assigne values to Aquista button   
  CouchForm.i_name.value= "Divano ("+couch_dim+", "+couch_colour+" )";
  CouchForm.i_id.value = "DS-"+couch_dim_code+"-"+couch_colour_code;
  CouchForm.i_amount.value= couch_price;
  return true;
} 

