Getting text vell values of grid

have a gridview with textbox qty and rate and amt

when the user enters qty and then rate on blur of rate textbox i need amt to be calculated

function CalAmt(SelectRow) {

              var GridRow= SelectRow.parentNode.parentNode;

             var row = SelectRow.parentNode.parentNode;
             var Qty;
             var Rate;

             for (var child1 = 0; child1 <= GridRow.cells.length - 1; child1++)
		{
                 alert(GridRow.cells(child1).childNodes(0).type);// error
                 if (GridRow.cells(child1).childNodes(0).type == "text")
                 {
                     if (GridRow.cells(child1).childNodes(0).id.indexOf("txtqty") > 0)
                      {
                          Qty = GridRow.cells(child1).childNodes(0).value;
                      }

                      if (GridRow.cells(child1).childNodes(0).id.indexOf("txtrate") > 0)
                      {
                          Rate = GridRow.cells(child1).childNodes(0).value;

                      }

                      if (GridRow.cells(child1).childNodes(0).id.indexOf("txttotal") > 0)
                       {
                           GridRow.cells(child1).childNodes(0).value = Qty * Rate;
                      }
                  }

             }
         }

when i use GridRow.cells(child1).childNodesB[/B].type i get function expected’ in line JavaScript runtime error: Function expected
if i use GridRow.cells(child1).childNodes[0].type i get undefined alert instead of value