  //var whiteBalloon    = new Balloon;
  var DataVal;
  var selectedValue = 'Abuse';
  
  function reportContent(wwwroot, content_type, comm_id, sub_id, content_id){
  
    var data = '<div id="reportDivContent">' + 
    '<div class="formHeading">Report</div>'+
    '<div class="toppadder"></div>'+
    '<div style="height:92px;">'+
    '<div class="reportDivList">' + 
      '<ul>' + 
        '<li style="background :#6D6E72; color:#fff; font-weight:bold;" onclick="showSelectd(\'Abuse\')">Abuse</li>' + 
        '<li onclick="showSelectd(\'Copyright\')">Copyright</li>' + 
        '<li onclick="showSelectd(\'Commercial SPAM\')">Commercial SPAM</li>' + 
        '<li onclick="showSelectd(\'Other SPAM\')">Other SPAM</li>' + 
        '<li onclick="showSelectd(\'Other (specify)\')">Other (specify)</li>' + 
      '</ul>' + 
    '</div>' + 
    '<div id="reportTextarea" class="reportDivTextarea">' + 
     '<textarea name="reportedValue" id="reportedValue" onblur="DataVal=this.value;"></textarea>' + 
    '</div>' +
    '</div>' + 
    '<div class = "buttonHolderBallon">' + 
      '<input type="button" class="buttonborder" onclick="addReport(' 
              + '\'' + wwwroot + '\','
              + comm_id 
              + ',' +sub_id
              + ',\'' + content_type + '\',' 
              + content_id + ',DataVal);" value="Report">' + 
    '</div>' + 
  '</div>';
    return data;
  }
  function showSelectd(LINumber){
    var a =document.getElementsByName('report_item');
    for (i=0;i<a.length;i++){
       if(LINumber == a[i].innerHTML){
           selectedValue =  a[i].innerHTML;
           a[i].style.backgroundColor = "#A6C9E2";
           a[i].style.color = "#fff";
           a[i].style.fontWeight="bold";
       }else{
          a[i].style.backgroundColor = "#FCFDFD";
           a[i].style.color = "#A7A9AC";
           a[i].style.fontWeight="normal";
       }
    }
    document.getElementById('reportTextarea').style.backgroundColor = "#A6C9E2";
  }
  
  function addReport(wwwroot, community_id, sub_id, content_type, content_id, report_value){
     if(null == selectedValue || "" == selectedValue.trim()){
       alert("Please select a category.");
       return false;
     }
     //closeBalloon();
     //alert(wwwroot+' '+community_id+' '+sub_id+' '+content_type+' '+content_id);
     var textVal= escape(report_value);
     params = 'content_type=' + content_type 
              +'&reported_category='+ escape(selectedValue)
              +'&reported_text='+ textVal 
              +'&community_id='+community_id
              +'&sub_id='+sub_id
              +'&content_id='+content_id;
     var geturl = wwwroot + '/content/report?'+ params;
     //alert(geturl);
     ret = getUrlResponseAndFillDiv(geturl, 'xResponseDiv');
     enableMessageDiv();
  }

  function closeBalloon(){
   //whiteBalloon.hideTooltip(1);
  }
