﻿// JScript File

function DoRowHover(obj){                
    obj.style.backgroundColor = "#FFFFCC";                           
}
function UndoRowHover(obj){
    obj.style.backgroundColor = "";
}

var _timerID;
var _topicID;
var _rating;

function SubmitRating(objTopicName, objRatingName, topicID, rating){
    document.getElementById(objTopicName).value = topicID;
    document.getElementById(objRatingName).value = rating;
    document.forms[0].submit();
}
function ResetHiddenFields(objTopicName, objRatingName){
    document.getElementById(objTopicName).value = "";
    document.getElementById(objRatingName).value = "";            
}
function DoHover(topicID, count){
    clearTimeout(_timerID);
    var i=1;
    for (i=1;i<=count;i++){            
        document.getElementById(topicID + "_" + i).src="/images/star_hover.gif";
    }
    for (;i<=5;i++){            
        document.getElementById(topicID + "_" + i).src="/images/star.gif";
    }
    
}
function UndoHoverTimer(topicID, rating){
    _topicID = topicID;
    _rating = rating;
    _timerID = setTimeout("UndoHover()",200);  
}
function UndoHover(){
    clearTimeout(_timerID);
    
    var i=1;
    for (i=1;i<=_rating;i++){            
        document.getElementById(_topicID + "_" + i).src="/images/star_hover.gif";
    }
    for (;i<=5;i++){            
        document.getElementById(_topicID + "_" + i).src="/images/star.gif";
    }              
    
}
function OpenTOS(){
    window.open("/TOS.aspx","TOS","height=400,width=400,scrollbars=yes");
}