var isIE = is_IE();
var bodyClick = {'x':0,'y':0};

function get_body_inner_size() {
	var result = new Object;
	if(self.innerWidth) {
		result.width = self.innerWidth;
		result.height = self.innerHeight;
		return result;
	}else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict ¸ðµå
		result.width = document.documentElement.clientWidth;
		result.height = document.documentElement.clientHeight;
		return result;
	}
	else if (document.body) { // ´Ù¸¥ IE ºê¶ó¿ìÀú
		result.width = document.body.clientWidth;
		result.height = document.body.clientHeight;
		return result;
	}
}

function get_body_scroll() {
	var x,y;
	if(typeof(self.pageYOffset)!='undefined') {// IE ¿Ü ¸ðµç ºê¶ó¿ìÀú	
		x = self.pageXOffset;
		y = self.pageYOffset;
	}else if (document.documentElement && document.documentElement.scrollTop) {// Explorer 6 Strict
		x = document.documentElement.scrollLeft;
		y = document.documentElement.scrollTop;
	}else if (document.body)  { // ´Ù¸¥ IE ºê¶ó¿ìÀú
		x = document.body.scrollLeft;
		y = document.body.scrollTop;
	}
	var result = new Object;
	result.left = x;
	result.top = y;
	return result;
}

function get_body() {
	var oBodyScroll = get_body_scroll();
	var oBodySize = get_body_inner_size();
	var oBody = new Object;
	oBody.width = oBodySize.width;
	oBody.height = oBodySize.height;
	oBody.top = oBodyScroll.top;
	oBody.left = oBodyScroll.left;

	return oBody;
}
function set_body_scroll(left, top) {
	if (document.documentElement) { // Explorer 6 Strict
		if(left)
			document.documentElement.scrollLeft = left;
		if(top)	
			document.documentElement.scrollTop = top;
	}else if (self.pageYOffset) { // IE ¿Ü ¸ðµç ºê¶ó¿ìÀú
		if(left)
			self.pageXOffset = left;
		if(top)	
			self.pageYOffset = top;
	}else if (document.body) {  // IE ºê¶ó¿ìÀú
		if(left)
			document.body.scrollLeft = left;
		if(top)
			document.body.scrollTop = top;
	}
}

