/*
 * RESIZE WIDTH AND HEIGHT OF A MEDIA LAYER
 * mainly needed for IE
 */

function resizelayer(elem) {
    var elem = document.getElementById(elem);
    if(!elem) return false;
    // get width / height
    var screen = getInnerSize();
    // resize according to screens inner width/height
    elem.style.width = screen[0] + "px";
    elem.style.height = screen[1] + "px";
    return true;
}

function getInnerSize() {
    var x,y;
    if (self.innerHeight) // all except Explorer
    {
        x = self.innerWidth;
        y = self.innerHeight;
    }
    else if (document.documentElement && document.documentElement.clientHeight)
        // Explorer 6 Strict Mode
    {
        x = document.documentElement.clientWidth;
        y = document.documentElement.clientHeight;
    }
    else if (document.body) // other Explorers
    {
        x = document.body.clientWidth;
        y = document.body.clientHeight;
    }
    return new Array(x,y);
}