rem:  while (destTable.firstChild.nodeName == '#text') destTable.removeChild(destTable.firstChild); var row = destTable.firstChild.firstChild; while (row != null) { if (row.nodeName == 'TR') { var rowPos = getEltPosition(row); if ((rowPos.y <= eltPos.y) && (eltPos.y - rowPos.y < row.offsetHeight)) { break; } } row = row.nextSibling; } if (row != null) { var col = row.firstChild; while (col != null) { if (col.nodeName == 'TD') { var colPos = getEltPosition(col); if ((colPos.x <= eltPos.x) && (eltPos.x - colPos.x < col.offsetWidth)) { break; } } col = col.nextSibling; } if (col != null) { return col; } } return null; 
add:  while (destTable.firstChild.nodeName == '#text') destTable.removeChild(destTable.firstChild); var row = destTable.firstChild.firstChild; while (row != null) { if (row.nodeName == 'TR') { var rowPos = getEltPosition(row); if ((rowPos.y <= eltPos.y) && (eltPos.y - rowPos.y < row.offsetHeight)) { break; } } row = row.nextSibling; } if (row != null) { var col = row.firstChild; while (col != null) { if (col.nodeName == 'TD') { var colPos = getEltPosition(col); if ((colPos.x <= eltPos.x) && (eltPos.x - colPos.x < col.offsetWidth)) { break; } } col = col.nextSibling; } if (col != null) { return col; } } return null; 
context:   function getDestCell(elt)   {    var eltPos = getEltPosition(elt);    var destTable = document.getElementById(destinationTableId);	if (destTable == null) {		alert('Couldn\'t find destination table '+destinationTableId);		return null;	}    // get rid of moz's text nodes    while (destTable.firstChild.nodeName == '#text') destTable.removeChild(destTable.firstChild);    var row = destTable.firstChild.firstChild;    while (row != null) {      if (row.nodeName == 'TR') {        var rowPos = getEltPosition(row);        if ((rowPos.y <= eltPos.y) && (eltPos.y - rowPos.y < row.offsetHeight)) {           break;        }      }      row = row.nextSibling;    }     if (row != null) {       var col = row.firstChild;       while (col != null) {       if (col.nodeName == 'TD') {            var colPos = getEltPosition(col);            if ((colPos.x <= eltPos.x) && (eltPos.x - colPos.x < col.offsetWidth)) {                break;            }         }         col = col.nextSibling;       }       if (col != null) {          return col;       }    }    return null;  }//end getDestCell()
meta: 5635	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5635/4e9088420cde0b5d0efe0e6d0fb4719979e2a3c0/drag_n_drop.js/clean/packages/calendar/page_templates/page_calendar/js/drag_n_drop.js