function Help(key)
{
    var close_click = "CloseHelp()";
    bground = document.createElement('div');
    bground.id = 'help_background';
    bground.style.zIndex = 200;
    document.body.appendChild(bground);
    
    help_win = document.createElement('div');
    help_win.id = 'help';
    help_win.style.zIndex = 201;    
    help_win.innerHTML = "<div id='help_header'><img src='/toolbars/images/btn_close.gif' id='popup_btn_close' alt='Close' onclick='CloseHelp();' /><div id='help_title'></div></div><div id='help_content'>Loading...</div><input type='button' value='Close' style='float: right; margin-right: 10px;' onclick='CloseHelp();'/>";

    document.body.appendChild(help_win);
    httpPost('/toolbars/ajax_api.php', 'action=help&help_id=' + key);
}   

function CloseHelp()
{
    document.body.removeChild(document.getElementById("help_background"));
    document.body.removeChild(document.getElementById("help"));
}

function DoSearch(url)
{
    q = document.getElementById('search_box').value;
    url = url.replace('$utf8query', q);
    url = url.replace('$query', q);
    url = url.replace('$host', "toolbars.groowe.com");
    url = url.replace('$url', document.getElementById('current_url').value);
    window.open(url);
}

function DropDown(id)
{
    var arrow = document.getElementById("arrow_" + id);
    
    var pos = getPosition(arrow);
    
    var dropdownmenu = document.getElementById("dropdown_" + id);
    
    dropdownmenu.style.display = 'block';
    //alert(dropdownmenu.offsetWidth);
    dropdownmenu.style.left = (pos.x - dropdownmenu.offsetWidth + 16) + 'px';
    dropdownmenu.style.top = (pos.y + 18) + 'px';
}