
I am in need of assistance. I have generated a script for a slide in menu and on its own it works alright. However when I try to set it up for multiple slide menus in the same webpage I run in to some issues. Primarily the script only working for one slide on both tabs. So tab 1 hides and and un hides menu and tab 2 does the same thing. Any Ideas???Also when the page loads i need the menu to be closed below I have included the base script Im using any help would be great...thank you
<HTML>
<head>
<style>
#tabdiv { z-index: 2; left: 220px; position: absolute; top: 210px
}
#textdiv { z-index: 1; padding-top: 10px; position: absolute; top: 200px;
border-top-width: 1px; padding-right: 5px; padding-left: 5px;
border-left-width: 1px; border-left-color: #000099; left: 0px;
border-bottom-width: 1px; border-bottom-color: #000099;
padding-bottom: 10px; width: 220px; color: black; border-top-color:GREEN;
background-color:GREEN; border-right-width: 1px; border-right-color:GREEN
}
</style>
<SCRIPT language=JavaScript1.2>
if (document.layers) {n=1;ie=0}
if (document.all) {n=0;ie=1}
function init() {
if (n) tab = document.tabDiv
if (n) poptext = document.textdiv
if (ie) tab = tabDiv.style
if (ie) poptext = textdiv.style
}
var tabShow=1;
function myfunction() {
if (tabShow == 1) {
if (n) {
tab.visibility = "hide";
tab.left = 0;
tab.visibility = "show";
poptext.visibility = "hide";
tabShow = 0;
return;
}
if (ie) {
tab.visibility = "hidden";
tab.left = 0;
tab.visibility = "visible";
poptext.visibility = "hidden";
tabShow = 0;
return;
}
}
if (tabShow == 0) {
if (n) {
tab.visibility = "hide";
tab.left = 220;
tab.visibility = "show";
poptext.visibility = "show";
tabShow = 1;
}
if (ie) {
tab.visibility = "hidden";
tab.left = 220;
tab.visibility = "visible";
poptext.visibility = "visible";
tabShow = 1;
}
}
}
</SCRIPT>
</head>
<body onload=init()>
<!-- Slide-in table start -->
<DIV id=tabDiv><B>IRA</B><a href="javascript:myfunction();">
<IMG alt="Click here to close" src="images/popout_menu.gif" width=14 border=0></a></DIV>
<DIV id=textdiv>
<font face="Verdana" size="2"><B>INDIVIDUAL RETIREMENT ACCOUNT</B></font><br>
<font face="Verdana" size="1">IRA is held at a custodian institution such as a bank or brokerage, and may be invested in anything that the custodian allows (for instance, a bank may allow certificates of deposit, and a brokerage may allow stocks and mutual funds). Unlike the Roth IRA, the only criterion for being eligible to contribute to a Traditional IRA is sufficient income to make the contribution.Transactions in the account, including interest, dividends, and capital gains, are not subject to tax while still in the account, but upon withdrawal from the account, withdrawals are subject to federal income tax.
</font><br>
</DIV>
<!-- Slide-in table end -->
</body>
</HTML>
</HTML>