var Auswahl = 1;

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'block':(v=='hide')?'none':v; }
    obj.display=v; }
}

function MM_findObj(n, d) 
{ 
	var p,i,x;	
	if(!d) d=document; 
	if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; 
		n=n.substring(0,p);
	}
	if(!(x=d[n])&&d.all) x=d.all[n]; 
	for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	if(!x && d.getElementById) x=d.getElementById(n); 
	return x;
}

// da Objektattribute in externem Stylesheet definiert sind, kann man sie nicht direkt auslesen
// deshalb diese Funktion, die ueber getComputedStyle
function getCSSValue(strID, strCSS){
  var varValue;
  //  Falls der Brower die Methode "getComputedStyle" kennt (W3C-DOM)
  if(window.getComputedStyle){
    varValue = window.getComputedStyle(document.getElementById(strID), null)[strCSS];
  //  Falls der Browser die Methode "currentStyle" kennt (neuere IEs)
  }else if(document.getElementById(strID).currentStyle){
    varValue = document.getElementById(strID).currentStyle[strCSS];
  }
  return varValue;
}

// Teilflaeche der Garnitur wurde geklickt => global merken und Farbtabelle sichtbar schalten
function SetzeAuswahl (wert)
{
	Auswahl = wert;
	//document.getElementById("Farbselektor").style.visibility = "visible";
	MM_showHideLayers('Farben','','show');
}


// bei Klick auf eine Farbe Farbtabelle wieder ausschalten
function Fertig() 
{
	//document.getElementById("Farbselektor").style.visibility = "hidden";
	MM_showHideLayers('Farben','','hide');
}

function Go2 (select) {
  var wert = select.options[select.options.selectedIndex].value;
  if (wert == "leer") {
	select.form.reset();
	return;
  } else {
	switch (wert) {
		case "1":  Auswahl = 1; SetzeFarbe('F8100'); Auswahl = 2; SetzeFarbe('F8200'); break; /* beere - orchidee */
		case "2":  Auswahl = 1; SetzeFarbe('F2100'); Auswahl = 2; SetzeFarbe('F2500'); break; /* beaujolais - rose */
		case "3":  Auswahl = 1; SetzeFarbe('F5200'); Auswahl = 2; SetzeFarbe('F5700'); break; /* apricot - terracotta */
		case "4":  Auswahl = 1; SetzeFarbe('F1100'); Auswahl = 2; SetzeFarbe('F4400'); break; /* creme - bronze */
		case "5":  Auswahl = 1; SetzeFarbe('F5400'); Auswahl = 2; SetzeFarbe('F8800'); break; /* muschel - amaranth */
		case "6":  Auswahl = 1; SetzeFarbe('F1200'); Auswahl = 2; SetzeFarbe('F1000'); break; /* sekt - mais */
		case "7":  Auswahl = 1; SetzeFarbe('F1800'); Auswahl = 2; SetzeFarbe('F7300'); break; /* mandel - quarz */
		case "8":  Auswahl = 1; SetzeFarbe('F1400'); Auswahl = 2; SetzeFarbe('F1500'); break; /* citrone - messing */
		case "9":  Auswahl = 1; SetzeFarbe('F5100'); Auswahl = 2; SetzeFarbe('F7500'); break; /* puder - nougat */
		case "10": Auswahl = 1; SetzeFarbe('F8700'); Auswahl = 2; SetzeFarbe('F8600'); break; /* peridot - siam */
		case "11": Auswahl = 1; SetzeFarbe('F1800'); Auswahl = 2; SetzeFarbe('F6500'); break; /* mandel - sphinx */
		case "12": Auswahl = 1; SetzeFarbe('F5800'); Auswahl = 2; SetzeFarbe('F6600'); break; /* elfenbein - Chinchilla */
		case "13": Auswahl = 1; SetzeFarbe('F7200'); Auswahl = 2; SetzeFarbe('F7000'); break; /* kaschmir - brasil */
		case "14": Auswahl = 1; SetzeFarbe('F1900'); Auswahl = 2; SetzeFarbe('F6700'); break; /* kiesel - platin */
		case "15": Auswahl = 1; SetzeFarbe('F3500'); Auswahl = 2; SetzeFarbe('F3100'); break; /* bleu - friesenblau */
		case "16": Auswahl = 1; SetzeFarbe('F3400'); Auswahl = 2; SetzeFarbe('F8000'); break; /* himmelblau - lapis */
		case "17": Auswahl = 1; SetzeFarbe('F3300'); Auswahl = 2; SetzeFarbe('F3700'); break; /* aqua - fjord */
		case "18": Auswahl = 1; SetzeFarbe('F6000'); Auswahl = 2; SetzeFarbe('F8600'); break; /* silber - siam */
		case "19": Auswahl = 1; SetzeFarbe('F1600'); Auswahl = 2; SetzeFarbe('F6300'); break; /* melon - opal */
		case "20": Auswahl = 1; SetzeFarbe('F4900'); Auswahl = 2; SetzeFarbe('F4300'); break; /* pistazie - alpingrŸn */
	}
  }
}

