function jh_window_getheight(){
	if (window.innerHeight) {
		return window.innerHeight + window.pageYOffset;
	} else if (document.body && document.body.offsetHeight) {
		return document.body.offsetHeight;
	} else {
		return 0;
	}
}

function jh_window_getwidth(){
	if (window.innerWidth) {
		return window.innerWidth + window.pageXOffset;
	} else if (document.body && document.body.offsetWidth) {
		return document.body.offsetWidth;
	} else {
		return 0;
	}
}

function jh_window_getcurrentheight(){
	if (window.innerHeight) {
		return window.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) {
		return document.documentElement.clientHeight;
	} else if (document.body && document.body.clientWidth) {
		return document.body.clientHeight;
	} else {
		return 0;
	}
}

function jh_window_getcurrentwidth(){
	if (window.innerWidth) {
		return window.innerWidth;
	} else if (document.documentElement && document.documentElement.clientWidth) {
		return document.documentElement.clientWidth;
	} else if (document.body && document.body.clientWidth) {
		return document.body.clientWidth;
	} else {
		return 0;
	}
}

function jh_window_getcurrenttop(){
	if (window.pageYOffset) {
		return window.pageYOffset;
	} else if (document.documentElement && document.documentElement.scrollTop) {
		return document.documentElement.scrollTop;
	} else if (document.body && document.body.scrollTop) {
		return document.body.scrollTop;
	} else {
		return 0;
	}
}

function jh_window_getcurrentleft(){
	if (window.pageXOffset) {
		return window.pageXOffset;
	} else if (document.documentElement && document.documentElement.scrollLeft) {
		return document.documentElement.scrollLeft;
	} else if (document.body && document.body.scrollLeft) {
		return document.body.scrollLeft;
	} else {
		return 0;
	}
}

function jh_window_centralize(obj) {
	height = obj.offsetHeight;
	width = obj.offsetWidth;
	
	/*top = jh_window_getcurrenttop() + parseInt((jh_window_getcurrentheight() - height) / 2);
	left = jh_window_getcurrentleft() + parseInt((jh_window_getcurrentwidth() - width) / 2);
	
	obj.style.top = top + 'px';
	obj.style.left = left + 'px';*/
	
	obj.style.top = parseInt((jh_window_getcurrentheight() - height) / 2) + 'px';
	obj.style.left = parseInt((jh_window_getcurrentwidth() - width) / 2) + 'px';
}

function jh_window_maximize(obj) {
	/*obj.style.left = '0px';
	obj.style.top = '0px';
	obj.style.height = jh_window_getheight() + 'px';
	obj.style.width = jh_window_getwidth() + 'px';*/
	jh_setposition(obj, 0, 0, jh_window_getwidth(), jh_window_getheight());
}

function jh_window_moveto(obj, left, top) {
	obj.style.left = parseInt(left) + 'px';
	obj.style.top = parseInt(top) + 'px';
}

/*function jh_window_modalmsg_create(id) {
	obj.style.position = 'fixed';
	jh_window_centralize(obj);
	obj.style.visibility = 'visible';
}

function jh_window_modalmsg_close(obj) {
}*/