Io ho fatto una prova con una pagina chiamata ciao.htm e funziona...
codice:
<html>
<head>
<style type="text/css">
.uno {BACKGROUND: none; COLOR: #ffffff; FONT-SIZE: 11px; FONT-FAMILY: Verdana, Helvetica; TEXT-DECORATION: none; font-weight:bold}
a.uno:link {BACKGROUND: none; COLOR: #ffffff; FONT-SIZE: 11px; FONT-FAMILY: Verdana, Helvetica; TEXT-DECORATION: none; font-weight:bold}
a.uno:active {BACKGROUND: none; COLOR: #ffffff; FONT-SIZE: 11px; FONT-FAMILY: Verdana, Helvetica; TEXT-DECORATION: none; font-weight:bold}
a.uno:visited {BACKGROUND: none; COLOR: #ffffff; FONT-SIZE: 11px; FONT-FAMILY: Verdana, Helvetica; TEXT-DECORATION: none; font-weight:bold}
a.uno:hover {BACKGROUND: none; COLOR: #000000; FONT-SIZE: 11px; FONT-FAMILY: Verdana, Helvetica; TEXT-DECORATION: none; font-weight:bold}
</style>
<script type="text/javascript">
window.onload = function() {
var cont = document.getElementById("menu1"),
a = cont.getElementsByTagName("a"),
i = a.length;
while(i--) {
if(location.href.indexOf(a[i].href) != -1) {
a[i].className = "uno";
break;
}
}
}
</script>
</head>
</body>
<div id="menu1">
<table width="168" height="1" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="27" height="20"></td>
<td align="right">protocollo</td>
<td width="5"></td>
<td width="13"></td>
</tr>
<tr>
<td></td>
<td height="1" bgcolor="#E9D1BB" colspan="2"></td><td></td>
</tr>
<tr>
<td></td>
<td align="right" id="activelink">ordini</td>
<td></td>
<td height="20"></td>
</tr>
<tr>
<td></td>
<td height="1" bgcolor="#E9D1BB" colspan="2"></td><td></td>
</tr>
<tr>
<td></td>
<td align="right">attività</td>
<td></td>
<td height="20"></td>
</tr>
<tr>
<td></td>
<td height="1" bgcolor="#E9D1BB" colspan="2"></td><td></td>
</tr>
<tr>
<td></td>
<td align="right">chiamate</td>
<td></td>
<td height="20"></td>
</tr>
<tr>
<td></td>
<td height="1" bgcolor="#E9D1BB" colspan="2"></td><td></td>
</tr>
<tr>
<td></td>
<td align="right">attestati</td>
<td></td>
<td height="20"></td>
</tr>
<tr>
<td></td>
<td height="1" bgcolor="#E9D1BB" colspan="2"></td><td></td>
</tr>
<tr>
<td></td>
<td align="right">prinzworld</td>
<td></td>
<td height="20"></td>
</tr>
<tr>
<td></td>
<td height="1" bgcolor="#E9D1BB" colspan="2"></td><td></td>
</tr>
</table>
</div>
</body>
</html>
Sicuramente il problema è uno di questi due:
1) hai utilizzato un altro script che magari entra in conflitto con questo ( nel senso che sovrascrive il window.onload, in questo caso è facilmente risolvibile usando un addEventListener/attachEvent ).
2) c'è qualcosa che non va con l'url; lo script legge l'attributo href e controlla se questa stringa è contenuta all'interno dell'url ( location.href ). Per vedere se il problema è questo devi postare l'url della pagina dove risiede il problema e il valore dell'attributo href che punta verso questa.