var reportDubiousPrice_priceReportedHTML = '<img src="/images/new/buttons/repoted_sm.gif" alt="Thanks, you have already reported this dubious price.">';
var reportDubiousPrice_successAlert      = "Thank you for submitting a dubious price.  We will look into this as soon as possible";
var reportDubiousPrice_failureAlert      = "An error occured, please try again";

function reportDubiousPrice_handleResponse(handler)
{
  if (handler.XMLParser.success == 1)
  {
    var postProcessData = handler.XMLParser.getPostProcessData(0);
    $('p' + postProcessData['StockId'] + '_' + (postProcessData['StockLotId'] ? postProcessData['StockLotId'] : '')).innerHTML = reportDubiousPrice_priceReportedHTML;

    alert(reportDubiousPrice_successAlert);
  }

  else
  {
    alert(reportDubiousPrice_failureAlert);
  }
}

function reportDubiousPrice(stockId, stockLotId)
{
  handler = new AJAX();

  handler.setget('StockId', stockId);
  handler.setget('StockLotId', stockLotId);
  handler.setget('form_id', 'website_report_dubious_price');

  handler.postrequest_function = 'reportDubiousPrice_handleResponse';

  handler.get();


}