var n =0;
var ie = 0;
var nie = 0;
var browser=0;
coords_y=293;

nie = (document.getElementById) ? 1:0;
browser=nie || ((n || ie) && parseInt(navigator.appVersion)>=4);

function makeMenu(obj){
        if (n) this.css=eval('document.'+obj);
        if (ie) this.css=eval('document.all.'+obj+'.style');
                else if (nie) this.css=eval('document.getElementById("'+obj+'").style');
                
        if (n) {this.x=this.css.left; this.y=this.css.top;}
        if (ie) {this.x=this.css.pixelLeft; this.y=this.css.pixelTop;}
                else if (nie) {this.x=this.css.left; this.y=this.css.top;}      
        this.hideIt=b_hideIt;   this.showIt=b_showIt; this.moveIt=b_moveIt                                                                                      
        return this
}

function b_showIt(){this.css.visibility="visible"}
function b_hideIt(){this.css.visibility="hidden"}
function b_moveIt(x,y){this.x=x; this.y=y; this.css.left=this.x; this.css.top=this.y}

function init(){
 oMenu=new Array();
         
 for (i=1;i<=7;i++)
 {
  oMenu[i]=new makeMenu(eval("'divMenu'+i"));
  var x=(120*(i-1))+(35*i)+15;
  var y=coords_y;
  oMenu[i].moveIt(x,y);
 }
}

function show_menu(num)
{
 if(browser)
 {
  for (i=1;i<=(oMenu.length-1);i++)
  {
   oMenu[i].hideIt();
  }
  oMenu[num].showIt();
 }
}

//скрывает все динамические элементы
function hide_all()
{
 if(browser)
 {
 for (i=1;i<=(oMenu.length-1);i++)
 {
 oMenu[i].hideIt();
 }
 }
}

// задает время запаздывания

function time_out(num)
{
 tOut = eval('setTimeout("oMenu['+num+'].hideIt()", 300)')
}

// обнуляет время запаздывания

function clear_timeout()
{
        clearTimeout(tOut);
}

function newwin(n){
var nph="/images/article/"+n+".jpg";
window.open(nph,'','width=350,height=350,Toolbar=no, Location=no, Directories=no, Status=no, Menubar=no, resizable=yes,scrollbars=yes');
}
