function SpanGrid(tabObj,colIndex){
if(tabObj != null){
var i,j;
var intSpan;
var strTemp;
for(i = 0; i < tabObj.rows.length; i++){
intSpan = 1;
strTemp = tabObj.rows[i].cells[colIndex].innerHTML;
for(j = i + 1; j < tabObj.rows.length; j++){
if(strTemp == tabObj.rows[j].cells[colIndex].innerHTML){
intSpan++;
tabObj.rows[i].cells[colIndex].rowSpan = intSpan;
tabObj.rows[j].deleteCell(colIndex);
}else{
break;
}
}
i = j - 1;
}
}
}