$(document).ready(function(){
    $("#hmenu ul").superfish();
    $('#hmenu ul li').each(function(i){$(this).css('z-index',100+i);});
    $("#vmenu ul").superfish();
    $("#lmenu ul").superfish();
    $("#lmenu ul li:first").attr("id","first");
    $("#bmenu ul").superfish({dropShadows:false});
    $("#bmenu ul li:first-child").attr("id","first");
    $('.table').each(function() {
      $('tr:first', this).addClass('firstTr');
      $('tr:even', this).not(':first').addClass('evenTr');
      $('tr',this).not(':first').each(function() {
        $('td',this).addClass('allTd');
        });
      });
  	$("#advUl").innerfade({
  		speed: 1000,
  		timeout: 6000,
  		type: 'sequence'
      });
});

function popup(url, target, width, height, features)
{
    var wnd, features1;

    features1 = 'width=' + width + ',height=' + height;
    if (screen) {
        features1 += ',left=' + (screen.width - width) / 2 +
                ',top=' + (screen.height - height) /2;
    }
    if (features) {
        features1 += ',' + features;
    }

    wnd = window.open(url, target, features1);
    wnd.focus();

    return false;    
}
