//	var mainWin;
function startIO()
{
	var url;
	var scorm = null;


	if (scorm || location.search.indexOf('newwin=false') >= 0)
	{
		url = document.location.href;
		url = url.substring(0, url.lastIndexOf('/') + 1);
		url += 'html/hidden.htm' + location.search;
		if (scorm)
			url += (location.search != '') ? '&' + scorm : '?' + scorm;
		document.location.href = url;
		//mainWin = "NoWin";
	}
	else
	{
		//alert(location.search);
		var srch = location.search;
		if (sessionid != null) srch += (srch != '') ? '&' + sessionid : '?' + sessionid;
		var mainWin = openWin(getWidthOfWBC(), getHeightOfWBC(), 'html/hidden.htm'+srch, 'mainWin', false);
		url = document.location.href;
		
		if (!mainWin)
		{  location.href="./support/nopopup.html";
			return; 
		}
		if (url.indexOf('file:') == 0)
		{
			if (!browser.ie)
				self.close();
		}
		else
			self.history.back();
	}
}

function startLogin()
{
	checkLMSInitialization();
	parent.login.document.location.href = 'login.htm';
}

function startWBC()
{
	var url;

	url = document.location.href;
	url = url.substring(0, url.lastIndexOf('/') + 1);
	url += 'frame.htm';
	document.location.href = url;
}

function quitWBC()
{
	if (parent.location.search.indexOf('newwin=false') < 0)
		top.close();
	else
		top.document.location.href = 'blank.htm';
}
