//Google Analytics embed start

//var _gatc = document.createElement('script');
//_gatc.type = "text/javascript";
//_gatc.src = ((location.protocol=="https:")?"https://ssl.":"http://www.")+"google-analytics.com/ga.js";
//document.getElementsByTagName('head')[0].appendChild(_gatc);

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

if (typeof(_gat) == "object") {
	var pageTracker = _gat._getTracker("UA-4311385-1"); 
	pageTracker._initData(); 
	pageTracker._trackPageview();        
}


function startTracking() {
	if (typeof(_gat) == "object") {
		var pageTracker = _gat._getTracker("UA-4311385-1"); 
		pageTracker._initData(); 
		pageTracker._trackPageview();        
	}
}

try{
if (window.addEventListener) {
	window.addEventListener("load",startTracking,false);
} 
else if (window.attachEvent) {
	window.attachEvent("onload",startTracking);
}
}catch(e){ alert("Exception: "+e)}
//Google Analytics embed end



//Google Analytics Tracker
//var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." :"http://www.");
//document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

function MenuBuild(section,displayText,linkUrl)
{
	this.section = section;
	this.displayText = displayText;
	this.linkUrl = linkUrl;
}

var mainMenu = new Array(7);
var subMenu = new Array();

mainMenu[0] = new MenuBuild("Home","Home","/eqtm.html");
mainMenu[1] = new MenuBuild("Markets","Today\'s&nbsp;Market","/tm");
mainMenu[2] = new MenuBuild("Premium","Premium&nbsp;Services","/ptmail");
mainMenu[3] = new MenuBuild("Researchit","Research&nbsp;it","/research-it/");
mainMenu[4] = new MenuBuild("Outlook","Outlook&nbsp;Arena","/outlook/index.asp");
mainMenu[5] = new MenuBuild("Portfolio","Portfolio&nbsp;Tracker","/portfolio/index.asp");
mainMenu[6] = new MenuBuild("Help","Help","/help/sitemap.html");


function menuBuild1(section,displayText,linkUrl)
{
	this.section = section;
	this.displayText = displayText;
	this.linkUrl = linkUrl;
}


subMenu[0] = new menuBuild1("Home","LARGE CAP RESEARCH","/qv")
subMenu[1] = new menuBuild1("Home","MID CAP RESEARCH","/mc")
subMenu[2] = new menuBuild1("Home","SMALL CAP RESEARCH","/htr")
subMenu[3] = new menuBuild1("Home","RESEARCH REPORTS","/research-it/rr")
subMenu[4] = new menuBuild1("Home","VALUEPRO","/ValuePro")
subMenu[5] = new menuBuild1("Home","IPOs","/research-it/ipo")
subMenu[6] = new menuBuild1("Home","<img src='/blips/strans.gif' border=0 align=absmiddle> FEATURES","/subsearch.asp")
subMenu[7] = new menuBuild1("Markets","ADRs","/stockquotes/adr.asp")
subMenu[8] = new menuBuild1("Markets","BSE REPLICA","/india-markets/bse-replica.asp")
subMenu[9] = new menuBuild1("Markets","NSE REPLICA","/india-markets/nse-replica.asp")
subMenu[10] = new menuBuild1("Markets","FII INFO","/india-markets/fiis/index.asp")
subMenu[11] = new menuBuild1("Markets","BUY BACKS / OPEN OFFERS","/stockquotes/mkt-stats/openoffer.asp")
subMenu[12] = new menuBuild1("Markets","MARKET STATS","/stockquotes/mkt-stats/")
subMenu[13] = new menuBuild1("Markets","INDICES","/stockquotes/indices/")
subMenu[14] = new menuBuild1("Researchit","COMPANY INFO","/research-it/")
subMenu[15] = new menuBuild1("Researchit","COMPARE COMPANY","/research-it/compare")
subMenu[16] = new menuBuild1("Researchit","SECTOR INFO","/research-it/sector-info/")
subMenu[17] = new menuBuild1("Researchit","ECONOMY","/research-it/india-economy/")
subMenu[18] = new menuBuild1("Portfolio","REGISTER","/portfolio/register.html")
subMenu[19] = new menuBuild1("Portfolio","DEMO","/portfolio/sample.html")
subMenu[20] = new menuBuild1("Portfolio","PORTFOLIO","/portfolio/index.asp")
//subMenu[21] = new menuBuild1("Portfolio","WATCHLIST","http://www.personalfn.com/research-it/mutual-funds/watchlist/")
subMenu[21] = new menuBuild1("Portfolio","HELP","/portfolio/startup.html")
subMenu[22] = new menuBuild1("Portfolio","TERMS OF USE","/portfolio/legal.html")
subMenu[23] = new menuBuild1("Outlook","VIEWS ON NEWS","/outlook/weekly.asp")
subMenu[24] = new menuBuild1("Outlook","SPECIAL REPORT","/outlook/Archives.ASP?h_Type=7&start=1")
subMenu[25] = new menuBuild1("Outlook","FACE TO FACE","/outlook/Archives.ASP?h_Type=8&start=1")
subMenu[26] = new menuBuild1("Outlook","THE HONEST TRUTH","/ht")
subMenu[27] = new menuBuild1("Outlook","STRAIGHT FROM THE HIP","/sfth")
subMenu[28] = new menuBuild1("Outlook","THE 5 MINUTE WRAPUP","/5MinWrapUp") 
subMenu[29] = new menuBuild1("Help","SITEMAP","/help/sitemap.html")
subMenu[30] = new menuBuild1("Help","HOW TO REACH US","/help/writetous.html")
subMenu[31] = new menuBuild1("Help","LEGAL","/help/legal.html")
subMenu[32] = new menuBuild1("Help","ABOUT US","/help/aboutus.html")

function displayMainMenuOld(sectionName)
{


	var sectionCell = ""
	mainMenuData = "<STYLE><!--"
	mainMenuData += "A.em {color:#000000;text-decoration:none;}"
	mainMenuData += "A.em:active {color:#000000;}"
	mainMenuData += "A.em:visited {color:#000000;}"
	mainMenuData += "A.em:hover {color:#FF0000;}"
	mainMenuData += "A.em:visited:hover {color:#FF0000;}"
	mainMenuData += "--></STYLE>"
	document.write(mainMenuData)

	mainMenuData = "<STYLE><!--"
	mainMenuData += "A.em1 {color:#FF0000}"
	mainMenuData += "A.em1:active {color:#FF0000;}"
	mainMenuData += "A.em1:visited {color:#FF0000;}"
	mainMenuData += "A.em1:hover {color:#FF0000;}"
	mainMenuData += "A.em1:visited:hover {color:#FF0000;}"
	mainMenuData += "--></STYLE>"
	document.write(mainMenuData)

	mainMenuData = "<STYLE><!--"
	mainMenuData += "A.em2 {color:#FFFFFF;text-decoration:none;}"
	mainMenuData += "A.em2:active {color:#FFFFFF;}"
	mainMenuData += "A.em2:visited {color:#FFFFFF;}"
	mainMenuData += "A.em2:hover {color:#FFFFFF;}"
	mainMenuData += "A.em2:visited:hover {color:#FFFFFF;}"
	mainMenuData += "--></STYLE>"
	document.write(mainMenuData)

	document.write("<table cellpadding=1 cellspacing=0 height=22 align=center bgcolor=#2F4571 width=100%><tr align=center>")
	if(sectionName == "Portfolio")
	{
		document.write('<form method=post action="/feedback.asp" name="fb"><input type="hidden" name="htitle" value="Portfolio Tracker"><input type="hidden" name="hsector" value="Portfolio Tracker"></form>')
	}
	for(i=0; i < mainMenu.length; i++)
	{
		if(mainMenu[i].section == sectionName)
		{
			bgcolor = "#eeeeee"
			fontcolor = "red"
			classfile = "em1"
		}
		/*
		else if(mainMenu[i].section == "Budget")
		{
			bgcolor = "#4a7dca"
			fontcolor= "white"
			classfile = "em2"
		}
		*/
		else if(mainMenu[i].section == "Premium")
		{
			bgcolor = "#2F4571"
			fontcolor= "white"
			classfile = "em2"
		}
		else
		{
			bgcolor = "#2F4571"
			fontcolor= "white"
			classfile = "em2"
		}

		document.write("<td bgcolor='"+bgcolor+"'><b>&nbsp;&nbsp;<a href='"+mainMenu[i].linkUrl+"' class='"+classfile+"'><font face=arial size=2 color="+fontcolor+">"+mainMenu[i].displayText+"</font></a>&nbsp;&nbsp;</td><td bgcolor='#FFFFFF'></td>")
	}
	document.write("<td bgcolor='#2F4571' width=100%><font face=arial size=2 color=white></td></tr></table>")
}

function dispMainMenu(sectionName)
{
    objXmlHttpMenu = null;
    objXmlHttpMenu = GetXmlHttpObj(null);
    objXmlHttpMenu.open("GET", "/newmenu.asp", false);
    objXmlHttpMenu.send(null);
    var sText = objXmlHttpMenu.responseText;
    if(sText.replace(" ","")=="")
    {
        displayNewMainMenu(sectionName, "", "", "", "", "")
    }
    else
    {
        var sTextArr = sText.split('~');
        displayNewMainMenu(sectionName, sTextArr[0], sTextArr[1], sTextArr[2], sTextArr[3], sTextArr[4])
    }
}

///initailises the Xml Http object as per the user's browser
function GetXmlHttpObj(handler)
{
	var objXHttp=null;

	/*if (navigator.userAgent.indexOf("Opera")>=0)
	{
	    alert("This example doesn't work in Opera");
	    return;
	}*/
	
	if (navigator.userAgent.indexOf("MSIE")>=0 || navigator.userAgent.indexOf("Opera")>=0)
	{
	    if (window.XMLHttpRequest)
        {
            // code for all new browsers
            objXHttp=new XMLHttpRequest();
            if(handler!=null)
                objXHttp.onreadystatechange=handler;
            return objXHttp;
        }
        else if (window.ActiveXObject)
        {
            // code for IE5 and IE6
            objXHttp=new ActiveXObject("Microsoft.XMLHTTP");
            if(handler!=null)
                objXHttp.onreadystatechange=handler;
            return objXHttp;
        }

        if(objXHttp==null)
        {
	        var strName="Msxml2.XMLHTTP";
	        if (navigator.appVersion.indexOf("MSIE 5.5")>=0)
	        {
	            strName="Microsoft.XMLHTTP";
	        }
	        try
	        {
	            objXHttp=new ActiveXObject(strName);
	            if(handler!=null)
                    objXHttp.onreadystatechange=handler;
	            return objXHttp;
	        }
	        catch(e)
	        {
	            alert("Error. Scripting for ActiveX might be disabled");
	            return;
	        }
	    }
	}
	if (navigator.userAgent.indexOf("Mozilla")>=0)
	{
	    objXHttp=new XMLHttpRequest();
	    if(handler!=null)
	    {
            objXHttp.onload=handler;
	        objXHttp.onerror=handler;
	    }
	    return objXHttp;
	}
}//end of function GetXmlHttpObj(handler)

