function getPageScroll(){
var yScroll;
if (self.pageYOffset) {
yScroll = self.pageYOffset;
} else if (document.documentElement && document.documentElement.scrollTop){ // Explorer 6 엄격
yScroll = document.documentElement.scrollTop;
} else if (document.body) {// 다른 모든 탐색기
yScroll = document.body.scrollTop;
}
arrayPageScroll = new Array('',yScroll)
return arrayPageScroll;
}
function getPageSize(){
var xScroll, yScroll;
if (window.innerHeight && window.scrollMaxY) {
xScroll = document.body.scrollWidth;
yScroll = window.innerHeight window.scrollMaxY;
} else if (document.body.scrollHeight > document.body.offsetHeight){ // Explorer Mac을 제외한 모두
xScroll = document.body.scrollWidth;
yScroll = document.body.scrollHeight;
} 그렇지 않으면 { // Explorer Mac...Explorer 6 Strict, Mozilla 및 Safari
xScroll = document.body.offsetWidth에서도 작동합니다.
yScroll = document.body.offsetHeight;
}
var windowWidth, windowHeight;
if (self.innerHeight) { // Explorer를 제외한 모두
windowWidth = self.innerWidth;
windowHeight = self.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 엄격 모드
windowWidth = document.documentElement.clientWidth;
windowHeight = document.documentElement.clientHeight;
} else if (document.body) { // 다른 탐색기
windowWidth = document.body.clientWidth;
windowHeight = document.body.clientHeight;
}
// 전체 높이가 뷰포트 높이보다 작은 작은 페이지의 경우
if(yScroll < windowHeight){
pageHeight = windowHeight;
} else {
pageHeight = yScroll;
}
if(xScroll < windowWidth){
pageWidth = windowWidth;
} else {
pageWidth = xScroll;
}
arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)
return arrayPageSize;
}