for (var i=0;i<tbsub.rows.length;i++){
if(i==tbsub.rows.length-1){
break;
}
if(tbsub.rows(i+1).mid==tbsub.rows(i).mid){
var nodes=xmldoc.selectNodes("//z:row[@mid='"+tbsub.rows(i).mid+"']")
tbsub.rows(i).cells(0).rowSpan=nodes.length
tbsub.rows(i).cells(1).rowSpan=nodes.length
for(var j=1;j<nodes.length;j++){
tbsub.rows(j+i).cells(0).style.display="none"
tbsub.rows(j+i).cells(1).style.display="none"
}
i=i+nodes.length
}
}
if(i==tbsub.rows.length-1){
break;
}
if(tbsub.rows(i+1).mid==tbsub.rows(i).mid){
var nodes=xmldoc.selectNodes("//z:row[@mid='"+tbsub.rows(i).mid+"']")
tbsub.rows(i).cells(0).rowSpan=nodes.length
tbsub.rows(i).cells(1).rowSpan=nodes.length
for(var j=1;j<nodes.length;j++){
tbsub.rows(j+i).cells(0).style.display="none"
tbsub.rows(j+i).cells(1).style.display="none"
}
i=i+nodes.length
}
}