function displayNewMainMenu(sectionName, sName, sProducts, sLinks, sUserName, sPass)
{   
    document.write("<table cellspacing='0' cellpadding='0' border='0' width='100%'><tr><td style='width: 100%'><div id='outer'><ul id='nav'>")
	for(i=0; i < mainMenu.length; i++)
	{
		className = "";
			    
		if(mainMenu[i].section == sectionName)
			className = "current";

        document.write("<li class='" + className + "'><a href='" + mainMenu[i].linkUrl + "'>" + mainMenu[i].displayText + "</a>"+
                        "<ul style='width: 950px'>");
        
        if(mainMenu[i].section=="Premium")
            displayNewSubMenu("Home");
        else
            displayNewSubMenu(mainMenu[i].section);
                    
        document.write("</ul>"+
                    "</li>");
        if(i!=mainMenu.length - 1) //last menu
            document.write("<li><img src='/images/dividermenu.jpg' alt='' /></li>");
	}
	document.write("</ul><div id='subnavbg'></div></div></td></tr>")
	
	document.write("<tr style='height: 2px'><td></td></tr>");
	newMarketBand(sName, sProducts, sLinks, sUserName, sPass);
	document.write("</table>");
}

function displayNewSubMenu(sectionName1)
{
    counter = ret(sectionName1)
    var k = 0;
    for(t=0; t<subMenu.length; t++)
    {
        if(subMenu[t].section == sectionName1)
        {
            var sClass="";
            if(k==counter - 1)   //last sub menu
                sClass = " class='final'";

            document.write("<li><a" + sClass + " href='" + subMenu[t].linkUrl + "'>" + subMenu[t].displayText + "</a></li>");
            if(k<counter - 1)    //not last sub menu
                document.write("<li style='color:#797979; font-size: 12px; padding-left: 3px; padding-right: 3px; padding-top: 1px;'>|</li>");
            
            k++;
        }
    }
}

