/***************************************************************************************************/
// ÇÃ·ÎÅÍ - ¹üÀ§Á¦ÇÑ
//ex) initMoving("idname",884,500);
//2008.5.13 ¼öÁ¤
function initMoving(id,xleft,ytop) {
	target = document.getElementById(id);
	if (!target) return false;
	var obj = target;
	obj.initLeft = xleft;//Àý´ëÁÂÇ¥x
	obj.initTop = ytop;//Àý´ëÁÂÇ¥y
	obj.bottomLimit = document.documentElement.scrollHeight - 10;//obj³ôÀÌ30+foot³ôÀÌ240
	obj.topLimit = ytop;
	obj.style.position = "absolute";
	obj.top = obj.initTop;
	obj.left = obj.initLeft;
	obj.style.top = obj.top + "px";
	obj.style.left = obj.left + "px";

	obj.getTop = function() {
		if (document.documentElement.scrollTop) {
			return document.documentElement.scrollTop;
		} else if (window.pageYOffset) {
			return window.pageYOffset;
		} else {
			return 0;
		}
	}
	obj.getHeight = function() {
		if (self.innerHeight) {
			return self.innerHeight;
		} else if(document.documentElement.clientHeight) {
			return document.documentElement.clientHeight;
		} else {
			return 550;//½ºÅ©·Ñ¾øÀ»¶§À©µµ¿ìÇ¥½Ã¿µ¿ª³ôÀÌ-¼öÁ¤ÇÊ¿ä¾øÀ½
		}
	}
/*
	obj.move = setInterval(function() {
		pos = obj.getTop() + obj.getHeight()/2 - obj.clientHeight;

		if (pos > obj.bottomLimit)
			pos = obj.bottomLimit
		if (pos < obj.topLimit)
			pos = obj.topLimit

		interval = obj.top - pos;
		obj.top = obj.top - interval / 3;
		obj.style.top = obj.top + "px";
	}, 40)
*/
}



function doit(){
if (!window.print){
alert("print")
return
}
window.print()
}




//È®´ëÃà¼Ò
//
var zoomRatio = 100;


/*
* true  10%È®´ë
* false 10% Ãà¼Ò
* ¹üÀ§ : 50~200%
*/
function zoom(zoomFlag)
{
/*	if(navigator.appVersion.indexOf("MSIE 7.0") > 0 && navigator.appVersion.indexOf("MSIE 6.0") > 0){
		alert("Ç¥ÁØºê¶ó¿ìÁ®¿¡¼­ ÀÛµ¿ÇÕ´Ï´Ù ºê¶ó¿ìÁ®¸¦ ¾÷µ¥ÀÌÆ® ÇØÁÖ¼¼¿ä");
		return false;
	}
*/	var ratioFlag = 10;
	if(!zoomFlag)
	{
		ratioFlag *= -1;
	}
	
	if(zoomRatio >= 200 && ratioFlag > 0)
	{
		alert("200%º¸´Ù Å©°Ô ¼³Á¤ÇÒ ¼ö ¾ø½À´Ï´Ù.");
	}
	else if(zoomRatio <= 50 && ratioFlag < 0)
	{
		alert("50%º¸´Ù ÀÛ°Ô ¼³Á¤ÇÒ ¼ö ¾ø½À´Ï´Ù.");
	}
	
		zoomRatio += ratioFlag;
		setZoom(zoomRatio);
	
	return false;
}



/*
*	ÆäÀÌÁö¸¦ ÁöÁ¤ÇÑ ÆÛ¼¾Æ®·Î º¯°æÇÕ´Ï´Ù.
*/
function setZoom(ratio)
{
	zoomRatio = ratio;
	//var bodyEl = document.getElementsByTagName("body")[0];
	//bodyEl.style.zoom=zoomRatio+"%";
	$("body > *").css("zoom",zoomRatio+"%");
	return false;
}

/*
* ±âº» ºñÀ²ÀÎ 100%·Î ¼³Á¤ÇÕ´Ï´Ù.
*/
function setDefaultZoom()
{
	return setZoom(100);
}
