function findPosY(obj)
{
    var curtop = 0;
    if (obj.offsetParent)
    {
        while (obj.offsetParent)
        {
            curtop += obj.offsetTop
            obj = obj.offsetParent;
        }
    }
    else if (obj.y)
        curtop += obj.y;
    return curtop;
}

function showMenu(id, anchor_id)
{
    obj = document.getElementById(id);
    obj2 = document.getElementById(anchor_id);
    obj.style.left="200px";
    obj.style.top=findPosY(obj2)+"px";
    obj.style.display="";
}

function hideMenu(id)
{
    obj = document.getElementById(id);
    obj.style.display="none";
}

function hideAll()
{
    var obj = new Object();
    var i; 
    obj[0] = document.getElementById('emptyTable');
    obj[1] = document.getElementById('pilberaTable');
    obj[2] = document.getElementById('kimberleyTable');
    obj[3] = document.getElementById('gascoyneTable');
    obj[4] = document.getElementById('goldfieldsTable');
    obj[5] = document.getElementById('midwestTable');
    obj[6] = document.getElementById('wheatbeltTable');
    obj[7] = document.getElementById('greatSTable');
    obj[8] = document.getElementById('southWTable');
    obj[9] = document.getElementById('peelTable');
    for (i in obj)
    {
        obj[i].className = "inactive";
    }
}

function showMapInfo(section)
{
    var obj;
    hideAll();
    obj = document.getElementById(section + 'Table');
    obj.className = "active";
}


function mailpage()
{
mail_str = "mailto:?subject=" + document.title;
mail_str += "&body=" + document.title;
mail_str += " " + location.href;
location.href = mail_str;
}

