function symbolCommentVote(comment_id, sign) {
  var strCommaDelimList=getServerDataComment(comment_id, sign);
}

function getServerDataComment(comment_id, sign) {
  document.body.style.cursor='wait';

  try{
    try{
      xmlhttp=new XMLHttpRequest();
    }
    catch(e) {
      var XMLHTTP_IDS=new Array(
      'MSXML2.XMLHTTP.5.0',
      'MSXML2.XMLHTTP.4.0',
      'MSXML2.XMLHTTP.3.0',
      'MSXML2.XMLHTTP',
      'Microsoft.XMLHTTP' );
      var success=false;
      for (var i=0;i < XMLHTTP_IDS.length && !success;i++) {
        try {
        xmlhttp=new ActiveXObject(XMLHTTP_IDS[i]);
        success=true;
        } catch (e) {}
      }
      if (!success) {
        try{
        xmlhttp=new HTML_AJAX_IframeXHR();
        } catch(e) {
          alert('Sorry. We are unable to load xml file. Please try again later.');
        }
      }
    }
    if(xmlhttp==null)
      return false;

    xmlhttp.open("GET", '/lib/ajax/symbol-comment-vote.php?comment_id='+comment_id+'&sign='+sign, true);
    xmlhttp.onreadystatechange=function(){
      if(xmlhttp.readyState==4){
        var elName=xmlhttp.responseXML.documentElement;
        if(document.getElementById('id_votes_plus_' + comment_id))
           document.getElementById('id_votes_plus_' + comment_id).innerHTML = decodeURIComponent(elName.getElementsByTagName("votes_plus")[0].childNodes[0].nodeValue);

        if(document.getElementById('id_img_vote_plus_' + comment_id)){
           document.getElementById('id_img_vote_plus_' + comment_id).src='/images/icon-thumbup-grey.gif';
           document.getElementById('id_img_vote_plus_' + comment_id).onclick = function(){return true};
        }
        
        if(document.getElementById('id_votes_minus_' + comment_id))
           document.getElementById('id_votes_minus_' + comment_id).innerHTML = decodeURIComponent(elName.getElementsByTagName("votes_minus")[0].childNodes[0].nodeValue);

        if(document.getElementById('id_img_vote_minus_' + comment_id)){
           document.getElementById('id_img_vote_minus_' + comment_id).src='/images/icon-thumbdown-grey.gif';
           document.getElementById('id_img_vote_minus_' + comment_id).onclick = function(){return true};
        }           
           
        alert(decodeURIComponent(elName.getElementsByTagName("response_text")[0].childNodes[0].nodeValue));
        
        document.body.style.cursor='auto';
        xmlhttp=null
      }
    };
    xmlhttp.send('');
  }
  catch (e) {
    alert("Server is not available at this time to process your request.");
  }
  return true;
}

function blockComment(id, action){
   $.get('/lib/ajax/symbol-comment-block.php', 
         {comment_id:id, action:action}, 
         function(data){ 
            $("#comment_description_" + id).html(data); 
            if(action == '1')
               $("#comment_disable_btn_" + id)
                  .attr("src", "/images/admin/disable.gif")
                  .attr("alt", "Block this comment")
                  .attr("title", "Block this comment")
                  .attr("onClick", 'if(confirm("Are you sure you want to block this comment?")){blockComment("'+id+'", "0");} else {return false}');
            else
               $("#comment_disable_btn_" + id)
                  .attr("src", "/images/admin/enable.gif")
                  .attr("alt", "Unblock this comment")
                  .attr("title", "Unblock this comment")
                  .attr("onClick", 'if(confirm("Are you sure you want to unblock this comment?")){blockComment("'+id+'", "1");} else {return false}');
         }
   );
}