function newMarketBand(sName, sProducts, sLinks, sUserName, sPass)
{
	document.write("<tr>"+
	                "<td class='menudown'>"+
	                    "<table cellpadding='0' cellspacing='0' width='100%'>"+
	                        "<tr valign='middle'>"+
	                        "   <form method='get' action='/getaquote.asp' name='Topquote'>"+
                	        "   <td style='width: 4px'>&nbsp;</td>"+
                            "   <td><input type='text' name='company' onfocus='javascript:this.form.company.value=\"\"' onblur=\"javascript:if(this.value=='')this.value='Quote / NAV';\" value='Quote / NAV' class='quoteinput' /></td>"+
                            "   <td style='width: 3px'></td>"+
                            "   <td>"+
                    	    "       <select name='Type' class='stockinput'>"+
                        	"           <option value='stock' selected='selected'>Stock</option>"+
                        	"           <option value='fund'>NAV</option>"+
                            "       </select>"+
                            "   </td>"+
                            "   <td style='width: 3px'>&nbsp;</td>"+
                            "   <td><a href='#' onclick='javascript:goTopQuote(document.Topquote)'><img src='/images/btngo.gif' alt='' border='0' /></a></td>"+
                            "   <td style='width: 9px'>&nbsp;</td>"+
                            "   </form>"+
                            "   <form method='get' action='/stockquotes/sector.asp' name='sector'>"+
                            "   <td>"+
                    	    "       <select name='sector' class='keystockinput' onchange='javascript:go1(this.form)'>"+
                        	"           <option value='0' selected>Key Sector Stocks</option>"+
	                        "           <option value='BSNX'>BSE Sensex</option>"+
	                        "           <option value='NIFTY'>NSE Nifty</option>"+
	                        "           <option value='-1'>Options Shortlist</option>"+
	                        "           <option value='Air'>Airlines</option>"+
	                        "           <option value='Aluminium'>Aluminium</option>"+
	                        "           <option value='Auto'>Automobiles</option>"+
	                        "           <option value='Autoc'>Auto Ancillaries</option>"+
	                        "           <option value='0,BANKPVT'>Banks (Private)</option>"+
	                        "           <option value='0,BANKPSU'>Banks (PSU)</option>"+
	                        "           <option value='Cement'>Cement</option>"+
	                        //"           <option value='Chemicals'>Chemicals</option>"+
	                        "           <option value='engg'>Engineering</option>"+
	                        "           <option value='energy'>Energy Sources</option>"+
	                        "           <option value='Fertilizer'>Fertilizer</option>"+
	                        "           <option value='Consprds'>FMCG</option>"+
	                        "           <option value='Food'>Food</option>"+
	                        "           <option value='Hotels'>Hotels</option>"+
	                        "           <option value='Finance'>Inv. &amp; Finance</option>"+
	                        //"           <option value='Logistics'>Logistics</option>"+
	                        "           <option value='Media'>Media</option>"+
	                        "           <option value='0,MNC'>MNC</option>"+
	                        "           <option value='0,IPHARMA'>Indian Pharma</option>"+
	                        "           <option value='0,MPHARMA'>MNC Pharma</option>"+
	                        "           <option value='0,PSU'>PSU</option>"+
	                        "           <option value='Paint'>Paints</option>"+
	                        "           <option value='Power'>Power</option>"+
	                        "           <option value='construction'>Real Estate</option>"+
	                        "           <option value='retail'>Retailing</option>"+
	                        "           <option value='Ship'>Shipping</option>"+
	                        "           <option value='0,SOFTL'>Software (Large)</option>"+
	                        "           <option value='0,SOFTO'>Software (Others)</option>"+
	                        "           <option value='Steel'>Steel</option>"+
	                        "           <option value='Sugar'>Sugar</option>"+
	                        "           <option value='Telecom'>Telecom</option>"+
	                        "           <option value='Textiles'>Textiles</option>"+
	                        //"           <option value='Tyres'>Tyres</option>"+
	                        "           <option value='0,BIRLA'>A V Birla</option>"+
	                        "           <option value='0,AMBANI'>Mukesh Ambani</option>"+
	                        "           <option value='0,ADAE'>Anil Ambani</option>"+
	                        "           <option value='0,TATA'>Tata</option>"+
	                        //"           <option value='0,GODREJ'>Godrej</option>"+
	                        //"           <option value='0,SUNDARAM'>Sundaram</option>"+
	                        //"           <option value='0,MURUGAPPA'>Murugappa</option>"+
                            "       </select>"+
                            "   </td>"+
                            "   </form>"+
                            "   <td style='width: 8px'>&nbsp;</td>"+
                            "   <form action='http://www.equitymaster.com/search.html' name='csesearchbox' id='cse-search-box'>"+
                            "   <td>"+
                            "       <input type='hidden' name='cx' value='partner-pub-2960491319221583:qz2ueq-fcn2' />"+
	                        "       <input type='hidden' name='cof' value='FORID:9' /> "+
	                        "       <input type='hidden' name='ie' value='ISO-8859-1' />"+
                            "       <input type='text' name='q' value='' style=\"background-image: url('/images/google_custom_search_watermark.gif');\" onfocus=\"javascript:this.style.backgroundImage='';\" onblur=\"javascript:if(this.value=='')this.style.backgroundImage='url(/images/google_custom_search_watermark.gif)';\" class='searchinput' />"+
                            "   </td>"+
                            "   <td style='width: 4px'>&nbsp;</td>"+
                            "   <td><a href='#' onclick='javascript:csesearchbox.submit();'><img src='/images/btngo.gif' alt='' border='0' /></a></td>"+
                            "   </form>"+
                            "   <td style='width: 10px'>&nbsp;</td>"+
                            "   <td class='textstock'><a href='/stockquotes/mystocks.asp'>MyStocks</a></td>"+
                            "   <td style='width: 5px'></td>");
    if(sName=="" || sName==null)
    {
        document.write("        <td class='memberslogin' style='width: 420px' align='right'><a href='#' onclick='javascript:showHomeLogin();return false;' style='color: #cc0000'>MEMBER'S LOGIN</a>&nbsp;&nbsp;"+
                            "       <div id='divLogin' style='position:relative; top:0; right:0; width: 240px; visibility: hidden; z-index: 1000'>"+
                            "           <div style='position: absolute; top: 10px; right: 0px; width: 100%; z-index: 1001; background-color: #e6e6e6'>"+
                            "               <table cellpadding='2' cellspacing='0' width='100%' style='border: solid 1px black'>"+
                            "                   <tr>"+
                            "                       <td></td>"+
                            "                       <td colspan='2' style='background-color: black; width: 96%'>"+
                            "                           <table cellspacing='0' cellpadding='0' border='0' width='100%'>"+
                            "                               <tr>"+
                            "                                   <td align='left' style='width: 80%; color: white; font-family: Arial; font-size: 14px'>MEMBER'S ARENA</td>"+
                            "                                   <td align='right' style='width: 20%; font-family: Arial; font-size: 14px; font-weight: bold'><a href='#' style='color: white; text-decoration: none' title='Close' onclick=\"javascript:showHomeLogin();return false;\">X</a>&nbsp;</td>"+
                            "                               </tr>"+
                            "                           </table>"+
                            "                       </td>"+
                            "                       <td></td>"+
                            "                   </tr>"+
                            "                    <tr>"+
                            "                       <td style='width: 2%'></td>"+
                            "                       <td align='left' style='font-size: 8pt; font-family: Arial; font-weight: bold; width: 48%'>&nbsp;&nbsp;USERNAME</td>"+
                            "                       <td align='left' style='font-size: 8pt; font-family: Arial; font-weight: bold; width: 48%'>&nbsp;&nbsp;PASSWORD</td>"+
                            "                       <td style='width: 2%'></td>"+
                            "                   <tr>"+
                            "                       <td></td>"+
                            "                        <td align='left' style='font-size: 8pt; font-family: Arial; font-weight: bold'><input type='text' id='txtUsername' name='txtUsername' size='11' style='font-family: arial; font-size: 13px; color: Black;' />"+
                            "                       <td align='left' style='font-size: 8pt; font-family: Arial; font-weight: bold'><input type='password' id='txtPassword' name='txtPassword' size='11' style='font-family: arial; font-size: 13px; color: Black;' /></td>"+
                            "                       <td></td>"+
                            "                   </tr>"+
                            "                   <tr>"+
                            "                       <td></td>"+
                            "                       <td colspan='2' align='left'>"+
	                        "                            <select id='selType' name='selType' style='font-family: arial; font-size: 13px; color: Black; width: 168px'>"+
	                        "                               <option value='SelectOptional' selected='selected'>Select (Optional)</option>"+
	                        "                               <option value='htr'>Hidden Treasure</option>"+
							"                               <option value='mc'>MidcapSelect</option>"+
				            "                               <option value='portfolio'>Portfolio Tracker</option>"+
				            "                               <option value='research-it'>ResearchPro</option>"+
	                        "                               <option value='qv'>StockSelect</option>"+
				            "                               <option value='valuepro'>ValuePro</option>"+
	                        "                               <option value='fundselect'>FundSelect</option>"+
	                        "                               <option value='fsplus'>FundSelect Plus</option>"+
	                        "                            </select>"+
	                        "                           <input type='button' value='Go' style='font-family: arial; font-size: 13px; color: Black; width: 38px' onclick='javascript:menuLoginAction(document.loginMenu);' />"+
                            "                       </td>"+
                            "                       <td></td>"+
                            "                   </tr>"+
                            "                   <tr>"+
                            "                       <td colspan='4' align='center' style='font-size: 8pt; font-family: Arial'><a href='/ptmail' style='color: #cc0000'>Sign Up</a> | <a href='/ptmail/for.asp?prd=PT' style='color: Black'>Forgot Password?</a>"+
                            "                       <form name='loginMenu' method='post' action='Subscription/login.asp' style='display: none'>"+
                            "                            <input type='hidden' value='' name='username' />"+
                            "                           <input type='hidden' value='' name='password' />"+
                            "                           <input type='hidden' value='' name='Type' />"+
                            "                           <!-- myPlanner -->"+
                            "                           <input type='hidden' name='user name' />"+
                            "                           <!-- StockSelect / Research Reports -->"+
                            "                           <input type='hidden' name='user' />"+
                            "                           <input type='hidden' name='pass' />"+
                            "                        </form>"+
                            "                       </td>"+
                            "                   </tr>"+
                            "               </table>"+
                            "           </div>"+
                            "       </div>"+
                            "   </td>");
    }
    else
    {
        var sProds = sProducts.split(",");
        document.write("        <td class='memberslogin' style='width: 420px' align='right'>"+
                            "       <table cellspacing='0' cellpadding='0' border='0' width='100%'>"+
                            "           <tr>"+
                            "               <td align='right' style='width: 210px'>Welcome,&nbsp;<span style='font-weight: normal; font-style: italic'>" + sName + "</span>&nbsp;&nbsp;&nbsp;</td>"+
                          //"               <td align='left' style='width: 155px'><a href='#' onMouseOver=\"javascript:document.getElementById('divMySubs').style.display='';\" onMouseOut=\"javascript:document.getElementById('divMySubs').style.display='none';\" style='text-decoration: underline'>My Subscriptions</a>&nbsp;|&nbsp;<a href='logout.asp' style='color: black; text-decoration: underline'>Logout</a>&nbsp;&nbsp;"+
                            "               <td align='left' style='width: 210px'><a href='#' onMouseOver=\"javascript:document.getElementById('divMySubs').style.display='';\" onMouseOut=\"javascript:document.getElementById('divMySubs').style.display='none';\" style='text-decoration: underline'>My Subscriptions</a>&nbsp;|&nbsp;<a href='#' onMouseOver=\"javascript:document.getElementById('divManage').style.display='';\" onMouseOut=\"javascript:document.getElementById('divManage').style.display='none';\" style='text-decoration: underline'>Manage</a>&nbsp;|&nbsp;<a href='logout.asp' style='color: black; text-decoration: underline'>Logout</a>&nbsp;&nbsp;"+
					        "                   <div id='divMySubs' style='position:relative; top:0; right:0; width: 180px; z-index: 1000; display: none' onMouseOver=\"javascript:document.getElementById('divMySubs').style.display='';\" onMouseOut=\"javascript:document.getElementById('divMySubs').style.display='none';\">"+
                            "                       <div style='position: absolute; top: 0px; right: 0px; width: 100%; z-index: 1001; background-color: #eeeeee'>"+
                            "                           <table cellpadding='0' cellspacing='0' width='100%' height='5px'>"+
                            "                           </table>"+
                            "                           <table cellpadding='2' cellspacing='0' width='100%' style='border: solid 1px black'>");
       for(j=0; j<sProds.length; j++)
       {
            document.write("                                <tr>"+
                            "                                   <td style='color: black; border-bottom: 1px solid #b8b8b8; font-size: 8pt;font-family: arial; cursor: pointer' align='left' onMouseOver=\"javascript:this.style.color='white'; this.style.backgroundColor='#032949';\" onMouseOut=\"javascript:this.style.color='black'; this.style.backgroundColor='';\" onclick=\"javascript:GoToService('" + sLinks.split(",")[j] + "');\">" + sProds[j] + "</td>"+
                            "                               </tr>");
       }
       document.write("                                 </table>"+
                            "                       </div>"+
                            "                   </div>"+
                            "                   <form name='frmLogin' method='post' style='display: none'>"+
                            "                       <input type='hidden' name='username' value='" + sUserName + "' />"+
                            "                       <input type='hidden' name='user' value='" + sUserName + "' />"+
                            "                       <input type='hidden' name='password' value='" + sPass + "' />"+
                            "                   </form>"+
                            "                   <div id='divManage' style='position:relative; top:0; right:0; width: 100px; z-index: 1002; display: none' onMouseOver=\"javascript:document.getElementById('divManage').style.display='';\" onMouseOut=\"javascript:document.getElementById('divManage').style.display='none';\">"+
                            "                       <div style='position: absolute; top: 0px; right: 0px; left: 105px; width: 100%; z-index: 1003; background-color: #eeeeee'>"+
                            "                           <table cellpadding='0' cellspacing='0' width='100%' height='5px'>"+
                            "                           </table>"+
                            "                           <table cellpadding='2' cellspacing='0' width='100%' style='border: solid 1px black'>"+
                            "                               <tr>"+
                            "                                   <td style='color: black; border-bottom: 1px solid #b8b8b8; font-size: 8pt;font-family: arial; cursor: pointer' align='left' onMouseOver=\"javascript:this.style.color='white'; this.style.backgroundColor='#032949';\" onMouseOut=\"javascript:this.style.color='black'; this.style.backgroundColor='';\" onclick=\"javascript:window.location.href='/subscription/changepassword.asp';\">Password</td>"+
                            "                               </tr>"+
                            "                               <tr>"+
                            "                                   <td style='color: black; border-bottom: 1px solid #b8b8b8; font-size: 8pt;font-family: arial; cursor: pointer' align='left' onMouseOver=\"javascript:this.style.color='white'; this.style.backgroundColor='#032949';\" onMouseOut=\"javascript:this.style.color='black'; this.style.backgroundColor='';\" onclick=\"javascript:window.location.href='/subscription/updateprofile.asp';\">Profile</td>"+
                            "                               </tr>"+
                            "                               <tr>"+
                            "                                   <td style='color: black; border-bottom: 1px solid #b8b8b8; font-size: 8pt;font-family: arial; cursor: pointer' align='left' onMouseOver=\"javascript:this.style.color='white'; this.style.backgroundColor='#032949';\" onMouseOut=\"javascript:this.style.color='black'; this.style.backgroundColor='';\" onclick=\"javascript:window.location.href='/Subscription/manage.asp';\">Subscriptions</td>"+
                            "                               </tr>"+
                            "                           </table>"+
                            "                       </div>"+
                            "                   </div>"+
                            "               </td>"+
                            "           </tr>"+
                            "       </table>"+
                            "   </td>");
    }
                            
    document.write("        </tr>"+
                        "</table>"+
                    "</td>"+
                   "</tr>");
}

function GoToService(sLink)
{
    if(sLink.indexOf("http") >= 0)
    {
        document.frmLogin.action=sLink;
        document.frmLogin.submit();
    }
    else
    {
        window.location.href = sLink;
    }
}

function showHomeLogin()
{
    var objDiv = document.getElementById('divLogin');
    if(objDiv.style.visibility=='hidden')
    {
        objDiv.style.visibility='visible';
    }
    else
    {
        objDiv.style.visibility='hidden';
    }
}

function menuLoginAction(form)
{
    form.username.value = document.getElementById('txtUsername').value;
	form.password.value = document.getElementById('txtPassword').value;
	form.Type.value = document.getElementById('selType').value;
	form["user name"].value = form.username.value;
	form.user.value = form.username.value;
	form.pass.value = form.password.value;
	
	if(!isBlank(form.username.value) && !isBlank(form.password.value))
	{
		//if(form.Type.value != "0")
		//{
		    form.submit();
		//}
		//else
		//{
		//	alert("Please select a product from the list.");
		//	document.getElementById('selType').focus();
		//}
	}
	else
	{
		alert("Please enter both username and password!")
		document.getElementById('txtUsername').focus();
	}
}

function ret(sec)
{
	counter = 0;
	for(j=0; j < subMenu.length; j++)
	{
		if(subMenu[j].section == sec)
			counter++;
	}
	return counter;
}

function displaySubMenuOld(sectionName1)
{
	counter = ret(sectionName1)
	document.write("<table cellpadding=3 cellspacing=0 width=100% bgcolor='#eeeeee' height=22><tr><td style='border-bottom: 1px solid #9d9d9d'><font style='font-family:arial; font-size:11px;'><b><font color=#000000>")
	k = 0;
	for(t=0; t<subMenu.length; t++)
	{
		if(subMenu[t].section == sectionName1)
		{
			subMenuData = "<a href=" + subMenu[t].linkUrl + " class=em>" + subMenu[t].displayText + "</a>"
			if(k < counter-1)
			{
				subMenuData += " &nbsp;|&nbsp; "
			}
			k++;
			document.write(subMenuData)
		}
	}
	document.write("</td></tr></table>")

	marketBand();
}


