function highLight(elt, onclass, offclass ){
onclass || ( onclass = 'selected' ) ;
offclass || ( offclass = '' ) ;
//alert('Will highligth this :' + elt);
elt.setAttribute("class", onclass );
elt.setAttribute("className", onclass );
/* Sibblings of elt has to be setted to nothing */
/* On the right */
var nextSib = elt ;
while( nextSib = nextSib.nextSibling ){
if ( nextSib.tagName == elt.tagName ){
//alert('Unhighlight this:' + nextSib );
nextSib.setAttribute("class", offclass ) ;
nextSib.setAttribute("className" , offclass ) ;
}
}
/* On the left */
var preSib = elt ;
while( preSib = preSib.previousSibling ){
if ( preSib.tagName == elt.tagName ){
//alert('Unhighlight this:' + nextSib );
preSib.setAttribute("class", offclass ) ;
preSib.setAttribute("className" , offclass ) ;
}
}
/* do the same for element tab corresponding to this one */
var divElt = document.getElementById('tab_' + elt.id ) ;
if ( divElt ){
highLight(divElt , 'tabconton' , 'tabcontoff' );
}
}
