function view_shrift(aa){
	var aa;

	if(aa == 1){
		document.getElementById('shrift').innerHTML='&nbsp;&nbsp;<a href="javascript: view_shrift(10);" style="font-size:10px;">A</a>&nbsp;&nbsp;<a href="javascript: view_shrift(12);" style="font-size:12px;">A</a>&nbsp;&nbsp;<a href="javascript: view_shrift(14);" style="font-size:14px;">A</a>';
	}
	if(aa == 2){
		document.getElementById('shrift').innerHTML=ab;
	}
	if(aa == 10){
		document.getElementById('article_content').style.font='10px';
		document.getElementById('shrift').innerHTML=ab;
	}
	if(aa == 12){
		document.getElementById('article_content').style.font='12px';
		document.getElementById('shrift').innerHTML=ab;
	}
	if(aa == 14){
		document.getElementById('article_content').style.font='14px';
		document.getElementById('shrift').innerHTML=ab;
	}
}

function top_frm(ac){
	var ac;

	if(ac>0){
		document.getElementById('qwe11').style.display='none';
		document.getElementById('qwe11').style.height='0px';
		document.getElementById('tb_qwe11').style.height='0px';

		document.getElementById('qwe').style.display='block';
		document.getElementById('tb_qwe').style.height='83px';
		document.getElementById('qwe').style.height='83px';
	}
	else{
		document.getElementById('qwe').style.display='none';
		document.getElementById('qwe').style.height='0px';
		document.getElementById('tb_qwe').style.height='0px';

		document.getElementById('qwe11').style.display='block';
		document.getElementById('tb_qwe11').style.height='36px';
		document.getElementById('qwe11').style.height='36px';
	}
}

function to_korzina(tovars_on_p){
	var tovars_on_p;

	kol = 0;
	for(var i = 0; i < tovars_on_p.length; i++)
	if(tovars_on_p[i]>0)
	if(document.getElementById('id_tovar_to_buy_'+tovars_on_p[i]).value>0){
		kol=kol+1;
//		alert("id= "+tovars_on_p[i]+" value= "+document.getElementById('id_tovar_to_buy_'+tovars_on_p[i]).value);
		dojo.io.bind({
	   	url: "/ajax.php?event=to_korzina&id="+tovars_on_p[i]+"&kol="+document.getElementById('id_tovar_to_buy_'+tovars_on_p[i]).value,
	   	load: function(type, data, evt){
//			alert(data);
	   	},
	   	error: function(type, error){
	   		alert('error!!!');
	   	},
	   	mimetype: "text/html"
		});
	}

	if(kol<1)
		alert(no_kol);
	else
		alert(yes_kol);
}

function anons_razdel(id){
	var id;
	if(selected_razdel != id || document.getElementById('art_zakl_1_'+selected_razdel).className == "art1_2")
	if(document.getElementById('art_zakl_1_'+id).className == "art1_2"){
		if(selected_razdel){
			document.getElementById('art_zakl_1_'+selected_razdel).className = "art1_2";
			document.getElementById('art_zakl_2_'+selected_razdel).className = "art2_2";
			document.getElementById('art_zakl_3_'+selected_razdel).className = "art3_2";

			document.getElementById('arti_'+selected_razdel).style.display = "none";
		}
		document.getElementById('art_zakl_1_'+id).className = "art1";
		document.getElementById('art_zakl_2_'+id).className = "art2";
		document.getElementById('art_zakl_3_'+id).className = "art3";

		document.getElementById('arti_'+id).style.display = "block";

	}
	else{
		if(selected_razdel){
			document.getElementById('art_zakl_1_'+selected_razdel).className = "art1";
			document.getElementById('art_zakl_2_'+selected_razdel).className = "art2";
			document.getElementById('art_zakl_3_'+selected_razdel).className = "art3";

			document.getElementById('arti_'+selected_razdel).style.display = "block";
		}
		document.getElementById('art_zakl_1_'+id).className = "art1_2";
		document.getElementById('art_zakl_2_'+id).className = "art2_2";
		document.getElementById('art_zakl_3_'+id).className = "art3_2";

		document.getElementById('arti_'+id).style.display = "none";
	}
	selected_razdel = id;
}

function show_brand(id){
	var id;
	if(open_brand && !(open_brand == id) ){
		dojo.lfx.wipeOut('brand_fulltext_'+open_brand, 300).play();
//		document.getElementById('brand_fulltext_'+open_brand).style.display = 'none';
	}
	if(document.getElementById('brand_fulltext_'+id).style.display == 'none'){
//		document.getElementById('brand_fulltext_'+id).style.display = 'block';
		dojo.lfx.wipeIn('brand_fulltext_'+id, 300).play();
		if(!(open_brand == id))
			open_brand = id;
		else
			open_brand = 0;
	}
	else{
//		document.getElementById('brand_fulltext_'+id).style.display = 'none';
		dojo.lfx.wipeOut('brand_fulltext_'+id, 300).play();
	}
}


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){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}