function getWindowHeight()
{
    var windowHeight = 0;
    if (typeof(window.innerHeight) == 'number')
    {
        windowHeight = window.innerHeight;
    }
    else
    {
        if (document.documentElement && document.documentElement.clientHeight)
        {
        windowHeight = document.documentElement.clientHeight;
        }
        else
        {
            if (document.body && document.body.clientHeight)
            {
            windowHeight = document.body.clientHeight;
            }
        }
    }
    return windowHeight;
}

function getWindowWidth()
{
    var windowWidth = 0;
    if (typeof(window.innerWidth) == 'number')
    {
        windowWidth = window.innerWidth;
    }
    else
    {
        if (document.documentElement && document.documentElement.clientWidth)
        {
            windowWidth = document.documentElement.clientWidth;
        }
        else
        {
            if (document.body && document.body.clientWidth)
            {
                windowWidth = document.body.clientWidth;
            }
        }
    }
    return windowWidth;
}

function setTextureHeight()
{
    var winWidth = 0;
    winWidth = getWindowWidth();
    //divWidth = document.getElementById('textureMask').clientWidth;
    var winHeight = 0;
    winHeight = getWindowHeight();
    var divHeight = 0;
    divHeight = document.getElementById('mainWrap').clientHeight;

    if (winHeight > divHeight) {
        //alert('win' + winHeight);
        document.getElementById('leftTexture').style.height = winHeight + 'px';
        //document.getElementById('rightTexture').style.height = winHeight + 'px';
    } else {
        //alert(divHeight);
        document.getElementById('leftTexture').style.height = divHeight + 'px';
        //document.getElementById('rightTexture').style.height = divHeight + 'px';
    }
    
    if (winWidth < 1024){
        // document.getElementById('leftTexture').style.width = '1024px';
        // document.getElementById('rightTexture').style.width = '1024px';
    }else{
        // document.getElementById('leftTexture').style.width = '100%';
        // document.getElementById('rightTexture').style.width = '100%';
    }
}

function bodyResize() {
    setTextureHeight();
}