function IsStarterExperience()
{
	var iSC	= parseInt(getDictionaryCookie('SC', 'EXP'));
	if (isNaN(iSC))
	{
		iSC = 0;
	}
	var iRights	= getUserRights();
	if ((!IsLoggedIn() && iSC == 1) || (IsLoggedIn() && ((iSC == 1 || iRights == 128) && !((getSubscriptionAll() & iRights) != 0))))
		return true; 
	else
		return false;
}

function mOvr(evt,src,theClass)
{
	if (!evt)
		evt=window.event;

	if (evt.fromElement && !src.contains(evt.fromElement))
	{
		src.style.cursor = 'hand'; 
		src.className = theClass;
	}
}

function mClk(evt,i,tabSetId)
{
	if (!evt)
		evt=window.event;

	if(evt.srcElement && evt.srcElement.tagName=='TD')
	{
		document.all["TabLinkID"+tabSetId][i].click();
	}
}

function mOut(evt,src,theClass)
{
	if (!evt)
		evt=window.event;

	if (evt.toElement && !src.contains(evt.toElement))
	{
		src.style.cursor = 'default';
		src.className = theClass;
	}
}

function writeTab(text, altText, url, width, bActive, tIndex, tabSetId)
{
	writeTabEx(text, altText, url, width, bActive, tIndex, tabSetId, 'sTab', 'tab', 'tabHover');
}

