function Run_topflash() {
	document.write('<div style="border-botoom:3px solid #591c06"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="720" height="244">  <param name="movie" value="/image/banners/main.swf">  <param name="quality" value="high"> <param name="wmode" value="opaque">    <param name="wmode" value="transparant">  <embed src="/image/banners/main.swf" quality="high" vmode="transparant" wmode="opaque" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="720" height="244"></embed></object></div>');
}

function Run_topflash_en() {
	document.write('<div style="border-botoom:3px solid #591c06"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="720" height="244">  <param name="movie" value="/image/banners/main_en.swf">  <param name="quality" value="high"> <param name="wmode" value="opaque">    <param name="wmode" value="transparant">  <embed src="/image/banners/main_en.swf" quality="high" vmode="transparant" wmode="opaque" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="720" height="244"></embed></object></div>');
}

function Run_mapflash() {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="483" height="300">  <param name="movie" value="/image/banners/map_rus2.swf">  <param name="quality" value="high">  <embed src="/image/banners/map_rus2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="483" height="300"></embed></object>');
}

function Run_mapflash_en() {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="483" height="300">  <param name="movie" value="/image/banners/map_eng2.swf">  <param name="quality" value="high">  <embed src="/image/banners/map_eng2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="483" height="300"></embed></object>');
}


/*** Открытие нового окна с изображением ***/
function showImg(URL,imgPath,Tit,alter) {
var content = '<html><head><title>Tit</title>' +
'\<\style>'+'BODY { margin:0; padding:0; }'+'<\/style>'
 +'<script>' + 'function selfResizer(obj) {' +
 'var w = obj.width;iWidth='+self.innerWidth+';' +
 'var h = obj.height;iHeight='+document.body.clientHeight +';' +
 'var left = (self.opera?iWidth:screen.availWidth)/2 - w/2;' +
 'var top = (self.opera?iHeight:screen.availHeight)/2 - h/2;' +
 ' window.resizeTo(w+30, h+60);' +
 ' window.moveTo(left, top);' +
 '}' + '<\/script>' +'</head><body>' +
'<div align="center"><img border="0" onLoad="selfResizer(this)" style="position: relative; left: 0px; top: 0px" src="'+imgPath+'" alt="'+alter+'"></div>' +
'</body></html>';
var wnd = window.open(URL, 'newWnd', 'width=50,height=50,left=0,top=0,screenX=0,screenY=0,resizable=no,scrollbars=no,statusbar=0');
 wnd.document.write(content);
 wnd.document.title = Tit;
 wnd.document.close();
}

function getElementPosition(elemId)
{
    //var elem = document.getElementById(elemId);
	var elem = elemId;
	
    var w = elem.offsetWidth;
    var h = elem.offsetHeight;
	
    var l = 0;
    var t = 0;
	
    while (elem)
    {
        l += elem.offsetLeft;
        t += elem.offsetTop;
        elem = elem.offsetParent;
    }

    return {"left":l, "top":t, "width": w, "height":h};
}

function info (id, t, l) {
var elem = document.getElementById(id);
elem.style.top=t+20+"px";
elem.style.left=l+10+"px";
elem.style.display='';
}

function mousePageXY(e)
{
  var x = 0, y = 0;

  if (!e) e = window.event;

  if (e.pageX || e.pageY)
  {
    x = e.pageX;
    y = e.pageY;
  }
  else if (e.clientX || e.clientY)
  {
    x = e.clientX + (document.documentElement.scrollLeft || document.body.scrollLeft) - document.documentElement.clientLeft;
    y = e.clientY + (document.documentElement.scrollTop || document.body.scrollTop) - document.documentElement.clientTop;
  }

  return {"x":x, "y":y};
}

function replace_string(txt,cut_str,paste_str){ 
var f=0;
var ht='';
ht = ht + txt;
f=ht.indexOf(cut_str);
while (f!=-1){ 
//цикл для вырезания всех имеющихся подстрок 
f=ht.indexOf(cut_str);
if (f>0){
ht = ht.substr(0,f) + paste_str + ht.substr(f+cut_str.length);
};
};
return ht
};

