function convertUIDToPDID(idInt,uid)
{
	if( idInt == "") idInt = 0;
	if(idInt==0) 	{
		idInt = uid + 100000000000;
		var id = "Z" + idInt;	
		if (uid > 18100000) {id = "B" + idInt}
        	return id;
	}
	return idInt;
}
function doSubmit(form) {  form.submit()}
function locateHighlight(sName, iURL) {
	if (document.images) document.images[sName].src = iURL;
	return true;
}
function stopError() {return true;}
window.onerror = stopError;
function SetHomePage(sURL)
{
	var sPath = '/mmyhp';
	var sAffiliateID = '';
	var nPos = sPath.length;
	if (sPath.substring(nPos, nPos) == "/" || sPath.substring(nPos, nPos) == "\\")
	nPos = nPos-1;
	var sRun = sPath.substring(0, nPos) + "/mmyhpStart.htm" + "?" + sURL + "&" + sPath + "&" + sAffiliateID;
	window.open(sRun, 'mmyhpStart', 'alwaysRaised=yes,resizable=yes,scrollbars=yes,width=450,height=390,left=100,top=100,screenX=100,screenY=100');
}
function loadStocks(cobrandurl, financeurl, cobrandname, userid)
{
	return cobrandurl + "/s/context.dll?type=clickthru&id=1104&name=Nav+Stocks&redirecturl=" + financeurl + "/s/s.dll?spage=fc/stocksFrame.htm&cobrand=" + cobrandname + "&pdid=" + convertUserIDToPDID(userid);
}
function loadFullPortfolio(financeurl, cobrandname, userid)
{
	return financeurl+ "/s/s.dll?spage=fc/portfolioFrame.htm&cobrand=" + cobrandname + "&pdid=" + convertUserIDToPDID(userid);
}
function loadMarketNews(financeurl, cobrandname, userid)
{
	return financeurl + "/s/s.dll?spage=fc/marketnewsFrame.htm&cobrand=" + cobrandname + "&pdid=" + convertUserIDToPDID(userid);
}
var agt=navigator.userAgent.toLowerCase();
var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
            && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
            && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
function bannerAd(adnum, keyword, gloc, randomnum) 
	{
	site = adnum;
	site1 = (adnum*1) +1;
	random1 = "/bnum=" + randomnum + "/size=468060/tags=1";
	random2 = randomnum ;
	bust = keyword;
	if (typeof (g_gloc)=="undefined") g_gloc = 0;
	if (gloc==0) gloc = g_gloc;
	glocvar = "/dma_code=" + gloc;
	document.write('<SCR'); 
	document.write('IPT type="text/javascript" SRC="http://servedby.advertising.com/site='+ site + '/size=468060/bnum=' + random2 + glocvar +'? ">'); 
	document.write('</SCR'); 
	document.write('IPT>'); 

}
function skyAd(adnum2, keyword2, gloc2, randomnum2) 
{
	site2 = (adnum2*1) +1;
	random2 = (randomnum2*1) + 1 ;
	random1 = "/bnum=" + randomnum2 + "/size=120600/tags=1";
	bust = keyword2;
	if (typeof (g_gloc)=="undefined") g_gloc = 0;
	if (gloc2==0) gloc2 = g_gloc;
	glocvar2 = "/dma_code=" + gloc2;
	document.write('<SCR'); 
	document.write('IPT type="text/javascript" SRC="http://servedby.advertising.com/site='+ site2 + '/size=120600/bnum=' + random2 + glocvar2 +' ? ">'); 
	document.write('</SCR'); 
	document.write('IPT>'); 
	
}
function bannerAd3(adnum, keyword, gloc, randomnum) 
	{
	site = adnum;
	site1 = (adnum*1) +1;
	random1 = "/bnum=" + randomnum + "/size=468060/tags=1";
	random2 = randomnum ;
	bust = keyword;
	if (typeof (g_gloc)=="undefined") g_gloc = 0;
	if (gloc==0) gloc = g_gloc;
	glocvar = "/dma_code=" + gloc; 
	document.write('<SCR'); 
	document.write('IPT type="text/javascript" SRC="http://servedby.advertising.com/site='+ site + '/size=468060/bnum=' + random2 + glocvar +'? ">'); 
	document.write('</SCR'); 
	document.write('IPT>'); 
	
}

