var revisionIE = 0;

function init()
{
	selectTab("welcome");
};

function selectTab(tabId)
{
    var contentDiv = document.getElementById("content");
    contentDiv.innerHTML = getPage(tabId + ".xml");
}

function loadDiv(divId, loadId)
{
    var contentDiv = document.getElementById(divId);
    contentDiv.innerHTML = getPage(loadId + ".xml");
}

function isIE()
{
	revisionIE = 0;

	if (navigator.appName == "Microsoft Internet Explorer")
	{
		// test for MSIE x.x;
		// see: http://www.javascriptkit.com/jsref/navigator.shtml
		if (/MSIE (\d+\.\d+);/.test(navigator.userAgent))
			revisionIE = new Number(RegExp.$1) // capture x.x portion and store as a number
	}

	return revisionIE;
}

function getPage(uri)
{
	var http = "";
	var ver  = isIE();

	if ( ver == 0 || ver >= 7 )
		http = new XMLHttpRequest();
	else
		http = new ActiveXObject("Microsoft.XMLHTTP");

    http.open('GET', uri, false);
    http.send(null);
    return http.responseText;
}

