/*****Zoom In & Zoom Out Script*****/

var zoomRate = 3;			// È®´ë/Ãà¼Ò½Ã Áõ°¨·ü
var maxRate = 300;			//ÃÖ´ëÈ®´ë·ü
var minRate = 100;			//ÃÖ¼ÒÃà¼Ò·ü

function GetCookie(name){
	if (document.cookie != "") {
		zoomc = document.cookie.split("; ");
		for (var i=0; i < zoomc.length; i++) {
			zoomv = zoomc[i].split("="); 
			if (zoomv[0] == name) {
				return  unescape(zoomv[1]);
			}
		}        
	}else{
		return "";
	}
}

function SetCookie(name,value){
	document.cookie = name + "=" + escape (value)+";";
}

function GoZoom(contentid){
	if(GetCookie("zoomVal") != null && GetCookie("zoomVal") != ""){
		document.all[contentid].style.zoom = GetCookie("zoomVal");
		currZoom=GetCookie("zoomVal");
	}
	else{
		document.all[contentid].style.zoom = '100%'; 
		currZoom = '100%';
	}
}

//Zoom In & Zoom Out
function zoomInOut(contentid, how) {
	var clintName = navigator.appName;
	if(clintName.indexOf("Netscape") > -1) {
		alert("»ç¿ëÇÏ½Ã´Â ºê¶ó¿ìÀú´Â ÄÁÆ®·ÑÅ°¿Í ¸¶¿ì½ºÈÙÀ» È°¿ëÇÏ¿© È®´ë/Ãà¼Ò ÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù. \n\nÄÁÆ®·ÑÅ°¿Í ¼ýÀÚ0À» ´©¸£½Ã¸é ¿ø·¡Å©±â·Î º¸½Ç ¼ö ÀÖ½À´Ï´Ù.");
		return  false;
	}

	if(GetCookie("zoomVal") != null && GetCookie("zoomVal") != ""){
		document.all[contentid].style.zoom = GetCookie("zoomVal");
		currZoom=GetCookie("zoomVal");
	}
	else{
		document.all[contentid].style.zoom = '100%'; 
		currZoom = '100%';
	}
	if (((how == "in") && (parseInt(currZoom) >= maxRate)) || ((how == "out") && (parseInt(currZoom) <= minRate)) ) {
		return; 
	}
	if (how == "in") {
		document.all[contentid].style.zoom = parseInt(document.all[contentid].style.zoom)+zoomRate+'%'
	}
	else {
		document.all[contentid].style.zoom = parseInt(document.all[contentid].style.zoom)-zoomRate+'%'
	}
	SetCookie("zoomVal",document.all[contentid].style.zoom);
}

