



// JavaScript for Atlantic Coast Joint Venture
// Author: Susan L. Bolander, Webworks7, except where otherwise noted


function setActiveStyleSheet(title) {
   var i, a, main;
   for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
     if(a.getAttribute("rel").indexOf("style") != -1
        && a.getAttribute("title")) {
       a.disabled = true;
       if(a.getAttribute("title") == title) a.disabled = false;
     }
   }
}


// ------------------------------------------------------------------------

// Prevents this site from being framed - if original window is used, opens new
// one and puts original back to page where click occurred

if(window != top)
{
  if(history.length==0)
  {
    top.location = self.location
  }
  else
  {
    window.open(location.href);
    history.go(-1);
  }
}

//---------- Verify that page has loaded --------------------------------

// This function is called when the pages have completely loaded, which prevents the MouseOver
// event from triggering before the groups have been defined
// (this had been a problem when using older Netscape versions)

var ready = "no"

function done()
{
  ready = "yes"
}


//------------- Pop-Up Menus -----------------------------

var topcorner = 240
var twolines = 9

// Add some extra vertical spacing to make Mozilla and Netscape browsers line up properly
// Currently this feature is not needed with the modern Gecko browsers, but if there  
// are future font changes or new menu items, it may be necessary to add
// a few pixels here - change the zero to a number

if(!document.all && document.getElementById)  //Mozilla and Netscape 6 and up
    {
    topcorner+= 0
    }

if(document.layers) // Netscape 4
    {
    topcorner+= 8
    }


// ------------------------------

var submenus = ""

submenus+= "<div>&nbsp;<\/div>"  // This is here to overcome a Netscape 4 bug

submenus += "<div id='aboutusmenu' class='nav2' style='position: absolute; top: "

submenus += topcorner

submenus += "px; visibility: hidden;'>"


// Here is the About Us menu  -------------------------------

submenus += "<a href='about_acjv.htm'>What is the Atlantic Coast Joint Venture?<\/a> | <a href='partners.htm'>Partners<\/a> | <a href='acjv_structure.htm'>Joint Venture Structure<\/a> | <a href='what_are_acjvs.htm'>Joint Ventures &#8211; What Are They?<\/a>"

//  ---------------------------------------------------------

submenus += "<\/div>"

submenus += "<div id='planmenu' class='nav2' style='position: absolute; top: "

submenus += topcorner

submenus += "px; visibility: hidden;'>"

// Here is the Planning menu  -------------------------------

submenus += "<a href='planning.htm#plan_summaries'>National, International, and Step-Down Plans<\/a> | <a href='bird_conservation_regions.htm'>Bird Conservation Regions<\/a> | <a href='species_plans.htm'>Individual Species Plans<\/a>"

//  ---------------------------------------------------------

submenus += "<\/div>"

submenus += "<div id='projectsmenu' class='nav2' style='position: absolute; top: "

submenus += topcorner

submenus += "px; visibility: hidden;'>"

// Here is the Projects menu  -------------------------------

submenus += "<a href='projects.htm'>Conservation Projects<\/a> | <a href='science_projects.htm'>Science Projects<\/a>"

//  ---------------------------------------------------------

submenus += "<\/div>"

submenus += "<div id='fundingmenu' class='nav2' style='position: absolute; top: "

submenus += (topcorner - twolines)

submenus += "px; visibility: hidden;'>"

// Here is the Funding menu  -------------------------------

submenus += "<a href='funding.htm'>North American Wetlands Conservation Act<\/a> | <a href='neo_trop_act.htm'>Neotropical Migratory Bird Act<\/a> | <a href='neo_trop_act.htm#coastal_grants'>Coastal Grants<\/a><img src='images/empty.gif' height='1' width='1' alt='' \/><br \/><a href='fws_funding.htm'>Other U.S. Fish and Wildlife Service Funding Opportunities<\/a> | <a href='state_federal_programs.htm'>Other State and Federal Programs<\/a>"

//  ---------------------------------------------------------

submenus += "<\/div>"

submenus += "<div id='resourcesmenu' class='nav2' style='position: absolute; top: "

