function email(st1, st2)
{
	window.location.href = 'mail'+'to:'+st1+'@'+st2;
}

function get_http()
{
	var xmlhttp;
	/*@cc_on
	@if (@_jscript_version >= 5)
		try
		{
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			try
			{
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (E)
			{
				xmlhttp = false;
			}
		}
	@else
		xmlhttp = false;
	@end @*/
	if (!xmlhttp && typeof XMLHttpRequest != 'undefined')
	{
		try
		{
			xmlhttp = new XMLHttpRequest();
		}
		catch (e)
		{
			xmlhttp = false;
		}
	}
	return xmlhttp;
}

function urlencode(text)
{
	text = escape(text.toString()).replace(/\+/g, "%2B");

	// this escapes 128 - 255, as JS uses the unicode code points for them.
	// This causes problems with submitting text via AJAX with the UTF-8 charset.
	var matches = text.match(/(%([0-9A-F]{2}))/gi);
	if (matches)
	{
		for (var matchid = 0; matchid < matches.length; matchid++)
		{
			var code = matches[matchid].substring(1,3);
			if (parseInt(code, 16) >= 128)
			{
				text = text.replace(matches[matchid], '%u00' + code);
			}
		}
	}

	// %25 gets translated to % by PHP, so if you have %25u1234,
	// we see it as %u1234 and it gets translated. So make it %u0025u1234,
	// which will print as %u1234!
	text = text.replace('%25', '%u0025');

	return text;
}

function divshow(view,hide)
{
	view.style.display = "";
	hide.style.display = "none";
}

function sub_menu(mb_id,ctrl_id)
{
	var mb = document.getElementById('mb_' + mb_id);
	var ctrl  = document.getElementById('ctrl_' + ctrl_id);
	if (mb.style.display == '')
	{
		mb.style.display = 'none';
		ctrl.className = 'mbutc';
		return;
	}
	if (mb.style.display != '')
	{
		mb.style.display = '';
		ctrl.className = 'mbuto';
		return;
	}
}