function bottomLineOld()
{
	  document.write("</td></tr></table><p align=center><a href='javascript:window.history.back()'><img src='/icons/back-b.gif' border=0></a>&nbsp;&nbsp;<a href='/'><img src='/icons/home-b.gif' border=0></a><br><font face='arial' size=2><font size=2>&copy;</font> Equitymaster Agora Research Private Limited</font><font face='arial' size=1><br><a href='/help/legal.html'>Terms of Use</a> | <a href='/help/writetous.html'>Contact us</a> | <a href='/help/sitemap.html'>Sitemap</a> | <a href='/help/aboutus.html'>About us</a> | <A href='/rss'><img src='/rss/rss.gif' border=0 align=absmiddle></a> <A href='/rss'>RSS FEEDS</A></p><iframe name='session' WIDTH='0' HEIGHT='0' SRC='/session.asp' scrolling='no' frameborder='0'></iframe>")
	//Google Analytics Tracker
	//var pageTracker = _gat._getTracker("UA-4311385-1"); pageTracker._initData(); pageTracker._trackPageview(); 
}

//Birendra | 13-03-2009 | New image for Back & Home button | Start-Code-->
function bottomline_new()
{
	  document.write("</td></tr></table><p align=center><a href='javascript:window.history.back()'><img src='/icons/New_back.gif' border=0></a>&nbsp;&nbsp;<a href='/'><img src='/icons/New_home.gif' border=0></a><br><font face='arial' size=2><img src='/blips/copyright.gif'>&nbsp;Equitymaster Agora Research Private Limited</font><font face='arial' size=1><br><a href='/help/legal.html'>Terms of Use</a> | <a href='/help/writetous.html'>Contact us</a> | <a href='/help/sitemap.html'>Sitemap</a> | <a href='/help/aboutus.html'>About us</a> | <A href='/rss' target='_new'><img src='/rss/rss.gif' border=0 align=absmiddle></a> <A href='/rss' target='_new'>RSS FEEDS</A></p><iframe name='session' WIDTH='0' HEIGHT='0' SRC='/session.asp' scrolling='no' frameborder='0'></iframe>")
}
//Birendra | 13-03-2009 | New image for Back & Home button | End-Code-->


function bottomLineHTSFTHOld()
{
	//document.write("</td></tr></table><p align=center><font face='arial' size=2 color=white><font size=2>&copy;</font> Equitymaster Agora Research Private Limited</font><font face='arial' size=1 color=white><br><a href='/help/legal.html' style='color:white'>Terms of Use</a> | <a href='/help/writetous.html' style='color:white'>Contact us</a> | <a href='/help/sitemap.html' style='color:white'>Sitemap</a> | <a href='/help/aboutus.html' style='color:white'>About us</a></p><iframe name='session' WIDTH='0' HEIGHT='0' SRC='/session.asp' scrolling='no' frameborder='0'></iframe>")
	//document.write("</td></tr></table><p align=center><font style='font-size:8pt; font-family:arial' color='white'><b><font size=2>&copy;</font> Equitymaster Agora Research Private Limited</font></b><font style='font-size:8pt; font-family:arial' color='white'><br><a href='/help/legal.html' style='color:white'>Terms of Use</a> | <a href='/help/writetous.html' style='color:white'>Contact us</a> | <a href='/help/sitemap.html' style='color:white'>Sitemap</a> | <a href='/help/aboutus.html' style='color:white'>About us</a> | <A href='/help/sitemap.html'><font style='font-size:8pt; font-family:arial' color='white'>Sitemap</A> | </font><A href='/rss'><font style='font-size:8pt; font-family:arial' color='white'>RSS FEEDS</A></font></p><iframe name='session' WIDTH='0' HEIGHT='0' SRC='/session.asp' scrolling='no' frameborder='0'></iframe>");
	//Google Analytics Tracker
	//var pageTracker = _gat._getTracker("UA-4311385-1"); pageTracker._initData(); pageTracker._trackPageview(); 
		document.write("</td></tr></table><p align=center><font style='font-size:8pt; font-family:arial' color='white'><b><font size=2>&copy;</font> Equitymaster Agora Research Private Limited</font></b><font style='font-size:8pt; font-family:arial' color='white'><br><a href='/help/legal.html' style='color:white'>Terms of Use</a> | <a href='/help/writetous.html' style='color:white'>Contact us</a> | <A href='/help/sitemap.html'><font style='font-size:8pt; font-family:arial' color='white'>Sitemap</A> | <a href='/help/aboutus.html' style='color:white'>About us</a> | </font><A href='/rss'><font style='font-size:8pt; font-family:arial' color='white'>RSS FEEDS</A></font></p><iframe name='session' WIDTH='0' HEIGHT='0' SRC='/session.asp' scrolling='no' frameborder='0'></iframe>");
}


function bottomLinepf()
{
	document.write("</td></tr></table><p align=center><font face='arial' size=2><img src='/blips/copyright.gif'>&nbsp;Equitymaster Agora Research Private Limited")
	//Google Analytics Tracker
	//var pageTracker = _gat._getTracker("UA-4311385-1"); pageTracker._initData(); pageTracker._trackPageview(); 
}

function bottomLine()
{
	var sWidth = "";
    var myBody = document.getElementsByTagName('body')[0];
	var objTable = myBody.getElementsByTagName("table")[0];
	sWidth=objTable.width;

	document.write("</td></tr></table><table cellspacing='0' cellpadding='0' border='0' width='" + sWidth + "' align='center'>"+
	"<tr style='height: 5px'><td></td></tr>"+
	"<tr>"+
	"    <td style=\"background-image: url('/images/bordertabfot.gif'); background-repeat: repeat-x; height: 2px;\"></td>"+
	"</tr>"+
	"<tr>"+
	"    <td style='font-size: 8pt; font-family: arial; padding-bottom: 10px; padding-top: 10px' align='center'>"+
	"        <span style='font-weight: bold'><img src='/blips/copyright.gif'>&nbsp;Equitymaster Agora Research Private Limited.</span><br />"+
	"        <a href='#' onclick=\"this.style.behavior = 'url(#default#homepage)'; this.setHomePage('http://www.equitymaster.com/');return false;\""+
	"            style='color: Black'>Homepage Us</a> | <a href='#' onclick=\"javascript:window.external.AddFavorite('http://www.equitymaster.com','Equitymaster.com - The investors best friend!');return false;\""+
	"                style='color: Black'>Bookmark Us</a> | <a href='/whitelist.html' style='color: Black'>"+
	"                    Whitelist Us</a> | <a href='#' onclick=\"javascript:recommend('Equitymaster.com');return false;\""+
	"                        style='color: Black'>Refer Us</a> | <a href='/help/legal.html' style='color: Black'>"+
	"                            Terms of Use</a> | <a href='/help/writetous.html' style='color: Black'>Contact Us</a>"+
	"        | <a href='/help/aboutus.html' style='color: Black'>About Us</a> | <a href='/help/sitemap.html'"+
	"            style='color: Black'>Sitemap</a> | <a href='/rss' target='_new'>"+
	"                <img alt='RSS' src='/rss/rss.gif' border='0' align='absmiddle' /></a> <a href='/rss'"+
	"                    style='color: Black' target='_new'>RSS FEEDS</a>"+
	"    </td>"+
	"</tr>"+
	"</table");
}

function bottomLineHTSFTH()
{
	var sWidth = "";
    var myBody = document.getElementsByTagName('body')[0];
	var objTable = myBody.getElementsByTagName("table")[0];
	sWidth=objTable.width;

	document.write("</td></tr></table><table cellspacing='0' cellpadding='0' border='0' width='" + sWidth + "' align='center'>"+
	"<tr style='height: 5px'><td></td></tr>"+
	"<!--tr>"+
	"    <td style=\"background-image: url('/images/bordertabfot.gif'); background-repeat: repeat-x; height: 2px;\"></td>"+
	"</tr-->"+
	"<tr>"+
	"    <td style='font-size: 8pt; font-family: arial; padding-bottom: 10px; padding-top: 10px; color: white' align='center'>"+
	"        <span style='font-weight: bold'><img src='/blips/copyright.gif'>&nbsp;Equitymaster Agora Research Private Limited.</span><br />"+
	"        <a href='#' onclick=\"this.style.behavior = 'url(#default#homepage)'; this.setHomePage('http://www.equitymaster.com/');return false;\""+
	"            style='color: white'>Homepage Us</a> | <a href='#' onclick=\"javascript:window.external.AddFavorite('http://www.equitymaster.com','Equitymaster.com - The investors best friend!');return false;\""+
	"                style='color: white'>Bookmark Us</a> | <a href='/whitelist.html' style='color: white'>"+
	"                    Whitelist Us</a> | <a href='#' onclick=\"javascript:recommend('Equitymaster.com');return false;\""+
	"                        style='color: white'>Refer Us</a> | <a href='/help/legal.html' style='color: white'>"+
	"                            Terms of Use</a> | <a href='/help/writetous.html' style='color: white'>Contact Us</a>"+
	"        | <a href='/help/aboutus.html' style='color: white'>About Us</a> | <a href='/help/sitemap.html'"+
	"            style='color: White'>Sitemap</a> | <a href='/rss' target='_new'>"+
	"                <a href='/rss' style='color: white' target='_new'>RSS FEEDS</a>"+
	"    </td>"+
	"</tr>"+
	"</table");
}