submenus += (topcorner - twolines)

submenus += "px; visibility: hidden;'>"

// Here is the Resources menu  -------------------------------

submenus += "<a href='resources.htm'>ACJV Publications<\/a> | <a href='online_resources.htm'>Online Resources<\/a> | <a href='species_resources.htm'>Individual Species Resources<\/a><img src='images/empty.gif' height='1' width='1' alt='' \/><br \/><a href='other_resources.htm'>State Comprehensive Wildlife Conservation Strategies<\/a> | <a href='gis_resources.htm'>GIS and Mapping Resources<\/a> | <a href='other_resources.htm#additional_resources'>Additional Resources<\/a>" 

//  ---------------------------------------------------------

submenus += "<\/div>"

submenus += "<div id='newsmenu' class='nav2' style='position: absolute; top: "

submenus += topcorner

submenus += "px; visibility: hidden;'>"

// Here is the News menu  -------------------------------

submenus += "<a href='news_events.htm'>ACJV Newsletter<\/a> | <a href='subscribe.htm'>Subscribe to the Newsletter<\/a> | <a href='other_news.htm'>Other Bird Conservation News<\/a> | <a href='events.htm'>Upcoming Meetings &#038; Events<\/a>"

//  ---------------------------------------------------------

submenus += "<\/div>"

submenus += "<div id='contactusmenu' class='nav2' style='position: absolute; top: "

submenus += topcorner

submenus += "px; visibility: hidden;'>"

// Here is the Contact Us menu  -------------------------------

submenus += "&nbsp;"

//  ---------------------------------------------------------

submenus += "<\/div>"

submenus += "<div id='homemenu' class='nav2' style='position: absolute; top: "

submenus += topcorner

submenus += "px; visibility: hidden;'>"

// Here is the Home menu  -------------------------------

submenus += "&nbsp;"

//  ---------------------------------------------------------

submenus += "<\/div>"


// -----------------------------------------------------


function ShowIt(thingtoshow)
{
if (ready == "yes")
  {
    HideAll()
    if(document.layers)  // Netscape 4
    {
      eval('document.' + thingtoshow + '.visibility="visible"')
    }
    if(document.all)  // Internet Explorer 4 and up
    {
      eval('document.all.' + thingtoshow + '.style.visibility="visible"')
    }
    if(!document.all && document.getElementById)  // Mozilla and Netscape 6 and up
    {
    document.getElementById(thingtoshow).style.visibility="visible";
    }
  }
}

function Revert(thingtoshow)
{
HideAll()
ShowIt(thingtoshow)
}
	
function HideAll()
{
if(document.layers)
  {
    document.aboutusmenu.visibility="hidden"
    document.planmenu.visibility="hidden"
    document.projectsmenu.visibility="hidden"
    document.fundingmenu.visibility="hidden"
    document.resourcesmenu.visibility="hidden"
    document.newsmenu.visibility="hidden"
    document.contactusmenu.visibility="hidden"
    document.homemenu.visibility="hidden"
  }
if(document.all)
  {
    document.all.aboutusmenu.style.visibility="hidden"
    document.all.planmenu.style.visibility="hidden"
    document.all.projectsmenu.style.visibility="hidden"
    document.all.fundingmenu.style.visibility="hidden"
    document.all.resourcesmenu.style.visibility="hidden"
    document.all.newsmenu.style.visibility="hidden"
    document.all.contactusmenu.style.visibility="hidden"
    document.all.homemenu.style.visibility="hidden"
  }
if(!document.all && document.getElementById)
  {
    document.getElementById('aboutusmenu').style.visibility="hidden"
    document.getElementById('planmenu').style.visibility="hidden"
    document.getElementById('projectsmenu').style.visibility="hidden"
    document.getElementById('fundingmenu').style.visibility="hidden"
    document.getElementById('resourcesmenu').style.visibility="hidden"
    document.getElementById('newsmenu').style.visibility="hidden"
    document.getElementById('contactusmenu').style.visibility="hidden"
    document.getElementById('homemenu').style.visibility="hidden"    
  }
}

