
function highlight(id, id2)
{
	identity=document.getElementById(id);
    if (identity != null) 
        identity.className='highlight';
	identity2=document.getElementById(id2);
    if (identity2 != null) 
        identity2.className='highlight';
}

function normalized(id, id2)
{

	identity=document.getElementById(id);
    if (identity != null) 
        identity.className='leftside';
	identity2=document.getElementById(id2);
    if (identity2 != null) 
        identity2.className='leftnormal';

}
function select(id)
{
	identity=document.getElementById(id);
    if (identity != null 
            && identity.childNodes[0] != null 
            && identity.childNodes[0].childNodes[0] != null
            && identity.childNodes[0].childNodes[0].lastChild != null) {
        identity.className='leftselected';
        text = identity.childNodes[0].childNodes[0].lastChild.nodeValue;
        tr = identity.parentNode;
        tr.removeChild(identity);
        mycurrent_cell=document.createElement("td");
        // creates a Text Node
        currenttext=document.createTextNode(text);
        // appends the Text Node we created into the cell TD
        mycurrent_cell.appendChild(currenttext);
        // appends the cell TD into the row TR
        tr.appendChild(mycurrent_cell);
    }
}

function selectHead(id)
{
	identity=document.getElementById(id);
    if (identity != null && identity.childNodes[0] != null && identity.childNodes[0].lastChild != null ) {
        ahref = identity.childNodes[0];
        text = ahref.lastChild.nodeValue;
        currenttext=document.createTextNode(text);
        identity.removeChild(ahref);
        identity.appendChild(currenttext);
    }
}
