// JavaScript Document
var home_image = new Image();
home_image.src = "images/menu/home_on.gif";
var our_firm_image = new Image();
our_firm_image.src = "images/menu/our_firm_on.gif";
var direction_image = new Image();
direction_image.src = "images/menu/direction_on.gif";
var contact_us_image = new Image();
contact_us_image.src = "images/menu/contact_us_on.gif";
var elder_law_image = new Image();
elder_law_image.src = "images/menu/elder_law_on.gif";
var wills_and_estates_image = new Image();
wills_and_estates_image.src = "images/menu/wills_and_estates_on.gif";
var real_estate_image = new Image();
real_estate_image.src = "images/menu/real_estate_on.gif";

var time = null;
function showTab(idIndex){
    show = "document.getElementById('" + idIndex + "').style.display = 'block'";
    time = setTimeout(show,50);
}
function hideTab(idIndex){
    show = "document.getElementById('" + idIndex + "').style.display = 'none'";
    time = setTimeout(show,50);
}
function stopTimeOut(){
    clearTimeout(time);
}

var scrollWidth;

function position() {
    if (document.all)
    {
        gid("sm_1").style.top = "-12px";
        gid("sm_2").style.top = "-12px";
        gid("sm_3").style.top = "-12px";
    }
}
function showHide(k)
{
    s = ""+document.getElementById("aq_"+k).innerHTML;
    if (s=="ΛΛΛ")
    {
        document.getElementById("section_"+k).style.display = "block";
        document.getElementById("aq_"+k).innerHTML = "&laquo;&laquo;&laquo;";
    }else
    {
        document.getElementById("section_"+k).style.display = "none";
        document.getElementById("aq_"+k).innerHTML = "&raquo;&raquo;&raquo;";
    }
    return false;
}

function gid(id)
{
    return document.getElementById(id);
}




function showImg(obj)
{
    var pth = obj.firstChild.src;
    var rgexp = /_off\.gif$/;
    var k = obj.firstChild.src.search(rgexp);
    pth = pth.substr(0,k)+"_on.gif";
//    alert(pth);
    obj.firstChild.src = pth;
}

function hideImg(obj)
{
    var pth = obj.firstChild.src;
    var rgexp = /_on\.gif$/;
    var k = obj.firstChild.src.search(rgexp);
    pth = pth.substr(0,k)+"_off.gif";
    obj.firstChild.src = pth;
}