function Go3 (select) {
  var wert = select.options[select.options.selectedIndex].value;
  if (wert == "leer") {
	select.form.reset();
	return;
  } else {
	switch (wert) {
		case "1":  Auswahl = 2; SetzeFarbe('F2100'); Auswahl = 1; SetzeFarbe('F2500'); Auswahl = 3; SetzeFarbe('F8200'); break; /* rose - beaujolais - beere */
		case "2":  Auswahl = 2; SetzeFarbe('F1900'); Auswahl = 1; SetzeFarbe('F6700'); Auswahl = 3; SetzeFarbe('F6200'); break; /* kiesel - platin - ebenholz */
		case "3":  Auswahl = 2; SetzeFarbe('F3500'); Auswahl = 1; SetzeFarbe('F3100'); Auswahl = 3; SetzeFarbe('F3700'); break; /* bleu - friesenblau - fjord */
		case "4":  Auswahl = 2; SetzeFarbe('F9000'); Auswahl = 1; SetzeFarbe('F3300'); Auswahl = 3; SetzeFarbe('F3700'); break; /* weiss - aqua - fjord */
		case "5":  Auswahl = 2; SetzeFarbe('F5800'); Auswahl = 1; SetzeFarbe('F6600'); Auswahl = 3; SetzeFarbe('F7000'); break; /* elfenbein - chinchilla - brasil */
		case "6":  Auswahl = 2; SetzeFarbe('F1100'); Auswahl = 1; SetzeFarbe('F1300'); Auswahl = 3; SetzeFarbe('F4400'); break; /* creme - gold - bronze */
		case "7":  Auswahl = 2; SetzeFarbe('F5100'); Auswahl = 1; SetzeFarbe('F4400'); Auswahl = 3; SetzeFarbe('F8200'); break; /* puder - bronze - beere */
		case "8":  Auswahl = 2; SetzeFarbe('F1300'); Auswahl = 1; SetzeFarbe('F5700'); Auswahl = 3; SetzeFarbe('F8800'); break; /* gold - terracotta - amaranth */
		case "9":  Auswahl = 2; SetzeFarbe('F1600'); Auswahl = 1; SetzeFarbe('F6300'); Auswahl = 3; SetzeFarbe('F8700'); break; /* melon - opal - peridot */
		case "10": Auswahl = 2; SetzeFarbe('F6000'); Auswahl = 1; SetzeFarbe('F8600'); Auswahl = 3; SetzeFarbe('F8700'); break; /* silber - siam - peridot */
		case "11": Auswahl = 2; SetzeFarbe('F1400'); Auswahl = 1; SetzeFarbe('F1500'); Auswahl = 3; SetzeFarbe('F6500'); break; /* citrone - messing - shinx */
		case "12": Auswahl = 2; SetzeFarbe('F1600'); Auswahl = 1; SetzeFarbe('F3300'); Auswahl = 3; SetzeFarbe('F3100'); break; /* aqua - melon - friesenblau */
	}
  }
}

function GoHarmony (select) {
  var wert = select.options[select.options.selectedIndex].value;
  if (wert == "leer") {
	select.form.reset();
	return;
  } else {
	switch (wert) {
		case "1":  Auswahl = 1; SetzeFarbe('F2100'); Auswahl = 2; SetzeFarbe('F2500'); Auswahl = 3; SetzeFarbe('F8200'); break; /* rose - beaujolais - beere */
		case "2":  Auswahl = 1; SetzeFarbe('F1900'); Auswahl = 2; SetzeFarbe('F6700'); Auswahl = 3; SetzeFarbe('F6200'); break; /* kiesel - platin - ebenholz */
		case "3":  Auswahl = 1; SetzeFarbe('F3500'); Auswahl = 2; SetzeFarbe('F3100'); Auswahl = 3; SetzeFarbe('F3700'); break; /* bleu - friesenblau - fjord */
		case "4":  Auswahl = 1; SetzeFarbe('F9000'); Auswahl = 2; SetzeFarbe('F3300'); Auswahl = 3; SetzeFarbe('F3700'); break; /* weiss - aqua - fjord */
		case "5":  Auswahl = 1; SetzeFarbe('F5800'); Auswahl = 2; SetzeFarbe('F6600'); Auswahl = 3; SetzeFarbe('F7000'); break; /* elfenbein - chinchilla - brasil */
		case "6":  Auswahl = 1; SetzeFarbe('F1100'); Auswahl = 2; SetzeFarbe('F1300'); Auswahl = 3; SetzeFarbe('F4400'); break; /* creme - gold - bronze */
		case "7":  Auswahl = 1; SetzeFarbe('F5100'); Auswahl = 2; SetzeFarbe('F4400'); Auswahl = 3; SetzeFarbe('F8200'); break; /* puder - bronze - beere */
		case "8":  Auswahl = 1; SetzeFarbe('F1300'); Auswahl = 2; SetzeFarbe('F5700'); Auswahl = 3; SetzeFarbe('F8800'); break; /* gold - terracotta - amaranth */
		case "9":  Auswahl = 1; SetzeFarbe('F1600'); Auswahl = 2; SetzeFarbe('F6300'); Auswahl = 3; SetzeFarbe('F8700'); break; /* melon - opal - peridot */
		case "10": Auswahl = 1; SetzeFarbe('F6000'); Auswahl = 2; SetzeFarbe('F8600'); Auswahl = 3; SetzeFarbe('F8700'); break; /* silber - siam - peridot */
		case "11": Auswahl = 1; SetzeFarbe('F1400'); Auswahl = 2; SetzeFarbe('F1500'); Auswahl = 3; SetzeFarbe('F6500'); break; /* citrone - messing - shinx */
		case "12": Auswahl = 1; SetzeFarbe('F1600'); Auswahl = 2; SetzeFarbe('F3300'); Auswahl = 3; SetzeFarbe('F3100'); break; /* aqua - melon - friesenblau */
	}
  }
}

