/** * mark one element in the similarity matrix */ function mark(from, to) { if(from == to){ return; } m = getElement("id","m"+from+"_"+to ) f = getElement("name","c"+from+"_"+to , 0) if( m.style.fontWeight != "bold" ){ m.style.fontWeight = "bold"; f.value = "1"; }else{ m.style.fontWeight = "normal"; f.value = "0"; } } /** * mark one row in the similarity matrix */ function mark_row(from){ for(i=0; i< 10; i++){ mark(from, i); } } /** * mark one column in the similarity matrix */ function mark_col(to){ for(i=0; i<10; i++){ mark(i, to); } } /** * mark the complete similarity matrix */ function mark_everything(){ for(j=0; j<10; j++){ mark_row(j); } } /** * highlight an interval in the boxed pq-tree representation */ function highlight_interval( prefix, start, end, color ){ t = document.getElementById(prefix+"_"+start+"_"+end) if(t.style.backgroundColor == "transparent" ||t.style.backgroundColor == "" ){ t.style.backgroundColor = color; }else{ t.style.backgroundColor = "transparent"; } }