var returnUrl = escape(window.location).toLowerCase();

var sub1index = returnUrl.indexOf("irol-stockanddividend");
var sub1aindex = returnUrl.indexOf("irol-stocklookup");
var sub1bindex = returnUrl.indexOf("irol-divcalc");
var sub1cindex = returnUrl.indexOf("irol-stocksplithistory");
var sub1dindex = returnUrl.indexOf("irol-dividends");

var sub2index = returnUrl.indexOf("irol-financialinformation");
var sub2aindex = returnUrl.indexOf("irol-reportsannual");
var sub2cindex = returnUrl.indexOf("expmi");
var sub2dindex = returnUrl.indexOf("irol-reportsother");
var sub2eindex = returnUrl.indexOf("irol-sec");
var sub2findex = returnUrl.indexOf("expmi_notes");
var sub2gindex = returnUrl.indexOf("irol-event");
var sub2hindex = returnUrl.indexOf("guestbook");

var sub3index = returnUrl.indexOf("irol-govhighlights");
var sub3aindex = returnUrl.indexOf("8269");
var sub3bindex = returnUrl.indexOf("8270");
var sub3cindex = returnUrl.indexOf("irol-corpauditdepartment");
var sub3dindex = returnUrl.indexOf("irol-sarbanesoxleycompliance");
var sub3eindex = returnUrl.indexOf("irol-employeetraining");
var sub3findex = returnUrl.indexOf("irol-govbio");

var sub4index = returnUrl.indexOf("andevents");
var sub4aindex = returnUrl.indexOf("irol-news");
var sub4bindex = returnUrl.indexOf("irol-calendar");
var sub4cindex = returnUrl.indexOf("presentation");

var sub5index = returnUrl.indexOf("irol-shareholderinformation");
var sub5aindex = returnUrl.indexOf("proxy");
var sub5bindex = returnUrl.indexOf("irol-stockpurchase");
var sub5cindex = returnUrl.indexOf("irol-contact");
var sub5dindex = returnUrl.indexOf("irol-drip");


var sub6index = returnUrl.indexOf("irol-pmispinoff");
var sub6aindex = returnUrl.indexOf("irol-keydates");
var sub6bindex = returnUrl.indexOf("informationcontact");
var sub6cindex = returnUrl.indexOf("mafaq");
var sub6dindex = returnUrl.indexOf("irol-glossary");

var sub7index = returnUrl.indexOf("maoverview");
var sub7aindex = returnUrl.indexOf("manews");
var sub7bindex = returnUrl.indexOf("matimeline");
var sub7cindex = returnUrl.indexOf("mareports");
var sub7dindex = returnUrl.indexOf("madividends");
var sub7eindex = returnUrl.indexOf("macontact");
var sub7findex = returnUrl.indexOf("maustfaq");
var sub7gindex = returnUrl.indexOf("masec");


if (sub1index  != -1 || sub1aindex  != -1 || sub1bindex  != -1 || sub1cindex  != -1 || sub1dindex  != -1)

	{document.getElementById('list1').innerHTML = "<ul class=\"on\" id=\"sub1\"><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=irol-stocklookup\">Share Price Lookup</a></li><li>- <a href=\"http://www.altria.com/investors/2_3_2_investvalcalc.asp\">Investment Value Calculator </a></li><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=irol-divcalc\">Dividend Calculator </a></li><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=irol-stocksplithistory\">Stock Split History </a></li><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=irol-dividends\">Dividend Schedule &amp; History</a></li></ul>";
document.getElementById("null1").style.borderBottom = "0";
			}
			

else if (sub2index != -1 || sub2aindex != -1 || sub2dindex != -1 || sub2eindex != -1 || sub4cindex != -1 || sub2gindex != -1 || sub2hindex != -1)			
	{document.getElementById('list2').innerHTML = "<ul id=\"sub2\" class=\"on\"><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=irol-reportsannual\">Annual Reports</a></li><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=irol-presentations\">Earnings Releases &amp; Webcasts</a></li><li class=\"innerli\"><a href=\"phoenix.zhtml?c=80855&amp;p=expmi\">Financials Ex-PMI</a></li><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=irol-reportsother\">Financial Review</a></li><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=proxy\">Proxy Statement</a></li><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=irol-secLanding\">SEC Filings</a></li></ul>";
	document.getElementById("subtop1").style.borderBottom = "0";
	}
	
else if (sub2cindex != -1)
{document.getElementById('list2').innerHTML = "<ul id=\"sub2\" class=\"on\"><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=irol-reportsannual\">Annual Reports</a></li><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=irol-presentations\">Earnings Releases &amp; Webcasts</a></li><li class=\"innerlion\"><a href=\"phoenix.zhtml?c=80855&amp;p=expmi\">Financials Ex-PMI</a><ul id=\"innerul\"><li>-<a href=\"phoenix.zhtml?c=80855&amp;p=expmi_notes\">Notes</a></li></ul></li><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=irol-reportsother\">Financial Review</a></li><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=proxy\">Proxy Statement</a></li><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=irol-secLanding\">SEC Filings</a></li></ul>";
	document.getElementById("subtop1").style.borderBottom = "0";
	}

