window.onload = function () {
    try {
        if (window.external.msIsSiteMode()) {
            // Continue intialization
        }
        else {
            document.getElementById('divPinSite').style.display = "block";
            manipulateMetaTag();
        }
    }
    catch (e) {
        // Fail silently. Pinned Site API not supported.
    }
}	
function addSite() {
	try {
		window.external.msAddSiteMode();
	}
	catch (e) {
		// Fail silently. Pinned Site API not supported.
		// alert("This feature is only available in Internet Explorer 9.");
	}
}
function manipulateMetaTag() {
    metatags = document.getElementsByTagName("meta");
    for (cnt = 0; cnt < metatags.length; cnt++) {
        var name = metatags[cnt].getAttribute("name");

        //set screen.size to max
        //if (metatags[cnt].getAttribute("name") == "msapplication-window") {
        if (name == "msapplication-window") {
            //metatags[cnt].setAttribute("content", "width=1024;height=768");
            metatags[cnt].setAttribute("content", "width=" + screen.width + ";height=" + screen.height);
        }
    }
}



