
	var brName = navigator.appName;
	var brVer = parseInt(navigator.appVersion);
	var UserScr_W = 0;
	var UserScr_H = 0;
	var X_layer = 171;
	var Y_layer = 185;
	var X_stap = 17;
	var X_big_stap = 170;
	var tWidth = 0;  // Øèðèíà òàáëèöû
	var direction;
	var showed = 1;
function ml2(){

	UserScr_W = window.innerWidth + 4;
	UserScr_H = window.innerHeight + 4;
	X_layer_max = (UserScr_W - (UserScr_W - 770)/2 - 219);
	if(X_layer_max<550) X_layer = 550;
	X_layer_min = (UserScr_W - 770)/2 + 140;
	if(X_layer_max<145) X_layer = 140;

if (direction) {
if (direction == 'f') {
	stp += 1;
	if (stp >= X_layer_max) direction = 'b';
	} 
	else {
	stp -= 1;
	if (stp <= X_layer_min) direction = 'f';
	}
} else {
	direction = 'f';
	stp += 1;
}

if (document.losh.complete && showed == 1) {
layer_show('man', stp);
showed = 0;
}

document.layers['man'].left = stp;

}

function ml(){

	UserScr_W = document.body.offsetWidth;
	UserScr_H = document.body.offsetHeight;
	X_layer_max = (UserScr_W - (UserScr_W - 770)/2 - 219);
	if(X_layer_max<550) X_layer = 550;
	X_layer_min = (UserScr_W - 770)/2 + 140;
	if(X_layer_max<145) X_layer = 140;

//stp = document.all.item('man').style.left;


if (direction) {
if (direction == 'f') {
	stp += 1;
	if (stp >= X_layer_max) direction = 'b';
	} 
	else {
	stp -= 1;
	if (stp <= X_layer_min) direction = 'f';
	}
} else {
	direction = 'f';
	stp += 1;
}

if (document.losh.complete && showed == 1) {
layer_show('man', stp);
showed = 0;
}

document.all.item('man').style.left = stp;

}

function CreateLayer(id, x, y, text) {
  NS = (document.layers) ? 1 : 0;
  IE = (document.all) ? 1: 0;
  if(NS) {
    var str="<layer id=\"" + id + "\" top=\"" + x + "\" left=\"" + y + "\" visibility=\"hide\">" + text + "</layer>";
    document.write(str);
  }
  else if(IE) {
    var str="<div id=" + id + " style=\"position:absolute;top:" + x + ";left:" + y + ";visibility:hidden;\">" + text + "</div>";
    document.write(str);
  }
}

function layer_show_m(id,XX) {
  NS = (document.layers) ? 1 : 0;
  IE = (document.all) ? 1: 0;
  layVis=0;
   if(NS) {
      document.layers[id].visibility = "visible";
      document.layers[id].zIndex = 0;
      document.layers[id].left = XX;

    }
    else if(IE) {
      document.all.item(id).style.visibility = "visible";
      document.all.item(id).style.zIndex = 0;
      document.all.item(id).style.left = XX;

    }
}

function layer_show(id,XX) {
  NS = (document.layers) ? 1 : 0;
  IE = (document.all) ? 1: 0;
  layVis=0;
   if(NS) {
      document.layers[id].visibility = "visible";
      document.layers[id].zIndex = 1;
      document.layers[id].left = XX;

    }
    else if(IE) {
      document.all.item(id).style.visibility = "visible";
      document.all.item(id).style.zIndex = 1;
      document.all.item(id).style.left = XX;

    }
}

function layer_hide(id) {
  NS = (document.layers) ? 1 : 0;
  IE = (document.all) ? 1: 0;
  layVis=0;
  for(var i=0; i<arguments.length; i++) {
    if(NS) {
      document.layers[id].visibility = "hidden";
    }
    else if(IE) {
      document.all.item(id).style.visibility = "hidden";
    }
  }
}

function Inn() {
NS = (document.layers) ? 1 : 0;
IE = (document.all) ? 1: 0;
if (IE)	UserScr_W = document.body.offsetWidth;
else if (NS) UserScr_W = window.innerWidth + 4;
stp = (UserScr_W - 770)/2 + 140;
mans = "<img src=\"../img/loshad.gif\"  width=219 height=123 name=\"losh\">";
if(brName=="Netscape") {
position_Y = document.images.ris2.y - 45;
	} else {
position_Y = window.document.ris2.parentElement.offsetTop + window.document.ris2.parentElement.offsetHeight - 123;
	}
CreateLayer('man', position_Y, stp, mans);


if (NS){
setInterval('ml2()', 1);
} else if (IE) {
window.setInterval('ml()', 1);
}

}



