function goTo(e) {
if (document.getElementById) {goLoc = theLinks[e][0]}
else {goLoc = this.link;e=this.name.substring(4,this.name.length)}
if (theLinks[e][1]=="_top") {setTimeout('top.location=goLoc',1)}
else if (theLinks[e][1]=="_blank") {window.open(goLoc)}
else if (theLinks[e][1]>""&&top.frames[theLinks[e][1]]) {setTimeout('top.frames.'+theLinks[e][1]+'.location=goLoc',10)}
else if (theLinks[e][1]>"") {window.open(goLoc)}
else {setTimeout('location=goLoc',10)}}

menuSettings = new Array();
theLinks = new Array();
i=0

function beginLight() {
if (!menuSettings[1]&&menuSettings[10]=="vertical") menuSettings[1]='WIDTH="'+menuSettings[3]+'"'
else if (menuSettings[1]) menuSettings[1]='WIDTH="'+menuSettings[1]+'"'
document.write('<TABLE BGCOLOR="'+menuSettings[2]+'" ALIGN="CENTER" CELLPADDING=1 CELLSPACING="0" BORDER=0 '+menuSettings[1]+'><TR><TD><TABLE CELLPADDING=1 CELLSPACING="'+menuSettings[0]+'" BORDER=0 width="100%" align="center">')}

function addHeader(name) {
if (menuSettings[11]=="vertical") document.write('<TR>')
document.write('<TD WIDTH="'+menuSettings[3]+'" BGCOLOR="'+menuSettings[7]+'" ALIGN="'+menuSettings[6]+'"><FONT SIZE="'+menuSettings[8]+'" FACE="'+menuSettings[9]+'" COLOR="'+menuSettings[10]+'">&nbsp;'+name+'&nbsp;</TD>')
if (menuSettings[11]=="vertical") document.write('</TR>')}

function addLink(name, link, target) {
i++
theLinks[i] = [link, target]
if (menuSettings[11]=="vertical") document.write('<TR>')
document.write('<TD WIDTH="'+menuSettings[3]+'" ALIGN="'+menuSettings[6]+'" BGCOLOR="'+menuSettings[4]+'" onclick="goTo('+i+')" onmouseover="this.bgColor=\''+menuSettings[5]+'\';window.status=theLinks['+i+'][0];return true" onmouseout="this.bgColor=\''+menuSettings[4]+'\';window.status=\'\'"><ILAYER NAME="link'+i+'" visibility="hide"><LAYER LEFT=0 NAME="sub1" ALIGN="'+menuSettings[6]+'" onmouseover="bgColor=\''+menuSettings[5]+'\';window.status=theLinks['+i+'][0];return true" onmouseout="bgColor=\''+menuSettings[4]+'\';window.status=\'\'" WIDTH="100%" Z-INDEX="1"><DIV ALIGN="'+menuSettings[6]+'"><A HREF="'+link+'" CLASS="menuLink" TARGET="'+target+'" onclick="return false"><FONT SIZE="'+menuSettings[8]+'" FACE="'+menuSettings[9]+'" COLOR="'+menuSettings[10]+'">&nbsp;'+name+'&nbsp;</FONT></A></DIV></LAYER></ILAYER></TD>')
if (menuSettings[11]=="vertical") document.write('</TR>')
if (document.layers) {
document.layers["link"+i].captureEvents(Event.MOUSEUP);
document.layers["link"+i].onmouseup=goTo;
document.layers["link"+i].link=link;}}

function endLight() {document.write('</TABLE></TD></TR></TABLE>')}
if (document.layers) {window.onload=showLayers}

function showLayers() {
for (i=1;i<theLinks.length;i++) {
if (document.layers["link"+i]) document.layers["link"+i].visibility="show";}}
