function CPaneHelp()
{
	function GetCtrlPref()
	{
		var iLst,uValue,iFlg=-1,fRtrn=null;
		function FindPref()
		{
			var chiCrmb,iTkn,iCrmb=0,szTkn="V7DPM=",cchTkn=szTkn.length,cchCrmb=document.cookie.length;
			while(iCrmb<cchCrmb)
			{
				chiCrmb=iCrmb+cchTkn;
				if(document.cookie.substring(iCrmb,chiCrmb)==szTkn)
				{
					iTkn=document.cookie.indexOf(";",chiCrmb);
					if(-1==iTkn){iTkn=document.cookie.length;}
					return unescape(document.cookie.substring(chiCrmb,iTkn));
				}
				iCrmb=document.cookie.indexOf(" ",iCrmb)+1;
				if(0==iCrmb){break;}
			}
			return null;
		}
		uValue=FindPref();
		if(null!=uValue){iFlg=uValue.indexOf("fUseActiveX=")}
		if(iFlg!=-1)
		{
			iFlg+=12;
			iLst=uValue.indexOf("&",iFlg)
			if(-1==iLst){iLst=uValue.length}
			fRtrn=uValue.substring(iFlg,iLst)
		}
		return (null==fRtrn)?false:Boolean(Number(fRtrn));
	}
	var rxHelp=new RegExp();
	var fActX=GetCtrlPref();
	this.Agent=navigator.userAgent.toLowerCase();
	var fIsMSIE,szHost=document.location.hostname,bMSIE=this.Agent.indexOf("msie"),szLcl="/"+"en_us";
	rxHelp = /(MSN)\x20[8-9]/i
	this.IsMSN8=rxHelp.test(this.Agent);
	rxHelp = /(MSN)\x20[^8-9]/i
	this.IsMSNE=rxHelp.test(this.Agent);
	rxHelp = /(MSIE)\x20[4-9].+(win)/i
	fIsMSIE=rxHelp.test(this.Agent);
	rxHelp = /^([A-Z]{2}\.){0,1}(news\.){0,1}(money|billpay){1}(central){0,1}(\.msn\.){1}[A-Z]{2,3}(\.[A-Z]{2,3}){0,1}$/i
	this.Server="http://help.";
	this.Server+=(rxHelp.test(szHost))?"msn.com":(this.IsMSN8)?"msn-int.com":"moonport.com/panehelp_test";
	this.Server+=szLcl;

	if(-1 == szHost.toLowerCase().indexOf("billpay"))
	{
		this.Frameset="http://"+szHost;
		this.IsBP = "0";
	}
	else
	{
		if(szHost != "billpay.msn.com")
		{
			this.Frameset="http://mcdevweb02.dns.microsoft.com";
			this.IsBP = "0";
		}
		else
		{
			document.domain="msn.com";
			this.Frameset="http://moneycentral.msn.com";
			this.IsBP = "1";
		}
	}
	this.Frameset+="/inc/phFrameset.asp"
	if(this.IsMSN8)
	{
		this.Config="money_msn8.ini";
		this.Filter=(fActX)?"MC_MSNE":"MC_DL";
	}
	else if(this.IsMSNE)
	{
		this.Config="mc_msnev5.ini";
		this.Filter=(fActX)?"MC_MSNE":"MC_DL";
	}
	else if(fIsMSIE)
	{
		this.Config="mc_ie4v5.ini";
		this.Filter=(fActX)?"MC_IE4":"MC_DL";
	}
	else
	{
		this.Config="mc_dlv5.ini";
		this.Filter="MC_DL";
	}

}
function DoHelp(szId,
	szTpc)
{
	var szApp=navigator.appName.toLowerCase();
	var fIsMac=(mCPH.Agent.indexOf("mac")!=-1);
	var fIsAOL=(mCPH.Agent.indexOf("aol")!=-1);
	var W,H,sWD,bIE4PC,szQry="?",bScrn=screen.width;
	if((0==phid && null==szId)||(null!=szTpc)){H_TOPIC=(null!=szTpc)?szTpc:"";}else{H_KEY=(null==szId)?phid:szId;bSearch=true;}
	szQry+="H_VER="+H_VER;
	if(H_BRAND!="")szQry+="&H_BRAND="+H_BRAND;
	if(H_FILTER!="")szQry+="&Filter="+H_FILTER;
	szQry+=(bSearch)?"&SEARCHTERM="+escape(H_KEY)+"&S_TEXT="+escape(L_H_TEXT):"&TOPIC="+H_TOPIC;
	if(typeof(v1)!="undefined"){szQry+='&v1='+escape(v1)}else{szQry+='&v1='+escape(document.location.protocol + "//" + document.location.hostname)}
	szQry+="&v2="+escape(document.location.search);
	if(typeof(H_CONFIG) != "undefined" && (self.name==null || self.name=="" || self.name=="msnMain")) self.name = H_CONFIG.substring(0,H_CONFIG.indexOf("."));
	szQry+="&tmt="+escape(window.name);
	W=(bScrn<=800 && !fIsMac)?180:230;
	H=(mCPH.Agent.indexOf("windows")>0 && fIsAOL)?screen.availHeight-window.screenTop-22:screen.availHeight
	if(mCPH.IsMSNE)
	{
		window.external.showHelpPane(H_URL_BASE+"/frameset.asp"+szQry+"&H_APP="+escape(L_H_APP)+"&INI="+H_CONFIG,W)
	}
	else if(mCPH.IsMSN8)
	{
		szQry=(0==H_TOPIC.length)?(0==H_KEY.length)?"MC_GENERICTOC.htm":H_KEY+".htm":H_TOPIC;
		H_CONFIG+="&tmt="+escape(window.name);
		window.external.showHelpPane3(szQry,null,0,L_H_APP,H_CONFIG,null,"msnmny.chm",null);
	}
	else if((mCPH.Agent.indexOf("webtv")>0)||(mCPH.Agent.indexOf("msn companion")>0))
	{
		top.location.replace(H_URL_BASE+"/frameset.asp"+szQry+"&H_APP="+escape(L_H_APP)+"&INI="+H_CONFIG)
	}
	else
	{
		sWD="toolbar=0,status=0,menubar=0,width="+W+",height="+H+",left="+(bScrn-W)+",top=0,resizable=1";
		bResize=false;
		bIE4PC=mCPH.Agent.indexOf("msie 4")>0 && !fIsAOL && !fIsMac;
		if(H_TARG=="")H_TARG=(bIE4PC)?"_help17":"_help";
		if(bIE4PC && (h_win!=null) && !h_win.closed){h_win.location.replace(H_BURL+szQry)}else{h_win=window.open(H_BURL+szQry+"&BP="+mCPH.IsBP,H_TARG,sWD)}
		if(h_win && !fIsMac && szApp.indexOf("netscape")<0 && h_win.opener!=self) h_win.opener=self
	}
}
function MCHelp(szId){DoHelp(szId,null)}
function MCHelpTopic(szTpc){DoHelp(null,szTpc)}

var mCPH=new CPaneHelp();
var h_win,verOffset,bResize=true,phid=0,bSearch=false,H_BURL=mCPH.Frameset,H_CONFIG=mCPH.Config,H_URL_BASE=mCPH.Server,H_FILTER=mCPH.Filter;
var H_TOPIC="",H_KEY="",H_BRAND="",H_TARG="",L_CONTACTUS_URL="",H_OTHER="",H_VER="1.7";
var L_H_TEXT="For help with this page, click a topic:",L_HCONTEXTACCOUNTS_TEXT="the accounts tab",L_H_APP="MSN Money";