function check_bw()
{
    if ((navigator.appName.indexOf("Internet Explorer") != -1) &&
    (navigator.userAgent.indexOf("Opera") == -1)){
        bw_type = "ie";
    }else if (navigator.appName.indexOf("Netscape") != -1){
        bw_type = "nn";
        if (parseInt(navigator.appVersion) >= 5){
            bw_type += "6";
        }
    }else if (navigator.userAgent.indexOf("Opera") != -1){
        bw_type = "op";
    }else{
        bw_type="other";
    }
    return bw_type;
}

function width_control(ind) {

	var x,y;
	if (self.innerHeight) // all except Explorer
	{
		x = self.innerWidth;
		y = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
		// Explorer 6 Strict Mode
	{
		x = document.documentElement.clientWidth;
		y = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		x = document.body.clientWidth;
		y = document.body.clientHeight;
	}

	var elem = document.getElementById(ind);

b = document.body.clientWidth;
if(x < 1280) {elem.style.width = '1164px';}
if(x < 1280) {elem.style.width = b-56+'px';}	
if(x < 750) {elem.style.width = '714px';}
//elem.style.width = 'auto';
//	document.body.style.width  = document.getElementById('sup_global_box').clientWidth-18+"px";
	
	if (x<=1024) 
	{
//	    document.getElementById("coll").style.backgroundImage = 'url(img/shapka800.jpg)'
	} 
	else 
	{

//	    document.getElementById("coll").style.backgroundImage = 'url(img/shapka1024.jpg)'
	}
//document.getElementById('menu_table').width = document.getElementById('qm0').clientWidth-30+"px";
//	alert(document.getElementById('menu_table').width);


}

var h = 0;
function showhide(divname) {

  a = document.getElementById('t_menu');
  p = document.getElementById('pad_div');
  
  if(a)
  {
    a.style.left = mapx('img_sel') + 'px';
    a.style.top =  mapy('img_sel') + 'px';
  }


if (!document.getElementById(divname))	return ;

 if (document.getElementById(divname).style.display=='none') 
 {
		if (p )   p.style.height =parseInt(p.clientHeight)+220+'px';
 		document.getElementById(divname).style.display='block';
 }
 else 
 {

		if (p)   p.style.height =parseInt(p.clientHeight)-220+'px';
 		document.getElementById(divname).style.display='none';
 }
}

function hide(divname) 
{
  if(!document.getElementById(divname)) return;
  document.getElementById(divname).style.display='none';
}

function show(divname) 
{
  if(!document.getElementById(divname)) return;
  document.getElementById(divname).style.display='block';
}


/* by Pavli4eg */
var direct		= 1;		
var speed		= 1;
var go			= true;
var smoothness	= 50;
var width		= 0;
var was_run = false; 

//alert(document.body.clientWidth);
function init()
{

	if ( !document.getElementById('photo_slider_1') )
	{
		return ;
	}
	width=document.getElementById("td_brands").clientWidth;
	document.getElementById('photo_slider_1').style.width=width-69;
  a = document.getElementById('photo_slider_1').style ;
//  a.border="1px solid black";
  a.marginLeft="25px";
//	document.getElementById('photo_slider_1').style.width="95%";
//  document.getElementById('photo_slider_3').style.visibility="visible";
}


function move()
{
  if (!document.getElementById('photo_slider_2')) return ;

	if (!was_run) {setTimeout("move()",20000);was_run = 1; return;}


  if(!go) {
   setTimeout("move()",smoothness); return;  }
//  go=false;

   var x=parseInt(document.getElementById('photo_slider_2').style.left)+(direct*speed)
     //alert(parseInt(document.getElementById('photo_slider_2').style.left));
   document.getElementById('photo_slider_2').style.left=x+"px";
   if(x>0) direct=-1 ;
   if(x<width-slider_inner_width) direct=1;
//alert(width+" "+slider_inner_width);
	   setTimeout("move()", smoothness);
//	   alert(width-document.getElementById('photo_slider_3').clientWidth);
//	   document.getElementById('info').value=x+"px";
//	   document.getElementById('info1').value=document.getElementById('photo_slider_3').clientWidth;
//	   document.getElementById('info2').value=width;
	   
}
			   






function do_stop ( ) { go=false; }
function do_start ( ) { go=true; }


function compact() {

	if(!document.getElementById('compactle')) return ;

	if (document.documentElement.clientWidth <= 900) {
	document.getElementById('compactle').style.display='none';
	} else {
	document.getElementById('compactle').style.display='block';
}
}

function compact2() {
	if(!document.getElementById('compactimg')) return ;

	if (document.documentElement.clientWidth >= 1200) {
	document.getElementById('compactimg').style.display='block';
	} else {
	document.getElementById('compactimg').style.display='none';
}
}

function topmenu1() 
{
	
}

function shadowBanners()
{
 if (document.getElementById('menu_left_id'))
 if (document.getElementById('banner_id'))
  { document.getElementById('banner_id').style.display='none';}
}
