<!--



function openWIN(URL,WName,w,h)
{
	sw = screen.width-100;
	sh = screen.availHeight-100;
	mtw = (screen.width-w)/2;
	mth = (screen.availHeight-h)/2;
	window.open(URL, WName, "width="+w+",height="+h+",top="+mth+",left="+mtw+",status=no,toolbar=no,scrollbars=no,resizable=no,menubar=no");
}

function subscr()
{
	email=document.subs.email.value;
	if ( email != '')
	{
    	nw=open('','nnw','width=530,height=420,scrollbars=no,pos=0');
	    document.subs.action='subscribe.php';
    	document.subs.target='nnw';
	    document.subs.submit();
	}
	else
	{
    	alert('email не введен...');
	}
}


function ch_pass(mode,id)
{
	howto=0;
	if ((mode==1) & (id==11)) { howto=1; }
	open('/login.php?mode='+mode+'&id='+id+'&howto='+howto,'nw','toolbar=no,scrollbars=no,width=323,height=280');
}

function show_res()
{
	context=document.srch.context.value;
	if ( context == '')
	{
  		alert('контекст не введен...') ;
	}
	else
	{
   		document.location="/search/index.htm?context="+document.srch.context.value;
	}
}

function shop_check()
{
	with (document.shop)
	{
       	if (shop_name.value == '')
		{
        	alert('Пожалуйста, укажите Фамилию, Имя, Отчество');
	        return false;
        }
        if (shop_job.value == '')
		{
        	alert('Пожалуйста, укажите Должность');
	        return false;
        }
		if (shop_company.value == '')
		{
        	alert('Пожалуйста, укажите Компанию');
	        return false;
        }
       	if (shop_address.value == '')
	   	{
        	alert('Пожалуйста, укажите Почтовый адрес');
	        return false;
        }
		if (shop_phone.value == '')
		{
        	alert('Пожалуйста, укажите телефон');
	        return false;
        }
        window.open('','shop_popup','scrollbars,width=450,height=300');
	}
}

/// Левое меню: начало

var im1 = new Image();
im1.src = "open_menu.gif";
var im2 = new Image();
im2.src = "close_menu.gif";
var im3 = new Image();
im3.src = "img/m_f_o_a.gif";
var im4 = new Image();
im4.src = "img/m_f_c_a.gif";

function m_ov_common(t)
{
	t.style.backgroundColor = "#FF6C00";
}

