if (!newxmlhttp) {
	document.write('<!--Minitab error, cannot find newxmlhttp-->');
}

function minitab_show(id) {
	titleid = id + "_t";
	document.getElementById(titleid).style.fontWeight = "bold";
	var e = document.getElementById(id);
	if (e.innerHTML == '') {
		var editionPage = (typeof(pageId)!='undefined' && pageId=='profile:edit') ? '&pageid=profile:edit' : '';
		
		xmlhttp = newxmlhttp();
		xmlhttp.open("GET", wwwroot + 'profile/profile_run.php?profile_id=' + profile_id + '&run=' + id + '&locale=' + display_locale + editionPage);
		xmlhttp.onreadystatechange = function() {
			if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
				e.style.display = "inline";
				e.innerHTML = xmlhttp.responseText;
			}
		}
		xmlhttp.send(null);
	} else {
		e.style.display = "inline";
	}
}

function minitab_hide(id) {
	var title = document.getElementById(id + "_t");
	if(title)
		title.style.fontWeight = "normal";
	
	var minitab = document.getElementById(id);
	if(minitab)
		minitab.style.display = "none";
}

function minitab_hide_all(id, from, to)
{
	for(var i=from; i<=to; i++)
	{
		minitab_hide(id+i);
	}
}

