//Window( Frame )の幅の取得 
function getWinWidth(){
	if(window.innerWidth) return window.innerWidth; // Mozilla, Opera, NN4
	if(document.documentElement && document.documentElement.clientWidth){ // 以下 IE
		return document.documentElement.clientWidth;
	}else if(document.body && document.body.clientWidth){
		return document.body.clientWidth;
	}
	return 0;
}

//Window( Frame )の高さの取得 
function getWinHeight(){
	if(window.innerHeight) return window.innerHeight; // Mozilla, Opera, NN4
	if(document.documentElement && document.documentElement.clientHeight){ // 以下 IE
		return document.documentElement.clientHeight;
	}else if(document.body && document.body.clientHeight){
		return document.body.clientHeight;
	}
	return 0;
}

//Window( Frame )のスクリーン上の位置（X座標）
function getWinScrollLeft(){
	if(window.scrollX) return window.scrollX; // Moziila
	if(window.pageXOffset) return window.pageXOffset; // Opera, NN4
	if(document.documentElement && document.documentElement.scrollLeft){ // 以下 IE
		return document.documentElement.scrollLeft;
	}else if(document.body && document.body.scrollLeft){
		return document.body.scrollLeft;
	}
	return 0;
}

//Window( Frame )のスクリーン上の位置（Y座標）
function getWinScrollTop(){
	if(window.scrollY) return window.scrollY; // Mozilla
	if(window.pageYOffset) return window.pageYOffset; // Opera, NN4
	if(document.documentElement && document.documentElement.scrollTop){ // 以下 IE
		return document.documentElement.scrollTop;
	}else if(document.body && document.body.scrollTop){
		return document.body.scrollTop;
	}
	return 0;
}
