<!--

function SetCookie(c_name, value, expiredays)
{
	var exdate = new Date();
	exdate.setDate(exdate.getDate()+expiredays);
	document.cookie = c_name + "=" + escape(value) +
		((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}

function GetCookie(c_name)
{
	if (document.cookie.length>0)
	{
		c_start = document.cookie.indexOf(c_name + "=");
		if (c_start!=-1)
		{
			c_start = c_start + c_name.length + 1;
			c_end = document.cookie.indexOf(";", c_start);
			if (c_end==-1) 
				c_end = document.cookie.length;
			return unescape(document.cookie.substring(c_start, c_end));
		}
	}
	return "";
}

function DeleteCookie(c_name)
{
	SetCookie(name, "", -1);
}

function GotoLanguage(lang_code)
{
	SetCookie('WingsLang', lang_code, 100);
	if (lang_code == 'N')
	{
		window.location = 'http://www.wings.be';
	} else
	if (lang_code == 'F')
	{
		window.location = '../F/Home/Home.htm';
	} else
	if (lang_code == 'E')
	{
		window.location = '../E/Home/Home.htm';
	}
}

function CheckLanguage()
{
	var lang_cookie = '';
	
	lang_cookie = GetCookie('WingsLang');
	if (lang_cookie == 'N')
	{
		GotoLanguage(lang_cookie);
	} else
	if (lang_cookie == 'F')
	{
		GotoLanguage(lang_cookie);
	} else
	if (lang_cookie == 'E')
	{
		GotoLanguage(lang_cookie);
	}
}

//-->
