var top_position=26;
var left_position='25%';
var nTimeOut = null;
var hideTime = 4000;
var showTime = 500;

var nForOpen = null;

document.write('<div style="position: absolute; top: '+top_position+'px; left: '+left_position+'; display: none; z-index: 10000; margin-left: -150px;" id="open_menu_table" onMouseOver="clearTimeout(nTimeOut);" onmouseout="setHide();">');
document.write('<table border="0" cellpadding="1" cellspacing="0" width="750" bgcolor="#D1E3A8" onMouseOver="clearTimeout(nTimeOut);">');
document.write('<tr><td>');
document.write('   <table border="0" cellpadding="2" cellspacing="0" width="100%">');
document.write('     <tr>');
document.write('       <td>&nbsp;&nbsp;<a href="http://www.alloy.ru/" style="font-weight: normal;font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;font-variant: small-caps;font-size: 12px;text-decoration: underline; color:#000000;">WWW.ALLOY.RU</a></td>');
document.write('       <td align="right"><a href="javascript://" onClick="open_menu();"/>[X]</font></td>');
document.write('     </tr>');
document.write('   </table>');
document.write('</td></tr>');
document.write('<tr><td style="border: 1px solid #666666; background-color: #F1FAED;">');
document.write('<iframe width="740" height="210" src="http://img.alloy.ru/img/menu.html" framespacing="0" frameborder="no" scrolling="no" allowtransparency="true"></iframe>');
document.write('</td></tr></table>');
document.write('</div>');

function setHide()        {
        clearTimeout(nTimeOut);
        nTimeOut = null;
        nTimeOut=window.setTimeout("closeMenu()",hideTime);
}

function setShow()
{
        if (!nForOpen)
        {
                nForOpen=window.setTimeout("openMenu()",showTime);
        }
}

function clearShow()
{
        clearTimeout(nForOpen);
        nForOpen = null;
}

function clearHide() {
        clearTimeout(nTimeOut);
        nTimeOut = null;
}

function open_menu(){
        clearTimeout(nTimeOut);

        if(document.getElementById('open_menu_table').style.display=='none')
        {
                openMenu();
        }
        else
        {
                closeMenu();
        }

        return false;
}


function closeMenu() {
        if (nTimeOut)
        {
                clearTimeout(nTimeOut);
                nTimeOut = null;
        }

        if (document.getElementById('regionsel'))
        {
                document.getElementById('regionsel').style.display = 'block';
        }

        if(document.getElementById('open_menu_table').style.display!='none')
        {
                document.getElementById('open_menu_table').style.display='none';
                if (document.getElementById('guest_div')){
                        document.getElementById('guest_div').style.display='block';
                }
                if (document.getElementById('ban_1')){
                        document.getElementById('ban_1').style.display='block';
                }
                if (document.getElementById('ftohide1')){
                        document.getElementById('ftohide1').style.visibility = 'visible';
                }
                if (document.getElementById('ftohide2')){
                        document.getElementById('ftohide2').style.visibility = 'visible';
                }
        }
}

function openMenu() {
        if (nTimeOut)
        {
                clearTimeout(nTimeOut);
                nTimeOut = null;
        }
        if (nForOpen)
        {
                clearTimeout(nForOpen);
                nForOpen = null;
        }
        if (document.getElementById('regionsel'))
        {
                document.getElementById('regionsel').style.display = 'none';
        }
        if(document.getElementById('open_menu_table').style.display=='none')
        {
                document.getElementById('open_menu_table').style.display='block';
                if (document.getElementById('guest_div'))
                {
                        document.getElementById('guest_div').style.display='none';
                }
                if (document.getElementById('ban_1'))
                {
                        document.getElementById('ban_1').style.display='none';
                }
                if (document.getElementById('ftohide1')){
                        document.getElementById('ftohide1').style.visibility = 'hidden';
                }
                if (document.getElementById('ftohide2')){
                        document.getElementById('ftohide2').style.visibility = 'hidden';
                }
        }
}


