Okay, I suck at java code. What can I say. I got this code and what I need to happen is depending on the menu var name, I need it to choose a colour accordingly.
Code:
<script type="text/javascript">
var menu1=new Array()
menu1[0]='<a href="http://www.mannahouseyouth.com/info">Info</a>'
menu1[1]='<a href="http://www.mannahouseyouth.com/info2">Something else?</a>'
menu1[2]='<a href="http://www.mannahouseyouth.com/info2">Mooshu?</a>'
menu1[3]='<a href="http://www.mannahouseyouth.com/info2">Dounut</a>'
var menu2=new Array()
menu2[0]='<a href="http://www.mannahouseyouth.com/tribe1">link1</a>'
menu2[1]='<a href="http://www.mannahouseyouth.com/tribe2">link2</a>'
menu2[2]='<a href="http://www.mannahouseyouth.com/tribe3">link3</a>'
var menuwidth='132px'
var menubgcolor='#ED1B24'
var disappeardelay=250
var hidemenu_onclick="yes"
var ie4=document.all
var ns6=document.getElementById&&!document.all
if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')
</style>
See right now. Here.
Code:
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')
is what I think needs to change. Somehow I need to get it not put the menubgcolor as a standard, but check what var it is, eg, menu1 or menu2, or menu3 and then place in a var named menubgcolor1, 2, 3.
Does that make sense?
Is it easily done?
Get back to me, thanks in advance.
~TTH