function bottomLineHTTPS()
{
	var sWidth = "";
    var myBody = document.getElementsByTagName('body')[0];
	var objTable = myBody.getElementsByTagName("table")[0];
	sWidth=objTable.width;

	document.write("</td></tr></table><table cellspacing='0' cellpadding='0' border='0' width='" + sWidth + "' align='center'>"+
	"<tr style='height: 5px'><td></td></tr>"+
	"<tr>"+
	"    <td style=\"background-image: url('/images/bordertabfot.gif'); background-repeat: repeat-x; height: 2px;\"></td>"+
	"</tr>"+
	"<tr>"+
	"    <td style='font-size: 8pt; font-family: arial; padding-bottom: 10px; padding-top: 10px' align='center'>"+
	"        <span style='font-weight: bold'><img src='/blips/copyright.gif'>&nbsp;Equitymaster Agora Research Private Limited.</span><br />"+
	"        <a href='#' onclick=\"this.style.behavior = 'url(#default#homepage)'; this.setHomePage('http://www.equitymaster.com/');return false;\""+
	"            style='color: Black'>Homepage Us</a> | <a href='#' onclick=\"javascript:window.external.AddFavorite('http://www.equitymaster.com','Equitymaster.com - The investors best friend!');return false;\""+
	"                style='color: Black'>Bookmark Us</a> | <a href='http://www.equitymaster.com/whitelist.html' style='color: Black'>"+
	"                    Whitelist Us</a> | <a href='#' onclick=\"javascript:recommendHTTPS('Equitymaster.com');return false;\""+
	"                        style='color: Black'>Refer Us</a> | <a href='http://www.equitymaster.com/help/legal.html' style='color: Black'>"+
	"                            Terms of Use</a> | <a href='http://www.equitymaster.com/help/writetous.html' style='color: Black'>Contact Us</a>"+
	"        | <a href='http://www.equitymaster.com/help/aboutus.html' style='color: Black'>About Us</a> | <a href='http://www.equitymaster.com/help/sitemap.html'"+
	"            style='color: Black'>Sitemap</a> | <a href='http://www.equitymaster.com/rss' target='_new'>"+
	"                <img alt='RSS' src='/rss/rss.gif' border='0' align='absmiddle' /></a> <a href='http://www.equitymaster.com/rss'"+
	"                    style='color: Black' target='_new'>RSS FEEDS</a>"+
	"    </td>"+
	"</tr>"+
	"</table");
}

function recommend(title)
{
	url = window.location.href;
	var recommend = window.open("/recommend/recommend.asp?title=" + title + "&url=" + url ,"recommend","height=230,width=400,toolbars=false");

}

function recommendHTTPS(title)
{
	url = window.location.href;
	var recommend = window.open("http://www.equitymaster.com/recommend/recommend.asp?title=" + title + "&url=" + url ,"recommend","height=230,width=400,toolbars=false");

}

function launchticker()
{
	var tickerWindow;
	var url = "/nseticker.html"
	tickerWindow = window.open(url,"tickerWindow","height=20, width=775")
	tickerWindow.focus();
}

function marketBand()
{
	document.write("<table bgcolor=#ffffdd border=0 cellpadding=0 cellspacing=0 width=100%>");
	document.write("<tr><td align=center'><table border=0 cellpadding=2 cellspacing=0 align=center>");
	document.write("<tr valign=middle><form method='get' action='/getaquote.asp' name='Topquote'><td>");
	document.write("<input name='company' size='10' OnFocus='javascript:this.form.company.value=\"\"'  value='Quote/NAV' style='font-family: arial; font-size: 9pt; color=black;'><select name='Type' style='font-family: arial; font-size: 13px; color=black;'><option value='stock' selected>Stock<option value='fund'>NAV</option></select><input type='button' value='Go' onClick='javascript:goTopQuote(this.form);' id=button1 name=button1 style='font-family: arial; font-size: 9pt; color=black;'></font>");
	document.write("</td></form><td width=5>&nbsp;</td><form method='get' action='/stockquotes/sector.asp' name='sector'><td>");
	document.write("<select name='sector' style='font-family: arial; font-size: 9pt; color=black;' onChange='javascript:go1(this.form)'>");
	document.write("<option value='0' selected>Key Sector Stocks</option>");
	document.write("<option value='BSNX'>BSE Sensex</option>");
	document.write("<option value='NIFTY'>NSE Nifty</option>");
	document.write("<option value='-1'>Options Shortlist</option>");
	document.write("<option value='Air'>Airlines</option>");
	document.write("<option value='Aluminium'>Aluminium</option>");
	document.write("<option value='Auto'>Automobiles</option>");
	document.write("<option value='Autoc'>Auto Ancillaries</option>");
	document.write("<option value='0,BANKPVT'>Banks (Private)</option>");
	document.write("<option value='0,BANKPSU'>Banks (PSU)</option>");
	document.write("<option value='Cement'>Cement</option>");
	//document.write("<option value='Chemicals'>Chemicals</option>");
	document.write("<option value='engg'>Engineering</option>");
	document.write("<option value='energy'>Energy Sources</option>");
	document.write("<option value='Fertilizer'>Fertilizer</option>");
	document.write("<option value='Consprds'>FMCG</option>");
	document.write("<option value='Food'>Food</option>");
	document.write("<option value='Hotels'>Hotels</option>");
	document.write("<option value='Finance'>Inv. &amp; Finance</option>");
	//document.write("<option value='Logistics'>Logistics</option>");
	document.write("<option value='Media'>Media</option>");
	document.write("<option value='0,MNC'>MNC</option>");
	document.write("<option value='0,IPHARMA'>Indian Pharma</option>");
	document.write("<option value='0,MPHARMA'>MNC Pharma</option>");
	document.write("<option value='0,PSU'>PSU</option>");
	document.write("<option value='Paint'>Paints</option>");
	document.write("<option value='Power'>Power</option>");
	document.write("<option value='construction'>Real Estate</option>");
	document.write("<option value='retail'>Retailing</option>");
	document.write("<option value='Ship'>Shipping</option>");
	document.write("<option value='0,SOFTL'>Software (Large)</option>");
	document.write("<option value='0,SOFTO'>Software (Others)</option>");
	document.write("<option value='Steel'>Steel</option>");
	document.write("<option value='Sugar'>Sugar</option>");
	document.write("<option value='Telecom'>Telecom</option>");
	document.write("<option value='Textiles'>Textiles</option>");
	//document.write("<option value='Tyres'>Tyres</option>");
	document.write("<option value='0,BIRLA'>A V Birla</option>");
	document.write("<option value='0,AMBANI'>Mukesh Ambani</option>");
	document.write("<option value='0,ADAE'>Anil Ambani</option>");
	document.write("<option value='0,TATA'>Tata</option>");
	//document.write("<option value='0,GODREJ'>Godrej</option>");
	//document.write("<option value='0,SUNDARAM'>Sundaram</option>");
	//document.write("<option value='0,MURUGAPPA'>Murugappa</option>");
	document.write("</select></td></form><td width=5>&nbsp;</td>");
	document.write("<form action='http://www.equitymaster.com/search.html' id='cse-search-box'> ");
	document.write("<td bgcolor=#ffffdd><style type='text/css'> ");
	document.write("@import url(http://www.google.com/cse/api/branding.css); ");
	document.write("</style> ");
	//document.write("<div class='cse-branding-bottom' style='background-color:#FFFFDD;color:#000000'> ");
	//document.write("<div class='cse-branding-form'> ");
	//document.write("<div> ");
	document.write("<input type='hidden' name='cx' value='partner-pub-2960491319221583:qz2ueq-fcn2' /> ");
	document.write("<input type='hidden' name='cof' value='FORID:9' /> ");
	document.write("<input type='hidden' name='ie' value='ISO-8859-1' /> ");
	document.write("<input type='text' name='q' size='18' style=\"font-family: arial;font-size:9pt; background-image: url('/images/google_custom_search_watermark.gif');\" onfocus=\"javascript:this.style.backgroundImage='';\" onblur=\"javascript:if(this.value=='')this.style.backgroundImage='url(/images/google_custom_search_watermark.gif)';\" /><input type='submit' name='sa' value='Search' style='font-family: arial;font-size:9pt;' /> ");
	//document.write("</div> ");
	//document.write("</div></div>");
	document.write("</td> ");
	document.write("</form> ");
	document.write("<td width=5>&nbsp;</td><td><font style='font-size:9pt; font-family:arial'><b><a href='/stockquotes/mystocks.asp' style='color:black'>MyStocks</a> | <a href='http://www.personalfn.com/research-it/mutual-funds/myfunds/myfunds.asp' style='color:black'>MyFunds</a> ");
	document.write("| <a href=\"javascript:var MktMon=window.open('/mktmon/mktmon.asp','MktMon','width=770, height=525,scrolling=no,status=no,toolbars=no'); MktMon.focus()\"; style=color:#cc0000>Market Monitor</a></td> ");
	document.write("</tr></table></td></tr><tr><td bgcolor=#9d9d9d height=1></td></tr></table>");

}

function isBlank(s)
	{
	  var len,k,flg;
	  flg=true;
	  if(s!=null)
	  {
		len=s.length;
		for(k=0;k<len;k++)
		 {
		  if(s.substring(k,k+1)!=" ")
				flg=false;
		 }
	  }
	 return flg;
	}

function goTopQuote(form)
{
	var a;
	a = true;
	var f = form


	if(f.company.value == null || f.company.value == "" || isBlank(f.company.value) || f.company.value == "Quote/NAV")
	{
		alert("Please enter a valid symbol/company name.");
		a = false;
	}
	if(a == true)
	{
		form.submit();
	}
}

function go1(form)
{
	if(form.sector.options[form.sector.selectedIndex].value == -1)
		window.location.href = "/stockquotes/options.asp";
	else if(form.sector.options[form.sector.selectedIndex].value != 0)
		form.submit();
	else
		alert("Please select a sector.");
}

function displayMainMenu(sectionName)
{
    document.write("<link href='/css/dropdown.css' rel='stylesheet' type='text/css' />");
        
    objXmlHttpMenu1 = null;
    objXmlHttpMenu1 = GetXmlHttpObj(null);
    objXmlHttpMenu1.open("GET", "/newmenu.asp", false);
    objXmlHttpMenu1.send(null);
    var sText = objXmlHttpMenu1.responseText;
    if(sText.replace(" ","")=="")
    {
        displayNewMainMenuInner(sectionName, "", "", "", "", "")
    }
    else
    {
        var sTextArr = sText.split('~');
        displayNewMainMenuInner(sectionName, sTextArr[0], sTextArr[1], sTextArr[2], sTextArr[3], sTextArr[4])
    }
}

