function bTinit() {
	bT={
		vazold:"ВАЗ классика",
		vaznew:"ВАЗ пер.прив.",
		niva:"Нива",
		gaz:"ГАЗ",
		moscvich:"Москвич",
		audi:"Audi",
		bmw:"BMW",
		chevrolet:"Chevrolet",
		chrysler:"Chrysler",
		daewoo:"Daewoo",
		ford:"Ford",
		honda:"Honda",
		hyundai:"Hyundai",
		kia:"Kia",
		mazda:"Mazda",
		mercedes:"Mercedes",
		mitsubishi:"Mitsubishi",
		nissan:"Nissan",
		opel:"Opel",
		renault:"Renault",
		subaru:"Subaru",
		suzuki:"Suzuki",
		toyota:"Toyota",
		volksvagen:"Volksvagen",
		volvo:"Volvo",
		tiregear:"Шины и колеса",
		gai:"ГАИ и закон",
		insurance:"Страхование",
		blablabla:"Просто треп",
		feedback:"О Клубе",
		trash:"Корзина"
	};
	d=document;
	var loc = (top.frames.list.location.pathname ? top.frames.list.location.pathname : d.location.pathname);
	var arr = /\/webboard\/(\w+)\//.exec(loc);
	cBid = arr[1];
}

function wrTop() {
	bTinit();
	d.write(gTD('17','vazold','vaznew','niva','gaz','moscvich')+
		gTD('17','audi','bmw','chevrolet','chrysler','daewoo')+
		gTD('17','ford','honda','hyundai','kia','mazda')+
		gTD('17','mercedes','mitsubishi','nissan','opel','renault')+
		gTD('17','subaru','suzuki','toyota','volksvagen','volvo')+
		gTD('17','tiregear','gai','insurance','blablabla','feedback')
	);
}

function wrTop1() {
	bTinit();
	d.write(gTD('17')+
		gTD('17')+
		gTD('17')+
		gTD('17')+
		gTD('17')+
		gTD('17','','','','','trash')
	);
}

function gTD(wd) {
	var r='<TD valign=top class=fnt width="'+wd+'%" nowrap>';
	if (arguments.length>0) {
		for (var i=1; i<arguments.length; i++) {
			var b=arguments[i];
			if (bT[b]==null)
			{
				r += '&nbsp;<BR>';
				continue;
			}
			if (b==cBid) {
				r += '<DIV id='+b+'><B>'+bT[b]+'</B></DIV>';
			} else {
				r += '<DIV id='+b+'><A href="javascript:cb('+"'"+b+"'"+')">'+bT[b]+'</A></DIV>';
			}
		}
	} else {
		r += '&nbsp;';
	}
	return r+'</TD>';
}

function cb(bid) {
	top.frames['list'].document.location='/webboard/'+bid+'/weblist.shtml';
	top.frames['o'].document.location='/webboard/'+bid+'/rules.shtml';
	top.document.title=bT[bid];
	if (d.getElementById(bid)!=null) d.getElementById(bid).innerHTML='<B>'+bT[bid]+'</B>';
	if (d.getElementById(cBid)!=null) d.getElementById(cBid).innerHTML='<A href="javascript:cb('+"'"+cBid+"'"+')">'+bT[cBid]+'</A>';
	cBid=bid;
}
