// JavaScript Document
function Language(varLang)
{
	if (window.top.location.href.lastIndexOf('lang=') == -1)	// Innehåller inte lang=
	{
		if (window.top.location.href.lastIndexOf('.php') == -1)	// Innehåller inte .asp
			if (window.top.location.href.lastIndexOf('?') == -1)	// Innehåller inte ?
				window.top.location.href = window.top.location.href + "?lang=" + varLang;
			else
				window.top.location.href = window.top.location.href + "&lang=" + varLang;
		else
			if (window.top.location.href.lastIndexOf('.php#') == -1)	// Innehåller inte .asp#
			{
				if (window.top.location.href.lastIndexOf('#') == -1)	// Innehåller inte #
				{
					if (window.top.location.href.lastIndexOf('.php?') == -1)	// Innehåller inte .asp?
						window.top.location.href = window.top.location.href + "?lang=" + varLang;
					else
						window.top.location.href = window.top.location.href + "&lang=" + varLang;
				}
				else
					window.top.location.href = window.top.location.href.substring(0,window.top.location.href.lastIndexOf('#')) + "&lang=" + varLang;
			}
			else
				window.top.location.href = window.top.location.href.substring(0,window.top.location.href.lastIndexOf('.php#')) + ".php?lang=" + varLang;
	}
	else
		window.top.location.href = window.top.location.href.substring(0,window.top.location.href.lastIndexOf('lang=')) + "lang=" + varLang;
/*
	if (window.top.location.href.lastIndexOf('lang=') == -1)
		if (window.top.location.href.lastIndexOf('.asp?') == -1)
			window.top.location.href = window.top.location.href + "?lang=" + varLang;
		else
			window.top.location.href = window.top.location.href + "&lang=" + varLang;
	else
		window.top.location.href = window.top.location.href.substring(0,window.top.location.href.lastIndexOf('lang=')) + "lang=" + varLang;
*/
}