/* Version: 11.0.6412 */
/*
	Copyright (c) Microsoft Corporation.  All rights reserved.
*/

function G(o)
{
	if(o&&typeof(o)=="string")o=document.getElementById?document.getElementById(o):null;
	return o&&typeof(o)=="object"?o:null;
}

function GS(o)
{
	o=G(o);
	return o?o.style:null;
}

function GDsply(o)
{
	o=GS(o);
	return o?o.display:"";
}

function SDsply(o,d)
{
	o=GS(o);
	if(o)o.display=d;
}

function SDsplyH(o)
{
	SDsply(o,"none");
}

function SDsplyS(o)
{
	SDsply(o,"");
}

function TDsply(o,d)
{
	SDsply(o,(GDsply(o)==d?"none":d));
}

function FVis(o)
{
	return GDsply(o)!="none";
}

function TDB(o)
{
	TDsply(o,"block");
	return false;
}

function FSClk(e)
{
	return e&&e.button<=1&&e.shiftKey;
}

function FSEnt(e)
{
	return e&&e.keyCode==13&&e.shiftKey;
}

function GHlp(u)
{
	var strScrollBars = (window.navigator.appName.toUpperCase().indexOf("NETSCAPE") >= 0) ? ",scrollbars=1" : "" ;
	window.open(u, '_hlp011', 'toolbar=0,status=0,menubar=0' + strScrollBars + ',resizable=1,width=260,height=' + Math.round(window.screen.availHeight*2/3));
	return false;
}

function ChkSrchTxt(wz)
{
	var ws=/^[\s]*$/;
	return wz&&!ws.test(wz);
}

function FocSrchTxt(o)
{
	if(o&&o.value)o.select();
}

function TrySearch(e)
{
	if(oSrchFrm&&SelectAction())
		{

		try {external.AutoCompleteSaveForm(oSrchFrm);} catch (err) {}
		oSrchFrm.submit();
		}
	if(e&&e.stopPropagation)e.stopPropagation(); 
	return false;
}

function EntTextbox(e)
{
	if(e&&e.keyCode==13)return TrySearch(e);
	return true;
}

function TbrGet(tb)
{
	tb=G(tb);
	if(tb&&tb.tagName=="TABLE")
		for(var tbTable=tb.rows[0].cells[0].firstChild; tbTable; tbTable=tbTable.nextSibling)
			if(tbTable.tagName=="TABLE")return tbTable.rows[0];
	return null;
}

function FCIIRange(tr,i)
{
	return tr&&tr.tagName=="TR"&&i!=null&&i>=0&&i<tr.cells.length;
}

function WzGTT(tbic)
{
	var wzType=null;

	tbic=G(tbic);
	if(tbic)
		{
		wzType=tbic.getAttribute("TBICTYPE");
		if(!wzType)wzType="i";
		}

	return wzType;
}

function FIGTbic(tbic)
{
	return FITbic(tbic)||FGTbic(tbic);
}

function FITbic(tbic)
{
	return WzGTT(tbic)=="i";
}

function FGTbic(tbic)
{
	return WzGTT(tbic)=="g";
}

function FSTbic(tbic)
{
	return WzGTT(tbic)=="s";
}

function FPTbic(tbic)
{
	return WzGTT(tbic)=="p";
}

function TbicGet(tb,i,fSkip,tbic)
{
	tbic=G(tbic);
	if(!tbic)
		{
		var tbrow=TbrGet(tb);
		if(!tbrow)return;

		if(i==null)i=0;
		if(fSkip==null)fSkip=true;

		if(FCIIRange(tbrow,i))
			{
			if(!fSkip)
				{
				tbic=tbrow.cells[i];
				}
			else
				{
				for(var iCell=0, cCells=tbrow.cells.length; iCell<cCells; iCell++)
					{
					tbic=tbrow.cells[iCell];

					if(FIGTbic(tbic))
						{
						if(i==0)break; 
						else i--;
						}

					tbic=null;
					if(i<0) break;
					}
				}
			}
		}

	return tbic;
}

function HideTbic(tb,i,tbic)
{
	tbic=TbicGet(tb,i,true,tbic);
	if(tbic)
		{

		SDsplyH(tbic);

		PTBSep(tb);
		}
}

function ShowTbic(tb,i,tbic)
{
	tbic=TbicGet(tb,i,true,tbic);
	if(tbic)
		{

		SDsplyS(tbic);

		PTBSep(tb);
		}
}

function PTBSep(tb)
{
	var tbrow=TbrGet(tb);
	if(!tbrow)return;

	var tbic;
	var iCell, cCells=tbrow.cells.length;

	for(iCell=0, tbic=tbrow.cells[iCell]; tbic&&iCell<cCells; iCell++, tbic=tbrow.cells[iCell])
		if(FSTbic(tbic))SDsplyH(tbic);

	var fVisibleFound=false;
	var tbicNext;
	for(iCell=0, tbic=tbrow.cells[iCell]; tbic&&iCell<cCells; iCell++, tbic=tbrow.cells[iCell])
		{
		if(FIGTbic(tbic)&&FVis(tbic))fVisibleFound=true;
		else if(FPTbic(tbic))fVisibleFound=false;

		tbicNext=tbrow.cells[iCell+1];
		if(fVisibleFound&&FSTbic(tbic)&&FIGTbic(tbicNext)&&FVis(tbicNext))SDsplyS(tbic);
		}
}

var imgPremiumContent = new Image (32,18);
imgPremiumContent.src = '/global/images/default.aspx?assetid=ZA011153081033';

function DisplayPremiumStars()
{
	if (typeof(ofcstatus) == 'undefined')
		return;

	var iPremCount = 0;

	if (!ofcstatus && document.images)
		{
		nImageGroup = document.images;
		for (nImageCounter = 0;nImageCounter < nImageGroup.length;nImageCounter++)
			{
			if(nImageGroup[nImageCounter].name == "PremiumContent")
				{
				nImageGroup[nImageCounter].src = imgPremiumContent.src;
				iPremCount++;
				}
			}
		}

	var doc_sp_ReqO11 = G("ReqO11");
	if (doc_sp_ReqO11 && !ofcstatus && iPremCount > 1) 
		SDsplyS(doc_sp_ReqO11);	
}

function chkStar(){

}

function SetTopNavSiteMapLinkBorder(strTdId, fIsHover)
{
	if (!document.getElementById ||
		'undefined' == typeof(document.getElementById))
		return;

	var tdCell = document.getElementById(strTdId);
	if ('undefined' == typeof(tdCell) ||
		null == tdCell ||
		'undefined' == typeof(tdCell.className))
		return;

	if (fIsHover)
		tdCell.className = 'TopNavCellLinkHover';
	else
		tdCell.className = 'TopNavCellLink';
}

function EncodeUrlComponent(strUrlComponent)
{
	if (typeof(strUrlComponent) == "undefined" ||
		null == strUrlComponent)
		return "";

	if (typeof(encodeURIComponent) != "undefined")
		return EncodeUrlComponent55(strUrlComponent);

	return EncodeUrlComponent50(strUrlComponent);
}

function EncodeUrlComponent55(strUrlComponent)
{
	return encodeURIComponent(strUrlComponent);
}

function EncodeUrlComponent50(strUrlComponent)
{
	var i=0;
	var strEncoded = "";
	for (i=0; i < strUrlComponent.length; i++)
		{
		var chr = strUrlComponent.charAt(i);
		var iChr = strUrlComponent.charCodeAt(i);

		if (iChr < 128)
			{
			if ('!' == chr || '\'' == chr || '(' == chr || 	')' == chr || '~' == chr)
				strEncoded += chr;
			else if (0 == iChr)
				strEncoded += "%00";
			else if (127 == iChr)
				strEncoded += "%7F";
			else if ('+' == chr)
				strEncoded += "%2B";
			else if ('/' == chr)
				strEncoded += "%2F";
			else if ('@' == chr)
				strEncoded += "%40";
			else
				strEncoded += escape(chr);
			}
		else if (iChr < 2048)
			{
			strEncoded += "%";
			strEncoded += ( (iChr >> 6) + 192).toString(16).toUpperCase();

			strEncoded += "%";
			strEncoded += ( (iChr & 63) + 128).toString(16).toUpperCase();
			}
		else 
			{
			strEncoded += "%";
			strEncoded += ( (iChr >> 12) + 224).toString(16).toUpperCase();

			strEncoded += "%";
			strEncoded += ( ((iChr >> 6) & 63) + 128).toString(16).toUpperCase();

			strEncoded += "%";
			strEncoded += ( (iChr & 63) + 128).toString(16).toUpperCase();
			}
		}

	return strEncoded;
}

function StrReplaceParam(strUrl, strParam, strNewValue)
{
	var strUpperUrl = strUrl.toUpperCase();
	var strUpperParam = strParam.toUpperCase();

	var iStart = strUpperUrl.indexOf('?' + strUpperParam);
	if (iStart < 0)
		iStart = strUpperUrl.indexOf('&' + strUpperParam);

	if (iStart < 0)
		return strUrl;

	var iEnd = strUpperUrl.indexOf('&', iStart+1);

	if (iEnd < 0)
		iStart--;

	var strRet = strUrl.substring(0, iStart+1);

	if (iEnd >= 0)
		strRet += strUrl.substring(iEnd+1, strUrl.length);

	if (typeof(strNewValue) != 'undefined' &&
		null != strNewValue && strNewValue.length > 0)
		{
		var strSeparator = strRet.indexOf('?') < 0 ? '?' : '&';
		if (strRet.charAt(strRet.length-1) == strSeparator)
			strSeparator=''; 
		strRet += strSeparator + strParam + '=' + strNewValue;
		}

	return strRet;
}

function CheckElementID(strID)
{
	if ('undefined' == typeof(document.getElementById(strID)))
		return false;

	if (null == document.getElementById(strID))
		return false;

	return true;
}

function FeedbackWizCheckIDs()
{
	if (CheckElementID('m_divFeedbackPanel1') &&
		CheckElementID('m_divFeedbackPanel2') &&
		CheckElementID('m_divFeedbackPanel3A') &&
		CheckElementID('m_divFeedbackPanel3B') &&
		CheckElementID('m_divFeedbackPanel3C') &&
		CheckElementID('m_divFeedbackPanel3D') &&
		CheckElementID('m_divFeedbackPanel4') &&
		CheckElementID('m_divFeedbackPanel5') &&
		CheckElementID('radList_0') &&
		CheckElementID('radList_1') &&
		CheckElementID('radList_2') &&
		CheckElementID('tbFeedbackA') &&
		CheckElementID('tbFeedbackB') &&
		CheckElementID('tbFeedbackC') &&
		CheckElementID('tbFeedbackD'))
		{
		return true;
		}

	return false;
}

