var Window = {
	getWidth: function(){
	   if (document.documentElement.clientWidth != "") return document.documentElement.clientWidth;
		return window.innerWidth != null? window.innerWidth: document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth:document.body != null? document.body.clientWidth:null;
	},
	
	getPageHeight: function(){
	   if (document.documentElement.clientHeight != "") return document.documentElement.clientHeight;
		return window.innerHeight != null? window.innerHeight: document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight:document.body != null? document.body.clientHeight:null;
	},

	getWindowHeight: function(){
		return window.innerHeight != null? window.innerHeight: document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight:document.body != null? document.body.clientHeight:null;
	},

	getScrollHeight: function(){
		return document.documentElement.scrollHeight;
	},

	getScrollWidth: function(){
		return document.documentElement.scrollWidth;
	},

	getScrollTop: function(){
		return document.documentElement.scrollTop || window.pageYOffset || 0;
	},

	getScrollLeft: function(){
		return document.documentElement.scrollLeft || window.pageXOffset || 0;
	},
	
    getPosLeft: function() {
        return typeof window.pageXOffset != 'undefined' ? window.pageXOffset:document.documentElement && document.documentElement.scrollLeft? document.documentElement.scrollLeft:document.body.scrollLeft? document.body.scrollLeft:0;
    },

    getPosTop: function() {
        return typeof window.pageYOffset != 'undefined' ? window.pageYOffset:document.documentElement && document.documentElement.scrollTop? document.documentElement.scrollTop: document.body.scrollTop?document.body.scrollTop:0;
    }
}

function isIE6()
{
    var version = navigator.appVersion;
    var isIE = navigator.appName == "Microsoft Internet Explorer"
    
    if (isIE)
    {
    	var verStr = version.substring(version.indexOf("MSIE"), version.length-version.indexOf("MSIE"))
    	var items = verStr.split(';');
    	var MSIEVer = items[0].toString().replace("MSIE ","");
    	return parseFloat(MSIEVer)<7;
    }
    return false;
}

function goToTop() {
    window.scrollTo(0,0); 
}






