﻿function centerContent() {
    obj = document.getElementById("centerContent");
    x = getWinWidth() / 2 - 475;
    y = getWinHeight() / 2 - 300;
    obj.style.left = x + 'px';
    obj.style.top = y + 'px';
    return;
}
function getWinWidth() {
    if (typeof (window.innerWidth) == 'number') {
        return window.innerWidth;
    }
    if (document.documentElement && document.documentElement.clientWidth) {
        return document.documentElement.clientWidth;
    }
    if (document.body && document.body.clientWidth) {
        return document.body.clientWidth;
    }
    return 100;
}
function getWinHeight() {
    if (typeof (window.innerHeight) == 'number') {
        return window.innerHeight;
    }
    if (document.documentElement && document.documentElement.clientHeight) {
        return document.documentElement.clientHeight;
    }
    if (document.body && document.body.clientHeight) {
        return document.body.clientHeight;
    }
    return 100;
}