function FeedbackWizShowPanel(nPanel, nProblem)
{
	if (!FeedbackWizCheckIDs())
		return;

	nLastPanel = nPanel;
	nLastProblem = nProblem;

	if (-1 == nProblem)
		{
		if (document.getElementById('radList_0').checked)
			nProblem = 1;

		if (document.getElementById('radList_1').checked)
			nProblem = 2;

		if (document.getElementById('radList_2').checked)
			nProblem = 3;
		}

	document.getElementById('m_divFeedbackPanel1').style.display = 'none';
	document.getElementById('m_divFeedbackPanel2').style.display = 'none';
	document.getElementById('m_divFeedbackPanel3A').style.display = 'none';
	document.getElementById('m_divFeedbackPanel3B').style.display = 'none';
	document.getElementById('m_divFeedbackPanel3C').style.display = 'none';
	document.getElementById('m_divFeedbackPanel3D').style.display = 'none';
	document.getElementById('m_divFeedbackPanel4').style.display = 'none';
	document.getElementById('m_divFeedbackPanel5').style.display = 'none';

	if (nPanel == 1)
		{
		document.getElementById('m_divFeedbackPanel1').style.display = 'block';
		}
	else if (nPanel == 2)
		{
		document.getElementById('m_divFeedbackPanel2').style.display = 'block';
		}
	else if (nPanel == 3)
		{
		if (nProblem == 1)
			document.getElementById('m_divFeedbackPanel3A').style.display = 'block';
		else if (nProblem == 2)
			document.getElementById('m_divFeedbackPanel3B').style.display = 'block';
		else if (nProblem == 3)
			document.getElementById('m_divFeedbackPanel3C').style.display = 'block';
		else if (nProblem == 4)
			document.getElementById('m_divFeedbackPanel3D').style.display = 'block';
		}
	else if (nPanel == 4)
		{
		document.getElementById('m_divFeedbackPanel4').style.display = 'block';
		}
	else if (nPanel == 5)
		{
		document.getElementById('m_divFeedbackPanel5').style.display = 'block';
		}
}

function NavigateIFrameIE(strIFrameId, strLocation)
{
	var ifrmSubmitTarget = frames[strIFrameId];
	if (typeof(ifrmSubmitTarget) != 'undefined' && null != ifrmSubmitTarget)
		ifrmSubmitTarget.location.replace(strLocation);
}

function NavigateIFrameNetscape(strIFrameId, strLocation)
{
	var ifrmSubmitTarget = document.getElementById(strIFrameId);
	if (typeof(ifrmSubmitTarget) != 'undefined' && null != ifrmSubmitTarget)
		ifrmSubmitTarget.contentWindow.location.replace(strLocation);
}

function NavigateIFrame(strIFrameId, strLocation)
{
	if (window.navigator.appName.toUpperCase().indexOf("NETSCAPE") >= 0)
		NavigateIFrameNetscape(strIFrameId, strLocation);
	else
		NavigateIFrameIE(strIFrameId, strLocation);
}

function FeedbackWizDoSubmit(rating, iCommentId, fChangePanel)
{
	if (typeof(window.navigator) != 'undefined' &&
		typeof(window.navigator.onLine) != 'undefined')
		{
		if (!window.navigator.onLine)
			{
			alert(strYouAreNotOnlineErrMsg);
			return;
			}
		}

	if (!FeedbackWizCheckIDs())
		return;

	var comment = '';
	if (1 == iCommentId)
		comment = document.getElementById('tbFeedbackA').value;
	else if (2 == iCommentId)
		comment = document.getElementById('tbFeedbackB').value;
	else if (3 == iCommentId)
		comment = document.getElementById('tbFeedbackC').value;
	else if (4 == iCommentId)
		comment = document.getElementById('tbFeedbackD').value;

	if (typeof(comment) == 'undefined')
		comment = '';
	else if (null == comment)
		comment = '';

	if (comment.length > 750)
		{
		alert(strErrorCommentTooLong);
		return;
		}

	comment = escape(comment);

	var nPanel = nLastPanel;
	var nProblem = nLastProblem;
	if (fChangePanel)
		FeedbackWizShowPanel(4);

	var strAssetId = strPageAssetId;
	if (typeof(strAssetId) != 'undefined' &&
		null != strAssetId &&
		strAssetId.length > 0)
		{
		strAssetId = '&AssetID=' + strAssetId;
		}
	else
		{
		strAssetId = '';
		}

	var strNewLocation = strNewPageLocation;
	strNewLocation += '?';

	strNewLocation += 'postback=true&rating=' + rating + strAssetId;
	strNewLocation += '&' + strPageLoggingParams;
	document.cookie = 'feedbackComment=' + comment + ';path=/';

	var fWasOK = true;
	try
		{
		NavigateIFrame('submitTarget', strNewLocation);
		}
	catch (e)
		{
		fWasOK = false;
		alert(strCannotSubmitFeedbackErrmsg);
		FeedbackWizShowPanel(nPanel, nProblem);
		}

	if (true == fWasOK)
		{
		if (fChangePanel)
			window.setTimeout('FeedbackWizShowPanel(5);', 1200);
		}	
}

function FeedbackWizSubmitAndShowPanel(rating, comment, panel)
{
	FeedbackWizDoSubmit(rating, comment, false);
	FeedbackWizShowPanel(panel);
}

function FeedbackWizGenerateFXHeader()
{
	document.write('<DIV>&nbsp;</DIV>');
	document.write('<DIV CLASS="OLn">&nbsp;</DIV>\n');
}