function m_out_common(t)
{
	t.style.backgroundColor = "#1960C8";
}
        function m_out_common_spec(t) {
                t.style.backgroundColor = "#0048A2";
        }
        function m_ov_in(t,tt) {
                t.style.backgroundColor = "#FF6C00";
                tt.style.color = "#FFFFFF";
        }
        function m_out_in(t,tt) {
                t.style.backgroundColor = "#E5ECF6";
                tt.style.color = "#004A90";
        }
        function musor_vis(t) {
                with (document.all) {
                        musor_div.style.top = y_ = document.body.scrollTop + document.body.offsetHeight/2;
                        musor_div.style.left = x_ = document.body.offsetWidth/2 - 150;
                        ans_reg.className = "hid";
                        off_div.className = "hid";
                        mess_div.className = "hid";
                        basket_div.className = "hid";
                        eval(t+'.className = "vis"');
                        musor_div.style.visibility = "visible";
                }
        }
        function cl_all() {
                b_cl();
                dd();
                clear_bg();
                cl_curr_b();
                document.all.filter_div.className = "hid";
        }
        function c0(t) {
                var obj = eval("document.all.k"+t+"_in");
                if (obj.className == "vis") cl0(t,obj)
                else sh0(t);
        }
        function c1(t) {
                var obj = eval("document.all.k"+t+"_in");
                if (obj.className == "vis") cl1(t,obj)
                else sh1(t);
        }
        function c2(t,flag,pos_id,el_id) {
                var ids_ = new Array();
                ids_ = t.split("_");
                wr(t);
                ms2(t);
                r1(ids_[0]);
                document.forms.main.curr_id.value = t;
                if (flag != 1) {
                        back_filt();
                        lp2(t,pos_id,el_id);
                }
        }
        function c11(t,flag,pos_id,el_id) {
                var ids_ = new Array();
                ids_ = t.split("_");
                wr(t);
                ms11(t);
                r1(ids_[0]);
                document.forms.main.curr_id.value = t;
                if (flag != 1) {
                        back_filt();
                        lp2(t,pos_id,el_id);
                }
        }
        function cl0(t) {
                var obj = eval("document.all.k"+t+"_in");
                eval("document.images.i"+t+".src = im2.src");
                obj.className = "hid";
        }
        function sh0(t) {
                var obj = eval("document.all.k"+t+"_in");
                eval("document.images.i"+t+".src = im1.src");
                obj.className = "vis";
        }
        function cl1(t) {
                var obj = eval("document.all.k"+t+"_in");
                eval("document.images.i"+t+".src = im4.src");
                obj.className = "hid";
        }
        function sh1(t) {
                var obj = eval("document.all.k"+t+"_in");
                eval("document.images.i"+t+".src = im3.src");
                obj.className = "vis";
        }
        function wr(ids) {
                document.forms.main.curr_ids.value = ids;
                var ids_ = ids.split("_");
                var id1,id2,id3;
                id1 = ids_[0];
                if (ids_[1]) id2 = ids_[0]+"_"+ids_[1];
                if (ids_[1] && ids_[2]) id3 = ids_[0]+"_"+ids_[1]+"_"+ids_[2];
                var div_title = eval('document.all.k'+id1+'.innerText');
                if (id2) div_title += "&nbsp;>>&nbsp;" + eval('document.all.k'+id2+'.innerText');
                if (id3) div_title += "&nbsp;>>&nbsp;" + eval('document.all.k'+id3+'.innerText');
                var count_prod = eval('document.all.k'+ids+'.title');
                if (count_prod && document.forms.main.mode.value == "full") div_title += " <nobr>("+count_prod+")</nobr>";
                document.all.title_div.innerHTML = div_title;
        }
        function ms2(t) {
                clear_bg(t);
                eval('document.all.t'+t+'.className = "m_p_o"');
                document.forms.main.bg_id.value = t;
        }
        function ms11(t) {
                clear_bg(t);
                eval('document.all.t'+t+'.className = "m_f_o1"');
                eval("document.images.i"+t+".src = im3.src");
                document.forms.main.bg_id.value = t;
        }
        function clear_bg(t) {
                with (document.forms.main) {
                        if (!t) t = "";
                        if (bg_id.value && bg_id.value != t) {
                                var obj = eval('document.all.t'+bg_id.value);
                                if (obj.className == "m_p_o") obj.className = "m_p";
                                if (obj.className == "m_f_o1") {
                                        obj.className = "m_f_o";
                                        eval("document.images.i"+bg_id.value+".src = im4.src");
                                }
                        }
                        bg_id.value = t;
                }
        }
        function back_filt() {
                document.all.filter_div.className = "vis";
                with (document.forms.main) {
                        sort_mode.value = "";
                        brands.options[0].selected = true;
                        price_to.value = "";
                        price_from.value = "";
                        brands.options.length = 1;
                }
        }
        function lp2(parent_id,pos_id_,child_id) {
                with (document.forms.main) {
                        curr_id.value = parent_id;
                        if (pos_id_) pos_id.value = pos_id_;
                        else pos_id.value = "";
                }
                if (child_id) show_current('',child_id);
                else show_current();
        }
        function r1(id1) {
                if (id1) {
                        if (all_im[id1]) document.all.top_image.src=all_im[id1];
                        for (var i=0;i<all_ids.length;i++) {
                                if (all_ids[i] != id1) {
                                        eval('document.all.k' + all_ids[i] + '_in.className="hid"');
                                        eval("document.images.i" + all_ids[i] + ".src = im2.src");
                                }
                        }
                }
        }
        var x_ = 0;
        var x_c = x_m = 0;
        var y_ = 0;
        var y_c = y_m = 0;
        var flag = 0;
        var flagM=0;
        function move_all() {
                if (flag == 1) {
                 with (document.all) {
                        if (flagM) {
                                x_c = x_ + event.clientX - x_m;
                                y_c = y_ + event.clientY - y_m;
                                musor_div.style.left = x_c;
                                musor_div.style.top = y_c;
                        }
                 }
                } else event.onmousemove = false;
        }
        function restore() {
                if (flagM) {
                        flagM = 0;
                        x_ = x_c;
                        y_ = y_c;
                }
                flag = 0;
        }
        function set_coord() {
                flag = 1;
                x_m = event.clientX;
                y_m = event.clientY;
        }
        function ab_f(t) {
                t.style.backgroundColor = "#7986A6";
        }
        function ab_r(t) {
                t.style.backgroundColor = "#EC5414";
        }
        function ab_cl() {
                document.all.about.className = "hid";
        }
        function ab_sh() {
                document.all.about.className = "vis";
        }

/// Левое меню: конец
		
//-->