else if (sub3index != -1 || sub3aindex != -1 || sub3bindex != -1 || sub3cindex != -1 || sub3dindex != -1 || sub3eindex != -1 || sub3findex != -1)
{document.getElementById('list3').innerHTML =  "<ul id=\"sub3\" class=\"on\"><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=irol-govCommittee&amp;Committee=8269\">Audit Committee of the Board</a></li><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=irol-govCommittee&amp;Committee=8270\">Disclosure Controls Committee</a></li><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=irol-corpauditdepartment\">Corporate Audit Department</a></li><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=irol-sarbanesoxleycompliance\">Sarbanes-Oxley Act</a></li><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=irol-employeetraining\">Employee Training</a></li></ul>"
}


else if (sub4index != -1 || sub4aindex != -1 || sub4bindex != -1)
{document.getElementById('list4').innerHTML = "<ul id=\"sub4\" class=\"on\"><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=irol-news\">Financial News</a></li><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=irol-calendar\">Investor Calendar</a></li><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=irol-presentations\">Webcasts</a></li></ul>"
}

			
else if (sub5index != -1 || sub5aindex != -1 || sub5bindex != -1 || sub5cindex != -1 || sub5dindex !=-1)
{document.getElementById('list5').innerHTML = "<ul id=\"sub5\" class=\"on\"><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=proxy\">Annual Shareholders Meeting</a></li><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=irol-stockpurchase\">Shareholder Services</a></li><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=irol-contact\">Investor Contacts</a></li></ul>"
}

	
		
else if (sub6index  != -1 || sub6aindex != -1 || sub6bindex != -1 || sub6cindex != -1 || sub6dindex != -1)
{document.getElementById('list6').innerHTML = "<ul class=\"on\" id=\"sub6\"><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=irol-keydates\">Key Dates</a></li><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=irol-informationcontact\">Contact Information</a></li><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=mafaq_2_2_1_4_faqs\">FAQs</a></li><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=irol-glossary\">Glossary</a></li></ul>";

}

else if (sub7index  != -1 || sub7aindex != -1 || sub7bindex != -1 || sub7cindex != -1 || sub7dindex != -1 || sub7eindex != -1  || sub7findex != -1 || sub7gindex != -1)
{document.getElementById('list7').innerHTML = "<ul class=\"on\" id=\"sub7\"><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=manews\">News Releases</a></li><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=maSEC\">SEC Filings</a></li><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=matimeline\">Historical Stock Data</a></li><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=mareports\">Financial Reports</a></li><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=madividends\">Dividends</a></li><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=macontact\">Contact Information</a></li><li>- <a href=\"phoenix.zhtml?c=80855&amp;p=maustfaq\">UST Inc. FAQs</a></li></ul>";


}

var sb1 = document.getElementById('list1').getElementsByTagName('li');
if (sub1aindex !=-1 && sub1index !=0){sb1[0].className = 'current';
document.getElementById('subtop1').className = 'activeoff';}
if (sub1bindex !=-1 && sub1index !=0){sb1[2].className = 'current';
document.getElementById('subtop1').className = 'activeoff';}
if (sub1cindex !=-1 && sub1index !=0){sb1[3].className = 'current';
document.getElementById('subtop1').className = 'activeoff';}
if (sub1dindex !=-1 && sub1index !=0){sb1[4].className = 'current';
document.getElementById('subtop1').className = 'activeoff';}

var sb2 = document.getElementById('list2').getElementsByTagName('li');

if (sub2aindex !=-1 && sub2index!=0){sb2[0].className = 'current';
document.getElementById('subtop2').className = 'activeoff';
document.getElementById('subtop1').className = 'topitemimgoff';}
if (sub2findex !=1 && sub2cindex !=-1 && sub2index!=0){
	var sb2inner = document.getElementById('innerul').getElementsByTagName('li');
	sb2inner[0].className = '';
document.getElementById('subtop2').className = 'activeoff';
document.getElementById('subtop1').className = 'topitemimgoff';}
if (sub2findex !=-1 && sub2index !=0){sb2[2].className = "innerliactiveoff";
document.getElementById('subtop2').className = 'activeoff';
document.getElementById('subtop1').className = 'topitemimgoff';}
if (sub2dindex !=-1 && sub2index !=0){sb2[3].className = 'current';
document.getElementById('subtop2').className = 'activeoff';
document.getElementById('subtop1').className = 'topitemimgoff';}
if (sub2eindex !=-1 && sub2index !=0){sb2[5].className = 'current';
document.getElementById('subtop2').className = 'activeoff';
document.getElementById('subtop1').className = 'topitemimgoff';}
if (sub4cindex !=-1 || sub2gindex !=-1  || sub2hindex !=-1 && sub2index !=0){sb2[1].className = 'current';
document.getElementById('subtop2').className = 'activeoff';
document.getElementById('subtop1').className = 'topitemimgoff';}

