﻿function windowHeight() {
    var windowHeight; //最后传出的值   
    if (self.innerHeight) { // 除了IE以外的浏览器   
        windowHeight = self.innerHeight;
    }
    else if (document.documentElement && document.documentElement.clientHeight) { /* IE6 浏览器 */
        windowHeight = document.documentElement.clientHeight;
    }
    else if (document.body) { //其他版本的IE浏览器   
        windowHeight = document.body.clientHeight;
    }
    return windowHeight;
}

function windowWidth() {
    var windowWidth; //最后传出的值   
    if (self.innerWidth) { // 除了IE以外的浏览器   
        windowWidth = self.innerWidth;
    }
    else if (document.documentElement && document.documentElement.clientWidth) { /* IE6 浏览器 */
        windowWidth = document.documentElement.clientWidth;
    }
    else if (document.body) { // 其他版本的IE浏览器   
        windowWidth = document.body.clientWidth;
    }
    return windowWidth;
}

function setwindowHeight(height) {
    var windowHeight; //最后传出的值   
    if (self.innerHeight) { // 除了IE以外的浏览器   
        windowHeight = self.innerHeight;
    }
    else if (document.documentElement && document.documentElement.clientHeight) { /* IE6 浏览器 */
        windowHeight = document.documentElement.clientHeight;
    }
    else if (document.body) { //其他版本的IE浏览器   
        windowHeight = document.body.clientHeight;
    }
    windowHeight = height + "px";  
}

function setwindowWidth(width) {
    var windowWidth; //最后传出的值   
    if (self.innerWidth) { // 除了IE以外的浏览器   
        windowWidth = self.innerWidth;
    }
    else if (document.documentElement && document.documentElement.clientWidth) { /* IE6 浏览器 */
        windowWidth = document.documentElement.clientWidth;
    }
    else if (document.body) { // 其他版本的IE浏览器   
        windowWidth = document.body.clientWidth;
    }
    windowWidth = width + "px";   
} 

