function ContactInfo()
{
	document.location = "/s"+"tx/c"+'ontact' 
		+ "?referer="+encodeURIComponent(document.URL);
}

function LegalInfo()
{
	window.open("/as"+"sets/l"+"egal"+'.'+"php","jtl", 
		"width=400,height=500,resizable=yes,scrollbars=yes");
}

function setCookie(name, value, expires, path, domain, secure)
{
	document.cookie= name + "=" + escape(value) +
		((expires) ? "; expires=" + expires.toGMTString() : "") +
		((path) ? "; path=" + path : "") +
		((domain) ? "; domain=" + domain : "") +
		((secure) ? "; secure" : "");
}

function getCookie(name)
{
	var dc = document.cookie;
	var prefix = name + "=";
	var begin = dc.indexOf("; " + prefix);
	if (begin == -1)
	{
		begin = dc.indexOf(prefix);
		if (begin != 0) return null;
	}
	else begin += 2;
	var end = document.cookie.indexOf(";", begin);
	if (end == -1) end = dc.length;
	return unescape(dc.substring(begin + prefix.length, end));
}

function deleteCookie(name, path, domain)
{
	if (getCookie(name))
	{
		document.cookie = name + "=" + 
			((path) ? "; path=" + path : "") +
			((domain) ? "; domain=" + domain : "") +
			"; expires=Thu, 01-Jan-70 00:00:01 GMT";
	}
}

function StxLocale(lc)
{
	if( lc )
	{
		var now = new Date();
		now.setFullYear(now.getFullYear()+10);
		setCookie("stx_locale", lc, now, "/");

		// handle blocked cookies gracefully

		if( getCookie("stx_locale") != lc )
			return true;
	}
	else
	{
		deleteCookie("stx_locale","/");
	}

	if( window.location.reload )
		window.location.reload( true );
	else
		window.location.replace( unescape(window.location.pathname) );

	return false;
}

function StxCloak(el)
{
	// about referer in IE: http://www.aspfaq.com/show.asp?id=2169
	// TODO: use location.href and recognize existing query string
	window.location.replace( el.href + "?show=all&referer=" + window.location.pathname );
	return false;
}