function displayNewMainMenuInner(sectionName, sName, sProducts, sLinks, sUserName, sPass)
{   
    var iWidth = 0;
    var sWidth = "";
    if (typeof window.innerWidth != 'undefined')
    {
        sWidth = "100%";
    }
    // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
    else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0)
    {
		iWidth = document.documentElement.clientWidth;
        iWidth = iWidth - 4;
        sWidth = iWidth.toString() + "px";

		var myBody = document.getElementsByTagName('body')[0];
		var objTable = myBody.getElementsByTagName("table")[0];
		if(objTable.width!="100%")
			sWidth=objTable.width;
    }
    // older versions of IE
    else
    {
		iWidth = document.getElementsByTagName('body')[0].clientWidth;
        iWidth = iWidth - 4;
        sWidth = iWidth.toString() + "px";

		var myBody = document.getElementsByTagName('body')[0];
		var objTable = myBody.getElementsByTagName("table")[0];
		if(objTable.width!="100%")
			sWidth=objTable.width;
    }
    
    document.write("<table cellspacing='0' cellpadding='0' border='0' width='100%' style='margin: 0px;padding: 0px;font-family: Arial, Helvetica, sans-serif;'><tr><td style='width: 100%'><div id='outer'><ul id='nav'>")
	for(i=0; i < mainMenu.length; i++)
	{
		className = "";
			    
		if(mainMenu[i].section == sectionName)
			className = "current";

        document.write("<li class='" + className + "' onmouseover=\"javascript:this.className+=' over';\" onmouseout=\"javascript:this.className=this.className.replace(' over', '');\"><a href='" + mainMenu[i].linkUrl + "'>" + mainMenu[i].displayText + "</a>"+
                        "<ul style='width: " + sWidth + "'>");
        
        if(mainMenu[i].section=="Premium")
            displayNewSubMenu("Home");
        else
            displayNewSubMenu(mainMenu[i].section);
                    
        document.write("</ul>"+
                    "</li>");
        if(i!=mainMenu.length - 1) //last menu
            document.write("<li><img src='/images/dividermenu.jpg' alt='' /></li>");
	}
	document.write("</ul><div id='subnavbg'></div></div></td></tr>")
	
	document.write("<tr style='height: 2px'><td></td></tr>");
	newMarketBandInner(sName, sProducts, sLinks, sUserName, sPass);
	document.write("<tr style='height: 2px'><td></td></tr>");
	document.write("</table>");
}

function newMarketBandInner(sName, sProducts, sLinks, sUserName, sPass)
{
	document.write("<tr>"+
	                "<td style='height: 29px; background-color: #eeeeee;'>"+
	                    "<table cellpadding='0' cellspacing='0' width='100%'>"+
	                        "<tr valign='middle'>"+
	                        "   <form method='get' action='/getaquote.asp' name='Topquote'>"+
                	        "   <td style='width: 4px'>&nbsp;</td>"+
                            "   <td style='width: 82px'><input type='text' name='company' onfocus='javascript:this.form.company.value=\"\"' onblur=\"javascript:if(this.value=='')this.value='Quote / NAV';\" value='Quote / NAV' style='width: 82px; height: 22px; border: 1px solid #cacaca; color: black; font-size: 12px; padding-left: 5px; padding-right: 5px; text-align: left; font-family: Arial, Helvetica, sans-serif;' /></td>"+
                            "   <td style='width: 3px'></td>"+
                            "   <td style='width: 56px'>"+
                    	    "       <select name='Type' style='font-family: Arial, Helvetica, sans-serif; height: 22px; width: 56px; border: 1px solid #cacaca; color: black; font-size: 12px;'>"+
                        	"           <option value='stock' selected='selected'>Stock</option>"+
                        	"           <option value='fund'>NAV</option>"+
                            "       </select>"+
                            "   </td>"+
                            "   <td style='width: 3px'>&nbsp;</td>"+
                            "   <td style='width: 23px'><a href='#' onclick='javascript:goTopQuote(document.Topquote)'><img src='/images/btngo.gif' alt='' border='0' /></a></td>"+
                            "   <td style='width: 9px'>&nbsp;</td>"+
                            "   </form>"+
                            "   <form method='get' action='/stockquotes/sector.asp' name='sector'>"+
                            "   <td style='width: 128px'>"+
                    	    "       <select name='sector' style='font-family: Arial, Helvetica, sans-serif; height: 22px; width: 128px; border: 1px solid #cacaca; color: black; font-size: 12px;' onchange='javascript:go1(this.form)'>"+
                        	"           <option value='0' selected>Key Sector Stocks</option>"+
	                        "           <option value='BSNX'>BSE Sensex</option>"+
	                        "           <option value='NIFTY'>NSE Nifty</option>"+
	                        "           <option value='-1'>Options Shortlist</option>"+
	                        "           <option value='Air'>Airlines</option>"+
	                        "           <option value='Aluminium'>Aluminium</option>"+
	                        "           <option value='Auto'>Automobiles</option>"+
	                        "           <option value='Autoc'>Auto Ancillaries</option>"+
	                        "           <option value='0,BANKPVT'>Banks (Private)</option>"+
	                        "           <option value='0,BANKPSU'>Banks (PSU)</option>"+
	                        "           <option value='Cement'>Cement</option>"+
	                        //"           <option value='Chemicals'>Chemicals</option>"+
	                        "           <option value='engg'>Engineering</option>"+
	                        "           <option value='energy'>Energy Sources</option>"+
	                        "           <option value='Fertilizer'>Fertilizer</option>"+
	                        "           <option value='Consprds'>FMCG</option>"+
	                        "           <option value='Food'>Food</option>"+
	                        "           <option value='Hotels'>Hotels</option>"+
	                        "           <option value='Finance'>Inv. &amp; Finance</option>"+
	                        //"           <option value='Logistics'>Logistics</option>"+
	                        "           <option value='Media'>Media</option>"+
	                        "           <option value='0,MNC'>MNC</option>"+
	                        "           <option value='0,IPHARMA'>Indian Pharma</option>"+
	                        "           <option value='0,MPHARMA'>MNC Pharma</option>"+
	                        "           <option value='0,PSU'>PSU</option>"+
	                        "           <option value='Paint'>Paints</option>"+
	                        "           <option value='Power'>Power</option>"+
	                        "           <option value='construction'>Real Estate</option>"+
	                        "           <option value='retail'>Retailing</option>"+
	                        "           <option value='Ship'>Shipping</option>"+
	                        "           <option value='0,SOFTL'>Software (Large)</option>"+
	                        "           <option value='0,SOFTO'>Software (Others)</option>"+
	                        "           <option value='Steel'>Steel</option>"+
	                        "           <option value='Sugar'>Sugar</option>"+
	                        "           <option value='Telecom'>Telecom</option>"+
	                        "           <option value='Textiles'>Textiles</option>"+
	                        //"           <option value='Tyres'>Tyres</option>"+
	                        "           <option value='0,BIRLA'>A V Birla</option>"+
	                        "           <option value='0,AMBANI'>Mukesh Ambani</option>"+
	                        "           <option value='0,ADAE'>Anil Ambani</option>"+
	                        "           <option value='0,TATA'>Tata</option>"+
	                        //"           <option value='0,GODREJ'>Godrej</option>"+
	                        //"           <option value='0,SUNDARAM'>Sundaram</option>"+
	                        //"           <option value='0,MURUGAPPA'>Murugappa</option>"+
                            "       </select>"+
                            "   </td>"+
                            "   </form>"+
                            "   <td style='width: 8px'>&nbsp;</td>"+
                            "   <form action='http://www.equitymaster.com/search.html' name='csesearchbox' id='cse-search-box'>"+
                            "   <td style='width: 128px'>"+
                            "       <input type='hidden' name='cx' value='partner-pub-2960491319221583:qz2ueq-fcn2' />"+
	                        "       <input type='hidden' name='cof' value='FORID:9' /> "+
	                        "       <input type='hidden' name='ie' value='ISO-8859-1' />"+
                            "       <input type='text' name='q' value='' style=\"font-family: Arial, Helvetica, sans-serif; background-image: url('/images/google_custom_search_watermark.gif'); height: 22px; width: 128px; border: 1px solid #cacaca; color: black; font-size: 12px;\" onfocus=\"javascript:this.style.backgroundImage='';\" onblur=\"javascript:if(this.value=='')this.style.backgroundImage='url(/images/google_custom_search_watermark.gif)';\" />"+
                            "   </td>"+
                            "   <td style='width: 4px'>&nbsp;</td>"+
                            "   <td style='width: 23px'><a href='#' onclick='javascript:csesearchbox.submit();'><img src='/images/btngo.gif' alt='' border='0' /></a></td>"+
                            "   </form>"+
                            "   <td style='width: 10px'>&nbsp;</td>"+
                            "   <td style='font-size: 12px; color: black;'><a href='/stockquotes/mystocks.asp' style='font-size: 12px; color: black; text-decoration: underline;'>MyStocks</a></td>"+
                            "   <td style='width: 5px'></td>");
    if(sName=="" || sName==null)
    {
        document.write("        <td style='width: 420px; font-family: arial; font-size: 12px; color: black; font-weight: bold; text-decoration: none;' align='right'><a href='#' onclick='javascript:showHomeLogin();return false;' style='color: #cc0000; font-family: arial; font-size: 12px; font-weight: bold; text-decoration: underline;'>MEMBER'S LOGIN</a>&nbsp;&nbsp;"+
                            "       <div id='divLogin' style='position:relative; top:0; right:0; width: 240px; visibility: hidden; z-index: 1000'>"+
                            "           <div style='position: absolute; top: 10px; right: 0px; width: 100%; z-index: 1001; background-color: #e6e6e6'>"+
                            "               <table cellpadding='2' cellspacing='0' width='100%' style='border: solid 1px black'>"+
                            "                   <tr>"+
                            "                       <td></td>"+
                            "                       <td colspan='2' style='background-color: black; width: 96%'>"+
                            "                           <table cellspacing='0' cellpadding='0' border='0' width='100%'>"+
                            "                               <tr>"+
                            "                                   <td align='left' style='width: 80%; color: white; font-family: Arial; font-size: 14px; font-weight: bold'>MEMBER'S ARENA</td>"+
                            "                                   <td align='right' style='width: 20%; font-family: Arial; font-size: 14px; font-weight: bold'><a href='#' style='color: white; text-decoration: none' title='Close' onclick=\"javascript:showHomeLogin();return false;\">X</a>&nbsp;</td>"+
                            "                               </tr>"+
                            "                           </table>"+
                            "                       </td>"+
                            "                       <td></td>"+
                            "                   </tr>"+
                            "                    <tr>"+
                            "                       <td style='width: 2%'></td>"+
                            "                       <td align='left' style='font-size: 8pt; font-family: Arial; font-weight: bold; width: 48%'>&nbsp;&nbsp;USERNAME</td>"+
                            "                       <td align='left' style='font-size: 8pt; font-family: Arial; font-weight: bold; width: 48%'>&nbsp;&nbsp;PASSWORD</td>"+
                            "                       <td style='width: 2%'></td>"+
                            "                   <tr>"+
                            "                       <td></td>"+
                            "                        <td align='left' style='font-size: 8pt; font-family: Arial; font-weight: bold'><input type='text' id='txtUsername' name='txtUsername' size='11' style='font-family: arial; font-size: 13px; color: Black;' />"+
                            "                       <td align='left' style='font-size: 8pt; font-family: Arial; font-weight: bold'><input type='password' id='txtPassword' name='txtPassword' size='11' style='font-family: arial; font-size: 13px; color: Black;' /></td>"+
                            "                       <td></td>"+
                            "                   </tr>"+
                            "                   <tr>"+
                            "                       <td></td>"+
                            "                       <td colspan='2' align='left'>"+
	                        "                            <select id='selType' name='selType' style='font-family: arial; font-size: 13px; color: Black; width: 168px'>"+
	                        "                               <option value='SelectOptional' selected='selected'>Select (Optional)</option>"+
	                        "                               <option value='htr'>Hidden Treasure</option>"+
							"                               <option value='mc'>MidcapSelect</option>"+
				            "                               <option value='portfolio'>Portfolio Tracker</option>"+
				            "                               <option value='research-it'>ResearchPro</option>"+
	                        "                               <option value='qv'>StockSelect</option>"+
				            "                               <option value='valuepro'>ValuePro</option>"+
	                        "                               <option value='fundselect'>FundSelect</option>"+
	                        "                               <option value='fsplus'>FundSelect Plus</option>"+
	                        "                            </select>"+
	                        "                           <input type='button' value='Go' style='font-family: arial; font-size: 13px; color: Black; width: 38px' onclick='javascript:menuLoginAction(document.loginMenu);' />"+
                            "                       </td>"+
                            "                       <td></td>"+
                            "                   </tr>"+
                            "                   <tr>"+
                            "                       <td colspan='4' align='center' style='font-size: 8pt; font-family: Arial; font-weight: bold'><a href='/ptmail' style='color: #cc0000'>Sign Up</a> | <a href='/ptmail/for.asp?prd=PT' style='color: Black'>Forgot Password?</a>"+
                            "                       <form name='loginMenu' method='post' action='/Subscription/login.asp' style='display: none'>"+
                            "                            <input type='hidden' value='' name='username' />"+
                            "                           <input type='hidden' value='' name='password' />"+
                            "                           <input type='hidden' value='' name='Type' />"+
                            "                           <!-- myPlanner -->"+
                            "                           <input type='hidden' name='user name' />"+
                            "                           <!-- StockSelect / Research Reports -->"+
                            "                           <input type='hidden' name='user' />"+
                            "                           <input type='hidden' name='pass' />"+
                            "                        </form>"+
                            "                       </td>"+
                            "                   </tr>"+
                            "               </table>"+
                            "           </div>"+
                            "       </div>"+
                            "   </td>");
    }
    else
    {
        var sProds = sProducts.split(",");
        document.write("        <td style='width: 420px; font-family: arial; font-size: 12px; color: black; font-weight: bold; text-decoration: none;' align='right'>"+
                            "       <table cellspacing='0' cellpadding='0' border='0' width='100%' style='font-family: arial; font-size: 12px; color: black; font-weight: bold; text-decoration: none;'>"+
                            "           <tr>"+
                            "               <td align='right' style='width: 210px;'>Welcome,&nbsp;<span style='font-weight: normal; font-style: italic'>" + sName + "</span>&nbsp;&nbsp;&nbsp;</td>"+
                            "               <td align='left' style='width: 210px'><a href='#' onMouseOver=\"javascript:document.getElementById('divMySubs').style.display='';\" onMouseOut=\"javascript:document.getElementById('divMySubs').style.display='none';\" style='text-decoration: underline; color: black'>My Subscriptions</a>&nbsp;|&nbsp;<a href='#' onMouseOver=\"javascript:document.getElementById('divManage').style.display='';\" onMouseOut=\"javascript:document.getElementById('divManage').style.display='none';\" style='text-decoration: underline; color: black'>Manage</a>&nbsp;|&nbsp;<a href='/logout.asp' style='color: black; text-decoration: underline'>Logout</a>&nbsp;&nbsp;"+
                            "                   <div id='divMySubs' style='position:relative; top:0; right:0; width: 155px; z-index: 1000; display: none' onMouseOver=\"javascript:document.getElementById('divMySubs').style.display='';\" onMouseOut=\"javascript:document.getElementById('divMySubs').style.display='none';\">"+
                            "                       <div style='position: absolute; top: 0px; right: 0px; width: 100%; z-index: 1001; background-color: #eeeeee'>"+
                            "                           <table cellpadding='0' cellspacing='0' width='100%' height='5px'>"+
							"								<tr style='height: 5px'>"+
							"									<td></td>"+
							"								</tr>"+
                            "                           </table>"+
                            "                           <table cellpadding='2' cellspacing='0' width='100%' style='border: solid 1px black'>");
       for(j=0; j<sProds.length; j++)
       {
            document.write("                                <tr>"+
                            "                                   <td style='font-weight: bold; color: black; border-bottom: 1px solid #b8b8b8; font-size: 8pt;font-family: arial; cursor: pointer' align='left' onMouseOver=\"javascript:this.style.color='white'; this.style.backgroundColor='#032949';\" onMouseOut=\"javascript:this.style.color='black'; this.style.backgroundColor='';\" onclick=\"javascript:GoToService('" + sLinks.split(",")[j] + "');\">" + sProds[j] + "</td>"+
                            "                               </tr>");
       }
       document.write("                                 </table>"+
                            "                       </div>"+
                            "                   </div>"+
                            "                   <form name='frmLogin' method='post' style='display: none'>"+
                            "                       <input type='hidden' name='username' value='" + sUserName + "' />"+
                            "                       <input type='hidden' name='user' value='" + sUserName + "' />"+
                            "                       <input type='hidden' name='password' value='" + sPass + "' />"+
                            "                   </form>"+
                            "                   <div id='divManage' style='position:relative; top:0; right:0; width: 100px; z-index: 1002; display: none' onMouseOver=\"javascript:document.getElementById('divManage').style.display='';\" onMouseOut=\"javascript:document.getElementById('divManage').style.display='none';\">"+
                            "                       <div style='position: absolute; top: 0px; right: 0px; left: 105px; width: 100%; z-index: 1003; background-color: #eeeeee'>"+
                            "                           <table cellpadding='0' cellspacing='0' width='100%' height='5px'>"+
                            "                               <tr style='height: 5px'>"+
							"									<td></td>"+
							"								</tr>"+
                            "                           </table>"+
                            "                           <table cellpadding='2' cellspacing='0' width='100%' style='border: solid 1px black'>"+
                            "                               <tr>"+
                            "                                   <td style='font-weight: bold; color: black; border-bottom: 1px solid #b8b8b8; font-size: 8pt;font-family: arial; cursor: pointer' align='left' onMouseOver=\"javascript:document.getElementById('aPassword').style.color='white'; this.style.backgroundColor='#032949';\" onMouseOut=\"javascript:document.getElementById('aPassword').style.color='black'; this.style.backgroundColor='';\"><a id='aPassword' href='/subscription/changepassword.asp' style='text-decoration: none; color: black'>Password</a></td>"+
                            "                               </tr>"+
                            "                               <tr>"+
                            "                                   <td style='font-weight: bold; color: black; border-bottom: 1px solid #b8b8b8; font-size: 8pt;font-family: arial; cursor: pointer' onMouseOver=\"javascript:document.getElementById('aProfile').style.color='white'; this.style.backgroundColor='#032949';\" onMouseOut=\"javascript:document.getElementById('aProfile').style.color='black'; this.style.backgroundColor='';\"><a id='aProfile' href='/subscription/updateprofile.asp' style='text-decoration: none; color: black'>Profile</a></td>"+
                            "                               </tr>"+
                            "                               <tr>"+
                            "                                   <td style='font-weight: bold; color: black; border-bottom: 1px solid #b8b8b8; font-size: 8pt;font-family: arial; cursor: pointer' align='left' onMouseOver=\"javascript:this.style.color='white'; this.style.backgroundColor='#032949';\" onMouseOut=\"javascript:this.style.color='black'; this.style.backgroundColor='';\" onclick=\"javascript:window.location.href='/Subscription/manage.asp';\">Subscriptions</td>"+
                            "                               </tr>"+
                            "                           </table>"+
                            "                       </div>"+
                            "                   </div>"+
                            "               </td>"+
                            "           </tr>"+
                            "       </table>"+
                            "   </td>");
    }
                            
    document.write("        </tr>"+
                        "</table>"+
                    "</td>"+
                   "</tr>");
}