var sb3 = document.getElementById('list3').getElementsByTagName('li');
if (sub3aindex !=-1 && sub3index !=0){sb3[0].className = 'current';
document.getElementById('subtop3').className = 'activeoff';
document.getElementById('subtop2').className = 'topitemimgoff';}
if (sub3bindex !=-1 && sub3index !=0){sb3[1].className = 'current';
document.getElementById('subtop3').className = 'activeoff';
document.getElementById('subtop2').className = 'topitemimgoff';}
if (sub3cindex !=-1 && sub3index !=0){sb3[2].className = 'current';
document.getElementById('subtop3').className = 'activeoff';
document.getElementById('subtop2').className = 'topitemimgoff';}
if (sub3dindex !=-1 && sub3index !=0){sb3[3].className = 'current';
document.getElementById('subtop3').className = 'activeoff';
document.getElementById('subtop2').className = 'topitemimgoff';}
if (sub3eindex !=-1 && sub3index !=0){sb3[4].className = 'current';
document.getElementById('subtop3').className = 'activeoff';
document.getElementById('subtop2').className = 'topitemimgoff';}
if (sub3findex !=-1 && sub3index !=0){sb3[1].className = 'current';
document.getElementById('subtop3').className = 'activeoff';
document.getElementById('subtop2').className = 'topitemimgoff';}

var sb4 = document.getElementById('list4').getElementsByTagName('li');
if (sub4aindex !=-1 && sub4index !=0 ){sb4[0].className = 'current';
document.getElementById('subtop4').className = 'activeoff';
document.getElementById('subtop3').className = 'topitemimgoff';}
if (sub4bindex !=-1 && sub4index !=0){sb4[1].className = 'current';
document.getElementById('subtop4').className = 'activeoff';
document.getElementById('subtop3').className = 'topitemimgoff';}
if (sub4index !=-1 && sub4aindex !=0){sb4[0].className = '';
document.getElementById('subtop4').className = 'topitemimgon';
document.getElementById('subtop3').className = 'topitemimgoff';}

var sb5 = document.getElementById('list5').getElementsByTagName('li');
if (sub5aindex !=-1 && sub5index !=0){sb5[0].className = 'current';
document.getElementById('subtop5').className = 'activeoff';
document.getElementById('subtop4').className = 'topitemimgoff';}
if (sub5bindex !=-1 && sub5index !=0){sb5[1].className = 'current';
document.getElementById('subtop5').className = 'activeoff';
document.getElementById('subtop4').className = 'topitemimgoff';}
if (sub5cindex !=-1 && sub5index !=0){sb5[2].className = 'current';
document.getElementById('subtop5').className = 'activeoff';
document.getElementById('subtop4').className = 'topitemimgoff';}
if (sub5dindex !=-1 && sub5index !=0){sb5[1].className = 'current';
document.getElementById('subtop5').className = 'activeoff';
document.getElementById('subtop4').className = 'topitemimgoff';}


var sb6 = document.getElementById('list6').getElementsByTagName('li');
if (sub6aindex !=-1 && sub6index !=0){sb6[0].className = 'current';
document.getElementById('subtop6').className = 'activeoff';}
if (sub6bindex !=-1 && sub6index !=0){sb6[1].className = 'current';
document.getElementById('subtop6').className = 'activeoff';}
if (sub6cindex !=-1 && sub6index !=0){sb6[2].className = 'current';
document.getElementById('subtop6').className = 'activeoff';
}
if (sub6dindex !=-1 && sub6index !=0){sb6[3].className = 'current';
document.getElementById('subtop6').className = 'activeoff';}






var sb7 = document.getElementById('list7').getElementsByTagName('li');
if (sub7aindex !=-1 && sub7index !=0){sb7[0].className = 'current';
document.getElementById('subtop7').className = 'activeoff';
}
if (sub7bindex !=-1 && sub7index !=0){sb7[2].className = 'current';
document.getElementById('subtop7').className = 'activeoff';
}
if (sub7cindex !=-1 && sub7index !=0){sb7[3].className = 'current';
document.getElementById('subtop7').className = 'activeoff';
}
if (sub7dindex !=-1 && sub7index !=0){sb7[4].className = 'current';
document.getElementById('subtop7').className = 'activeoff';
}
if (sub7eindex !=-1 && sub7index !=0){sb7[5].className = 'current';
document.getElementById('subtop7').className = 'activeoff';
}
if (sub7findex !=-1 && sub7index !=0){sb7[6].className = 'current';
document.getElementById('subtop7').className = 'activeoff';
}
if (sub7gindex !=-1 && sub7index !=0){sb7[1].className = 'current';
document.getElementById('subtop7').className = 'activeoff';
}



