var brs_cat="260##Agriculture, Fishery, Livestock##1||25##Arts, Artcrafts and Antiques##1||18##Automobiles  and transportation vehicles##1||5##Beauty and bodycare##1||20##Boats, Ships, marine products ##1||12##Building Materials and Construction##1||4##Chemicals##1||479##Climatiseur##1||21##Clocks and Watches, Optics, Photography##1||11##Clothes, Shoes and Fashion accessories##1||300##Commodities##1||17##Computer, telephone, telecommunications##1||16##Electronics and electrical ##1||3##Energy, minerals and natural resources##1||299##Environment##1||7##First-need products##1||1##Food and Beverage##1||8##Furnishing and Decorative objects##1||209##Hardware, DIY Products, Gardening##1||26##Import-export Services##1||22##Leisure, Sports and Entertainment##1||301##Liquidations, Excess Inventory##1||15##Mechanics and Machinery##1||24##Medical and Health##1||14##Metals and Metallic Works##1||23##Office Supplies and Equipment##1||9##Packaging, paper and publishing##1||375##Patents, Inventions, Concepts and Opportunities##1||6##Plastics##1||298##Protection and Security##1||13##Tableware, kitchenware and household##1||10##Textile and leather##1";
function categ_construct(categ_cnt,nbr_cols,lnk,stl){
	var tble=categ_cnt.split("||");
	if (isNaN(nbr_cols)){nbr_cols=1};
	if(!lnk){lnk="brs_ann_pasach.asp?id_categ=elmid&cat_nom=elmtitre&type_annonce=0"};
	if(!stl){stl="padding:2px;border:1px solid #e1e1e1;"};
	var str="";
	var max_elm=tble.length-1;
	var w_cols=parseInt(100/nbr_cols);
	for (i=0;i<max_elm;i++){
		ss_tble=tble[i].split("##");
		lang=ss_tble[2];
		titre=ss_tble[1];
		elmid=ss_tble[0];
		lnk2=lnk.replace("elmid",elmid);
		lnk2=lnk2.replace("elmtitre",titre);
		modu=i%nbr_cols;
		if (modu==0){str=str +"<TR valign='top'>"};
		if (i==max_elm-1){colsp=" colspan='"+(nbr_cols-modu)+"'";}
		else {colsp=" width='" +w_cols+ "%'"};
		str=str+"<TD" +colsp+ "><a href=\"" +lnk2+ "\">" +titre+ "</a></td>";
		if (modu==nbr_cols-1 || i==max_elm-1){str=str +"</TR>"};
	};
document.write("<style>table.brs_categ td{"+stl+"}</style><table width='100%' border=0 cellpadding=1 cellspacing=1 class='brs_categ'>" +str+ "</TABLE>")}
