<!--
function openPopUp(e)
{
    newPopUp = window.open(e, 'popUp', 'width=350,height=250,statusbar=no,left=150,top=150,menubar=no,toolbar=no,scrollbars=no')
    newPopUp.focus()
}

font = "Arial, Helvetica, sans-serif";
fontweight = "bold";
fontsize = 12;

menubgcolor = "E9D5A3";
menufgcolor = "5F0000";
menuonbgcolor = "E9D5A3";
menuonfgcolor = "000000";
bordercolor = "E9D5A3";
keepselected = true;
timegap = 500;
mpadding = 0;


// Syntax
//menus[MENU NUMBER] = new Array(
//"TOP", "LEFT", "HEIGHT", "WIDTH", "BORDER WIDTH","MENU TITLE"
//"MENU TITLE", "URL"
//);

menu1 = new Array(
"325","155","145","155","4","Link 1","","","","",
"House Sharing","/housesharing.php",2,
"Circle of Friends","/circleoffriends.php",2,
"Affordable Housing","/housing.php",2,
"Collaborators","/collaborators.php",2
);

menu2 = new Array(
"343","155","145","150","4","Link 2","","","","",
"Resources","/resources.php",2,
"Articles","/articles.php",2,
"Reading List","/readinglist.php",2
);

menu3 = new Array(
"274","155","145","150","4","Link 3","","","","",
"Press Release","/pressrelease.php",2,
"Press Kit Request","/presskit.php",2,
"Fact Sheet","/factsheet.php",2,
"Our Founder","/founder.php",2,
"Press Articles","/pressarticles.php",2,
"Awards","/awards.php",2,
"Founder Interview","/interview.php",2
);

menu4 = new Array(
"203","155","145","150","4","Link 4","","","","",
"About CoAbode","/aboutus.php",2,
"Board of Directors","/board.php",2,
"Contributors","/contributors.php",2
);



mdom = (document.getElementById) ? true : false;
mie = (navigator.appVersion.indexOf("MSIE") != -1)  ? true : false;
mns6 = (navigator.vendor == ("Netscape6") != -1) ? true : false;
NS = (document.layers) ? true : false;
mopera = (navigator.userAgent.indexOf("Opera") != -1)  ? true : false;

arraycorrect = 10;
timer=0;

selmenu = "";
selitem = "";
closestr = "";

openmenus = new Array();
oldcount = 0;

function getmenuobj(menutext)
{
if (document.getElementById) {menui = document.getElementById(menutext).style;} else if (document.all) {menui = document.all[menutext].style;} else if (document.layers) {menui = document.layers.eval(menutext);}
return menui;
}

function closeallmenus()
{
        for (a=0; a < openmenus.length; a++)
        {
                menutexta = openmenus[a];
                menitema = getmenuobj(menutexta);
                menitema.visibility = 'hidden';
        }
}

function closemenu()
{
        timer = setTimeout("closeallmenus()",timegap)
}


function popup(menunum)
{
        clearTimeout(timer);
        menutext = 'menu' + menunum;
        menitem = getmenuobj(menutext);
        closeallmenus();
        delete(openmenus);
        openmenus = new Array();
        openmenus[openmenus.length] = menutext;
        menitem.visibility = 'visible';
}

function showel(lyr, el, show, menuname, menustr)
{
        clearTimeout(timer);
        menutext = 'el' + el;

        if (document.getElementById) {menitem = document.getElementById(menutext).style;} else if (document.all) {menitem = document.all[menutext].style;} else if (NS) {menitem = document.layers[lyr -1].document.layers[el - 1].document.layers[0];}

        if (show)
        {
                menitem.visibility="visible";
                popup(lyr);
        }
        else
        {
                menitem.visibility="hidden";
                closemenu();
        }


}

function dc()
{
        location.href=window.status;
}

menus = 1;
mentext = "";
menarr = "";
while(eval("window.menu" + menus))
{
        menarr += "menu" + menus + ",";
        submenus = 1;
        while(eval("window.menu" + menus + "_" + submenus))
        {
                menarr += "menu" + menus + "_" + submenus + ",";
                submenus++;
        }
        tmenu = eval("menu" + menus);
        menus++;
}

menuarray = menarr.split("\,");
menus = menuarray.length;
elcount=0;

stxt = "<div><style type=\"text/css\"> ";
stxt += "DIV.minimenu{padding-left:" + mpadding + ";padding-right:" + (mpadding) + ";padding-top:" + mpadding + ";padding-bottom:" + mpadding + ";font-weight:" + fontweight + ";font-family:" + font + ";font-size:" + fontsize + "px;color:#" + menufgcolor + ";background-color:#" + menubgcolor + "}";
stxt += "TD.minimenu {font-family:" + font + ";font-size:" + fontsize + "px; font-weight:" + fontweight + ";}";
stxt += "A.minimenu  {font-family:" + font + ";font-size:" + fontsize + "px; font-weight:" + fontweight + ";color:#" + menuonfgcolor + ";text-decoration:none;}"
stxt += "</style>";
document.write(stxt);

