/*PDFObject v1.2.20111123http://github.com/pipwerks/PDFObjectCopyright (c) Philip HutchisonMIT-style license: http://pipwerks.mit-license.org/*/ /*jslint browser: true, sloppy: true, white: true, plusplus: true */ /*global ActiveXObject, window */ var PDFObject = function (obj){if(!obj || !obj.url){ return false; }var pdfobjectversion = "1.2",//Set reasonable defaultsid = obj.id || false,width = obj.width || "100%",height = obj.height || "100%",pdfOpenParams = obj.pdfOpenParams,url,pluginTypeFound,//declare functionscreateAXO,hasReaderActiveX,hasReader,hasGeneric,pluginFound,setCssForFullWindowPdf,buildQueryString,get,embed;/* ---------------------------------------------------- Supporting functions ---------------------------------------------------- */createAXO = function (type){var ax;try {ax = new ActiveXObject(type);} catch (e) {//ensure ax remains nullax = null; } return ax; };//Tests specifically for Adobe Reader (aka Acrobat) in Internet ExplorerhasReaderActiveX = function (){var axObj = null;if (window.ActiveXObject) {axObj = createAXO("AcroPDF.PDF");//If "AcroPDF.PDF" didn't work, try "PDF.PdfCtrl"if(!axObj){ axObj = createAXO("PDF.PdfCtrl"); } //If either "AcroPDF.PDF" or "PDF.PdfCtrl" are found, return true if (axObj !== null) { return true; } } //If you got to this point, there's no ActiveXObject for PDFs return false; }; //Tests specifically for Adobe Reader (aka Adobe Acrobat) in non-IE browsers hasReader = function (){ var i, n = navigator.plugins, count = n.length, regx = /Adobe Reader|Adobe PDF|Acrobat/gi; for(i=0; i