/* This file is part of moses. Its use is licensed under the GNU Lesser General Public License version 2.1 or, at your option, any later version. */ var nodeIn = []; var nodeOut = []; var nodeChildren = []; var max_depth = []; var span_count_in = []; var span_count_out = []; var current_depth = -1; function highlightSingleNode( sentence, id, color ) { var i, j, item; for(i=nodeIn[sentence][id].start;i<=nodeIn[sentence][id].end;i++) { for(j=nodeIn[sentence][id].depth;j<=max_depth[sentence];j++) { item = "in-" + sentence + "-" + i + "-" + j; if ($(item) !== null) { $(item).setStyle({ backgroundColor: color, borderColor: 'red' }); } } } //$("debug").innerHTML = "highlight: "+id+", of "+nodeOut[sentence].size()+"
"; for(i=nodeOut[sentence][id].start;i<=nodeOut[sentence][id].end;i++) { for(j=nodeOut[sentence][id].depth;j<=max_depth[sentence];j++) { item = "out-" + sentence + "-" + i + "-" + j; //$("debug").innerHTML += item; if ($(item) !== null) { $(item).setStyle({ backgroundColor: color, borderColor: 'red' }); } } } } function lowlightAllNodes( sentence ) { var i, j, item; for(i=0;i