/*------------------ »õÃ¢ (½ºÅ©·Ñ ¾øÀ½) ---------------------- */
function wOpen(URL,wName,wWidth,wHeight,wType) {
	var x 
	var y
	var wFeatures
	x = (screen.width - wWidth) / 2 
	y = (screen.height - wHeight) / 2
	
	if (wType == "1") {
		wFeatures = 'width='+wWidth+',height='+wHeight+',top='+y+',left='+x+'scrollbar=1,resizeable=no,status=no'
	} else {
		wFeatures = 'width='+wWidth+',height='+wHeight+',top='+y+',left='+x+'scrollbar=0,resizeable=no,status=no'
	}
	window.open(URL,wName,wFeatures)
}
function CheckInputNum(iNum) {
	var num_val = iNum.value;
    if(! IsNum(num_val)) {
		alert("¼ýÀÚ¸¸ ÀÔ·Â°¡´É ÇÕ´Ï´Ù.");
		iNum.value = "";
	}
}
function focusChange(current, next, maxSize)
{
	if(current.value.length >= parseInt(maxSize)) {
		
		next.focus()
	}
}
function IsNum(temp) {
	for(var i = 0; i < temp.length; i++) {
		var chr = temp.substr(i,1);
    if(chr < '0' || chr > '9') {
			return false;
		}
	}
	return true;   
}

// tab menu
function initTabMenu(tabContainerID, order) {
	var tabContainer = document.getElementById(tabContainerID);
	var tabAnchor = tabContainer.getElementsByTagName("a");
	var i = 0;

	var arr = new Array ();
	for(i=0; i<tabAnchor.length; i++) {
		if (tabAnchor.item(i).className == "tab")
			thismenu = tabAnchor.item(i);
		else
			continue;

		thismenu.container = tabContainer;
		thismenu.targetEl = document.getElementById(tabAnchor.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		thismenu.imgEl = thismenu.getElementsByTagName("img").item(0);
		thismenu.onclick = function tabMenuClick() {
			currentmenu = this.container.current;
			if (currentmenu == this)
				return false;

			if (currentmenu) {
				currentmenu.targetEl.style.display = "none";
				if (currentmenu.imgEl) {
					currentmenu.imgEl.src = currentmenu.imgEl.src.replace("_on.gif", ".gif");
				} else {
					currentmenu.className = currentmenu.className.replace(" on", "");
				}
			}
			this.targetEl.style.display = "";
			if (this.imgEl) {
				this.imgEl.src = this.imgEl.src.replace(".gif", "_on.gif");
			} else {
				this.className += "on";
			}
			this.container.current = this;

			return false;
		};

		if (!thismenu.container.first)
			thismenu.container.first = thismenu;

		arr[i] = new Array ( thismenu.href.split("#")[1], thismenu );
	}

	if ( order && order != '') {
		for ( i=0; i<arr.length; i++ ) {
			if ( arr[i][0] == order ) {
				arr[i][1].onclick();
				break;
			}
		}
	}
	else {
		if (tabContainer.first)
			tabContainer.first.onclick();
	}
}



// faq
	function isView(divName,num){
		var ele = document.getElementById(divName);
		var titleEle=ele.getElementsByTagName('dt');
		var contEle=ele.getElementsByTagName('dd');

	for(var i=0;i<titleEle.length;i++){
		if(i==num){
			if(contEle[i].className=="onCont"){
				titleEle[i].className="";
				contEle[i].className="";
			}else{
				titleEle[i].className="onTitle";
				contEle[i].className="onCont";
			}
		}else{
			titleEle[i].className="";
			contEle[i].className="";
		}
	}
}

