		function switchLanguage(inLanguage){
			
			var theOldURI = window.location.pathname;
			var theOldHref = window.location.href;
			
			if (theOldHref.indexOf("L=") > 1 || theOldHref.indexOf("?id=") > 1){
				var theLvar = 0;
				if (inLanguage == 'en') theLvar = 1;
				
				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);
				} 
			
				window.location.href=theOldURI + window.location.search;		
			}
			return false;
		}

