var stelle="";
var pfad=window.location.href;
if(pfad.lastIndexOf(".com") > -1){
	stelle = pfad.lastIndexOf('.com');
	endung=".com";
	}
else if (pfad.lastIndexOf(".at") > -1){
	stelle = pfad.lastIndexOf('.at');
	endung=".at";
	}


function sprache(y){
	var vorne=pfad.split(endung);
	//lang=vorne[0]+endung+'/'+y+vorne[1].substr(3,(vorne[1].length-3));
	//window.location.href=lang;
	if(y=="fr") window.location.href=vorne[0]+endung+"/fr/home.htm";
	else window.location.href=vorne[0]+endung+"/de/home.htm";
	}
function sprachauswahl(y,a){
	var vorne=pfad.split(endung);
	
	//if(y=="fr" || y=="concept") window.location.href=vorne[0]+endung+"/fr/home.htm";
	//else window.location.href=vorne[0]+endung+"/de/home.htm";
	
	
	lang=vorne[0]+endung+'/'+y+'/'+a+'.htm';
	window.location.href=lang;
	}
			
function fensterauf(URL,fenster,param) {
 	x = window.open(URL,fenster,param);
    x.window.focus();
	}

function karteauf(URL,fenster,param){
	breite= screen.width - 685;
 	x = window.open(URL,'map','width=660,height=460,scrollbars=yes,left='+breite+',top=5');
    x.window.focus();
	}


function lexauf(x) {
	breite= screen.width - 385;
	ergebnis = pfad.slice(0,stelle)+endung+'/lexikon/lexikon.htm'+x;
 	y = window.open(ergebnis,'lexikon','scrollbars=yes,height=540,width=360,left='+breite+',top=5');
 	y.window.focus();
	}
function lexauf_s(x,y) {
	breite= screen.width - 385;
	ergebnis = pfad.slice(0,stelle)+endung+'/lexikon/lexikon.htm'+x;
 	yy = window.open(y,'sprecher','height=60,width=360,left='+breite+',top=580');
 	xx = window.open(ergebnis,'lexikon','height=540,width=360,left='+breite+',top=5');
 	xx.window.focus();
	}

function encyclopedie(x) {
	breite= screen.width - 385;
	ergebnis = pfad.slice(0,stelle)+endung+'/lexikon/encyclop.htm'+x;
 	y = window.open(ergebnis,'lexikon','scrollbars=yes,height=540,width=360,left='+breite+',top=5');
 	y.window.focus();
	}
function encyclopedie_s(x,y) {
	breite= screen.width - 385;
	ergebnis = pfad.slice(0,stelle)+endung+'/lexikon/encyclop.htm'+x;
	yy = window.open(y,'sprecher','height=60,width=360,left='+breite+',top=580');
 	xx = window.open(ergebnis,'lexikon','height=540,width=360,left='+breite+',top=5');
 	xx.window.focus();
	}
	
var	breite=screen.width;
var	links=(breite-760)/2+440;


var	hoehe=screen.height;
var	oben=(hoehe-420)/2+416;


function sound_on(son){	
	self.name="sound_ja";
	wo = pfad.slice(0,stelle)+endung+'/'+son;
	win = window.open(wo, "musi", "top="+oben+",left="+links+",height=60,width=310");
	//win.blur();
	}
function sound_off(son){
	self.name="sound_nein";
	wo = pfad.slice(0,stelle)+endung+'/'+son;
	win = window.open(wo, "musi", "top="+oben+",left="+links+",height=60,width=310");
  	win.close();
	}
	
function tausch(bild,quelle){
	document.images[bild].src = quelle;
	}
function animation(){
	if(z>=bild.length) z=0;
	document.images["pix"].src = bild[z].src;
	z++;
	//window.setTimeout("animation()",3000);
	}