    function window_open_video(text,w,h)
    {
    window.open(text,""," resizable=no,width="+w+",height="+h+",scrollbars=no,top=100,left=50");
    }
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }

    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    }

    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ try{d.MM_p[j]=new Image(); d.MM_p[j++].src=a[i];}catch(ex){}}}
    }


    function addParameters(){
      document.forms[0].submit();
    }
    
function auto_tag(tag_name) {
	if (window.attachEvent) {
		window.attachEvent("onload", function() {
			var el = document.getElementsByTagName(tag_name);
			set_auto_tag(el);
		});
	}
}

function set_auto_tag (el) {
	for (var i=0; i<el.length; i++) {
	    if (el[i].target == '_blank'){
			el[i].className+=" onw";
	    }
	}
}

auto_tag("A");

isDOM=document.getElementById //DOM1 browser (MSIE 5+, Netscape 6, Opera 5+)
isMSIE=document.all && document.all.item //Microsoft Internet Explorer 4+
isNetscape4=document.layers //Netscape 4.*
isOpera=window.opera //Opera
isOpera5=isOpera && isDOM //Opera 5+
isMSIE5=isDOM && isMSIE && !isOpera //MSIE 5+
isMozilla=isNetscape6=isDOM && !isMSIE && !isOpera

var obj;

function getLayer(layerName, parentLayerName){
  if(isDOM){ return document.getElementById(layerName); }
  if(isMSIE){ return document.all[layerName]; }
  if(isNetscape4){ return eval('document.layers[layerName]'); }
  return false;
}


function ts(e,what){
  mousex = e.clientX;
  mousey = e.clientY;
  pagexoff = 0;
  pageyoff = 0;
  if(isMSIE5){
    pagexoff = document.body.scrollLeft;
    pageyoff = document.body.scrollTop;
    bottom = document.body.offsetHeight;
    right=document.body.offsetWidth;
  }
  else{
    pagexoff = window.pageXOffset;
    pageyoff = window.pageYOffset;//mozila
    bottom = window.innerHeight;
    right = window.innerWidth;
  }
  if(getLayer(what)){
    if(isNetscape4)
      obj = getLayer(what);
    else
      obj = getLayer(what).style;

  	if(obj){
	    leftoff = mousex-pagexoff;
     //   right = screen.availWidth;
         widthlayer =document.getElementById(what).offsetWidth;
          //чтоб не выходила за пределы экрана
        if ((leftoff +widthlayer ) > right)
       {
        leftoff = right-widthlayer-30;
        obj.left = (leftoff);
        }
        else
        {
       // alert(right);
        obj.left = (mousex+pagexoff)+8;
        }


        topoff = mousey;
      //  bottom = screen.availHeight;
   //     bottom = document.body.offsetHeight;
     //   alert(document.getElementById(what).offsetHeight);
        heightlayer =document.getElementById(what).offsetHeight;
       //  alert(topoff +document.getElementById(what).offsetHeight);
       //  alert(bottom);
         if ((topoff + heightlayer+10) > bottom)
       {
        topoff = bottom-heightlayer-10;
        obj.top = (topoff);

        }
        else
        {
       // alert(right);
        obj.top = (mousey+pageyoff) + 20;
        }



	    if(isNetscape4)
    	  obj.visibility = 'show';
	    else
    	  obj.visibility = 'visible';
	  }
   }
  return true;
}

function tc(){
  if(obj){
    if(isNetscape4)
      obj.visibility = 'hide';
    else
      obj.visibility='hidden';
  }
  return true
}

