function getAcrobatReaderVersion() {
  var ver = -1;
   
  if (navigator.plugins && navigator.plugins.length){
    for ( var x = 0, l = navigator.plugins.length; x < l; ++x ) {
      if (navigator.plugins[x].description.indexOf('Adobe Acrobat') != -1 || navigator.plugins[x].description.indexOf('PDF') != -1) {
        ver=(navigator.plugins[x].description.indexOf('PDF')!=-1)?'7+':parseFloat(navigator.plugins[x].description.split('Version ')[1]);
        if (ver.toString().length == 1) ver+='.0';
        break;
      }
    }
  } else if (window.ActiveXObject) {
    for (x=2; x<10; x++) {
      try {
        oAcro=eval("new ActiveXObject('PDF.PdfCtrl."+x+"');");
        if (oAcro) {
          ver = x+'.0'; 
        }
      } catch(e) {}
    }
    try {
      oAcro4=new ActiveXObject('PDF.PdfCtrl.1');
      if (oAcro4) {
        ver = '4.0';
      }
    } catch(e) {}
    try {
      oAcro7=new ActiveXObject('AcroPDF.PDF.1');
      if (oAcro7) {
        ver='7+';
      }
    } catch(e) {}
  }
  return ver;
}