function displaySubMenu(sectionName1)
{
}

function newMarketBandInner_rr(sName, sProducts, sLinks, sUserName, sPass)
{
	document.write("<tr>"+
	                "<td style='height: 29px; background-color: #eeeeee;'>"+
	                    "<table cellpadding='0' cellspacing='0' width='100%'>"+
	                        "<tr valign='middle'>");
    if(sName=="" || sName==null)
    {
        document.write("        <td style='width: 100%; font-family: arial; font-size: 12px; color: black; font-weight: bold; text-decoration: none;' align='right'><a href='#' onclick='javascript:showHomeLogin();return false;' style='color: #cc0000; font-family: arial; font-size: 12px; font-weight: bold; text-decoration: underline; text-align: right'>MEMBER'S LOGIN</a>&nbsp;&nbsp;"+
                            "       <div id='divLogin' style='position:relative; top:0; right:0; width: 240px; visibility: hidden; z-index: 1000'>"+
                            "           <div style='position: absolute; top: 10px; right: 0px; width: 100%; z-index: 1001; background-color: #e6e6e6'>"+
                            "               <table cellpadding='2' cellspacing='0' width='100%' style='border: solid 1px black'>"+
                            "                   <tr>"+
                            "                       <td></td>"+
                            "                       <td colspan='2' style='background-color: black; width: 96%'>"+
                            "                           <table cellspacing='0' cellpadding='0' border='0' width='100%'>"+
                            "                               <tr>"+
                            "                                   <td align='left' style='width: 80%; color: white; font-family: Arial; font-size: 14px; font-weight: bold'>MEMBER'S ARENA</td>"+
                            "                                   <td align='right' style='width: 20%; font-family: Arial; font-size: 14px; font-weight: bold'><a href='#' style='color: white; text-decoration: none' title='Close' onclick=\"javascript:showHomeLogin();return false;\">X</a>&nbsp;</td>"+
                            "                               </tr>"+
                            "                           </table>"+
                            "                       </td>"+
                            "                       <td></td>"+
                            "                   </tr>"+
                            "                    <tr>"+
                            "                       <td style='width: 2%'></td>"+
                            "                       <td align='left' style='font-size: 8pt; font-family: Arial; font-weight: bold; width: 48%'>&nbsp;&nbsp;USERNAME</td>"+
                            "                       <td align='left' style='font-size: 8pt; font-family: Arial; font-weight: bold; width: 48%'>&nbsp;&nbsp;PASSWORD</td>"+
                            "                       <td style='width: 2%'></td>"+
                            "                   <tr>"+
                            "                       <td></td>"+
                            "                        <td align='left' style='font-size: 8pt; font-family: Arial; font-weight: bold'><input type='text' id='txtUsername' name='txtUsername' size='11' style='font-family: arial; font-size: 13px; color: Black;' />"+
                            "                       <td align='left' style='font-size: 8pt; font-family: Arial; font-weight: bold'><input type='password' id='txtPassword' name='txtPassword' size='11' style='font-family: arial; font-size: 13px; color: Black;' /></td>"+
                            "                       <td></td>"+
                            "                   </tr>"+
                            "                   <tr>"+
                            "                       <td></td>"+
                            "                       <td colspan='2' align='left'>"+
	                        "                            <select id='selType' name='selType' style='font-family: arial; font-size: 13px; color: Black; width: 168px'>"+
	                        "                               <option value='SelectOptional' selected='selected'>Select (Optional)</option>"+
	                        "                               <option value='htr'>Hidden Treasure</option>"+
							"                               <option value='mc'>MidcapSelect</option>"+
				            "                               <option value='portfolio'>Portfolio Tracker</option>"+
				            "                               <option value='research-it'>ResearchPro</option>"+
	                        "                               <option value='qv'>StockSelect</option>"+
				            "                               <option value='valuepro'>ValuePro</option>"+
	                        "                               <option value='fundselect'>FundSelect</option>"+
	                        "                               <option value='fsplus'>FundSelect Plus</option>"+
	                        "                            </select>"+
	                        "                           <input type='button' value='Go' style='font-family: arial; font-size: 13px; color: Black; width: 38px' onclick='javascript:menuLoginAction(document.loginMenu);' />"+
                            "                       </td>"+
                            "                       <td></td>"+
                            "                   </tr>"+
                            "                   <tr>"+
                            "                       <td colspan='4' align='center' style='font-size: 8pt; font-family: Arial; font-weight: bold'><a href='/ptmail' style='color: #cc0000'>Sign Up</a> | <a href='/ptmail/for.asp?prd=PT' style='color: Black'>Forgot Password?</a>"+
                            "                       <form name='loginMenu' method='post' action='/Subscription/login.asp' style='display: none'>"+
                            "                            <input type='hidden' value='' name='username' />"+
                            "                           <input type='hidden' value='' name='password' />"+
                            "                           <input type='hidden' value='' name='Type' />"+
                            "                           <!-- myPlanner -->"+
                            "                           <input type='hidden' name='user name' />"+
                            "                           <!-- StockSelect / Research Reports -->"+
                            "                           <input type='hidden' name='user' />"+
                            "                           <input type='hidden' name='pass' />"+
                            "                        </form>"+
                            "                       </td>"+
                            "                   </tr>"+
                            "               </table>"+
                            "           </div>"+
                            "       </div>"+
                            "   </td>");
    }
    else
    {
        var sProds = sProducts.split(",");
        document.write("        <td style='width: 100%; font-family: arial; font-size: 12px; color: black; font-weight: bold; text-decoration: none;' align='right'>"+
                            "       <table cellspacing='0' cellpadding='0' border='0' width='100%' style='font-family: arial; font-size: 12px; color: black; font-weight: bold; text-decoration: none;'>"+
                            "           <tr>"+
                            "               <td align='right' style='width: auto;'>Welcome,&nbsp;<span style='font-weight: normal; font-style: italic'>" + sName + "</span>&nbsp;&nbsp;&nbsp;</td>"+
                            "               <td align='left' style='width: 210px'><a href='#' onMouseOver=\"javascript:document.getElementById('divMySubs').style.display='';\" onMouseOut=\"javascript:document.getElementById('divMySubs').style.display='none';\" style='text-decoration: underline; color: black'>My Subscriptions</a>&nbsp;|&nbsp;<a href='#' onMouseOver=\"javascript:document.getElementById('divManage').style.display='';\" onMouseOut=\"javascript:document.getElementById('divManage').style.display='none';\" style='text-decoration: underline; color: black'>Manage</a>&nbsp;|&nbsp;<a href='/logout.asp' style='color: black; text-decoration: underline'>Logout</a>&nbsp;&nbsp;"+
                            "                   <div id='divMySubs' style='position:relative; top:0; right:0; width: 155px; z-index: 1000; display: none' onMouseOver=\"javascript:document.getElementById('divMySubs').style.display='';\" onMouseOut=\"javascript:document.getElementById('divMySubs').style.display='none';\">"+
                            "                       <div style='position: absolute; top: 0px; right: 0px; width: 100%; z-index: 1001; background-color: #eeeeee'>"+
                            "                           <table cellpadding='0' cellspacing='0' width='100%' height='5px'>"+
							"								<tr style='height: 5px'>"+
							"									<td></td>"+
							"								</tr>"+
                            "                           </table>"+
                            "                           <table cellpadding='2' cellspacing='0' width='100%' style='border: solid 1px black'>");
       for(j=0; j<sProds.length; j++)
       {
            document.write("                                <tr>"+
                            "                                   <td style='font-weight: bold; color: black; border-bottom: 1px solid #b8b8b8; font-size: 8pt;font-family: arial; cursor: pointer' align='left' onMouseOver=\"javascript:this.style.color='white'; this.style.backgroundColor='#032949';\" onMouseOut=\"javascript:this.style.color='black'; this.style.backgroundColor='';\" onclick=\"javascript:GoToService('" + sLinks.split(",")[j] + "');\">" + sProds[j] + "</td>"+
                            "                               </tr>");
       }
       document.write("                                 </table>"+
                            "                       </div>"+
                            "                   </div>"+
                            "                   <form name='frmLogin' method='post' style='display: none'>"+
                            "                       <input type='hidden' name='username' value='" + sUserName + "' />"+
                            "                       <input type='hidden' name='user' value='" + sUserName + "' />"+
                            "                       <input type='hidden' name='password' value='" + sPass + "' />"+
                            "                   </form>"+
                            "                   <div id='divManage' style='position:relative; top:0; right:0; width: 100px; z-index: 1002; display: none' onMouseOver=\"javascript:document.getElementById('divManage').style.display='';\" onMouseOut=\"javascript:document.getElementById('divManage').style.display='none';\">"+
                            "                       <div style='position: absolute; top: 0px; right: 0px; left: 105px; width: 100%; z-index: 1003; background-color: #eeeeee'>"+
                            "                           <table cellpadding='0' cellspacing='0' width='100%' height='5px'>"+
                            "                               <tr style='height: 5px'>"+
							"									<td></td>"+
							"								</tr>"+
                            "                           </table>"+
                            "                           <table cellpadding='2' cellspacing='0' width='100%' style='border: solid 1px black'>"+
                            "                               <tr>"+
                            "                                   <td style='font-weight: bold; color: black; border-bottom: 1px solid #b8b8b8; font-size: 8pt;font-family: arial; cursor: pointer' align='left' onMouseOver=\"javascript:document.getElementById('aPassword').style.color='white'; this.style.backgroundColor='#032949';\" onMouseOut=\"javascript:document.getElementById('aPassword').style.color='black'; this.style.backgroundColor='';\"><a id='aPassword' href='/subscription/changepassword.asp' style='text-decoration: none; color: black'>Password</a></td>"+
                            "                               </tr>"+
                            "                               <tr>"+
                            "                                   <td style='font-weight: bold; color: black; border-bottom: 1px solid #b8b8b8; font-size: 8pt;font-family: arial; cursor: pointer' onMouseOver=\"javascript:document.getElementById('aProfile').style.color='white'; this.style.backgroundColor='#032949';\" onMouseOut=\"javascript:document.getElementById('aProfile').style.color='black'; this.style.backgroundColor='';\"><a id='aProfile' href='/subscription/updateprofile.asp' style='text-decoration: none; color: black'>Profile</a></td>"+
                            "                               </tr>"+
                            "                               <tr>"+
                            "                                   <td style='font-weight: bold; color: black; border-bottom: 1px solid #b8b8b8; font-size: 8pt;font-family: arial; cursor: pointer' align='left' onMouseOver=\"javascript:this.style.color='white'; this.style.backgroundColor='#032949';\" onMouseOut=\"javascript:this.style.color='black'; this.style.backgroundColor='';\" onclick=\"javascript:window.location.href='/Subscription/manage.asp';\">Subscriptions</td>"+
                            "                               </tr>"+
                            "                           </table>"+
                            "                       </div>"+
                            "                   </div>"+
                            "               </td>"+
                            "           </tr>"+
                            "       </table>"+
                            "   </td>");
    }
                            
    document.write("        </tr>"+
                        "</table>"+
                    "</td>"+
                   "</tr>");
}

function displayMainMenu_rr()
{
    document.write("<link href='/css/dropdown.css' rel='stylesheet' type='text/css' />");        
    objXmlHttpMenu1 = null;
    objXmlHttpMenu1 = GetXmlHttpObj(null);
    objXmlHttpMenu1.open("GET", "/newmenu.asp", false);
    objXmlHttpMenu1.send(null);
    var sText = objXmlHttpMenu1.responseText;
	document.write("<table cellspacing='0' cellpadding='0' border='0' width='100%' style='margin: 0px;padding: 0px;font-family: Arial, Helvetica, sans-serif;'>");
	if(sText.replace(" ","")=="")
    {
		
        newMarketBandInner_rr("", "", "", "", "")
    }
    else
    {
        var sTextArr = sText.split('~');
        newMarketBandInner_rr(sTextArr[0], sTextArr[1], sTextArr[2], sTextArr[3], sTextArr[4])
    }
	document.write("</table>");
}
  function openWindow(reqUrl){
	//window.open(reqUrl,'mywindow','width=600,height=300,resizable=yes,scrollbars=yes,toolbar=yes,directories=yes,status=yes,menubar=yes,copyhistory=yes');
	window.open(reqUrl,'_blank');  
	return false;
  }
