function getCookie(name) {
		var nameOfCookie = name + "=";
		var x = 0;
		while(x <= document.cookie.length) {
			var y = (x+nameOfCookie.length);
			if(document.cookie.substring(x, y) == nameOfCookie) {
				if((endOfCookie=document.cookie.indexOf(";", y)) == -1)
					endOfCookie = document.cookie.length;
				return unescape(document.cookie.substring(y, endOfCookie));
			}
			x = document.cookie.indexOf(" ", x) + 1;
			if(x == 0)
				break;
		}
		return "";
	}
function setCookie( name, value, expiredays ) {
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate() + expiredays );
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}
function docTitle(str){
	window.document.title = str + " - ¾Æ´ã¸®Áî ¼öÇÐ";
}

function toggler(obj,idx,j) {
	for(i = 1; i <= j ; i++ ) {
		document.getElementById(obj+i).className = "hide";
	}
		document.getElementById(obj+idx).className = "show";

	setTimeout('res()','500');

}


function toggle(obj) {
	var object = document.getElementById(obj);
	if (object.className == 'hide') {
    	object.className = 'show';
	} else {
    	object.className = 'hide';
	}
}

function res(){
	var targ = document.getElementById('body');
	targ.style.height='100';
}

function stripeHover(obj) {
	switch(obj.className) {
		case "first-child":
    		obj.className="first-child-over";
    		break;
		case "first-child-over":
			obj.className="first-child";
			break;
		case "over":
			obj.className="";
			break;
		default:
			obj.className="over";
			break;
	}
}

//resizeByObj('container','overlay')

function resizeByObj(source,target) {
	var source = document.getElementById(source);
	var target = document.getElementById(target);
	var source_h = source.height|parseInt(source.style.height)||source.offsetHeight;
	target.style.height = source_h + 40;
}

function resizeWin(w,h) {
	document.body.style.overflow='hidden';
	var clintAgent = navigator.userAgent;
	if ( clintAgent.indexOf("MSIE") != -1 ) {
		window.resizeBy(w-document.body.clientWidth, h-document.body.clientHeight);
	} else {
		window.resizeBy(w-window.innerWidth, h-window.innerHeight);
	}
}


function launchFamily() { // ÆÐ¹Ð¸®»çÀÌÆ®
	var temp;
	obj = document.getElementById('familySite');
	temp = obj.value;
	switch(temp)
    {
        case 'a01':
			window.open('http://www.miraeneducare.com','_blank');
			break;
        case 'a02':
			window.open('http://www.uber.co.kr','_blank');
			break;
        case 'a03':
			window.open('http://www.mathplay.co.kr','_blank');
			break;
        case 'a04':
			window.open('http://www.gymschule.co.kr','_blank');
			break;
        case 'a05':
			window.open('http://www.daehane.com','_blank');
			break;
        case 'a06':
			window.open('http://www.textbookmuseum.com','_blank');
			break;
        case 'a07':
			window.open('http://www.hdmh.co.kr','_blank');
			break;
        case 'a08':
			window.open('http://www.purun1318.com','_blank');
			break;
        case 'a09':
			window.open('http://www.sjedu.co.kr','_blank');
			break;
        case 'a10':
			window.open('http://jbcitygas.co.kr','_blank');
			break;
        case 'a11':
			window.open('http://www.seohaecitygas.co.kr','_blank');
			break;
        case 'a12':
			window.open('http://www.daehane.com/NewSource2/beijing_index.html','_blank');
			break;
        case 'a13':
			window.open('http://edu.daehane.com','_blank');
			break;
        case 'a14':
			window.open('http://www.i-seum.com','_blank');
			break;
        case 'a15':
			window.open('http://www.izzlebooks.com','_blank');
			break;
        case 'a16':
			window.open('http://www.passnonsul.co.kr','_blank');
			break;
        case 'a17':
			window.open('http://www.bookfolio.co.kr','_blank');
			break;
		case 'a18':
			window.open('http://www.mirae-n.co.kr','_blank');
			break;
		case 'a19':
			window.open('http://learning.mirae-n.com','_blank');
			break;
		default:
			obj.value = "";
			break;
    }
}