﻿
function initPage() {
    focusSilverlight();
    checkNoSilverlight();
}


function focusSilverlight() {
    if (document.getElementById("SilverlightObject") != null) {
        //alert('object found');
        document.getElementById("SilverlightObject").focus();
    } else {
        //alert('object not found');
    }
}

function checkNoSilverlight() {
    if (document.getElementById('NoSilverlightContainer') != null &&
        document.getElementById('NoSilverlightContainer').style != null &&
        (document.getElementById('NoSilverlightContainer').style.display == null ||
        document.getElementById('NoSilverlightContainer').style.display == "")) {
        // No Silverlight HTML is displayed. Let's color the body background
        document.getElementsByTagName('body')[0].className = "NoSilverlightBody";
        //alert(document.getElementById('NoSilverlightContainer').style.display);
    }
}