<!--
var din_otstup;
var clwidth;

function getallwidth(){
isDOM=document.getElementById //DOM1 browser (MSIE 5+, Netscape 6, Opera 5+)
isOpera=isOpera5=window.opera && isDOM //Opera 5+
isOpera6=isOpera && window.print //Opera 6+
isOpera7=isOpera && document.readyState //Opera 7+
isMSIE=document.all && document.all.item && !isOpera //Microsoft Internet Explorer 4+
isMSIE5=isDOM && isMSIE //MSIE 5+
isNS4=document.layers //Netscape 4.*
isMozilla=isDOM && navigator.appName=="Netscape" //Mozilla или Netscape 6.*
VISIBLE = (isNS4) ? 'show' : 'visible';
HIDDEN = (isNS4) ? 'hide' : 'hidden';

if(isMSIE || isOpera7)
		dcwdth=document.body.scrollWidth;
else if(isMozilla || isNS4 )		
		dcwdth=document.width;
else //	Opera 5, 6
		dcwdth=document.body.style.pixelWidth;
return dcwdth;
}	
	

function set_wd(){
  minleft=300;
  minleftsrch=150;
  topwidth=796;  

  subwidth=87;

  relpos=425; 
  subrelpos=709; 
     
  srchotstup=85;
  prvthalfwidth=100;
  clwidth=getallwidth();
  din_otstup=Math.round((clwidth-topwidth)/2);
  
  xtopmenu=din_otstup+relpos;
  xsubmenu=din_otstup+subrelpos;

  xsrch=din_otstup+srchotstup;
  if(din_otstup>prvthalfwidth)
       xprvtmes=din_otstup-prvthalfwidth;
  else
	  xprvtmes=0;
  if(xtopmenu < minleft) 
    {
	  razn=minleft-xtopmenu;
      xtopmenu=minleft;
	  xsubmenu=xsubmenu+razn;
     }
	 
  if(xsrch < minleftsrch) 
    {
      xsrch=minleftsrch;
     }

  //alert("clwidth= "+clwidth);
  //alert("xtopmenu= "+xtopmenu);
  document.getElementById('tst').width=xtopmenu; 
  document.getElementById('tstsub').width=xsubmenu;
  document.getElementById('tstsrch').width=xsrch;
  document.getElementById('tstprvtmes').width=xprvtmes;  
    
}	



//-->