function FeedbackWizGenerateForm(
	strLabel1, strLabel2, strLabel4, strLabel5, strLabel5Text,
	strLnkContactUsLink, strContactUsText, strContactUsUrl,
	strBtnSubmitSuccess, strBtnNo,
	strRadList0, strRadList1, strRadList2,
	strBack, strNext, strSubmit,
	strLabelA, strLabelB, strLabelC, strLabelD)
{
	var strLnkContactUsCellText = strLnkContactUsLink.replace('{0}',
		'<A CLASS="OAnc" HREF="javascript:OpenInNewWindow(\'' + strContactUsUrl +
		'\')">' + strContactUsText + '</A>');

	document.write('<TABLE CLASS="FeedbackControlMainTable OTbl" CELLPADDING="0" CELLSPACING="0" ' +
		'BORDER="0" WIDTH="100%"><TR><TD CLASS="FeedbackControl" WIDTH="100%">');

	document.write('<DIV ID="m_divFeedbackPanel1" ALIGN="left" STYLE="display: none; padding-top: 16px;">');
	document.write('	<TABLE WIDTH="100%" CLASS="OTbl" HEIGHT="' + 120 + '">');
	document.write('		<TR>');
	document.write('			<TD STYLE="font-weight: bold;">');
	document.write('				<SPAN CLASS="OLbl">' + strLabel1 + '</SPAN>');
	document.write('			</TD>');
	document.write('		</TR>');
	document.write('		<TR>');
	document.write('			<TD>');
	document.write('				<INPUT CLASS="AsstFeedbackButton" TYPE="button" VALUE="' + strBtnSubmitSuccess + '" ONCLICK="FeedbackWizDoSubmit(5,0,true);" />');
	document.write('				<SPAN CLASS="OWSInl" STYLE="margin-left:8px;">&nbsp;</SPAN>');
	document.write('				<INPUT CLASS="AsstFeedbackButton" TYPE="button" value="' + strBtnNo + '" ONCLICK="FeedbackWizSubmitAndShowPanel(0,0,2);" />');
	document.write('			</TD>');
	document.write('		</TR>');
	document.write('		<TR>');
	document.write('			<TD HEIGHT="100%"/>');
	document.write('		</TR>');
	document.write('	</TABLE>');
	document.write('</DIV>');

	document.write('<DIV ID="m_divFeedbackPanel2" STYLE="display:none; padding-top: 16px;" ALIGN="left">');
	document.write('	<TABLE WIDTH="100%" CLASS="OTbl" HEIGHT="' + 120 + '">');
	document.write('		<TR>');
	document.write('			<TD STYLE="font-weight: bold;" COLSPAN="3">');
	document.write('				<SPAN CLASS="OLbl">' + strLabel2 + '</SPAN>');
	document.write('			</TD>');
	document.write('		</TR>');

	document.write('		<TR>');
	document.write('			<TD COLSPAN="3" WIDTH="100%">');
	document.write('				<TABLE WIDTH="100%" CLASS="OTbl" CELLSPACING="0" CELLPADDING="0">');
	document.write('					<TR>');
	document.write('						<TD STYLE="padding-left: 20px;"/>');
	document.write('						<TD WIDTH="100%">');
	document.write('							<FORM CLASS="OFrm" ID="radListFrm" NAME="radListFrm" METHOD="POST" ACTION="#">');
	document.write('								<TABLE CLASS="OFLT" CELLPADDING="0" CELLSPACING="0">');
	document.write('									<TR>');
	document.write('										<TD CLASS="OFLTDU">');
	document.write('											<INPUT NAME="radList" ID="radList_0" TYPE="radio" VALUE="' + strRadList0 + '" checked="checked" />');
	document.write('											<LABEL FOR="radList_0" CLASS="OFLbl">' + strRadList0 + '</LABEL>');
	document.write('										</TD>');
	document.write('									</TR><TR>');
	document.write('										<TD CLASS="OFLTDU">');
	document.write('											<INPUT NAME="radList" ID="radList_1" TYPE="radio" VALUE="' + strRadList1 + '" />');
	document.write('											<LABEL FOR="radList_1" CLASS="OFLbl">' + strRadList1 + '</LABEL>');
	document.write('										</TD>');
	document.write('									</TR><TR>');
	document.write('										<TD CLASS="OFLTDU">');
	document.write('											<INPUT NAME="radList" ID="radList_2" TYPE="radio" VALUE="' + strRadList2 + '" />');
	document.write('											<LABEL FOR="radList_2" CLASS="OFLbl">' + strRadList2 + '</LABEL>');
	document.write('										</TD>');
	document.write('									</TR>');
	document.write('								</TABLE>');
	document.write('							</FORM>');
	document.write('						</TD>');
	document.write('					</TR>');
	document.write('				</TABLE>');
	document.write('			</TD>');
	document.write('		</TR>');

	document.write('		<TR>');
	document.write('			<TD WIDTH="100%"/>');
	document.write('			<TD CLASS="AsstFeedbackButtonCell">');
	document.write('				<INPUT CLASS="AsstFeedbackButton" TYPE="button" VALUE="' + strBack + '" ONCLICK="FeedbackWizShowPanel(1);" />');
	document.write('			</TD>');
	document.write('			<TD CLASS="AsstFeedbackButtonCell">');
	document.write('				<INPUT CLASS="AsstFeedbackButton" TYPE="button" VALUE="' + strNext + '" ONCLICK="FeedbackWizShowPanel(3,-1);" />');
	document.write('			</TD>');
	document.write('		</TR>');

	document.write('		<TR>');
	document.write('			<TD HEIGHT="100%" COLSPAN="3"/>');
	document.write('		</TR>');
	document.write('	</TABLE>');
	document.write('</DIV>');

	document.write('<DIV ID="m_divFeedbackPanel3A" STYLE="display:none; padding-top: 16px;" ALIGN="left">');
	document.write('	<TABLE WIDTH="100%" CLASS="OTbl" HEIGHT="' + 120 + '">');
	document.write('		<TR>');
	document.write('			<TD STYLE="font-weight: bold;" COLSPAN="3">');
	document.write('				<LABEL CLASS="OFLbl" FOR="tbFeedbackA">' + strLabelA + '</LABEL>');
	document.write('			</TD>');
	document.write('		</TR>');
	document.write('		<TR>');
	document.write('			<TD COLSPAN="3">');
	document.write('				<TEXTAREA CLASS="OTBM" ROWS="3" ID="tbFeedbackA" STYLE="width:100%;"></TEXTAREA>');
	document.write('			</TD>');
	document.write('		</TR>');
	document.write('		<TR>');
	document.write('			<TD WIDTH="100%"/>');
	document.write('			<TD CLASS="AsstFeedbackButtonCell">');
	document.write('				<INPUT CLASS="AsstFeedbackButton" TYPE="button" VALUE="' + strBack + '" ONCLICK="FeedbackWizShowPanel(2);" />');
	document.write('			</TD>');
	document.write('			<TD CLASS="AsstFeedbackButtonCell">');
	document.write('				<INPUT CLASS="AsstFeedbackButton" TYPE="button" VALUE="' + strSubmit + '" ONCLICK="FeedbackWizDoSubmit(1,1, true);" />');
	document.write('			</TD>');
	document.write('		</TR>');
	document.write('		<TR>');
	document.write('			<TD HEIGHT="100%" COLSPAN="3"/>');
	document.write('		</TR>');
	document.write('	</TABLE>');
	document.write('</DIV>');

	document.write('<DIV ID="m_divFeedbackPanel3B" STYLE="display:none; padding-top: 16px;" ALIGN="left">');
	document.write('	<TABLE WIDTH="100%" CLASS="OTbl" HEIGHT="' + 120 + '">');
	document.write('		<TR>');
	document.write('			<TD STYLE="font-weight: bold;" COLSPAN="3">');
	document.write('				<LABEL CLASS="OFLbl" FOR="tbFeedbackB">' + strLabelB + '</LABEL>');
	document.write('			</TD>');
	document.write('		</TR>');
	document.write('		<TR>');
	document.write('			<TD COLSPAN="3">');
	document.write('				<TEXTAREA CLASS="OTBM" ROWS="3" ID="tbFeedbackB" STYLE="width:100%;"></TEXTAREA>');
	document.write('			</TD>');
	document.write('		</TR>');
	document.write('		<TR>');
	document.write('			<TD WIDTH="100%"/>');
	document.write('			<TD CLASS="AsstFeedbackButtonCell">');
	document.write('				<INPUT CLASS="AsstFeedbackButton" TYPE="button" VALUE="' + strBack + '" ONCLICK="FeedbackWizShowPanel(2);" />');
	document.write('			</TD>');
	document.write('			<TD CLASS="AsstFeedbackButtonCell">');
	document.write('				<INPUT CLASS="AsstFeedbackButton" TYPE="button" VALUE="' + strSubmit + '" ONCLICK="FeedbackWizDoSubmit(2,2, true);" />');
	document.write('			</TD>');
	document.write('		</TR>');
	document.write('		<TR>');
	document.write('			<TD HEIGHT="100%" COLSPAN="3"/>');
	document.write('		</TR>');
	document.write('	</TABLE>');
	document.write('</DIV>');

	document.write('<DIV ID="m_divFeedbackPanel3C" STYLE="display:none; padding-top: 16px;" ALIGN="left">');
	document.write('	<TABLE WIDTH="100%" CLASS="OTbl" HEIGHT="' + 120 + '">');
	document.write('		<TR>');
	document.write('			<TD STYLE="font-weight: bold;" COLSPAN="3">');
	document.write('				<LABEL CLASS="OFLbl" FOR="tbFeedbackC">' + strLabelC + '</LABEL>');
	document.write('			</TD>');
	document.write('		</TR>');
	document.write('		<TR>');
	document.write('			<TD COLSPAN="3">');
	document.write('				<TEXTAREA CLASS="OTBM" ROWS="3" ID="tbFeedbackC" STYLE="width:100%;"></TEXTAREA>');
	document.write('			</TD>');
	document.write('		</TR>');
	document.write('		<TR>');
	document.write('			<TD WIDTH="100%"/>');
	document.write('			<TD CLASS="AsstFeedbackButtonCell">');
	document.write('				<INPUT CLASS="AsstFeedbackButton" TYPE="button" VALUE="' + strBack + '" ONCLICK="FeedbackWizShowPanel(2);" />');
	document.write('			</TD>');
	document.write('			<TD CLASS="AsstFeedbackButtonCell">');
	document.write('				<INPUT CLASS="AsstFeedbackButton" TYPE="button" VALUE="' + strSubmit + '" ONCLICK="FeedbackWizDoSubmit(3,3, true);" />');
	document.write('			</TD>');
	document.write('		</TR>');
	document.write('		<TR>');
	document.write('			<TD HEIGHT="100%" COLSPAN="3"/>');
	document.write('		</TR>');
	document.write('	</TABLE>');
	document.write('</DIV>');

	document.write('<DIV ID="m_divFeedbackPanel3D" STYLE="display:none; padding-top: 16px;" ALIGN="left">');
	document.write('	<TABLE WIDTH="100%" CLASS="OTbl" HEIGHT="' + 120 + '">');
	document.write('		<TR>');
	document.write('			<TD STYLE="font-weight: bold;" COLSPAN="2">');
	document.write('				<LABEL CLASS="OFLbl" FOR="tbFeedbackD">' + strLabelD + '</LABEL>');
	document.write('			</TD>');
	document.write('		</TR>');
	document.write('		<TR>');
	document.write('			<TD COLSPAN="2">');
	document.write('				<TEXTAREA CLASS="OTBM" ROWS="3" ID="tbFeedbackD" STYLE="width:100%;"></TEXTAREA>');
	document.write('			</TD>');
	document.write('		</TR>');
	document.write('		<TR>');
	document.write('			<TD WIDTH="100%"/>');
	document.write('			<TD CLASS="AsstFeedbackButtonCell">');
	document.write('				<INPUT CLASS="AsstFeedbackButton" TYPE="button" VALUE="' + strSubmit + '" ONCLICK="FeedbackWizDoSubmit(1,4, true);" />');
	document.write('			</TD>');
	document.write('		</TR>');
	document.write('		<TR>');
	document.write('			<TD HEIGHT="100%" COLSPAN="2"/>');
	document.write('		</TR>');
	document.write('	</TABLE>');
	document.write('</DIV>');

	document.write('<DIV ID="m_divFeedbackPanel4" STYLE="display:none; padding-top: 16px;" ALIGN="left">');
	document.write('	<TABLE WIDTH="100%" CLASS="OTbl" HEIGHT="' + 120 + '">');
	document.write('		<TR>');
	document.write('			<TD STYLE="font-weight: bold;">');
	document.write('				<SPAN CLASS="OLbl">' + strLabel4 + '</SPAN>');
	document.write('			</TD>');
	document.write('		</TR>');
	document.write('		<TR>');
	document.write('			<TD HEIGHT="100%"/>');
	document.write('		</TR>');
	document.write('	</TABLE>');
	document.write('</DIV>');

	document.write('<DIV ID="m_divFeedbackPanel5" STYLE="display:none; padding-top: 16px;" ALIGN="left">');
	document.write('	<TABLE WIDTH="100%" CLASS="OTbl" HEIGHT="' + 120 + '">');
	document.write('		<TR>');
	document.write('			<TD STYLE="font-weight: bold;">');
	document.write('				<SPAN CLASS="OLbl">' + strLabel5 + '</SPAN>');
	document.write('			</TD>');
	document.write('		</TR>');
	document.write('		<TR>');
	document.write('			<TD>');
	document.write('				<SPAN>' + strLabel5Text + '</SPAN>');
	document.write('			</TD>');
	document.write('		</TR>');

	document.write('		<TR><TD HEIGHT="6"><SPAN/></TD></TR>');

	document.write('		<TR>');
	document.write('			<TD WIDTH="100%" NOWRAP="true">');
	document.write(					strLnkContactUsCellText);
	document.write('			</TD>');
	document.write('		</TR>');

	document.write('		<TR>');
	document.write('			<TD HEIGHT="100%"/>');
	document.write('		</TR>');
	document.write('	</TABLE>');
	document.write('</DIV>');

	document.write('</TD></TR></TABLE>');

	if (fNotFound)
		FeedbackWizShowPanel(3,4);
	else
		FeedbackWizShowPanel(1);
}