function writeTabEx(text, altText, url, width, bActive, tIndex, tabSetId, tabSelStyle, tabUSelStyle, tabUSelHoverStyle)
{
	var tWidth = parseInt(width);
	var tHeight = (bActive) ? 20 : 17;
	var tabStyle = tabUSelStyle;
	var tabTextStyle = "TabText";
	var tabHoverStyle = tabUSelHoverStyle;
	var borderStyle = "tabBorder";
	var borderShadowLt = "tabShadowLt";
	var borderShadowDk = "tabShadowDk";
	
	if (bActive)
	{
		tabStyle = tabSelStyle;
		tabTextStyle = "sTabText";
		borderStyle = "sTabBorder";
		borderShadowLt = "sTabShadowLt";
		borderShadowDk = "sTabShadowDk";
	}

	document.write('		<td valign="bottom" width="' + tWidth + '">');
	document.write('			<table width="100%" border="0" cellspacing="0" cellpadding="0">');
	// Tab top
	document.write('				<tr>');
	// Left rounded corner
	document.write('					<td width="3" colspan="3">');
	document.write('						<table width="100%" border="0" cellspacing="0" cellpadding="0">');
	document.write('							<tr height="1">');
	document.write('								<td width="2" height="1" colspan="2"><spacer type="block" height="1" width="1"></td>');
	document.write('								<td width="1" height="1" class="' + borderStyle + '"><spacer type="block" height="1" width="1"></td>');
	document.write('							</tr>');
	document.write('							<tr height="1">');
	document.write('								<td width="1" height="1"><spacer type="block" height="1" width="1"></td>');
	document.write('								<td width="1" height="1" class="' + borderStyle + '"><spacer type="block" height="1" width="1"></td>');
	document.write('								<td width="1" height="1" class="' + borderShadowLt + '"><spacer type="block" height="1" width="1"></td>');
	document.write('							</tr>');
	document.write('						</table>');
	document.write('					</td>');
	// Top bevel
	document.write('					<td width="' + ((tWidth=="100%") ? "" : tWidth - 6) + '">');
	document.write('						<table width="100%" border="0" cellspacing="0" cellpadding="0">');
	document.write('							<tr height="1"><td class="' + borderStyle + '" width="1" height="1"><spacer type="block" height="1" width="1"></td></tr>');
	document.write('							<tr height="1"><td class="' + borderShadowLt + '" height="1"><spacer type="block" height="1" width="1"></td></tr>');
	document.write('						</table>');
	document.write('					</td>');
	// Right rounded corner
	document.write('					<td width="3" colspan="3">');
	document.write('						<table width="3" border="0" cellspacing="0" cellpadding="0">');
	document.write('							<tr height="1">');
	document.write('								<td width="1" height="1" class="' + borderStyle + '"><spacer type="block" height="1" width="1"></td>');
	document.write('								<td width="2" height="1" colspan="2"><spacer type="block" height="1" width="1"></td>');
	document.write('							</tr>');
	document.write('							<tr height="1">');
	document.write('								<td width="1" height="1" class="' + borderShadowLt + '"><spacer type="block" height="1" width="1"></td>');
	document.write('								<td width="1" height="1" class="' + borderStyle + '"><spacer type="block" height="1" width="1"></td>');
	document.write('								<td width="1" height="1"><spacer type="block" height="1" width="1"></td>');
	document.write('							</tr>');
	document.write('						</table>');
	document.write('					</td>');
	document.write('				</tr>');
	// Tab body
	document.write('				<tr>');
			// Left edge
	document.write('					<td class="' + borderStyle + '" width="1" height="' + tHeight + '"><spacer type="block" height="1" width="1"></td>');
	document.write('					<td class="' + borderShadowLt + '" width="1"><spacer type="block" height="1" width="1"></td>');
	document.write('					<td class="' + tabStyle + '" width="1"><spacer type="block" height="1" width="1"></td>');
			// Tab text
	document.write('					<td class="' + tabStyle + '" nowrap align="center" title="' + altText + '"');

			// Add events for tabs
	if (!bActive)
	{
		document.write(' onMouseOver="mOvr(event,this,\'' + tabHoverStyle + '\');" onMouseOut="mOut(event,this,\'' + tabStyle + '\');" onClick="mClk(event,' + tIndex + ',\'' + tabSetId + '\');"');
	}
	else
	{
		document.write(' onMouseOver="mOvr(event,this,\'' + tabStyle + '\');" onMouseOut="mOut(event,this,\'' + tabStyle + '\');" onClick="mClk(event,' + tIndex + ',\'' + tabSetId + '\');"');
	}
				
	document.write('><A href="'+ url + '" id="TabLinkID' + tabSetId + '" class="' + tabTextStyle + '">' + text + '</A></td>');
			// Right edge
	document.write('					<td class="' + tabStyle + '" width="1"><spacer type="block" height="1" width="1"></td>');
	document.write('					<td class="' + borderShadowDk + '" width="1"><spacer type="block" height="1" width="1"></td>');
	document.write('					<td class="' + borderStyle + '" width="1"><spacer type="block" height="1" width="1"></td>');
	document.write('				</tr>');
	// Tab bottom
	document.write('				<tr height="1">');
	if (bActive)
	{
		document.write('					<td width="1" height="1" class="' + borderShadowDk + '"><spacer type="block" height="1" width="1"></td>');
		document.write('					<td colspan="5" height="1" class="' + tabStyle + '"><spacer type="block" height="1" width="1"></td>');
		document.write('					<td width="1" height="1" class="' + borderShadowDk + '"><spacer type="block" height="1" width="1"></td>');
	}
	else
	{
		document.write('					<td colspan="7" height="1" class="sTabBorder"><spacer type="block" height="1" width="1"></td>');
	}
	document.write('				</tr>');
	document.write('			</table>');
	document.write('		</td>');
}

//-------
function doSpace(sWidth)
{
// Space between tabs
	document.write('		<td' + ((parseInt(sWidth) != 0) ? (' width="' + sWidth + '"') : '') + ' valign="bottom">');
	document.write('			<table width="100%" height="1" border="0" cellspacing="0" cellpadding="0">');
	document.write('				<tr height="1">');
	document.write('					<td class="sTabBorder" height="1"><img src=' + m_Cache + '/i/pixel.gif height="1" width="1"></td>');
	document.write('				</tr>');
	document.write('			</table>');
	document.write('		</td>');
}
