function tabpage(str){
	for (i=1;i<=5;i++){
		document.getElementById('tabpage'+i).style.display="none";
		document.getElementById('more'+i).style.display="none";
		if(document.getElementById('tab'+i).getElementsByTagName('img')[0]&&document.getElementById('tab'+i).getElementsByTagName('img')[0].src.slice(-5,-4)=='_'){
			document.getElementById('tab'+i).getElementsByTagName('img')[0].src=document.getElementById('tab'+i).getElementsByTagName('img')[0].src.slice(0,-5)+'.gif';
		}
	}
	document.getElementById('tabpage'+str).style.display="block";
	if(document.getElementById('tab'+str).getElementsByTagName('img')[0]&&document.getElementById('tab'+str).getElementsByTagName('img')[0].src.slice(-5,-4)!='_'){
		document.getElementById('tab'+str).getElementsByTagName('img')[0].src=document.getElementById('tab'+str).getElementsByTagName('img')[0].src.slice(0,-4)+'_.gif';
	}
	document.getElementById('more'+str).style.display="block";
}
function tabpane(){
	tabpage(1);
	for (i=1;i<=5;i++){
		document.getElementById('tab'+i).onclick=function(e) {
			tabpage(this.id.charAt(3));
			return false;
		}
		document.getElementById('tab'+i).onfocus=function(e) {
			tabpage(this.id.charAt(3));
		}
	}
}
$('ducument').ready(function(){
	tabpane();
})

/* roll over-out image */
function menuOver() {
	this.src = this.src.replace(".gif", "_on.gif");
}
function menuOut() {
	this.src = this.src.replace("_on.gif", ".gif");
}

function initImgEffect(ImgEls,SelImg) {

	MenuImg = document.getElementById(ImgEls).getElementsByTagName("img");
	MenuImgLen = MenuImg.length;

	for (i=0; i<MenuImgLen; i++) {
		MenuImg.item(i).onmouseover = menuOver;
		MenuImg.item(i).onmouseout = menuOut;
		if (i == SelImg) {
			MenuImg.item(i).onmouseover();
			MenuImg.item(i).onmouseover = null;
			MenuImg.item(i).onmouseout = null;
		}
	}
}


/*°Ô½ÃÆÇ ÅÇ¸Þ´º*/

function newsInitTabMenu(menuContainerID) {

		var tabAnchor = document.getElementById(menuContainerID).getElementsByTagName("a");
		var i = 0;

		for(i=0; i<tabAnchor.length; i++) {
			if (tabAnchor.item(i).className == "tab")
				thismenu = tabAnchor.item(i);
			else
				continue;
			thismenu.menuContainer = document.getElementById(menuContainerID);
			thismenu.targetEl = document.getElementById(thismenu.href.split("#")[1]);
			thismenu.targetEl.style.display = "none";
			if (thismenu.getElementsByTagName("img").item(0)) {
				thismenu.getElementsByTagName("img").item(0).onclick = function () {
					this.src = this.src.replace(".gif", "_on.gif");
				}
			}

			thismenu.onclick =  newsTabMenuClick;

			if (!thismenu.menuContainer.first) {
				thismenu.menuContainer.first = thismenu;
			}
		}
		document.getElementById(menuContainerID).first.onclick();
	}
	function newsTabMenuClick() {
		currentmenu = this.menuContainer.current;

		if (currentmenu != this) {
			if (currentmenu) {
				currentmenu.targetEl.style.display = "none";
				if (currentmenu.getElementsByTagName("img").item(0)) {
					currentmenu.getElementsByTagName("img").item(0).src = currentmenu.getElementsByTagName("img").item(0).src.replace("_on.gif", ".gif");
					currentmenu.getElementsByTagName("img").item(0).onclick = function () {
						this.src = this.src.replace(".gif", "_on.gif");
					}
				}
				currentmenu.className = currentmenu.className.replace(" on", "");
			}

			this.targetEl.style.display = "block";
			if (this.getElementsByTagName("img").item(0)) {
				this.getElementsByTagName("img").item(0).src = this.getElementsByTagName("img").item(0).src.replace("_on.gif", ".gif");

				this.getElementsByTagName("img").item(0).onclick();
				this.getElementsByTagName("img").item(0).onclick = null;
			}
			if (this) {
				this.className += " on";
			}
			this.menuContainer.current = this;
		}
		return false;
	}
	
	
	
	//À¥Á¢±Ù¼ºÀ» À§ÇÑ È­¸é È®´ëÃà¼Ò
var nowZoom = 100;
		
		function zoomIn() {
			nowZoom = nowZoom - 10;
			if(nowZoom <= 70) nowZoom = 70;
			zooms();
		}
 
		function zoomOut() {
				nowZoom = nowZoom + 10;
				if(nowZoom >= 500) nowZoom = 500;
				zooms();
		}
		
		function zoomReset(){
			nowZoom = 100; 
			zooms();
		}
		
		function zooms(){
			document.body.style.zoom = nowZoom + '%';
		
			if(nowZoom==70){
				alert ("30%Ãà¼Ò µÇ¾ú½À´Ï´Ù. ´õ ÀÌ»ó Ãà¼ÒÇÒ ¼ö ¾ø½À´Ï´Ù.");
			}
			
			if(nowZoom==500){
				alert ("500%È®´ë µÇ¾ú½À´Ï´Ù. ´õ ÀÌ»ó È®´ëÇÒ ¼ö ¾ø½À´Ï´Ù.");
			}
		}

