temp1=0
for i=1 to total_no
if temp1<total(i,1) then temp1=total(i,1)
next
temp1=int(temp1)
if temp1>9 then
temp2=mid(cstr(temp1),2,1)
if temp2>4 then
temp3=(int(temp1/(10^(len(cstr(temp1))-1)))+1)*10^(len(cstr(temp1))-1)
else
temp3=(int(temp1/(10^(len(cstr(temp1))-1)))+0.5)*10^(len(cstr(temp1))-1)
end if
else
if temp1>4 then temp3=10 else temp3=5
end if
if total_no>0 then
for i=temp3 to 1 step -temp3/5
response.write "<tr style='font-size:1px;height:1px'><td></td><td bgcolor='#111111' width='20%'></td></tr>"
response.write "<tr align=right valign='top'><td colspan='2'>"&i&"</td></tr>"
next
response.write "</table>"
response.write "</td><td style='font-size:1px;height:1px' bgcolor='#111111'>1</td><td width='"&(all_width-30)&"' height='"&(all_height-30)&"' valign='bottom' align='left'>"
response.write "<!--[if gte vml 1]>"
z=9
width=30
total_width=280
width=(total_width-total_no*z*2)/(total_no)
m=0
if width>30 then width=30
m=m+1
for i=1 to total_no
response.write "<v:rect id='_x0000_s1025' alt='' style='position:relative;left:"
response.write table_space/2+table_space*(i-1)
response.write "pt;top:2px;width:"&width&"pt;height:"&(all_height/1.41)*total(i,1)/temp3&"pt;z-index:1' fillcolor='"&tb_color(i,2)&"'>"
response.write "<v:fill color2='"&tb_color(i,1)&"' rotate='t' type='gradient'/>"
response.write "<o:extrusion v:ext='view' backdepth='"&thickness&"pt' color='"&tb_color(i,2)&"' on='t'/>"
response.write "<v:textbox inset='0,0,0,0'>"
response.write "<table cellspacing=0 cellpadding=0 width='100%' height='100%'>"
response.write "<tr><td align='center'"
if (all_height/1.41)*total(i,1)/temp3<8 then response.write " style='font-size:1px;'"
response.write ">"&total(i,1)&"</td></tr>"
response.write "</table></v:textbox></v:rect>"
next
for i=1 to total_no
response.write "<td width='"&(100/total_no)&"%'>"&total(i,2)&"</td>"
next
else
response.write ""
end if
response.write "</tr></table></td></tr></table></td></tr></table>"
end function
%>