function st_hov(n){ for( var i=1 ; i<=5 ; i++ ){ // save current img src if( i <= n ){ document.getElementById('st_'+i).src = '/images/star_rate.gif' ; }else{ document.getElementById('st_'+i).src = st_holder[i] ; } } // turn stars "on" } function st_clr(){ for( i = 1 ; i<=5 ; i++ ){ document.getElementById('st_'+i).src = st_holder[i] ; } } function url(u){ window.location = u; return; } function init() { var e = document.getElementsByTagName('table'); for (var i = 0; i < e.length; i++) { if (e[i].className!='chart results') continue; var tr = e[i].getElementsByTagName('tr'); for (var j = 0; j < tr.length; j++) { tr[j].style.cursor = 'pointer'; tr[j].onmouseover = function () { this.style.background = '#FFEFF2'; } if (tr[j].className=='even') { tr[j].onmouseout = function () { this.style.background = '#FFFFFF'; } } else { tr[j].onmouseout = function () { this.style.background = '#EFEEF4'; } } } } // show errors if any } $(document).ready(function(){ init() ; $('#errors').show('slow') ; }) ;