function SetColor(theRow,newColor)
{
 var theCells = null;
 if (typeof(theRow.style) == 'undefined') {
     return false;
 }

 if (typeof(document.getElementsByTagName) != 'undefined') {
     theCells = theRow.getElementsByTagName('td');
 }
 else if (typeof(theRow.cells) != 'undefined') {
     theCells = theRow.cells;
 }
 else {
     return false;
 }
 var rowCellsCnt  = theCells.length;
 var c = null;
  if (typeof(window.opera) == 'undefined') {
     for (c = 0; c < rowCellsCnt; c++) {
         theCells[c].setAttribute('bgcolor', newColor, 0);
     } 
 }        
 else {
     for (c = 0; c < rowCellsCnt; c++) {
         theCells[c].style.backgroundColor = newColor;
     }
 }
}


function demung(email)
{
    if (email.indexOf("mailto:") == 0)
    {
	email = email.substring("mailto:".length, email.length);
    }
    var lastDot = email.lastIndexOf(".");
    var numb = parseInt(email.substring(lastDot+1, email.length));
    email = email.substring(0, lastDot);
    var email1 = email.substring(0, numb);
    var email2 = email.substring(numb, email.length);
    email = email1 + "@" + email2;
    return "mailto:" + email;
}

function loopLinks()
{
    var l;
    if (document.links) l = document.links;
    else return;
    for (var i=0; i<l.length; i++)
    {
	if (l[i].href.indexOf("mailto:") == 0 && l[i].href.indexOf("@") == -1)
	{
	    l[i].href = demung(l[i].href);
	}
    }
}

