
bilder = new Array (
	"../../media/images/moebel/map-normal.gif",
	"../../media/images/moebel/map_frankreich_a.gif",
	"../../media/images/moebel/map_griechenland_a.gif",
	"../../media/images/moebel/map_grossbritannien_a.gif",
	"../../media/images/moebel/map_irland_a.gif",
	"../../media/images/moebel/map_norwegen_a.gif",
	"../../media/images/moebel/map_portugal_a.gif",
	"../../media/images/moebel/map_rumaenien_a.gif",
	"../../media/images/moebel/map_schweiz_a.gif",
	"../../media/images/moebel/map_spanien_a.gif",
	"../../media/images/moebel/map_tschechien_a.gif",
	"../../media/images/moebel/map_ungarn_a.gif",
	"../../media/images/moebel/map_slowakei_a.gif"
 );

var aktiv = 0;

function showimage (number) {
	if (number != aktiv) {
		if (document.getElementById('vertretungen-karte')) {
			document.getElementById('vertretungen-karte').src = bilder[number];
		}
	}
}

function hideimage (number) {
	if (document.getElementById('vertretungen-karte')) {
		document.getElementById('vertretungen-karte').src = bilder[aktiv];
	}
}

function showtext (number) {
	if (document.getElementById('text-' + aktiv)) {
		document.getElementById('text-' + aktiv).style.display = 'none';
	}
	
	if (document.getElementById('text-' + number)) {
		document.getElementById('text-' + number).style.display = 'block';
	}
}

function setcontent (number) {
	showimage (number);
	showtext (number);
	aktiv = number;
}

/* Katalog */

function techWin(which){
	var NewWindow =0;
	NewWindow = window.open(which,"new",'width=615,height=430,toolbar=0,menubar=0,directories=0,statusbar=0,location=0,resizable=no,scrollbars=no'); 
	if (NewWindow){
		NewWindow.moveTo(screen.width/2-(307),screen.height/2-(215));
		NewWindow.focus();
	 }
}

function newWin(which, breite, hoehe){
 var NewWindow =0;
  NewWindow = window.open(which,"new",'width='+breite+',height='+hoehe+',toolbar=0,menubar=0,directories=0,statusbar=0,location=0,resizable=no,scrollbars=no'); 
   if (NewWindow){
    NewWindow.moveTo(screen.width/2-(breite/2),screen.height/2-(hoehe/2));
    NewWindow.focus();
  }
}

function compute(TH,BS,TA,mm1,mm2,oSo,oSu,oY) {
   comma = TH.indexOf(",");
   if (comma != -1) {
      TH = TH.substr(0,comma) + "." + TH.substr(comma+1);
   }
   comma = BS.indexOf(",");
   if (comma != -1) {
      BS = BS.substr(0,comma) + "." + BS.substr(comma+1);
   }
   comma = TA.indexOf(",");
   if (comma != -1) {
      TA = TA.substr(0,comma) + "." + TA.substr(comma+1);
   }
   if (TH != "" && BS != "" && TA != "") {
      oSo.value = TH - BS - TA - mm1;
      oSu.value = BS - TA - mm1;
      oY.value  = parseFloat(TA) + mm2;
   }
}