if(!window.Silverlight){window.Silverlight={}}Silverlight._silverlightCount=0;Silverlight.__onSilverlightInstalledCalled=false;Silverlight.fwlinkRoot="http://go2.microsoft.com/fwlink/?LinkID=";Silverlight.__installationEventFired=false;Silverlight.onGetSilverlight=null;Silverlight.onSilverlightInstalled=function(){window.location.reload(false)};Silverlight.isInstalled=function(g){if(g==undefined){g=null}var f=false,e=null;try{var a=null,b=false;if(window.ActiveXObject){try{a=new ActiveXObject("AgControl.AgControl");if(g===null){f=true}else{if(a.IsVersionSupported(g)){f=true}}a=null}catch(d){b=true}}else{b=true}if(b){var c=navigator.plugins["Silverlight Plug-In"];if(c){if(g===null){f=true}else{var m=c.description;if(m==="1.0.30226.2"){m="2.0.30226.2"}var h=m.split(".");while(h.length>3){h.pop()}while(h.length<4){h.push(0)}var j=g.split(".");while(j.length>4){j.pop()}var i,l,k=0;do{i=parseInt(j[k]);l=parseInt(h[k]);k++}while(k<j.length&&i===l);if(i<=l&&!isNaN(i)){f=true}}}}}catch(d){f=false}return f};Silverlight.WaitForInstallCompletion=function(){if(!Silverlight.isBrowserRestartRequired&&Silverlight.onSilverlightInstalled){try{navigator.plugins.refresh()}catch(a){}if(Silverlight.isInstalled(null)&&!Silverlight.__onSilverlightInstalledCalled){Silverlight.onSilverlightInstalled();Silverlight.__onSilverlightInstalledCalled=true}else{setTimeout(Silverlight.WaitForInstallCompletion,3000)}}};Silverlight.__startup=function(){navigator.plugins.refresh();Silverlight.isBrowserRestartRequired=Silverlight.isInstalled(null);if(!Silverlight.isBrowserRestartRequired){Silverlight.WaitForInstallCompletion();if(!Silverlight.__installationEventFired){Silverlight.onInstallRequired();Silverlight.__installationEventFired=true}}else{if(window.navigator.mimeTypes){var d=navigator.mimeTypes["application/x-silverlight-2"],a=navigator.mimeTypes["application/x-silverlight-2-b2"],b=navigator.mimeTypes["application/x-silverlight-2-b1"],c=b;if(a){c=a}if(!d&&(b||a)){if(!Silverlight.__installationEventFired){Silverlight.onUpgradeRequired();Silverlight.__installationEventFired=true}}else{if(d&&c){if(d.enabledPlugin&&c.enabledPlugin){if(d.enabledPlugin.description!=c.enabledPlugin.description){if(!Silverlight.__installationEventFired){Silverlight.onRestartRequired();Silverlight.__installationEventFired=true}}}}}}}if(!Silverlight.disableAutoStartup){if(window.removeEventListener){window.removeEventListener("load",Silverlight.__startup,false)}else{window.detachEvent("onload",Silverlight.__startup)}}};if(!Silverlight.disableAutoStartup){if(window.addEventListener){window.addEventListener("load",Silverlight.__startup,false)}else{window.attachEvent("onload",Silverlight.__startup)}}Silverlight.createObject=function(e,k,j,c,d,m,b){var i={},f=c,h=d;i.version=f.version;f.source=e;i.alt=f.alt;if(m){f.initParams=m}if(f.isWindowless&&!f.windowless){f.windowless=f.isWindowless}if(f.framerate&&!f.maxFramerate){f.maxFramerate=f.framerate}if(j&&!f.id){f.id=j}delete f.ignoreBrowserVer;delete f.inplaceInstallPrompt;delete f.version;delete f.isWindowless;delete f.framerate;delete f.data;delete f.src;delete f.alt;if(Silverlight.isInstalled(i.version)){for(var g in h){if(h[g]){if(g=="onLoad"&&typeof h[g]=="function"&&h[g].length!=1){var a=h[g];h[g]=function(n){return a(document.getElementById(j),b,n)}}var l=Silverlight.__getHandlerName(h[g]);if(l!=null){f[g]=l;h[g]=null}else{throw"typeof events."+g+" must be 'function' or 'string'"}}}slPluginHTML=Silverlight.buildHTML(f)}else{slPluginHTML=Silverlight.buildPromptHTML(i)}if(k){k.innerHTML=slPluginHTML}else{return slPluginHTML}};Silverlight.buildHTML=function(b){var c=[];c.push('<object type="application/x-silverlight" data="data:application/x-silverlight,"');if(b.id!=null){c.push(' id="'+Silverlight.HtmlAttributeEncode(b.id)+'"')}if(b.width!=null){c.push(' width="'+b.width+'"')}if(b.height!=null){c.push(' height="'+b.height+'"')}c.push(" >");delete b.id;delete b.width;delete b.height;for(var a in b){if(b[a]){c.push('<param name="'+Silverlight.HtmlAttributeEncode(a)+'" value="'+Silverlight.HtmlAttributeEncode(b[a])+'" />')}}c.push("</object>");return c.join("")};Silverlight.createObjectEx=function(c){var b=c,a=Silverlight.createObject(b.source,b.parentElement,b.id,b.properties,b.events,b.initParams,b.context);if(b.parentElement==null){return a}};Silverlight.buildPromptHTML=function(d){var c="",b=Silverlight.fwlinkRoot,a=d.version;if(d.alt){c=d.alt}else{if(!a){a=""}c="<a href='javascript:Silverlight.getSilverlight(\"{1}\");' style='text-decoration: none;'><img src='{2}' alt='Get Microsoft Silverlight' style='border-style: none'/></a>";c=c.replace("{1}",a);c=c.replace("{2}",b+"108181")}return c};Silverlight.getSilverlight=function(c){if(Silverlight.onGetSilverlight){Silverlight.onGetSilverlight()}var e="",d=String(c).split(".");if(d.length>1){var a=parseInt(d[0]);if(isNaN(a)||a<2){e="1.0"}else{e=d[0]+"."+d[1]}}var b="";if(e.match(/^\d+\056\d+$/)){b="&v="+e}Silverlight.followFWLink("149156"+b)};Silverlight.followFWLink=function(a){top.location=Silverlight.fwlinkRoot+String(a)};Silverlight.HtmlAttributeEncode=function(a){var c,d="";if(a==null){return null}for(var b=0;b<a.length;b++){c=a.charCodeAt(b);if(c>96&&c<123||c>64&&c<91||c>43&&c<58&&c!=47||c==95){d=d+String.fromCharCode(c)}else{d=d+"&#"+c+";"}}return d};Silverlight.default_error_handler=function(c,e){var b,a=e.ErrorType;b=e.ErrorCode;var d="\nSilverlight error message     \n";d+="ErrorCode: "+b+"\n";d+="ErrorType: "+a+"       \n";d+="Message: "+e.ErrorMessage+"     \n";if(a=="ParserError"){d+="XamlFile: "+e.xamlFile+"     \n";d+="Line: "+e.lineNumber+"     \n";d+="Position: "+e.charPosition+"     \n"}else{if(a=="RuntimeError"){if(e.lineNumber!=0){d+="Line: "+e.lineNumber+"     \n";d+="Position: "+e.charPosition+"     \n"}d+="MethodName: "+e.methodName+"     \n"}}alert(d)};Silverlight.__cleanup=function(){for(var a=Silverlight._silverlightCount-1;a>=0;a--){window["__slEvent"+a]=null}Silverlight._silverlightCount=0;if(window.removeEventListener){window.removeEventListener("unload",Silverlight.__cleanup,false)}else{window.detachEvent("onunload",Silverlight.__cleanup)}};Silverlight.__getHandlerName=function(c){var b="";if(typeof c=="string"){b=c}else{if(typeof c=="function"){if(Silverlight._silverlightCount==0){if(window.addEventListener){window.addEventListener("unload",Silverlight.__cleanup,false)}else{window.attachEvent("onunload",Silverlight.__cleanup)}}var a=Silverlight._silverlightCount++;b="__slEvent"+a;window[b]=c}else{b=null}}return b};Silverlight.onRequiredVersionAvailable=function(){};Silverlight.onRestartRequired=function(){};Silverlight.onUpgradeRequired=function(){};Silverlight.onInstallRequired=function(){};Silverlight.IsVersionAvailableOnError=function(b,c){var d=false;try{if(c.ErrorCode==8001&&!Silverlight.__installationEventFired){Silverlight.onUpgradeRequired();Silverlight.__installationEventFired=true}else{if(c.ErrorCode==8002&&!Silverlight.__installationEventFired){Silverlight.onRestartRequired();Silverlight.__installationEventFired=true}else{if(c.ErrorCode==5014||c.ErrorCode==2106){if(Silverlight.__verifySilverlight2UpgradeSuccess(c.getHost())){d=true}}else{d=true}}}}catch(a){}return d};Silverlight.IsVersionAvailableOnLoad=function(c){var b=false;try{if(Silverlight.__verifySilverlight2UpgradeSuccess(c.getHost())){b=true}}catch(a){}return b};Silverlight.__verifySilverlight2UpgradeSuccess=function(b){var a=false,e="3.0.40818",d=null;try{if(b.IsVersionSupported(e+".99")){d=Silverlight.onRequiredVersionAvailable;a=true}else{if(b.IsVersionSupported(e+".0")){d=Silverlight.onRestartRequired}else{d=Silverlight.onUpgradeRequired}}if(d&&!Silverlight.__installationEventFired){d();Silverlight.__installationEventFired=true}}catch(c){}return a};
