v=(navigator.appName+':'+navigator.appVersion);
b="";
if (v.indexOf('Explorer:')>=0 && v.substring(v.indexOf('Explorer:')+9)>='4')
  b='IE';
else
  b='NS';
//----if (!b) document.location='br_err.htm';

cgi='http://'+location.hostname+'/cgi-bin/hb.cgi?';
imgtxt='Нажмите здесь для просмотра картинки в отдельном окне';

function pr_line(kod,name,cena,pack,qtt,img,sel) {
document.write(
'<TR bgcolor=white><TD colspan=2>'
+'<table border=0 width=100% cellpadding=0 cellspacing=0 class="pr-tbl">'
+'<tr><TD width=25>'
+(img ? '<img width=20 height=14 border=0 src="images/foto.gif" alt="'+imgtxt+'" border=0 style="cursor:hand" onClick="window.open(\''+cgi+'tema=p'+kod+'\',\'View\',\'width=600,height=550\')">':'<br>')
+'<td width=325'+(sel ? ' style="color:silver"':'')+'>'+name+'</td>'
+'</td></tr></table>'
+'</TD>'
+'<TD align=center>'+kod+'</TD>'
+'<TD align=center>'+cena+'</TD>'
+'<TD align=center>'+pack+'</TD>'
+'<TD><input style="text-align:right" name="p'+kod+'" type=text size=4 class="pr-inp" value="'+qtt+'"></TD>'
+'</TR>');}

function pr_line1(kod,name,cena,pack,qtt,img,sel) {
document.write(
'<TR bgcolor=white><TD colspan=2>'
+'<table border=0 width=100% cellpadding=0 cellspacing=0 class="pr-tbl">'
+'<tr><TD width=25>'
+(img ? '<img width=20 height=14 border=0 src="images/foto.gif" alt="'+imgtxt+'" border=0 style="cursor:hand" onClick="window.open(\''+cgi+'tema=p'+kod+'\',\'View\',\'width=600,height=550\')">':'<br>')
+'<td width=325'+(sel ? 'style="color=silver"':'')+'>'+name+'</td>'
+'</td></tr></table>'
+'</TD>'
+'<TD align=center>'+kod+'</TD>'
+'<TD align=center>'+cena+'</TD>'
+'<TD align=center>'+pack+'</TD>'
+'<TD align=right>'+qtt+'</TD>'
+'</TR>');}

function encode(s) {
  s = s.split('"').join('%22');
  return s.split('+').join('%2B');}

function nop() {
}

function news_line(name,txt) {document.write('<div class="txt-head2">'+name+'</div><div class="txt">'+txt+'</div><br><br>');}

function transport_image( Weight ) {
  var TransCaps = [0.0,20,500,1500,10000,20000,65000,999999];
  aImg=['blank','1','2','3','4','5','6','7'];
  aAlt=['Пусто','Тележка','"Каблук"','"Газель"','"Камаз"','большой "Камаз"','ж/д Вагон','м.б. Корабь подойдет? ;)'];

  for( var Index = 0;
  (Index < TransCaps.length) && (TransCaps[ Index ] < Weight);
  Index++ );
  return "SRC=images/" + aImg[Index] + ".gif alt='"+ aAlt[Index] +"'";}

function discount_line(sumd,discount) {
  if (sumd > 0) {
    document.write('<TR bgcolor=white><TD align=center>'+sumd+'</TD><TD align=center>'+discount+'</TD></TR>');
  }
}

function ShowTop(id) {
  HideTopAll();
  eval(id+".style.visibility='visible'");
  eval(id+"m.style.visibility='visible'");}

function HideTop(id) {
  eval(id+".style.visibility='hidden'");
  eval(id+"m.style.visibility='hidden'");}

function HideTopAll() {
  HideTop('about');HideTop('news');HideTop('prlist');HideTop('contacts');}

function trTopOver(obj) {
	obj.style.backgroundColor='rgb(237,134,15)';
	obj.children[0].children[0].style.color='white';}

function trTopOut(obj) {
		obj.style.backgroundColor='rgb(225,225,225)';
		obj.children[0].children[0].style.color='black';}

function TopMB(n,l,w) {
  document.write('<div id='+n+' onMouseOut=\'HideTop("'+n+'")\' style="position:absolute;top=25;left='+l+';height:16;width:'+w+';visibility:hidden;">'+
'<img src="img/tran.gif" width="'+w+'" height="16" border="0"></div>'+
'<table id='+n+'m onMouseOut=\'HideTop("'+n+'")\' onMouseOver=\'ShowTop("'+n+'")\''+
' style="position:absolute;top=41;left='+(l+10)+';visibility:hidden;border: red solid 1px; background-color: rgb(225,225,225);">');}

function EndMB() {
  document.write('</table>')}

function TopM(n,a) {
  document.write('<tr onMouseOver="trTopOver(this)" onMouseOut="trTopOut(this)"><td><a class=am href="'+cgi+'tema='+a+'">'+n+'</a></td></tr>');}