var windowHeight;
var windowWidth;

function checkLocation()
{
    if (top.location != location)
    {
        top.location.href = "logout.php" ;
    }
}

function KeyValue(event)
{
    intKeyCode = event.keyCode;
    if (intKeyCode == 13)
    document.forms.login.submit();
}

function setFrame()
{
    if(typeof( window.innerWidth ) == 'number')
    {
        if(self.innerHeight) windowHeight=self.innerHeight;
        if(self.innerWidth) windowWidth=self.innerWidth;
    }
    else if (document.documentElement && (document.documentElement.clientHeight || document.documentElement.clientWidth))
    {
        if(document.documentElement.clientHeight) windowHeight = document.documentElement.clientHeight;
        if(document.documentElement.clientWidth) windowWidth = document.documentElement.clientWidth;
    }
    else if(document.body && (document.body.clientHeight && document.body.clientWidth))
    {
        windowHeight=document.body.clientHeight;
        windowWidth=document.body.clientWidth;
    }
}

function setPage()
{
    document.getElementById("page").style.height=windowHeight+"px";
    document.getElementById("page").style.width=windowWidth+"px";
}

window.onload = function()
{
    checkLocation();
    setFrame();
    setPage();
}

window.onresize = function()
{
    setFrame();
    setPage();
}
