/**
 * @author Vasily.Selivanov
 */


function gotoPage(link) {
    if(window.location)
        window.location = link;
    else 
        document.location = link;
}

function windowOnLoad(){
  if (typeof(Prototype) == 'object') {
      $$('#header #menu_container .menu .button input').each(
           function(input){
                input.onmouseover = function(){
                    input.up().addClassName('hover');
                };
                input.onmouseout = function(){
                    input.up(0).removeClassName('hover');
                };
      });
      $$('a[rel="external"]').onclick = function(){
        this.target = "_blank";
      }; 
      $$('#bookmark input[type="button"]').onclick = function(){
        if (window.sidebar) { // *firefox*
              window.sidebar.addPanel(document.title, window.location ,"");
        } else if( document.all ) { //MSIE
                window.external.AddFavorite(window.location, document.title);
        } else {
               alert("Sorry, your browser doesn't support this");
        }
      }
  } else {
    $('#header #menu_container .menu .button input').each( 
        function(){
            $(this).hover(function(){
                $(this).parent(0).addClass('hover');
            }, function(){
                $(this).parent(0).removeClass('hover');
            })
        }
    );
    
    $('a[@rel="external"]').click(function(){
        this.target = "_blank";
    });
    
    $('#bookmark input[type="button"]').click(function(){
        if (window.sidebar) { // *firefox*
              window.sidebar.addPanel(document.title, window.location ,"");
        } else if( document.all ) { //MSIE
                window.external.AddFavorite(window.location, document.title);
        } else {
               alert("Sorry, your browser doesn't support this");
        }
    })
 }
}
window.onload = windowOnLoad;




