
	
	function getBrowserInfo() {
 var t,v = undefined;
 if (window.opera) t = 'Opera';
 else if (document.all) {
  t = 'IE';
  var nv = navigator.appVersion;
  var s = nv.indexOf('MSIE')+5;
  v = nv.substring(s,s+1);
 }
 else if (navigator.appName) t = 'Netscape';
 return {type:t,version:v};
}
 
function bookmark(a){
 var url = window.document.location;
 var title = window.document.title;
 var b = getBrowserInfo();
 if (b.type == 'IE' && 7 > b.version && b.version >= 4) window.external.AddFavorite(url,title);
 else if (b.type == 'Opera') {
  a.href = url;
  a.rel = "sidebar";
  a.title = url+','+title;
  return true;
 }
 else if (b.type == "Netscape") window.sidebar.addPanel(title,url,"");
 else alert("Нажмите CTRL-D, чтобы добавить страницу в закладки.");
 return false;
}
	
function resize() {

//(if (! ($.browser.msie && $.browser.version == '6.0') ) {

    var body = $("body").width();
    
        if(body > 1200) {
          $(".checkbox_left.p50").css("width","115px");
          $(".checkbox_group").css("width","350px"); 
            if (! ($.browser.msie && $.browser.version == '6.0') ) {
            $(".banners .part3 img").css("margin-right","8%");  
            }    
        } else {
          $(".checkbox_left.p50").css("width","85px");
          $(".checkbox_group").css("width","170px");  
            if (! ($.browser.msie && $.browser.version == '6.0') ) {
            $(".banners .part3 img").css("margin-right","5px"); 
            $(".banners .part3 img").css("width","180px"); 
            }
        }
    
    var leftcol = $("#left").width();
    var rightcol = $("#right").width();
    var content_width = body-(leftcol+rightcol);
    
    if(body>1000 && body<1200) {
     
        //alert(body+" "+content_width+" "+leftcol+" "+rightcol); 
        if(content_width >=640){
            $("#content, #content_footer").css("width",content_width);
            $("#general").css("width","100%");     
        }
        else {
            $("#general").css("width",1000);    
        }
        
    } 
    else if (body>=1200) {
       $("#content, #content_footer").css("width",840);
       $("#general").css("width",1200); 
    }   
    
    else {
       $("#content, #content_footer").css("width",640);
       $("#general").css("width",1000);  
    }
    
    
	/*
    var leftcol_h = $("#left").height();
    var rightcol_h = $("#right").height();
    var center_h = $("#content").height();
    alert(leftcol_h+" "+rightcol_h+" "+center_h);
    var max_h = (leftcol_h>rightcol_h && leftcol_h>center_h?leftcol_h:center_h>rightcol_h?center_h:rightcol_h);
    $("#left").css("height",max_h); 
    alert($("#left").height());*/
//}
}

function check_filter_width() {
    if( !($.browser.mozilla || $.browser.msie) ){
    var ul_width = $(".catalog_search_form_tabs").width();
    var sum_li = 0;
    for(i=1;i<=6;i++) {
        sum_li+=$(".tb"+i).width();
    }
    var diff = ul_width - sum_li;
    if(diff!=0) {
        var new_tb6 = $(".tb6").width()+diff;
        $(".tb6").css("width", new_tb6);
    }
 }
}
