﻿
function rate(news_id)
{    
    document.getElementById('a_rate_'+news_id).onclick = ''
    document.getElementById('div_'+news_id).innerHTML = "<img src='/images/loading.gif'>";    
    
    new Ajax.Request("/Ajax/Comments/Rate.aspx?News_ID="+news_id,
    {
	    method:'get',
	    evalScripts: true,

	    onSuccess: function(transport)
	    {
	        var response = transport.responseText;
	        document.getElementById('div_'+news_id).innerHTML = "<span style='font-size:14pt;font-family:Georgia'>" + response+"</span>";
	    },
	    onFailure: function(){ alert('Có lỗi xảy ra..'); }
    });
}

function tdMouseOver(td)
{
    

    document.getElementById('tb_'+td).style.backgroundImage = "url(/images/family/binhluan/img_binhluanon_a.jpg)";

    document.getElementById('tb_'+td).style.width = "107px";
    document.getElementById('tr_'+td).style.height = "53px";
    
    document.getElementById('div_rate_'+td).style.cursor = "pointer";
    
    document.getElementById('div_rate_'+td).style.color = "White";
    document.getElementById('div_rate_'+td).style.fontSize = "28pt";
    document.getElementById('div_rate_'+td).style.fontFamily = "Georgia";
    
    if (!document.all)
    document.getElementById('td_Ngan_'+td).style.width = "30px";
    else
    {
    document.getElementById('td_Ngan_'+td).style.width = "28px";
    }
}

function tdMouseOut(td)
{
    document.getElementById('tb_'+td).style.backgroundImage = "url(/images/family/binhluan/img_binhluanoff_a.jpg)";
    
    document.getElementById('div_rate_'+td).style.color = "White";
    document.getElementById('div_rate_'+td).style.fontSize = "28pt";
    document.getElementById('div_rate_'+td).style.fontFamily = "Georgia";    
    
    document.getElementById('tb_'+td).style.width = "81px";
    document.getElementById('tr_'+td).style.height = "53px";    
    document.getElementById('td_Ngan_'+td).style.width = "0px";
}