function addBehaviorQR(olid,paramQR)
{
var x = document.getElementById("ol"+olid);
if (!x) return;
var y = x.getElementsByTagName('a');
var temphref="test";
for (var i=0;i<y.length;i++)
{
temphref=y[i].href;
  if (document.all) {
    //if under IE...
    y[i].onclick=function(e)
    {
      if (this.href.charAt(0)!="#")
      {
        this.href="#"+this.href;
      }
    var ratingpos=(this.href.length-1);
    var rating=this.href.charAt(ratingpos);
    silentQR(olid,paramQR,rating);
    }
  }
  else
  {
y[i].setAttribute("onclick","silentQR('"+olid+"','"+paramQR+"','"+i+"')");
y[i].href="#"+y[i].href;
  }
}
}
function deployQR(id,state)
{
var qr_titleid='title'+id;
var qr_divid='div'+id;
if (state=='open')
   {
   document.getElementById(qr_divid).className='quick_rating_content';
   document.getElementById(qr_titleid).className='quick_rating_ttb';
   }
   else
   {
   document.getElementById(qr_titleid).className='quick_rating_tt';
   document.getElementById(qr_divid).className='hide';
   }
}
function silentQR(olid,paramQR,rating)
{
var silentURL=unescape(paramQR)+rating;

kk_div_update("/ctl/do/asyncCall/product_quick_rating_confirm"+silentURL+"&qrAjax=true");
}

function kk_div_update_callback(response) {

   if (response.readyState == 4) {
      eval(response.responseText);
   }
   else
   {
      alert('pb with this request.'+response.readyState+'. The div can t be updated');
   }
}

function kk_div_update(url) {

        // Get the yahoo request object
        var req_o = ygConn.getObject()
        ygConn.http.asyncRequest(req_o,'GET',url,false,kk_div_update_callback);
}