function GetCookie(tName, DefaultReturn)
{
	if ("undefined" == typeof(DefaultReturn))
		DefaultReturn = "";

	var tArg = tName + "=";
	var nArgLen = tArg.length;
	var nCookieLen = document.cookie.length;
	var nStartPos = 0;

	while (nStartPos < nCookieLen)
		{
		var nEndPos = nStartPos + nArgLen;

		if (document.cookie.substring(nStartPos, nEndPos) == tArg)
			{
			var n2EndPos = document.cookie.indexOf(";", nEndPos);
			if (n2EndPos == -1)
				{
				n2EndPos = document.cookie.length;
				}
			return unescape(document.cookie.substring(nEndPos, n2EndPos));
			}

		nStartPos = document.cookie.indexOf(" ", nStartPos) + 1;
		if (nStartPos == 0)
			break;
		}

	return DefaultReturn;
}

function SetPersistentCookie(szName, szValue)
{
	var dateNow = new Date();
	var dateExpire = new Date();
	dateExpire.setTime(dateNow.getTime() + 1000 * 60 * 60 * 24 * 365);
	mSetCookie(szName, szValue, false, dateExpire);

	return;
}

function FIsVariableInCookie(szName, DefaultValue)
{
	if ("undefined" == typeof(DefaultValue))
		DefaultValue = "";

	return (DefaultValue != GetCookie(szName, DefaultValue));
}

