function t_equipment(name)
{
this.name = name;
}
var a_equipment = new Array();
a_equipment[0] = new t_equipment("Классика")
a_equipment[1] = new t_equipment("Боевики")
a_equipment[2] = new t_equipment("Учебники")
function equipment(name, price, count, vsego, description, t_equipment)
{
this.name = name;
this.price = price;
this.count = count;
this.vsego = vsego;
this.description = description;
this.t_equipment = t_equipment;
}
var n_equipment = new Array();
n_equipment[0] = new equipment("Мертвые души", parseFloat(300), "1", '300', "", a_equipment[0])
n_equipment[1] = new equipment("Маршрут", parseFloat(258), "1", '258', "", a_equipment[1])
n_equipment[2] = new equipment("Руский язык за 5 класс", parseFloat(250), "1", '250', "", a_equipment[2])
var strTab = "<table id='equip' 'border='2' ><tr>"
strTab += "<th> Наименование </th><th width=80px> Цена </th><th width=65px> Кол-во </th><th width=100px> Всего </th><th width=auto align=left > Описание </th><th width=200px align=left > Тип </th>"
for(var i=0; i <= n_equipment.length - 1; i ++)
{
strTab += "<TR><TD><h5>" + n_equipment[i].name + "</h5></TD><TD id=p align=center ><b>" + n_equipment[i].price
strTab += "</b></TD><TD align=center ><b>" + n_equipment[i].count + "</b></TD><TD align=center ><b>" + n_equipment[i].vsego
strTab += "</b></TD><TD><h5>" + n_equipment[i].description + "</h5></TD><TD><h5>" + n_equipment[i].t_equipment.name + "</h5></TD></TR>"
}
strTab += "</table>"
document.write(strTab);
strTab = "<table 'border='2' ><tr>"
var count_pr = new Array();
for( var j = 1; j < document.getElementById("equip").rows.length; j ++)
{
count_pr += document.getElementById("equip").rows[j].cells[3].innerText;
alert(parseFloat(document.getElementById("equip").rows[j].cells[3].innerText));
}
alert(count_pr.innerText);
pr = count_pr.innerText;
strTab += "<tr><td align='right' width='190px' > Итого стоимость книг: </td><td align='center' width='80px'>"+ pr +"</td><td align='center' width='65'>руб.</td></tr>"
strTab += "</table>"
document.write(strTab);