﻿if(!window.Silverlight){
window.Silverlight={};
}
Silverlight._silverlightCount=0;
Silverlight.fwlinkRoot="http://go2.microsoft.com/fwlink/?LinkID=";
Silverlight.onGetSilverlight=null;
Silverlight.onSilverlightInstalled=function(){
window.location.reload(false);
};
Silverlight.isInstalled=function(_1){
var _2=false;
var _3=null;
try{
var _4=null;
try{
_4=new ActiveXObject("AgControl.AgControl");
if(_1==null){
_2=true;
}else{
if(_4.IsVersionSupported(_1)){
_2=true;
}
}
_4=null;
}
catch(e){
var _5=navigator.plugins["Silverlight Plug-In"];
if(_5){
if(_1===null){
_2=true;
}else{
var _6=_5.description;
if(_6==="1.0.30226.2"){
_6="2.0.30226.2";
}
var _7=_6.split(".");
while(_7.length>3){
_7.pop();
}
while(_7.length<4){
_7.push(0);
}
var _8=_1.split(".");
while(_8.length>4){
_8.pop();
}
var _9;
var _a;
var _b=0;
do{
_9=parseInt(_8[_b]);
_a=parseInt(_7[_b]);
_b++;
}while(_b<_8.length&&_9===_a);
if(_9<=_a&&!isNaN(_9)){
_2=true;
}
}
}
}
}
catch(e){
_2=false;
}
if(_3){
document.body.removeChild(_3);
}
return _2;
};
Silverlight.WaitForInstallCompletion=function(){
if(!Silverlight.isBrowserRestartRequired&&Silverlight.onSilverlightInstalled){
try{
navigator.plugins.refresh();
}
catch(e){
}
if(Silverlight.isInstalled(null)){
Silverlight.onSilverlightInstalled();
}else{
setTimeout(Silverlight.WaitForInstallCompletion,3000);
}
}
};
Silverlight.__startup=function(){
Silverlight.isBrowserRestartRequired=Silverlight.isInstalled(null);
if(!Silverlight.isBrowserRestartRequired){
Silverlight.WaitForInstallCompletion();
}
if(window.removeEventListener){
window.removeEventListener("load",Silverlight.__startup,false);
}else{
window.detachEvent("onload",Silverlight.__startup);
}
};
if(window.addEventListener){
window.addEventListener("load",Silverlight.__startup,false);
}else{
window.attachEvent("onload",Silverlight.__startup);
}
Silverlight.createObject=function(_c,_d,id,_f,_10,_11,_12){
var _13=new Object();
var _14=_f;
var _15=_10;
_13.version=_14.version;
_14.source=_c;
_13.alt=_14.alt;
if(_11){
_14.initParams=_11;
}
if(_14.isWindowless&&!_14.windowless){
_14.windowless=_14.isWindowless;
}
if(_14.framerate&&!_14.maxFramerate){
_14.maxFramerate=_14.framerate;
}
if(id&&!_14.id){
_14.id=id;
}
delete _14.ignoreBrowserVer;
delete _14.inplaceInstallPrompt;
delete _14.version;
delete _14.isWindowless;
delete _14.framerate;
delete _14.data;
delete _14.src;
delete _14.alt;
if(Silverlight.isInstalled(_13.version)){
for(var _16 in _15){
if(_15[_16]){
if(_16=="onLoad"&&typeof _15[_16]=="function"&&_15[_16].length!=1){
var _17=_15[_16];
_15[_16]=function(_18){
return _17(document.getElementById(id),_12,_18);
};
}
var _19=Silverlight.__getHandlerName(_15[_16]);
if(_19!=null){
_14[_16]=_19;
_15[_16]=null;
}else{
throw "typeof events."+_16+" must be 'function' or 'string'";
}
}
}
slPluginHTML=Silverlight.buildHTML(_14);
}else{
slPluginHTML=Silverlight.buildPromptHTML(_13);
}
if(_d){
_d.innerHTML=slPluginHTML;
}else{
return slPluginHTML;
}
};
Silverlight.buildHTML=function(_1a){
var _1b=[];
_1b.push("<object type=\"application/x-silverlight\" data=\"data:application/x-silverlight,\"");
if(_1a.id!=null){
_1b.push(" id=\""+_1a.id+"\"");
}
if(_1a.width!=null){
_1b.push(" width=\""+_1a.width+"\"");
}
if(_1a.height!=null){
_1b.push(" height=\""+_1a.height+"\"");
}
_1b.push(" >");
delete _1a.id;
delete _1a.width;
delete _1a.height;
for(var _1c in _1a){
if(_1a[_1c]){
_1b.push("<param name=\""+Silverlight.HtmlAttributeEncode(_1c)+"\" value=\""+Silverlight.HtmlAttributeEncode(_1a[_1c])+"\" />");
}
}
_1b.push("</object>");
return _1b.join("");
};
Silverlight.createObjectEx=function(_1d){
var _1e=_1d;
var _1f=Silverlight.createObject(_1e.source,_1e.parentElement,_1e.id,_1e.properties,_1e.events,_1e.initParams,_1e.context);
if(_1e.parentElement==null){
return _1f;
}
};
Silverlight.buildPromptHTML=function(_20){
var _21="";
var _22=Silverlight.fwlinkRoot;
var _23=_20.version;
if(_20.alt){
_21=_20.alt;
}else{
if(!_23){
_23="";
}
_21="<a href='javascript:Silverlight.getSilverlight(\"{1}\");' style='text-decoration: none;'><img src='{2}' alt='Get Microsoft Silverlight' style='border-style: none'/></a>";
_21=_21.replace("{1}",_23);
_21=_21.replace("{2}",_22+"108181");
}
return _21;
};
Silverlight.getSilverlight=function(_24){
if(Silverlight.onGetSilverlight){
Silverlight.onGetSilverlight();
}
var _25="";
var _26=String(_24).split(".");
if(_26.length>1){
var _27=parseInt(_26[0]);
if(isNaN(_27)||_27<2){
_25="1.0";
}else{
_25=_26[0]+"."+_26[1];
}
}
var _28="";
if(_25.match(/^\d+\056\d+$/)){
_28="&v="+_25;
}
Silverlight.followFWLink("114576"+_28);
};
Silverlight.followFWLink=function(_29){
document.location=Silverlight.fwlinkRoot+String(_29);
};
Silverlight.HtmlAttributeEncode=function(_2a){
var c;
var _2c="";
if(_2a==null){
return null;
}
for(var cnt=0;cnt<_2a.length;cnt++){
c=_2a.charCodeAt(cnt);
if(((c>96)&&(c<123))||((c>64)&&(c<91))||((c>43)&&(c<58)&&(c!=47))||(c==95)){
_2c=_2c+String.fromCharCode(c);
}else{
_2c=_2c+"&#"+c+";";
}
}
return _2c;
};
Silverlight.default_error_handler=function(_2e,_2f){
var _30;
var _31=_2f.ErrorType;
_30=_2f.ErrorCode;
var _32="\nSilverlight error message     \n";
_32+="ErrorCode: "+_30+"\n";
_32+="ErrorType: "+_31+"       \n";
_32+="Message: "+_2f.ErrorMessage+"     \n";
if(_31=="ParserError"){
_32+="XamlFile: "+_2f.xamlFile+"     \n";
_32+="Line: "+_2f.lineNumber+"     \n";
_32+="Position: "+_2f.charPosition+"     \n";
}else{
if(_31=="RuntimeError"){
if(_2f.lineNumber!=0){
_32+="Line: "+_2f.lineNumber+"     \n";
_32+="Position: "+_2f.charPosition+"     \n";
}
_32+="MethodName: "+_2f.methodName+"     \n";
}
}
alert(_32);
};
Silverlight.__cleanup=function(){
for(var i=Silverlight._silverlightCount-1;i>=0;i--){
window["__slEvent"+i]=null;
}
Silverlight._silverlightCount=0;
if(window.removeEventListener){
window.removeEventListener("unload",Silverlight.__cleanup,false);
}else{
window.detachEvent("onunload",Silverlight.__cleanup);
}
};
Silverlight.__getHandlerName=function(_34){
var _35="";
if(typeof _34=="string"){
_35=_34;
}else{
if(typeof _34=="function"){
if(Silverlight._silverlightCount==0){
if(window.addEventListener){
window.addEventListener("onunload",Silverlight.__cleanup,false);
}else{
window.attachEvent("onunload",Silverlight.__cleanup);
}
}
var _36=Silverlight._silverlightCount++;
_35="__slEvent"+_36;
window[_35]=_34;
}else{
_35=null;
}
}
return _35;
};