function mSetCookie(tName, vValue)
{
	var aArgs = mSetCookie.arguments;
	var nArgs = mSetCookie.arguments.length;
	var bAppendToCurrentCookie = (nArgs > 2) ? aArgs[2] : false;
	var expires = (nArgs > 3) ? aArgs[3] : null;
	var path = (nArgs > 4) ? aArgs[4] : "/";
	var domain = (nArgs > 5) ? aArgs[5] : null;
	var secure = (nArgs > 6) ? aArgs[6] : false;

	if (bAppendToCurrentCookie && "" != GetCookie(tName))
		vValue = GetCookie(tName) + "," + vValue;

	document.cookie = tName + "=" + vValue +
		((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
		((path == null) ? "" : ("; path=" + path)) +
		((domain == null) ? "" : ("; domain=" + domain)) +
		((secure == true) ? "; secure" : "");

	return;
}

function mGetCookie(tName)
{
	return GetCookie(tName, "na");
}

function mDeleteCookie(tName) {
		var exp = new Date();
		exp.setDate (exp.getDate() -10);
		mSetCookie(tName, "", false, exp);
}

function SzGetArgumentValue(strQueryName)
{
	var iStart;
	var iEnd;
	var strQueryUpper = unescape(location.search.toUpperCase());
	var strQuery = "&" + strQueryName.toUpperCase() + "=";

	iStart = strQueryUpper.indexOf(strQuery);

	if (-1 == iStart)
		{
		strQuery = "?" + strQueryName.toUpperCase() + "=";
		iStart = strQueryUpper.indexOf(strQuery);
		}

	if (-1 == iStart)
		return null;

	iStart += strQuery.length;
	iEnd = strQueryUpper.indexOf("&", iStart);

	if (-1 == iEnd)
		iEnd = strQueryUpper.indexOf("?", iStart);
	if (-1 == iEnd)
		iEnd = strQueryUpper.length;

	return unescape(location.search).substring(iStart, iEnd);
}

function Rollover(normal, high, ratedOn, ratedOff)
{
	this.normal = new Image();
	this.normal.src = normal;
	this.high = new Image();
	this.high.src = high;
	this.ratedOn = new Image();
	this.ratedOn.src = ratedOn;
	this.ratedOff = new Image();
	this.ratedOff.src = ratedOff;
}

function GetName(imgName)
{
	var pos = imgName.lastIndexOf("_Image");
	var baseName = imgName.substring(0, pos) + "_Image";
	return baseName;
}

function GetIndex(imgName)
{
	var pos = imgName.lastIndexOf("_Image");
	var num = imgName.substring(pos+6, imgName.length);
	return num;
}

function DoMouseOver(img, star)
{
	var prefixName = GetName(img.name);
	var imgNumber = new Number(GetIndex(img.name));
	for (var i = 1; i <= imgNumber; i++)
		{
		document.images[prefixName+i].src = star.high.src;
		}
}

function DoMouseOut(img, maxRating, star)
{
	var prefixName = GetName(img.name);
	for (var i = 1; i <= maxRating; i++)
		{
		document.images[prefixName+i].src = star.normal.src;
		}
}

function DoRating(controlName, rating)
{
	var strAssetIdParam = strAssetId;
	if (typeof(strAssetIdParam) != 'undefined' && null != strAssetIdParam && strAssetIdParam.length > 0)
		strAssetIdParam = '&AssetID=' + strAssetIdParam;
	else
		strAssetIdParam = '';

	var strNewLocation = strRatingPage + '?Rating=' + rating + strAssetIdParam + '&RatingType='
		+ strRatingType + '&AssetVersion=' + strAssetVersion + '&Overwrite=' + strOverwrite
		+ '&' + strLogging;

	NavigateIFrame('submitTarget', strNewLocation);

	ChangeRatingElements(controlName, rating);

	return;
}

function ResetRatings(controlName)
{
	document.getElementById('sectionStarsBeforeRating').style.display = '';
	document.getElementById('sectionStarsAfterRating').style.display = 'none';
	document.getElementById('spanBeforeRating').style.display = '';
	document.getElementById('spanAfterRating').style.display = 'none';

	if (fShowFeedback == true)
		{
		document.getElementById('divFeedbackLink').style.display = 'none';
		}

	for (i = 1; i <= 5; i++)
		{
		document.images['Before' + controlName + '_Image' + i].src = ctlRating_Star.normal.src;
		document.images[controlName + '_Image' + i].src = ctlRating_Star.ratedOff.src;
		}
}

function ChangeRatingElements(controlName, rating)
{
	document.getElementById('sectionStarsBeforeRating').style.display = 'none';
	document.getElementById('sectionStarsAfterRating').style.display = '';
	document.getElementById('spanBeforeRating').style.display = 'none';
	document.getElementById('spanAfterRating').style.display = '';
	if (fShowFeedback == true)
		{
		document.getElementById('divFeedbackLink').style.display = '';
		document.getElementById('ctlRating_Feedback').href = strFeedbackLink + rating;
		}

	for (i = 1; i <= rating; i++)
		{
		document.images[controlName + '_Image' + i].src = ctlRating_Star.ratedOn.src;
		}
}

var m_wndwProgress = null;
var m_Downloading = false;

function StrDisplayTitle()
{
	if ("undefined" == typeof(m_strDisplayTitle))
		return "?";

	return m_strDisplayTitle;
}

function StrDownloadDetails()
	{
	if ("undefined" == typeof(m_strDownloadDetails))
		return "";

	return (null == m_strDownloadDetails ? "" : m_strDownloadDetails);
	}

function FIsDownloading()
	{
	if ("undefined" == typeof(m_Downloading))
		return false;

	return m_Downloading;
	}

function OpenProgressWindow()
	{
	m_Downloading = true;
	m_wndwProgress = window.open("/templates/progress.aspx", "idProgressWindow", "height=120,width=294");
	if (null != m_wndwProgress)
		m_wndwProgress.focus();

	return;
	}

function CloseProgressWindow()
	{
	m_Downloading = false;

	if (null != m_wndwProgress && !m_wndwProgress.closed && "undefined" != typeof(m_wndwProgress.Finish))
		m_wndwProgress.Finish();

	return;
	}

function OnProgress(iProgress, iGoal)
	{
	if (null != m_wndwProgress && "undefined" != typeof(m_wndwProgress) && "undefined" != typeof(m_wndwProgress.DoProgress))
		m_wndwProgress.DoProgress(iProgress, iGoal);

	return;
	}

function GotoDirectDownloadURLTemplates(iResult)
{
	var strLocation;

	strLocation  = "/templates/directdownload.aspx?AssetID=" + m_strAsset +
		"&Application=" + m_strApp +
		"&Result=" + iResult +
		"&Version=" + m_iVersion;

	if ("undefined" != typeof(m_strQuery) && 0 != m_strQuery.length)
		strLocation += "&QueryID=" + m_strQuery;

	window.location.href = strLocation;

    	return;
}

function OnComplete(iResult)
{

	CloseProgressWindow();

	if (fInstallingActiveX)
		return;

	if (1 == iResult && !fSupportsActiveX)
		iResult = 2;

	if (0 != iResult)
		GotoDirectDownloadURLTemplates(iResult);

	return;
}

function StartEditTemplate()
{
	var rgstrApp;

	if (null != m_strApp)
		{
		rgstrApp = m_strApp.split(",");
		m_strApp = rgstrApp[0];

		if (m_strApp == "IP")
			{
			m_strApp == "XD";
			}
		}

	if (("undefined" != typeof(m_fAcceptedTOU) && !m_fAcceptedTOU) ||
		("undefined" == typeof(m_fAcceptedTOU) && 0 != m_strTouUrl.length))
		{

		mSetCookie("AWS_CheckingEULA_Sess", "1");
		window.location.href = m_strTouUrl;
		return;
		}

	if(!InstallActiveX())
		{
		OnComplete(1);
		return;
		}

	if(FIsVariableInCookie("AWS_DontPrompt_Sess"))
		{
		OnComplete(DCTRL.StartEdit(m_strDisplayTitle,
			m_strAsset,
			"",
			m_strApp,
			m_strMetric,
			m_iVersion));
		}
	else
		{

		OpenProgressWindow();
		DCTRL.StartEdit(m_strDisplayTitle,
			m_strAsset,
			"",
			m_strApp,
			m_strMetric,
			m_iVersion);
		}

	return;
}

function ResizeClientArea(iClientWidth, iClientHeight)
{
	if (null != iClientWidth && null != iClientHeight &&
		!isNaN(iClientWidth) && !isNaN(iClientHeight) && 
		iClientWidth > 0 && iClientHeight > 0)
		{
		var iResizeWidthBy = 0;
		var iResizeHeightBy = 0;

		for (var i=0; i < 3; i++)
			{
			iResizeWidthBy = iClientWidth - document.body.clientWidth;
			iResizeHeightBy = iClientHeight - document.body.clientHeight;
			window.resizeBy(iResizeWidthBy, iResizeHeightBy);
			}
		}
}

function CreateVideoPage(fIsNetscape, fIsOther, fIsMPlayer, strLTRorRTL,
	iControlWidth, iControlHeight, strUrl,
	strErrWMPNotInstalled, strErrFlashNotInstalled)
{
	document.writeln('<BODY ' +
		'MARGINHEIGHT="0" ' +
		'MARGINWIDTH="0" ' +
		'LEFTMARGIN="0" ' +
		'RIGHTMARGIN="0" ' +
		'TOPMARGIN="0" ' +
		'BOTTOMMARGIN="0" ' +
		'CLASS="ONBody" ' +
		(fIsNetscape ? '' : 'SCROLL="auto" ') +
		strLTRorRTL + '>');

	if (!fIsOther)
		{
		if (fIsMPlayer)
			{
			if (!fIsNetscape)
				{
				document.writeln('<OBJECT CLASSID="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6" ID="objMediaPlayer" ' +
					'WIDTH="' + iControlWidth + '" ' +
					'HEIGHT="' + iControlHeight + '" ' +
					'BORDER="0">');

				document.writeln('<PARAM NAME="URL" VALUE="' + strUrl + '"/>');
				document.writeln('<PARAM NAME="ENABLECONTEXTMENU" VALUE="true"/>');
				document.writeln('<PARAM NAME="AUTOSTART" VALUE="true"/>');
				document.writeln('<PARAM NAME="STRETCHTOFIT" VALUE="true"/>');

				document.writeln('</OBJECT>');
				}
			else
				{
				document.writeln('<EMBED TYPE="application/x-mplayer2" ' +
					'PLUGINSPAGE = "http://www.microsoft.com/Windows/MediaPlayer/" ' +
					'SRC="' + strUrl + '" ' +
					'ID="objMediaPlayer" ' +
					'WIDTH="' + iControlWidth + '" ' +
					'HEIGHT="' + iControlHeight + '" ' +
					'AUTOSTART="true" ' +
					'UIMODE="mini" ' +
					'STRETCHTOFIT="true" ' +
					'SHOWAUDIOCONTROLS="true" ' +
					'SHOWPOSITIONCONTROLS="true">');
				document.write('</EMBED>');
				}
			}
		else
			{
			if (!fIsNetscape)
				{
				document.writeln('<OBJECT CLASSID="CLSID:D27CDB6E-AE6D-11CF-96B8-444553540000" ID="objFlashPlayer" ' +
					'WIDTH="' + iControlWidth + '" ' +
					'HEIGHT="' + iControlHeight + '" ' +
					'BORDER="0" ' +
					'CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0">');
				document.writeln('<PARAM NAME="movie" VALUE="' + strUrl + '"/>');
				document.writeln('<PARAM NAME="menu" VALUE="true"/>');
				document.writeln('<PARAM NAME="quality" VALUE="high"/>');
				document.writeln('</OBJECT>');
				}
			else
				{
				document.writeln('<EMBED ' +
					'ID="objFlashPlayer" ' +
					'SRC="' + strUrl + '" ' +
					'MENU="true" ' +
					'QUALITY="high" ' +
					'WIDTH="' + iControlWidth + '" ' +
					'HEIGHT="' + iControlHeight + '" ' +
					'TYPE="application/x-shockwave-flash" ' +
					'PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">');
				document.writeln('</EMBED>');
				}
			}
		}

	if (!fIsOther)
		{
		if (fIsMPlayer)
			{
			var fIsInstalled = false;

			if (!fIsNetscape)
				{
				fIsInstalled = ((typeof(objMediaPlayer) == "object") &&
					(typeof(objMediaPlayer.url) != "undefined"));
				}
			else
				{
				fIsInstalled = ((null != document.body.getElementsByTagName("EMBED")["objMediaPlayer"]) &&
					(typeof(document.body.getElementsByTagName("EMBED")["objMediaPlayer"]) == "object") &&
					(typeof(document.body.getElementsByTagName("EMBED")["objMediaPlayer"].src) != "undefined"));
				}

			if (!fIsInstalled)
				{
				alert(strErrWMPNotInstalled);
				}
			}
		else
			{
			var fIsInstalled = false;

			if (!fIsNetscape)
				{
				fIsInstalled = ((typeof(objFlashPlayer) == "object") &&
					(typeof(objFlashPlayer.movie) != "undefined"));
				}
			else
				{
				fIsInstalled = ((null != document.body.getElementsByTagName("EMBED")["objFlashPlayer"]) &&
					(typeof(document.body.getElementsByTagName("EMBED")["objFlashPlayer"]) == "object") &&
					(typeof(document.body.getElementsByTagName("EMBED")["objFlashPlayer"].src) != "undefined"));
				}

			if (!fIsInstalled)
				{
				alert(strErrFlashNotInstalled);
				}
			}
		}

	ResizeClientArea(iControlWidth, iControlHeight);
}

function CloseVideoPageBody()
{
	document.writeln('</BODY>');
}

function OpenVideo(url, width, height)
{

	if (-1 != window.navigator.appName.toUpperCase().indexOf("NETSCAPE"))
		{

		window.open(url, '_AsstVidWnd');
		}
	else
		{
		window.open(url, '_AsstVidWnd', 'toolbar=0,status=0,menubar=0,resizable=0,width=' + width + ',height=' + height);
		}
}

var strIsRtl = '';
var allDivsInPage = null;
var allImagesInPage = null;
var fExpandedAssistance = false;
var popupWin;

function openWindow(url, example){	if (typeof(popupWin) != "object" || null == popupWin) 		popupWin = window.open(url, example, "width=452,height=572,top=0,left=0,alwaysRaised=yes,toolbar=0,directories=0,menubar=0,status=1,resizable=yes,location=0,scrollbars=1,copyhistory=0");	else		{		if (!popupWin.closed) 			popupWin.location.href = url;		else 			popupWin = window.open(url, example, "width=452,height=572,top=0,left=0,alwaysRaised=yes,toolbar=0,directories=0,menubar=0,status=1,resizable=yes,location=0,scrollbars=1,copyhistory=0");		}	  	popupWin.focus();}

function ExpandDiv(theDivName)
{
	InitializeGlobalData();

	if (null == theDivName || typeof(theDivName) == "undefined") return; var theDiv = allDivsInPage[theDivName]; if (null == theDiv || typeof(theDiv) == "undefined") return;
	theDiv.style.display = "block";

	var thePic = allImagesInPage[theDivName + "_img"];
	if (null != thePic && typeof(thePic) != "undefined")
		{
		thePic.src = "/global/images/bluedrop.gif";
		thePic.alt = strHide;
		}
}

function CollapseDiv(theDivName)
{
	InitializeGlobalData();

	if (null == theDivName || typeof(theDivName) == "undefined") return; var theDiv = allDivsInPage[theDivName]; if (null == theDiv || typeof(theDiv) == "undefined") return;
	theDiv.style.display = "none";

	var thePic = allImagesInPage[theDivName + "_img"];
	if (null != thePic && typeof(thePic) != "undefined")
		{
		thePic.src = "/global/images/blueup" + strIsRtl + ".gif";
		thePic.alt = strShow;
		}
}

function ToggleDiv(theDivName)
{
	InitializeGlobalData();

	if (null == theDivName || typeof(theDivName) == "undefined") return; var theDiv = allDivsInPage[theDivName]; if (null == theDiv || typeof(theDiv) == "undefined") return;

	if (theDiv.style.display.toUpperCase() != "BLOCK")
		ExpandDiv(theDivName);
	else
		CollapseDiv(theDivName);
}

function AlterAllDivs(displayStyle)
{
	InitializeGlobalData();

	if (null == allDivsInPage || typeof(allDivsInPage) == "undefined")
		return;

	if (typeof(allDivsInPage["divShowAll"]) != "undefined" &&
		typeof(allDivsInPage["divHideAll"]) != "undefined")
		{
		if (displayStyle == "block")
			{
			allDivsInPage["divShowAll"].style.display = "none";
			allDivsInPage["divHideAll"].style.display = "block";
			}
		else
			{
			allDivsInPage["divShowAll"].style.display = "block";
			allDivsInPage["divHideAll"].style.display = "none";
			}
		}

	AlterAllDivsSpans(document.body.getElementsByTagName("DIV"), displayStyle);
	AlterAllDivsSpans(document.body.getElementsByTagName("SPAN"), displayStyle);
}

function AlterAllDivsSpans(allDivsSpans, displayStyle)
{
	if (typeof(allDivsSpans) == "undefined" ||
		null == allDivsSpans)
		return;

	for (i=0; i < allDivsSpans.length; i++)
		if (typeof(allDivsSpans[i]) != "undefined" &&
			null != allDivsSpans[i] &&
			typeof(allDivsSpans[i].id) != "undefined" &&
			null != allDivsSpans[i].id &&
			allDivsSpans[i].id.length > 0)
			{
			if (0 == allDivsSpans[i].id.indexOf("divExpCollAsst_")) 
				{
				var thePic = allImagesInPage[allDivsSpans[i].id + "_img"];

				if (displayStyle == "block")
					{
					allDivsSpans[i].style.display = "block";

					if (typeof(thePic) != "undefined" && null != thePic)
						{
						thePic.src = "/global/images/bluedrop.gif";
						thePic.alt = strHide;
						}
					}
				else
					{
					allDivsSpans[i].style.display = "none";

					if (typeof(thePic) != "undefined" && null != thePic)
						{
						thePic.src = "/global/images/blueup" + strIsRtl + ".gif";
						thePic.alt = strShow;
						}
					}
				}

			if (0 == allDivsSpans[i].id.indexOf("divInlineDef_")) 
				if (displayStyle == "block")
					allDivsSpans[i].style.display = "inline";
				else
					allDivsSpans[i].style.display = "none";
			}
}

function ToggleAllDivs()
{
	InitializeGlobalData();

	if (fExpandedAssistance)
		AlterAllDivs("none");
	else
		AlterAllDivs("block");

	fExpandedAssistance = !fExpandedAssistance;
}

function ToggleAll()
{
	InitializeGlobalData();
	ToggleAllDivs();
}

function InitializeGlobalData()
{
	if ('undefined' != typeof(strRtl))
		strIsRtl = strRtl;

	var divs = document.body.getElementsByTagName("DIV");
	var spans = document.body.getElementsByTagName("SPAN");

	var countDiv = 0;
	var countSpan = 0;
	if (typeof(divs) != "undefined" && null != divs)
		countDiv = divs.length;

	if (typeof(spans) != "undefined" && null != spans)
		countSpan = spans.length;

	allDivsInPage = new Array();
	for (i=0; i < countDiv; i++)
		if (typeof(divs[i].id) != "undefined" &&
			null != divs[i].id &&
			divs[i].id.length > 0)
			allDivsInPage[divs[i].id] = divs[i];

	for (i=0; i < countSpan; i++)
		if (typeof(spans[i].id) != "undefined" &&
			null != spans[i].id &&
			spans[i].id.length > 0)
			allDivsInPage[spans[i].id] = spans[i];

	allImagesInPage = document.body.getElementsByTagName("IMG");
}

function OnSeeAlsoClicked()
{
	InitializeGlobalData();

	if (null == allDivsInPage || typeof(allDivsInPage) == "undefined")
		return;

	if (typeof(allDivsInPage["divSeeAlsoShowBullet"]) != "undefined" &&
		typeof(allDivsInPage["divSeeAlsoHideBullet"]) != "undefined")
		{
		if (allDivsInPage["divSeeAlsoShowBullet"].style.display.toUpperCase() == "INLINE")
			{
			allDivsInPage["divSeeAlso"].style.display = "block";
			allDivsInPage["divSeeAlsoShowBullet"].style.display = "none";
			allDivsInPage["divSeeAlsoHideBullet"].style.display = "inline";
			}
		else
			{
			allDivsInPage["divSeeAlso"].style.display = "none";
			allDivsInPage["divSeeAlsoShowBullet"].style.display = "inline";
			allDivsInPage["divSeeAlsoHideBullet"].style.display = "none";
			}
		}
}

var QUIZ_COOKIE_NAME = "QUIZ_DATA";

function SetQuizCookie(strName, strValue)
{
	var strQuizCookie = GetCookie(QUIZ_COOKIE_NAME);
	if (null != strQuizCookie && 0 != strQuizCookie.length)
	{
		var iStart = strQuizCookie.indexOf(strName);
		if (iStart >= 0)
		{
			var iEnd = strQuizCookie.indexOf(" ", iStart + 1);
			var strEnd = (iEnd > 0 ? strQuizCookie.substr(iEnd) : "");
			var strCookie = (strValue == null ? "" : strName + ":" + strValue);
			strQuizCookie = strQuizCookie.substr(0, iStart) + strCookie + strEnd;
		}
		else if (strValue != null)
		{
			strQuizCookie += " " + strName + ":" + strValue;
		}
	}
	else
	{
		strQuizCookie = strName + ":" + strValue;
	}
	mSetCookie(QUIZ_COOKIE_NAME, strQuizCookie);
}

function GetQuizCookie(strName)
{
	var strQuizCookie = GetCookie(QUIZ_COOKIE_NAME);
	if (null != strQuizCookie && 0 != strQuizCookie.length)
	{
		var iStart = strQuizCookie.indexOf(strName);
		if (iStart >= 0)
		{
			iStart = strQuizCookie.indexOf(":", iStart + 1);
			if (iStart > 0)
			{
				iStart++;
				var	iEnd = strQuizCookie.indexOf(" ", iStart + 1);
				if (iEnd == -1)
				{
					return strQuizCookie.substr(iStart);
				}
				else
				{
					return strQuizCookie.substring(iStart, iEnd);
				}
			}
		}
	}
	return "";
}

function ShowElement(name)
{
	var objElement = GetPageElementQuiz(name);
	if (objElement != null)
		{
		objElement.style.display = 'inline';
		}
}

function GetPageElementQuiz(strElementID)
{
	if (document.all)
		{
		return document.all[strElementID];
		}
	else if (document.getElementById)
		{
		return document.getElementById(strElementID);
		}
	else if (document.layers)
		{
		return document.MainForm.elements[strElementID];
		}
	return null;
}

function fnMail()
{
	var re;
	re = /%Quiz_Score%/g;

	g_strMailToUrl = g_strMailToUrl.replace(re, g_iScore);

	var sUrl = location.href;
	var iEnd = sUrl.indexOf('?');
	if (iEnd > -1)
		{
		sUrl = sUrl.substr(0, iEnd);
		}

	re = /%Quiz_Url%%26/g;
	g_strMailToUrl = g_strMailToUrl.replace(re, sUrl + '?');

	location.href = g_strMailToUrl;
}

function fnMaintainAnswer(opt)
{
	var strID = opt.id;
	var iPos = strID.indexOf('_', 0);
	var iQuestion = parseInt(strID.substring(1, iPos));
	var strAnswer = strID.substring(iPos + 1);

	g_strUserAnswers = '0' + 
		g_strUserAnswers.substring(1, iQuestion) + 
		strAnswer + 
		(iQuestion == g_iTotalQuestions ? '' : g_strUserAnswers.substring(iQuestion + 1));

	SetQuizCookie(g_strQuizID, g_strUserAnswers);
}

function SubmitAnswers()
{
	g_strUserAnswers = '1' +
		g_strUserAnswers.substring(1, g_strUserAnswers.length);
	SetQuizCookie(g_strQuizID, g_strUserAnswers);
	document.location.href = g_strQuizID + '.aspx?ctt=6&submit=1';
	return true;
}

function PreloadAnswers()
{
	var strUserAnswer = '';

	for (var i = 1; i <= g_iTotalQuestions; i++)
		{

		strUserAnswer = g_strUserAnswers.charAt(i);

		if (strUserAnswer == '0')
			{
			ShowElement('q' + i + '_Unanswered');
			}
		else
			{

			if (strUserAnswer == g_strCorrectAnswers.charAt(i))
				{
				ShowElement('q' + i + '_Correct');
				}

			else
				{
				ShowElement('q' + i + '_Incorrect');
				ShowElement('q' + i + '_' + strUserAnswer);
				}
			}
		}

	if (g_dAvgScore > 0.0)
		{
		ShowElement('quizMetrics');
		}
}

function PreloadQuestions()
{
	var strUserAnswer;
	var obj;

	g_strUserAnswers = GetQuizCookie(g_strQuizID);

	for (var i = 1; i <= g_iTotalQuestions; i++)
		{
		strUserAnswer = g_strUserAnswers.substring(i, i + 1);
		if (strUserAnswer != "0")
			{
			obj = GetPageElementQuiz('q' + i + '_' + strUserAnswer);
			if (obj != null)
				{
				obj.checked = true;
				}
			}
		}
}

function SetAWSPanels(strSetDivFeedbackDropDownWeb, strSetDivComment, strSetDivNewContent, strSetDivFeedbackAsset)
{
	{ allDivs["divFeedbackDropDownWeb"].style.display = strSetDivFeedbackDropDownWeb; }
	{ allDivs["divComment"].style.display = strSetDivComment; }
	{ allDivs["divNewContent"].style.display = strSetDivNewContent; }
	{ allDivs["divFeedbackAsset"].style.display = strSetDivFeedbackAsset; }
	{ allDivs["divThirdImage"].style.display = strSetDivFeedbackAsset; }
}

function SetExtraAWSPanels(strSetDivClipArtComplaint, strSetDivNewContentCategory, strSetDivNewContentProduct) 
{
	{ allDivs["divClipArtComplaint"].style.display = strSetDivClipArtComplaint; }
	{ allDivs["divNewContentCategoryPanel"].style.display = strSetDivNewContentCategory; }
	{ allDivs["divNewContentProductPanel"].style.display = strSetDivNewContentProduct; }
}

function SetBottomPanels(strSetDivDisclaimerPanel, strSetDivButtonPanel)
{
	{ allDivs["divDisclaimerPanel"].style.display = strSetDivDisclaimerPanel; }
	{ allDivs["divButtonPanel"].style.display = strSetDivButtonPanel; }
}

function SetPageMode(mode)
{
	{ allDivs["divDownloadsProblem"].style.display = "none"; };
	{ allDivs["divDownloadsProblemEmail"].style.display = "none"; };

	switch (mode)
		{
		case iAWSCompliment:
			SetAWSPanels("block", "block", "none", "none"); 
			SetExtraAWSPanels("none", "none", "none");
			SetBottomPanels("block", "block"); 
		break;

		case iAWSComplaint:
			SetAWSPanels("block", "block", "none", "none"); 
			SetExtraAWSPanels("none", "none", "none");
			SetBottomPanels("block", "block"); 
			if (iWebOfficeUpdate == allSelects["m_ddlFeedbackRegardingWeb"].selectedIndex)
				{
				{ allDivs["divDownloadsProblem"].style.display = "block"; };
				{ allDivs["divDownloadsProblemEmail"].style.display = "block"; };
				}
		break;

		case iAWSComplaint_Clipart:
			SetAWSPanels("block", "block", "none", "none"); 
			SetExtraAWSPanels("block", "none", "none"); 
			SetBottomPanels("block", "block"); 
		break;

		case iAWSSuggestion:
			SetAWSPanels("block", "none", "block", "none"); 
			SetExtraAWSPanels("none", "none", "none");
			SetBottomPanels("block", "block"); 
		break;

		case iAWSSuggestion_Cat:
			SetAWSPanels("block", "none", "block", "none"); 
			SetExtraAWSPanels("none", "block", "none"); 
			SetBottomPanels("block", "block"); 
		break;

		case iAWSSuggestion_Prod:
			SetAWSPanels("block", "none", "block", "none"); 
			SetExtraAWSPanels("none", "none", "block"); 
			SetBottomPanels("block", "block"); 
		break;

		case iAWSAsset:
			SetAWSPanels("block", "none", "none", "block"); 
			SetExtraAWSPanels("none", "none", "none");
			SetBottomPanels("block", "block"); 
			SetStepGraphics(2);
			{ allDivs["divSecondImage"].style.display = "none"; }
			{ allDivs["divThirdImage"].style.display = "block"; }
		break;

		case iAWSNo_Bottom:
			SetAWSPanels("block", "none", "none", "none"); 
			SetExtraAWSPanels("none", "none", "none");
			SetBottomPanels("none", "none");
		break;
		};
}

function SetStepGraphics(step)
{
	var active = "";
	var inactive = "";
	if (!fIsRTL) 
		{
		active = "/assistance/images/icon_right_arrow_active.gif";
		inactive = "/assistance/images/icon_right_arrow_inactive.gif";
		}
	else
		{
		active = "/assistance/images/icon_left_arrow_active.gif";
		inactive = "/assistance/images/icon_left_arrow_inactive.gif";
		}

	switch (step) 
		{
		case 1:
			allImages["imgFirstPanel"].src = active; allImages["imgFirstPanel"].alt = strAltTextCurrent;
			allImages["imgSecondPanel"].src = inactive; allImages["imgSecondPanel"].alt = strAltTextCompleted;
			allImages["imgThirdPanel"].src = inactive; allImages["imgThirdPanel"].alt = strAltTextCompleted;

			{ allDivs["divSecondImage"].style.display = "none"; }
			{ allDivs["divThirdImage"].style.display = "none"; }
		break;

		case 2:
			allImages["imgFirstPanel"].src = inactive; allImages["imgFirstPanel"].alt = strAltTextCompleted;
			allImages["imgSecondPanel"].src = active; allImages["imgSecondPanel"].alt = strAltTextCurrent;
			allImages["imgThirdPanel"].src = active; allImages["imgThirdPanel"].alt = strAltTextCurrent;

			{ allDivs["divSecondImage"].style.display = "block"; }
			{ allDivs["divThirdImage"].style.display = "none"; }
		break;

		case 3:
			allImages["imgFirstPanel"].src = inactive; allImages["imgFirstPanel"].alt = strAltTextCompleted;
			allImages["imgSecondPanel"].src = inactive; allImages["imgSecondPanel"].alt = strAltTextCompleted;
			allImages["imgThirdPanel"].src = active; allImages["imgThirdPanel"].alt = strAltTextCurrent;

			{ allDivs["divSecondImage"].style.display = "block"; }
			{ allDivs["divThirdImage"].style.display = "block"; }
		break;
		};
}

function Complete_Page() 
{
	{ allDivs["divSuggestNewContent_EntireWebSite"].style.display = "none"; };
	{ allDivs["divSuggestNewContent_Assistance"].style.display = "none"; };
	{ allDivs["divSuggestNewContent_Training"].style.display = "none"; };
	{ allDivs["divSuggestNewContent_TemplateGallery"].style.display = "none"; };
	{ allDivs["divSuggestNewContent_Clipart"].style.display = "none"; };
	{ allDivs["divSuggestNewContent_PartnerMarketplace"].style.display = "none"; };
	{ allDivs["divSuggestNewContent_OfficeUpdate"].style.display = "none"; };

	{ allDivs["divSuggestNewContent_a_EntireWebSite"].style.display = "none"; };
	{ allDivs["divSuggestNewContent_a_Assistance"].style.display = "none"; };
	{ allDivs["divSuggestNewContent_a_Training"].style.display = "none"; };
	{ allDivs["divSuggestNewContent_a_TemplateGallery"].style.display = "none"; };
	{ allDivs["divSuggestNewContent_a_Clipart"].style.display = "none"; };
	{ allDivs["divSuggestNewContent_a_PartnerMarketplace"].style.display = "none"; };
	{ allDivs["divSuggestNewContent_a_OfficeUpdate"].style.display = "none"; };

	{ allDivs["divSuggestNewContent_b_EntireWebSite"].style.display = "none"; };
	{ allDivs["divSuggestNewContent_b_Assistance"].style.display = "none"; };
	{ allDivs["divSuggestNewContent_b_Training"].style.display = "none"; };
	{ allDivs["divSuggestNewContent_b_TemplateGallery"].style.display = "none"; };
	{ allDivs["divSuggestNewContent_b_Clipart"].style.display = "none"; };
	{ allDivs["divSuggestNewContent_b_PartnerMarketplace"].style.display = "none"; };
	{ allDivs["divSuggestNewContent_b_OfficeUpdate"].style.display = "none"; };

	{ allDivs["divProvideComments_Compliment"].style.display = "none"; };
	{ allDivs["divProvideComments_Complaint"].style.display = "none"; };

	var fIsAsset = false;

	if (iWebAsset == allSelects["m_ddlFeedbackRegardingWeb"].selectedIndex)
		{
		fIsAsset = true;
		}

	if (0 == iFeedbackType)
		{

		SetPageMode(iAWSCompliment);
		SetStepGraphics(2);
		{ allDivs["divProvideComments_Compliment"].style.display = "block"; };
		}
	else if (1 == iFeedbackType)
		{

		if (allSelects["m_ddlFeedbackRegardingWeb"].selectedIndex == iWebClipart)
			SetPageMode(iAWSComplaint_Clipart);
		else
			SetPageMode(iAWSComplaint);

		SetStepGraphics(2);
		{ allDivs["divProvideComments_Complaint"].style.display = "block"; };
		}
	else if (2 == iFeedbackType)
		{

		switch (allSelects["m_ddlFeedbackRegardingWeb"].selectedIndex) 
			{
			case iWebEntire_Web_Site:
				SetPageMode(iAWSSuggestion);
				{ allDivs["divSuggestNewContent_EntireWebSite"].style.display = "block"; };
				{ allDivs["divSuggestNewContent_a_EntireWebSite"].style.display = "block"; };
				{ allDivs["divSuggestNewContent_b_EntireWebSite"].style.display = "block"; };
			break;

			case iWebAssistance:
				SetPageMode(iAWSSuggestion);
				{ allDivs["divSuggestNewContent_Assistance"].style.display = "block"; };
				{ allDivs["divSuggestNewContent_a_Assistance"].style.display = "block"; };
				{ allDivs["divSuggestNewContent_b_Assistance"].style.display = "block"; };
			break;

			case iWebTraining: 
				SetPageMode(iAWSSuggestion_Prod);
				{ allDivs["divSuggestNewContent_Training"].style.display = "block"; };
				{ allDivs["divSuggestNewContent_a_Training"].style.display = "block"; };
				{ allDivs["divSuggestNewContent_b_Training"].style.display = "block"; };
			break;

			case iWebTemplateGallery: 
				SetPageMode(iAWSSuggestion_Cat);
				{ allDivs["divSuggestNewContent_TemplateGallery"].style.display = "block"; };
				{ allDivs["divSuggestNewContent_a_TemplateGallery"].style.display = "block"; };
				{ allDivs["divSuggestNewContent_b_TemplateGallery"].style.display = "block"; };
			break;

			case iWebClipart:
				SetPageMode(iAWSSuggestion);
				{ allDivs["divSuggestNewContent_Clipart"].style.display = "block"; };
				{ allDivs["divSuggestNewContent_a_Clipart"].style.display = "block"; };
				{ allDivs["divSuggestNewContent_b_Clipart"].style.display = "block"; };
			break;

			case iWebMarketplace:
				SetPageMode(iAWSSuggestion);
				{ allDivs["divSuggestNewContent_PartnerMarketplace"].style.display = "block"; };
				{ allDivs["divSuggestNewContent_a_PartnerMarketplace"].style.display = "block"; };
				{ allDivs["divSuggestNewContent_b_PartnerMarketplace"].style.display = "block"; };
			break

			case iWebOfficeUpdate:
				SetPageMode(iAWSSuggestion);
				{ allDivs["divSuggestNewContent_OfficeUpdate"].style.display = "block"; };
				{ allDivs["divSuggestNewContent_a_OfficeUpdate"].style.display = "block"; };
				{ allDivs["divSuggestNewContent_b_OfficeUpdate"].style.display = "block"; };
			break;

			default: 
				SetPageMode(iAWSAsset);
			};

		SetStepGraphics(2);
		if (fIsAsset)
			{
			{ allDivs["divSecondImage"].style.display = "none"; }
			{ allDivs["divThirdImage"].style.display = "block"; }
			}
		}
	else
		{

		SetPageMode(iAWSNo_Bottom);
		SetStepGraphics(2);
		}
}

function StrTrim(str)
{
	if (typeof(str) == "undefined" || null == str)
		return null;

	while (str.length > 0 && str.charCodeAt(0) <= 32)
		str = str.substring(1);

	while (str.length > 0 && str.charCodeAt(str.length-1) <= 32)
		str = str.substring(0, str.length-1);

	return str;
}

function FIsCommentValid(str, err, limit, auxError)
{
	if (typeof(str) == "undefined" || null == str)
		{
		alert(err);
		return false;
		}

	str = StrTrim(str);

	if (str.length <= 0)
		{
		alert(err);
		return false;
		}

	if (limit > 0 && str.length > limit)
		{
		if (auxError.length > 0)
			alert(auxError);

		return false;
		}

	return true;
}

function FIsEmailAddressValid(strEmail)
{
	if (typeof(strEmail) == "undefined")
		return true;

	if (null == strEmail)
		return true;

	if (0 == strEmail.length)
		return true;

	for (var i=0; i < strEmail.length; i++)
		{
		if (strEmail.charCodeAt(i) > 127 )
			return false;
		}

	return true;
}

function AttemptSubmit()
{
	{ allDivs["divDownloadsInvalidEmailAddress"].style.display = "none"; };

	if ((allDivs["divFeedbackAsset"].style.display == "block"))
		if (!FIsCommentValid(allTextAreas["m_txbAssetBox"].value, strErrorDescription, 1000, ""))
			return;

	if ((allDivs["divComment"].style.display == "block"))
		if (!FIsCommentValid(allTextAreas["m_txbCommentBox"].value, strErrorDescription, 850, ""))
			return;

	if ((allDivs["divNewContent"].style.display == "block"))
		{
		if (!FIsCommentValid(allTextAreas["m_txbNewContentDescribe"].value, strErrorDescription, 850, ""))
			return;
		}

	var fInvalidInput = false;

	if ((allDivs["divDownloadsProblemEmail"].style.display == "block"))
		{
		if (!FIsEmailAddressValid(allInputs["m_txbDownloadsEmail"].value))
			{
			{ allDivs["divDownloadsInvalidEmailAddress"].style.display = "block"; };
			fInvalidInput = true;
			}
		}

	if (fInvalidInput)
		return;

	document.forms["Form1"].submit();
}

function StrReplace(strSource, strWhat, strNew)
{
	if (typeof(strSource) == 'undefined' ||
		typeof(strWhat) == 'undefined' ||
		typeof(strNew) == 'undefined' ||
		null == strSource ||
		null == strSource ||
		null == strSource)
		{
		return strSource;
		}

	var iPos = strSource.indexOf(strWhat);
	if (iPos < 0)
		return strSource;

	return strSource.substring(0, iPos) + strNew + strSource.substring(iPos+strWhat.length);
}

function goDisplayCount(max_len, box, label)
{
	var sDescr;
	if (fIsIE)
		sDescr = document.all.item(box).value;
	else
		sDescr = document.getElementById(box).value;

	var nLen = max_len - parseInt(sDescr.length);

	if (nLen >= 0) 
		{
		allSpans[label].innerHTML = strGoDisplayCountOK + '<B>' + (nLen) + '</B>';
		}
	else 
		{
		var strError = strGoDisplayCountOver;
		strError = StrReplace(strError, '{0}',  '' + (max_len-nLen));
		strError = StrReplace(strError, '{1}',  '' + max_len);
		allSpans[label].innerHTML = '<B><FONT COLOR="#FF0000">' + strError + '</FONT></B>';
		}
}

function FeedbackRegardingAppsValid(s,e)
{
	var sDescr = allSelects["m_ddlFeedbackRegardingApps"].value;
	if (sDescr == "-1")
		{
		e.IsValid = false;
		}
	else
		{
		e.IsValid = true;
		}
}

function SetClipArtClientURLCookie()
{
	if (FIsMac() || null != SzGetArgumentValue("CAG"))
		mSetCookie("AWS_ClientURL_Sess", "CIL");

	return;
}

function ClipartPreviewCreateWMPControl()
{
	try
		{
		WMP7Obj = new ActiveXObject("WMPlayer.OCX.7");
		}
	catch(e)
		{

		}

	try
		{
		if (typeof(WMP7Obj) == "object") 
			{
			document.write('<OBJECT ID="MediaPlayer7" WIDTH="175" HEIGHT="175" CLASSID="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6">');
			document.write('<PARAM name="url" VALUE="' + sMediaURL + '">');
			document.write('<PARAM NAME="enablecontextmenu" VALUE="false">');
			document.write('<PARAM NAME="uimode" VALUE="mini">');
			document.write('<PARAM NAME="autostart" VALUE="true">');
			document.write('</OBJECT>');
			}
		else  
			{
			document.write('<OBJECT ID="MediaPlayer6" WIDTH="200" HEIGHT="200" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95">');
			document.write('<PARAM name="filename" VALUE="' + sMediaURL + '">');
			document.write('<PARAM NAME="animationatstart" VALUE="true">');
			document.write('<PARAM NAME="autorewind" VALUE="true">');
			document.write('<PARAM NAME="autostart" VALUE="true">');
			document.write('<PARAM NAME="showaudiocontrols" VALUE="true">');
			document.write('<PARAM NAME="showpositioncontrols" VALUE="false">');
			document.write('<PARAM NAME="showstatusbar" VALUE="false">');
			document.write('<EMBED TYPE="application/x-mplayer2"');
			document.write('	PLUGINSPAGE = "http://www.microsoft.com/Windows/MediaPlayer/"');
			document.write('	SRC="' + sMediaURL + '"');
			document.write('	NAME="MediaPlayer1"');
			document.write('	WIDTH="200"');
			document.write('	HEIGHT="200"');
			document.write('	ANIMATIONATSTART="true"');
			document.write('	AUTOREWIND="true"');
			document.write('	AUTOSTART="true"');
			document.write('	SHOWAUDIOCONTROLS="true"');
			document.write('	SHOWPOSITIONCONTROLS="false"');
			document.write('	SHOWSTATUSBAR="true">');
			document.write('</EMBED>');
			document.write('</OBJECT>');
			}
		}
	catch(e)
		{

		}
}

function FIsMac()
{
	if (typeof(window.navigator.platform) != 'undefined')
		return (-1 != window.navigator.platform.toUpperCase().indexOf("MAC"));
	else
		return (-1 != navigator.userAgent.toUpperCase().indexOf("MAC"));
}

function SetReturnParameterValue(strReturn)
{
	strAxInstallReturnParameter = escape(strReturn);
}

function FIsSupportedWindows()
{
	return ("Win32" == navigator.platform &&
		-1 == navigator.userAgent.indexOf("Windows 95") &&
		-1 == navigator.userAgent.indexOf("Windows 98") &&
		-1 == navigator.userAgent.indexOf("Windows ME") &&
		-1 == navigator.userAgent.indexOf("Windows NT 4") &&
		-1 == navigator.userAgent.indexOf("Windows CE"));
}

function FIsCorrectVersion()
{
	var rgstrVersion;
	var iVerMajor;
	var iVerMinor;
	var iVerBuild;
	var iVerRev;

	strVersion = GetCookie("AWS_ActivexVersion_Perm");
	if ("" == strVersion || "0" == strVersion)
		return false;

	rgstrVersion = strVersion.split(".");

	iVerMajor = Number(rgstrVersion[0]);
	iVerMinor = Number(rgstrVersion[1]);
	iVerBuild = Number(rgstrVersion[2]);
	iVerRev = Number(rgstrVersion[3]);

	if (iVerMajor > 11)
		return true;

	if (iVerMajor < 11)
		return false;

	if (iVerMinor > 0)
		return true;

	if (iVerMinor < 0)
		return false;

	if (iVerBuild > 6006)
		return true;

	if (iVerBuild < 6006)
		return false;

	if (iVerRev < 0)
		return false;

	return true;
}

function SetActiveXInstallStatus()
{

	if (!fSupportsActiveX || fDisableActivex)
		return;

	var fIsCorectVersion = FIsCorrectVersion();

	if (fIsCorectVersion)
		{

		document.write('<SPAN style="display:none"><OBJECT CLASSID="clsid:02BCC737-B171-4746-94C9-0D8A0B2C0089" ID="DCTRL" WIDTH="0" HEIGHT="0"></OBJECT></SPAN>');
		fIsActiveXInstalled = (typeof(DCTRL) != "undefined" &&	typeof(DCTRL.Version) != "undefined");

		if (!fIsActiveXInstalled)
			SetPersistentCookie("AWS_ActivexVersion_Perm", 0);
		}
}

function FShouldPromptForAx()
{
	return !(FIsVariableInCookie("AWS_DontPrompt_Sess") ||
		FIsVariableInCookie("AWS_DontPrompt_Perm") ||
		fDisableActivex);
}

function FIsDCTRLInstalled()
{
	return fIsActiveXInstalled;
}

function InstallActiveX(fIgnoreCookie, wnd, fUseWndUrl)
{
	var strAxInstallStyle = "";
	if ("undefined" != typeof(strActiveXInstallStyle))
		strAxInstallStyle = strActiveXInstallStyle;

	if ("undefined" == typeof(fIgnoreCookie) || null == fIgnoreCookie)
		fIgnoreCookie = false;

	if ("undefined" == typeof(wnd) || null == wnd)
		wnd = window;

	if ("undefined" == typeof(fUseWndUrl) || null == fUseWndUrl)
		fUseWndUrl = false;

	if (!fIsActiveXInstalled &&
		!fInstallingActiveX &&
		fSupportsActiveX &&
		(fIgnoreCookie || FShouldPromptForAx()))
		{

		fInstallingActiveX = true;

		var strNewUrl = strAxInstall;
		strNewUrl = strNewUrl.replace("{0}", strAxInstallStyle);
		strNewUrl = strNewUrl.replace("{2}", strAxInstallReturnParameter);

		if (fUseWndUrl)
			strNewUrl = strNewUrl.replace("{1}", escape(wnd.location.pathname.slice(1) + wnd.location.search));

		else
			strNewUrl = strNewUrl.replace("{1}", escape(document.location.pathname.slice(1) + document.location.search));

		wnd.location.href = strNewUrl;

		return false;
		}

	return fIsActiveXInstalled;
}

function StrRemoveParameterFromUrl(strUrl, strParam)
{
	var strUpperUrl = strUrl.toUpperCase();
	var strUpperParam = strParam.toUpperCase();

	var iStart = strUpperUrl.indexOf("?" + strUpperParam);
	if (iStart < 0)
		iStart = strUpperUrl.indexOf("&" + strUpperParam);

	if (iStart < 0)
		return strUrl;

	var iEnd = strUpperUrl.indexOf("&", iStart+1);

	if (iEnd < 0)
		iStart--;

	var strRet = strUrl.substring(0, iStart+1);

	if (iEnd >= 0)
		strRet += strUrl.substring(iEnd+1, strUrl.length);

	return strRet;
}

function SetDontPrompt()
{
	if (chkDontPrompt.checked)
		{
		SetPersistentCookie("AWS_DontPrompt_Perm", "1");
		}
	else
		{
		mDeleteCookie("AWS_DontPrompt_Perm");
		}
}

function FIsActiveXInstalled()
{
	return (typeof(DCTRL) != "undefined" &&
		typeof(DCTRL.Version) != "undefined")
}

function ReturnToCaller()
{
	var strReturn;
	strParameter = unescape(strQueryStringParameter);

	if (0 == strParameter.length)
		strParameter = "1";

	mSetCookie("AWS_DontPrompt_Sess", 1);

	if (FIsActiveXInstalled())
		mDeleteCookie("AWS_DontPrompt_Perm");

	strReturn = strQueryStringReturn;

	if (0 == strReturn.length)
		location.replace(".");
	else if ("{1}" == strReturn)
		history.back();
	else
		{
		var regExp = /&amp;/g;
		strReturn = strReturn.replace(regExp, "&");
		strReturn = StrRemoveParameterFromUrl(strReturn, "AxInstalled");
		strReturn += (-1 == strReturn.indexOf("?")) ? "?" : "&";
		strReturn += "AxInstalled=" + unescape(strParameter);
		location.replace("http://" + location.hostname + "/" + strReturn);
		}
}

function SetInstallStatus()
{
	document.getElementById("divStatus").style.display = "none";
	if (FIsActiveXInstalled())
		document.getElementById("divSuccess").style.display = "inline";
	else
		{
		document.getElementById("divFailure").style.display = "inline";
		document.getElementById("opnlRetry").style.visibility = "visible";
		document.getElementById("btnRetry").disabled = false;
		}
}

function SafePrintWindow()
{
	try
		{
		window.print();
		}
	catch(e)
		{

		}
}

function TryChapter(e)
{
	var oCNFrm = document.frmChapterNav;
	if (!oCNFrm) return false;

	var oChapter = oCNFrm.ChapterNav;
	if (!oChapter) return false;

	var nIndex = oChapter.selectedIndex;
	var strUrl = oChapter[nIndex].value;
	if (typeof(strUrl) != "undefined" &&
		null != strUrl && strUrl.length > 0)
	{
		window.location.href = strUrl;
	}
}