lh = mpadding + fontsize;
for (a=1; a < menus; a++)
{
        mentext = "";
        menu = eval(menuarray[a - 1]);

        if (mie)
        {divwidth = " style='width:100%;' ";
        divcol = "";}
        else if (mdom)
        {divwidth = "style='width:" + (menu[3] - (mpadding * 2)) + ";'";
        divcol = "background-color:" + bordercolor + ";";}

        if (NS)
        {mentext += "<layer visibility=hidden bgcolor=#" + bordercolor + " name=\"" + menuarray[a - 1] + "\" left=\"" + menu[1] + "\" top=\"" + menu[0] + "\" width=\"" + menu[3] + "\">";}
        else
        {mentext += "<div width=" + menu[3] + " id=\"" + menuarray[a - 1] + "\" style=\"" + divcol + ";z-index:99;visibility:hidden; position:absolute;top:" + menu[0] + "px;left:" + menu[1] + "px\">";}
        mentext += "<table bgcolor=#" + bordercolor + " width=" + menu[3] + " cellpadding=0 cellspacing=" + menu[4] + " border=0>\n";

        acount = 0;
        divwidth="";
        if (mie)
        {divwidth = " style='width:100%;' ";}
        else if (mdom)
        {
                divwidth = "style='width:" + (menu[3] - (mpadding * 2)) + ";'";
        }

        atop = parseInt(menu[4]);
        for (b=arraycorrect; b < menu.length ; b++)
        {
                b = b + 2;
                borderwidth = parseInt(menu[4]);
                bw = borderwidth * 2;

                elcount++;
                acount++;

                if (NS)
                {
                        mentext += "<tr><td width=" + menu[3] + " align=center>";
                        mentext += "<layer bgcolor=#" + menubgcolor + " width=" + (menu[3] - bw) + " name=mel" + elcount + " top=" + (atop) + " left=" + borderwidth + " onMouseOver=\"showel(" + a + ", " + acount + ",1, '" + menu[b - 1] + "', '" + menuarray[a - 1] + "')\" onMouseOut=\"showel(" + a + "," + acount + ",0, '" + menu[b - 1] + "', '" + menuarray[a - 1] + "')\">\n";
                        mentext += "<layer onmouseover=\"window.status='" + menu[b - 1] + "'; this.captureEvents(Event.CLICK); this.onclick=dc\" onmouseout=\"window.status=''\" width=" + (menu[3] - bw) + " name=el" + elcount + "  visibility=hidden bgcolor=#" + menuonbgcolor + ">";
                        mentext += "<table><tr><td height=" + lh + " class=minimenu bgcolor=#" + menuonbgcolor + " valign=middle>";
                        mentext += "<a class=minimenu href='" + menu[b - 1] + "' style='color:#" + menuonfgcolor + ";text-decoration:none;'>" + menu[b - 2] + "</a>";
                        mentext += "</td></tr></table>";
                        mentext += "</layer>";
                        mentext += "<table><tr><td height=" + lh + " class=minimenu bgcolor=#" + menubgcolor + " valign=middle><font color=#" + menufgcolor + ">" + menu[b - 2] + "</font></td></tr></table>";
                        mentext += "</layer>";
                }
                else if (mopera)
                {
                        mentext += "<tr><td style=\"color:#" + menufgcolor + ";background-color:#" + menubgcolor + ";\" class=minimenu onMouseOver=\"showel(" + a + ", " + elcount + ",1, '" + menu[b - 1] + "', '" + menuarray[a - 1] + "')\" onMouseOut=\"showel(" + a + "," + elcount + ",0, '" + menu[b - 1] + "', '" + menuarray[a - 1] + "')\" align=center>";
                        mentext += "<a id=ophlid" + elcount + " href='" + menu[b - 1] + "' style=\"left:" + borderwidth + ";position:absolute;width:" + (menu[3] - bw) + ";text-decoration:none\">";
                        mentext += "<div class=minimenu name=el" + elcount + " id=el" + elcount + " style=\"z-index:99;top:" + borderwidth + ";color:#" + menuonfgcolor + ";background-color:#" + menuonbgcolor + ";visibility:hidden\">" + menu[b - 2] + "</div>";
                        mentext += "</a><div class=minimenu>" + menu[b - 2] + "</div>";
                }
                else
                {
                        mentext += "<tr><td width=" + menu[3] + " align=center>";
                        mentext += "<a href='" + menu[b - 1] + "' style='text-decoration:none;'>";
                        mentext += "<div class=minimenu " + divwidth;
                        mentext += " onMouseOver=\"popup(" + a +",1);this.style.cursor='hand';this.style.backgroundColor='#" + menuonbgcolor + "';this.style.color='#" + menuonfgcolor + "';\" ";
                        mentext += " onMouseOut=\"closemenu(" + a +");this.style.backgroundColor='#" + menubgcolor + "'; this.style.color='#" + menufgcolor + "';\">";
                        mentext += menu[b - 2] + "</div></a>";
                }

                mentext += "</td></tr>\n\n";
                document.write(mentext);
                mentext = "";

                if (NS)
                {
                        mt = document.layers[a - 1].document.layers[acount - 1].document.layers[0];
                        atop += mt.clip.height + parseInt(menu[4]);
                }
        }
        if (NS) {mentext += "<tr><td><layer top=" + (atop) + "></layer></td></tr>"}
        mentext += "</table>";
        if (NS) {mentext += "</layer>"} else {mentext += "</div>"}
        document.write(mentext);

        if (mopera)
        {
                oh = 0;
                optop = borderwidth;
                icount = elcount - oldcount;
                ecount = elcount - icount;
                for (x=1; x<=icount; x++)
                {
                        cnt = ecount + x;
                        mi = getmenuobj('el' + cnt)
                        mia = getmenuobj('ophlid' + cnt)
                        mia.top = optop;
                        optop += mi.pixelHeight + borderwidth;
                }
        oldcount = elcount;
        }

}
if (NS) {document.write("</layer>")} else {document.write("</div>")

}

//  end hiding script  -->
