function showsubmenu(sid)
{
    whichEl = eval("menu" + sid);
    if (whichEl.style.display == "none")
    {
        eval("menu" + sid + ".style.display=\"\";");
    }
    else
    {
        eval("menu" + sid + ".style.display=\"none\";");
    }
}
function showKeyWord(sid)
{
    whichEl = eval("tb" + sid);
    if (whichEl.style.display == "none")
    {
        eval("tb" + sid + ".style.display=\"\";");
    }
    else
    {
        eval("tb" + sid + ".style.display=\"none\";");
    }
}

function CheckAll(form)
{
    for (var i=0;i<form.elements.length;i++)
    {
        var e = form.elements[i];
        if (e.name != 'chkall' && e.type=="checkbox")
            e.checked = $("chkall").checked;
    }
}


function SelectAll()
{
   var a = document.getElementsByTagName("input");
   for (var i=0; i<a.length; i++)
   {
       if (a[i].type == "checkbox")
        {
            a[i].checked = true;
        }
   }
}

function SelectNot()
{
   var b = document.getElementsByTagName("input");
   for (var i=0; i<b.length; i++)
   {
       if (b[i].type == "checkbox")
       {
           if(b[i].checked)
           {
               b[i].checked=false;
           }
           else
           {
               b[i].checked=true;
           } 
       }
   }
}
