<!--

function fn1(v){
 if (opera || document.addEventListener) {
  var v1=(v.target.name=="rpimg");
   if (v1){
    if (v.which==3){
    }
   }
 }else if(document.captureEvents) {
  var tgt=v.target.toString();
  var v1=(tgt.indexOf()!=-1);
  if (v1){
   if (v.which==3){
   }
  }
 }
}


function fn2(){
 win=window.open(rpt_url,'rpt_loc','status=1,location=0,scrollbars=0,resizeable=yes,width=700,height=600');
 if ((win != null)&&(!msie||(br_ver >= 5))) win.focus();
}


function fn3(){
 if(typeof event != 'undefined'){  
  if (event.button==2){
   return false;
  } 
  else if(event.button==1){
   if(msie) {
    return true;
   }
  }
 }
 fn2();
 return false;
}



rpt_loc="http://www.ratepoint.com/badge";
rpt_url=rpt_loc+"?h="+window.location.protocol+"//"+window.location.hostname;
rpt_bdg="//badge.ratepoint.com/member/capbadge?h="+window.location.hostname;

br_ua=navigator.userAgent.toLowerCase();
br_ver=parseInt(navigator.appVersion);

msie=(br_ua.indexOf("msie")>=0);
opera=(br_ua.indexOf("opera")>=0);

msg="Click for company report";

if (br_ua.indexOf("msie 5") >=0 ) br_ver=5;
if (br_ua.indexOf("msie 6") >=0 ) br_ver=6;
if (br_ua.indexOf("msie 7") >=0 ) br_ver=7;

if(msie && (br_ver<=4)) {
 document.write("<a tabindex=\"-1\" href=\""+rpt_url+"\" onmousedown=\"return fn3();\"><img name=\"rpimg\" height=\"50\" width=\"117\" border=\"0\" src=\""+rpt_bdg+"\" alt=\""+msg+"\" oncontextmenu=\"return false;\"></a>");
}
else if(msie && (br_ver>=5) && !opera) {
 document.write("<a href=\"javascript:fn2()\" tabindex=\"-1\" onmouseout=\"window.status='';\" onmouseover=\"this.style.cursor='hand'; window.status='"+msg+"';\" onmousedown=\"return fn3();\"><img name=\"rpimg\" height=\"50\" width=\"117\" border=\"0\" src=\""+rpt_bdg+"\" alt=\""+msg+"\" oncontextmenu=\"return false;\" /></a>");
}
else { 
 document.write("<a tabindex=\"-1\" href=\""+rpt_url+"\" onclick=\"return fn3();\" target=\"rpt_loc\"><img name=\"rpimg\" height=\"50\" width=\"117\" border=\"0\" src=\""+rpt_bdg+"\" alt=\""+msg+"\" oncontextmenu=\"return false;\"></a>");
}


if (document.addEventListener){
 document.addEventListener('mouseup',fn1,true);
}
else {
 if (document.layers){
  document.captureEvents(Event.mousedown);
 }
 document.onmousedown=fn1;
}



// -->
