
		function switchLanguage(inLanguage){
			
			var theOldURI = window.location.pathname;
			var theOldHref = window.location.href;
			var theNewHref = document.getElementById('menu_lang_0').firstChild.getAttribute('href');
			
			if (inLanguage == 'en'){
				theNewHref = document.getElementById('menu_lang_2').firstChild.getAttribute('href');
				if ((theNewHref.length == 3 && theNewHref == 'en/') || theNewHref.length == 0){
					theNewHref += '?home'
				}
			}
			
			if (inLanguage == ''){
				if (theNewHref.substr(0,2) == 'de'){
					theNewHref = theNewHref.substr(3);
					if (theNewHref.length == 0){
						theNewHref += '/?home'
					}
				}
			}
			
			
			if (theOldHref.indexOf("L=") > 1 || theOldHref.indexOf("?id=") > 1){
				var theLvar = 0;
				if (inLanguage == 'uk') theLvar = 2;
				
				if (theOldHref.indexOf("L=") == -1){
					window.location.href = window.location.href + '&L='+theLvar;
				}else{
					var thePrefix = theOldHref.substr(0,theOldHref.indexOf("L="));
					var theSufix = theOldHref.substr(theOldHref.indexOf("L=")+3);
					window.location.href=thePrefix + 'L='+theLvar+theSufix;
				}
			}else{
				var theLanguage = (inLanguage != '') ? ('/' + inLanguage) : '';
				if (theOldURI.substr(3,1) == '/'){
					
					theOldURI = theLanguage + theOldURI.substr(3);
				}else{
					theOldURI = theLanguage + theOldURI.substr(0);
				} 

			         
				if (theNewHref.substr(0,1) != '/') theNewHref = '/'+theNewHref;
			        
				 self.location.assign('http://www.soyatoo.de'+theNewHref); //theOldURI + window.location.search;	
				
			}
			return false;
		}
