var tim = new Array
function driveIn2(co) {
try {
var to
  parent.window.document.all[co].lang = 'W';
  var menuStyle= parent.window.document.all[co].style;
  if (menuStyle.pixelTop<0+parseInt(parent.window.document.body.scrollTop)) {
   menuStyle.pixelTop += 6; 
  }
  if (menuStyle.pixelTop>=0+parseInt(parent.window.document.body.scrollTop)) {
    menuStyle.pixelTop = 0+parseInt(parent.window.document.body.scrollTop);
	clearTimeout(to); 
	parent.window.document.all[co].lang = 'F';
	}
   else { 
   to = setTimeout("driveIn('"+co+"')",1);
   }
      }
   catch(co) {
   };
}

function driveIn(co,i) {
try {
var to
  parent.window.document.all[co].lang = 'W';
  var menuStyle= parent.window.document.all[co].style;

  menuStyle.filter="Alpha(Opacity: 90)";
  parent.window.document.all[co].lang = 'F';


      }
   catch(co) {
   };
}

function driveOut(co,i) {
try {
var to
  parent.window.document.all[co].lang = 'W';
  var menuStyle= parent.window.document.all[co].style;

  menuStyle.filter="Alpha(Opacity: 0)";

  menuStyle.visibility='hidden';
  parent.window.document.all[co].lang = 'F';

      }
   catch(co) {
   };
}
function driveOut3(co) {
try {
var to
  parent.window.frames['main'].document.all[co].lang = 'W';
  var menuStyle= parent.window.frames['main'].document.all[co].style;
  if (menuStyle.pixelTop >= parent.window.frames['main'].document.body.scrollTop-parseInt(menuStyle.height)) {
   menuStyle.pixelTop -= 8; 
  }
  if (menuStyle.pixelTop < parent.window.frames['main'].document.body.scrollTop-parseInt(menuStyle.height)) {
     menuStyle.pixelTop = parent.window.frames['main'].document.body.scrollTop-parseInt(menuStyle.height)-10;
	 clearTimeout(to); 
	 menuStyle.visibility='hidden';
	 parent.window.frames['main'].document.all[co].lang = 'F';
	}
   else { 
   to = setTimeout("driveOut('"+co+"')",1);
   }
   }
     catch(co) {
   };
}

function ukaz(co,img) {
try {
 var menu = parent.window.document.all[co].style;
  if (parent.window.document.all[co].lang == 'W' || menu.visibility=='visible') {
   return
  }
 menu.visibility='visible';
// menu.pixelTop = parseInt(parent.window.document.body.scrollTop)-parseInt(menu.height);
// menu.pixelTop = 101;
 driveIn(co,0);
    }
     catch(co) {
   };
}

function skryj(co,offset,x,y) {
try {
 var menu = parent.window.document.all[co].style;
 if (menu.visibility=='hidden') {
  clearTimeout(tim[co]);
  tim[co]=null;
  }
  if (parent.window.document.all[co].lang == 'W' || menu.visibility=='hidden' || HideMenu(co,offset,x,y)) {
   return
  }
 driveOut(co,90);
 }
     catch(co) {
   };
}

function fast_skryj(co,offset) {
   x = event.clientX;
   y = event.clientY;
   tim[co]==null;
   var menu = parent.window.document.all[co].style;
   if (parent.window.document.all[co].lang == 'W' || menu.visibility=='hidden' || HideMenu(co,offset,x,y)) {
   return
  }
 driveOut(co,90);
}

function HideMenu(co,offset,xs,ys) {
  var menu = parent.window.document.all[co].style;
  y_frame = parseInt(parent.window.document.body.clientHeight)
  x_frame = parseInt(parent.window.document.body.clientWidth)
  x = parseInt(xs)+parseInt(parent.document.body.scrollLeft);
  y = parseInt(ys)+parseInt(parent.document.body.scrollTop);
  if (offset == 'ne') {
   y_frame = 0; 
  }
  r1 = parseInt(menu.width);
  r2 = parseInt(menu.height);
  r1X = parseInt(menu.left);
  r1Y = parseInt(menu.top)+y_frame;
  r2X = parseInt(menu.left)+parseInt(menu.width);
  r2Y = parseInt(menu.top);
  r3X = parseInt(menu.left);
  r3Y = parseInt(menu.top)+parseInt(menu.height)+y_frame;
  r4X = parseInt(menu.left)+parseInt(menu.width);
  r4Y = parseInt(menu.top)+parseInt(menu.height);
  if (( x > r1X+0 ) && ( x < r2X-0 ) && ( y > r1Y+0 ) && ( y < r3Y-0 ) || (x == -1 || y == -1)) {
   return true;
  }
  else
  {
   return false;
  }
  alert('X mys: '+x);
  alert('Y mys: '+y);
  alert('r1x: '+r1X);
  alert('r2X: '+r2X);
  alert('r1Y: '+r1Y);
  alert('r3Y: '+r3Y);
 }
 
 function d_hide(co,offset) {
  try {
   x = event.clientX;
   y = event.clientY;
   var menu = parent.window.document.all[co].style;
   tim[co] = setTimeout("skryj('"+co+"','"+offset+"',"+x+","+y+")",1);
   }
   catch(co) {
   };
 }
 