var dPlugin={classIds:{javaApplet:"8AD9C840-044E-11D1-B3E9-00805F499D93",
javaBean:"8AD9C840-044E-11D1-B3E9-00805F499D93",
quicktime:"02BF25D5-8C17-4B23-BC80-D3488ABDDC6B",
flash:"D27CDB6E-AE6D-11CF-96B8-444553540000"
},
activeXNames:{javaApplet:'JavaPlugin',
javaBean:'JavaPlugin',
flash:'ShockwaveFlash.ShockwaveFlash',
mediaPlayer:'WMPlayer.ocx',
quicktime:'QuickTimeCheckObject.QuickTimeCheck',realPlayer:['rmocx.RealPlayer G2 Control','rmocx.RealPlayer G2 Control.1','RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)','RealVideo.RealVideo(tm) ActiveX Control (32-bit)','RealPlayer'],
pdf:['AcroPDF.PDF','PDF.PdfCtrl']
},
allowedActiveXNames:{flash:true,
mediaPlayer:true,
quicktime:false,javaApplet:true,
javaBean:true,
realPlayer:true,
pdf:true
},
pluginNames:{javaApplet:'Java ',javaBean:'Java ',
flash:'Shockwave Flash',
quicktime:'QuickTime',
pdf:'PDF',
realPlayer:'RealPlayer Version Plugin'},
mimeTypes:{javaApplet:'application/x-java-applet',
javaBean:'application/x-java-bean',
flash:'application/x-shockwave-flash',
mediaPlayer:'application/x-mplayer2',
realPlayer:'audio/x-pn-realaudio-plugin',
quicktime:'video/quicktime',
pdf:'application/pdf',
svg:'image/svg+xml'
},downloadUrls:{javaApplet:'//java.com/download/',
javaBean:'//java.com/download/',
flash:'//www.adobe.com/go/getflashplayer',
quicktime:'//www.apple.com/quicktime/download/'
},

pluginNotSupportedClassName:"PluginNotSupported",detectBrowser:function(){this.isOpera=!!window.opera;this.isOpera9=this.isOpera&&typeof XPathResult!="undefined";this.isIE=!!window.ActiveXObject&&!!window.showModalDialog&&!!document.all&&!this.isOpera;this.isIE6=this.isIE&&!!!window.XMLHttpRequest;this.isIE7=this.isIE&&!this.isIE6;},compareVersions:function(v1,v2){if(typeof v1=="string"&&typeof v2=="string"&&v1!=v2){var re=/\.|_|,|-/;var arr1=v1.split(re);var arr2=v2.split(re);for(var i=0,l=Math.max(arr1.length,arr2.length);i<l;i++){var s1=(i in arr1)?arr1[i]:'0';var s2=(i in arr2)?arr2[i]:'0';var n1=Number(s1);var n2=Number(s2);if(isNaN(n1)||isNaN(n2)){if(s1<s2){return -1;}
else if(s1>s2){return 1;}}else{if(n1<n2){return -1;}
else if(n1>n2){return 1;}}}}
return 0;},getParameter:function(obj,name){if(obj&&name){var children=obj.childNodes;for(var j=0,ln=children.length;j<ln;j++){var child=children[j];if(child.nodeType==1&&child.tagName.toLowerCase()=='param'){var n=child.getAttribute("name");if(n==name){return child.getAttribute("value");}}}}
return "";},
detectPluginType:function(obj){var key='';if(obj){if(this.isIE&&obj.getAttribute("classid")){var classId=obj.getAttribute("classid").toLowerCase();var idx=classId.indexOf("clsid:");classId=(idx>-1)?classId.substring(idx+6):classId;for(var p in this.classIds){if(this.classIds[p].toLowerCase()==classId){key=p;break;}}}
if(!key&&obj.getAttribute("type")){var type=obj.getAttribute("type");for(var p in this.mimeTypes){if(type.indexOf(this.mimeTypes[p])==0){key=p;break;}}}}
return key;},
getActiveXNames:function(key){if(key in this.allowedActiveXNames&&this.allowedActiveXNames[key]){return this.activeXNames[key];}
return '';},

hasPluginByName:function(pluginName){if(pluginName&&navigator.plugins){for(var j=0,len=navigator.plugins.length;j<len;j++){var plugin=navigator.plugins[j];if(typeof plugin.name=="string"&&plugin.name.indexOf(pluginName)>-1){return true;}
if(typeof plugin.description=="string"&&plugin.description.indexOf(pluginName)>-1){return true;}}}
return false;},

supportsMimeType:function(mimeType,mustBeEnabled){if(typeof mustBeEnabled!="boolean"){mustBeEnabled=true;}
if(mimeType&&navigator.mimeTypes){for(var j=0,l=navigator.mimeTypes.length;j<l;j++){var mType=navigator.mimeTypes[j];if(typeof mType.type=="string"&&mType.type.toLowerCase().indexOf(mimeType)>-1&&(!mustBeEnabled||mType.enabledPlugin)){return true;}}}
return false;},
hasPluginByMimeType:function(mimeType,mustBeEnabled){return this.supportsMimeType(mimeType,mustBeEnabled);},
hasPlugin:function(key){var hasPlugin=this.hasPluginByMimeType(this.mimeTypes[key])||this.hasPluginByName(this.pluginNames[key])||(this.getPluginVersion(key)!="0");if(!hasPlugin){switch(key){case "javaBean":
case "javaApplet":

hasPlugin=(typeof navigator.javaEnabled!="undefined")?navigator.javaEnabled():false;break;case "realPlayer":
case "pdf":
if(this.isIE){var names=this.getActiveXNames(key);for(var i=0,l=names.length;i<l;i++){try{hasPlugin=!!(new ActiveXObject(names[i]));}
catch(ex){}}}
break;case "mediaPlayer":
case "svg":
case "quicktime":
if(window.ActiveXObject){try{hasPlugin=!!(new ActiveXObject(this.getActiveXNames(key)));}
catch(ex){}}
break;default:
break;}}
return hasPlugin;},
getPluginVersionByMimeType:function(mimeType){var version='0';if(mimeType&&navigator.mimeTypes){var regExp=/=[0-9]{1,}((\.|,|_)[0-9]{1,}){0,}/;for(var j=0,l=navigator.mimeTypes.length;j<l;j++){var found=null;var mType=navigator.mimeTypes[j];if(typeof mType.type=="string"&&mType.type.indexOf(mimeType)>-1&&mType.enabledPlugin){found=mType.type.match(regExp);if(found&&found.length>0){var v=found[0].substring(1);if(v>version){version=v;}}}}}
return version;},
getPluginVersionByName:function(pluginName){var version='0';if(pluginName&&navigator.plugins){var regExp=/[0-9]{1,}((\.|,|_)[0-9]{1,}){0,}/;for(var j=0,len=navigator.plugins.length;j<len;j++){var found=null;var plugin=navigator.plugins[j];if(typeof plugin.name=="string"&&plugin.name.indexOf(pluginName)>-1){found=plugin.name.match(regExp);if(found&&found.length>0){if(found[0]>version){version=found[0];}}}
found=null;if(typeof plugin.description=="string"&&plugin.description.indexOf(pluginName)>-1){found=plugin.description.match(regExp);if(found&&found.length>0){if(found[0]>version){version=found[0];}}}}}
return version;},
getPluginVersion:function(key){var vmt=this.getPluginVersionByMimeType(this.mimeTypes[key]);var vpn=this.getPluginVersionByName(this.pluginNames[key]);var version="0";switch(key){case "javaBean":
case "javaApplet":
try{version=""+java.lang.System.getProperty("java.version");}
catch(ex){if(window.ActiveXObject){var name=this.getActiveXNames(key);if(name){outer:
for(var i=1;i>0;i--){for(var j=7;j>0;j--){for(var k=3;k>-1;k--){for(var l=17;l>0;l--){try{var s=(l<10)?"0"+l:""+l;if((new ActiveXObject(name+"."+i+""+j+""+k+"_"+s))!=null){version=i+"."+j+"."+k+"_"+s;break outer;}}
catch(iex){}}}}}}}}
break;case "realPlayer":
if(window.ActiveXObject){var names=this.getActiveXNames(key);for(var i=0,l=names.length;i<l;i++){try{var v=(new ActiveXObject(names[i])).GetVersionInfo();if(v>version){version=v;}}
catch(ex){}}}
else if(navigator.plugins){for(var j=0,len=navigator.plugins.length;j<len;j++){var plugin=navigator.plugins[j];if(typeof plugin.name=="string"&&plugin.name.indexOf(this.pluginNames[key])>-1){version=plugin.description;break;}}}
break;case "quicktime":
if(window.ActiveXObject){try{var v=(new ActiveXObject(this.getActiveXNames(key))).QuickTimeVersion.toString(16);version=v.substring(0,1)+'.'+v.substring(1,3);}
catch(ex){}}
break;case "pdf":
if(window.ActiveXObject){var names=this.getActiveXNames(key);for(var i=0,l=names.length;i<l;i++){try{var v=(new ActiveXObject(names[i])).GetVersions().split(",")[1].split("=")[1];if(v>version){version=v;}}
catch(ex){}}}
break;case "flash":
if(window.ActiveXObject){try{version=(new ActiveXObject(this.getActiveXNames(key))).GetVariable("$version").replace(/[^0-9,]/gi,"").replace(/,/g,".");}
catch(ex){}}
break;case "mediaPlayer":
if(window.ActiveXObject){try{version=(new ActiveXObject(this.getActiveXNames(key))).versionInfo;}
catch(ex){}}
break;default:
break;}
if(vmt>vpn){vpn=vmt;}
if(vpn>version){version=vpn;}
return version;},

getJavaVersion:function(){return this.getPluginVersion("javaApplet");},
getQuickTimeVersion:function(){return this.getPluginVersion("quicktime");},
getShockwaveFlashVersion:function(){return this.getPluginVersion("flash");},

isEolaUsed:function(obj){return(this.isIE||this.isOpera9);},

ignoreEola:function(obj){var ignore=false;var s=this.getParameter(obj,"ignoreEola");if(s){try{ignore=Boolean(eval(s));}
catch(ex){}}
return ignore;},
fixEola:function(obj){if(obj&&this.isEolaUsed()&&this.doFixEola(obj)){if(this.ignoreEola(obj)){return;}
var htm=obj.outerHTML.split('>')[0];htm+=(htm.indexOf("style=")==-1)?' style="visibility:visible;">':'>';var children=obj.childNodes;var detectScriptability=(this.isOpera&&obj.type.indexOf(this.mimeTypes["javaApplet"])==0);for(var j=0,ln=children.length;j<ln;j++){var child=children[j];if(child.nodeType==1&&child.tagName.toLowerCase()=='param'){if(detectScriptability){var n=child.getAttribute("name");if(n.toLowerCase()=="scriptable"||n.toLowerCase()=="mayscript"){obj.style.visibility="visible";return;}}
htm+=child.outerHTML;}}
htm+='<\/'+obj.tagName.toLowerCase()+'>';obj.outerHTML=htm;}},doFixEola:function(obj){return(!this.isOpera||!(this.detectPluginType(obj).indexOf("java")==0));},

getId:function(obj){var id=obj.id;if(!id){id='obj'+(new Date().getTime()*Math.random());id=id.replace(".","");}
return id;},
getAlternateHTML:function(obj,key){var htm='';if(obj){var clone=obj.cloneNode(false);var children=obj.childNodes;for(var j=0,ln=children.length;j<ln;j++){var child=children[j];if((child.nodeType!=1&&child.nodeType!=8)||(child.tagName&&child.tagName.toLowerCase()!="param")){clone.appendChild(child.cloneNode(true));}}
htm+=clone.innerHTML;var idx=htm.lastIndexOf("-->");if(idx>-1){htm=htm.substring(idx+3);}
key=key||this.detectPluginType(obj);var id=this.getId(obj);var downloadUrl=this.getParameter(obj,"downloadUrl")||this.downloadUrls[key];if(downloadUrl&&downloadUrl!="null"&&htm.indexOf(downloadUrl)==-1){var downloadText=this.getParameter(obj,"downloadText")||"Download Plugin";htm+='<p><a href="'+downloadUrl+'" onclick="return dPlugin.downloadPlugin(event, \''+id+'\');">'+downloadText+'<\/a><\/p>';}
var viewPluginLink=this.getParameter(obj,"viewPluginLink")||"View Plugin";htm+='<p><a href="" onclick="return dPlugin.viewPlugin(event, \''+id+'\');">'+viewPluginLink+'<\/a><\/p>';}
htm=htm.replace(/\r|\n/g,"");return htm;},
displayAlternateHTML:function(obj,key){if(obj){var otherMethod=this.getParameter(obj,"displayAlternateHTML");if(otherMethod){var fn=eval(otherMethod);if(typeof fn){var quit=fn.apply(null,[obj]);if(quit){obj.style.visibility="visible";return;}}}
var id=this.getId(obj);obj.id=id;obj.style.display="none";obj.style.height="0px";obj.style.width="0px";var div=document.createElement("div");div.id="div_"+id;div.className=this.pluginNotSupportedClassName;div.innerHTML=this.getAlternateHTML(obj,key);obj.parentNode.insertBefore(div,obj);}},
viewPlugin:function(e,objId){e=e||window.event;if(e){if(e.preventDefault){e.preventDefault();}else{e.returnValue=false;}}
var obj=(objId)?document.getElementById(objId):null;if(obj){var div=obj.previousSibling;div.style.display="none";if(this.isIE){var clone=obj.cloneNode(true);obj.removeAttribute("id");obj.parentNode.insertBefore(clone,obj);clone.style.display="inline";clone.style.visibility="visible";clone.style.width=clone.getAttribute("width")+"px";clone.style.height=clone.getAttribute("height")+"px";this.fixEola(clone);}else{obj.style.display="inline";obj.style.visibility="visible";obj.style.width=obj.getAttribute("width")+"px";obj.style.height=obj.getAttribute("height")+"px";}}
return false;},

downloadPlugin:function(e,objId){return true;},

checkPluginVersions:function(){try{var objectTags=document.getElementsByTagName('object');for(var i=0,l=objectTags.length;i<l;i++){var obj=objectTags[i];var key=this.detectPluginType(obj);var hasPlugin=this.hasPlugin(key);if(hasPlugin){var requiredVersion="";var children=obj.childNodes;for(var j=0,ln=children.length;j<ln;j++){var child=children[j];if(child.nodeType==1&&child.tagName.toLowerCase()=="param"&&child.getAttribute("name")=="requiredVersion"){requiredVersion=child.getAttribute("value");break;}}
if(!requiredVersion){var found=obj.type?/version=/i.exec(obj.type):null;var index=found?obj.type.indexOf(found[0]):-1;requiredVersion=(index>-1)?obj.type.substring(index+found[0].length):requiredVersion;}
var version=this.getPluginVersion(key);if(version!="0"&&requiredVersion&&this.compareVersions(version,requiredVersion)==-1){this.displayAlternateHTML(obj,key);}else{this.fixEola(obj);}}}}
catch(ex){}},
onloadListener:function(){dPlugin.checkPluginVersions.apply(dPlugin);}};(function(){dPlugin.detectBrowser();if(window.addEventListener){window.addEventListener("load",dPlugin.onloadListener,false);}
else if(window.attachEvent){window.attachEvent("onload",dPlugin.onloadListener);}})();