// x_core.js, X v3.15.3, Cross-Browser.com DHTML Library
// Copyright (c) 2004 Michael Foster, Licensed LGPL (gnu.org)
// lite version, modified by pvb, 2005
var xVersion='3.15.3',xNN4,xOp7,xOp5or6,xIE4Up,xIE4,xIE5,xMac,xUA=navigator.userAgent.toLowerCase();
var activeID=null;
var mTimer=5000;
if (window.opera){
  xOp7=(xUA.indexOf('opera 7')!=-1 || xUA.indexOf('opera/7')!=-1);
  if (!xOp7) xOp5or6=(xUA.indexOf('opera 5')!=-1 || xUA.indexOf('opera/5')!=-1 || xUA.indexOf('opera 6')!=-1 || xUA.indexOf('opera/6')!=-1);
}
else if (document.all && xUA.indexOf('msie')!=-1) {
  xIE4Up=parseInt(navigator.appVersion)>=4;
  xIE4=xUA.indexOf('msie 4')!=-1;
  xIE5=xUA.indexOf('msie 5')!=-1;
}
else if (document.layers) {xNN4=true;}
xMac=xUA.indexOf('mac')!=-1;

function xGetElementById(e) {
  if(typeof(e)!='string') return e;
  if(document.getElementById) e=document.getElementById(e);
  else if(document.all) e=document.all[e];
  else e=null;
  return e;
}
function xDef() {
  for(var i=0; i<arguments.length; ++i){if(typeof(arguments[i])=='undefined') return false;}
  return true;
}
function xShow(e) { xVisibility(e, 1); }
function xHide(e) { xVisibility(e, 0); }
function xVisibility(e, bShow)
{
  if(!(e=xGetElementById(e))) return;
  if(e.style && xDef(e.style.visibility)) {
    if (xDef(bShow)) e.style.visibility = bShow ? 'visible' : 'hidden';
    return e.style.visibility;
  }
  return null; // or return an empty string ???
}
function doHide() {
 if (mTimer<0) { xHide(activeID); activeID=null; mTimer=5000; }
 mTimer=mTimer-500;
 setTimeout('doHide()', 2000);
}
function xTimer(e) {
 if (e=="hm") { activeID=e; mTimer=5000; }
 setTimeout('doHide()', 2000);
}
function xClientWidth() {
  var w=0;
  if(xOp5or6) w=window.innerWidth;
  else if(!window.opera && document.documentElement && document.documentElement.clientWidth)
    w=document.documentElement.clientWidth;
  else if(document.body && document.body.clientWidth)
    w=document.body.clientWidth;
  else if(xDef(window.innerWidth,window.innerHeight,document.height)) {
    w=window.innerWidth;
    if(document.height>window.innerHeight) w-=16;
  }
  return w;
}
function setXMenu(e) {
 m="hm";
 if(!(m=xGetElementById(m))) return;
 if (e=="rus") { m.style.left=xClientWidth()/2-223; }
 if (e=="eng") { m.style.left=xClientWidth()/2-244; }
}
function setSrc(e,f) {
 if(!(e=xGetElementById(e))) return;
 e.src=f;
 }

