var isMSIE=(document.all)?true:false;
var isJS12=(window.screen)?true:false;
var isDOM = ((document.getElementById) ? true : false);
var isIE4 = ((document.all && !isDOM) ? true : false);
var isNS4 = ((document.layers) ? true : false);
var isNS = navigator.appName == "Netscape";
var strWWW = document.location.hostname.split(".")[0];
var strProtocol = document.location.protocol;
var strHost;
strProtocol == "http:" ? strHost = "" : strHost = "http://www.genikids.com"

function goGenikids() {
	if( strProtocol == "http:" ){
		if( typeof(top.index) == "undefined" )
		{
			top.location.href = "http://www.genikids.com";
			return;
		}
		top.index.location.href = "/index.asp";
	}else{
		document.location.href = strHost + "/index.asp";
	}
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//°ø·æ Ã¥ º¸±â ·¹ÀÌ¾î
function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function showHideLayers(objL, v) { //v3.0
if ((obj=document.getElementById(objL))!=null) {
    if (obj.style) { obj=obj.style; v=(v=='show')?'':(v='hide')?'none':v; }
    obj.display=v; }
}

function callError(msg, url, linenumber){
	alert(msg+"\n"+ url +"\n"+ linenumber)
	//if ( typeof(top.hidBottom) != "undefined" ) top.hidBottom.document.location.href = "/ScriptError.asp?msg=" +escape(msg) + "&url=" + escape(url) +"&linenumber="+linenumber;
	return true;
}
//window.onerror=callError;

function getPayHistory() {
	window.open( strHost + "/Member/GetPayHistory.asp","PayHistory","width=630, height=560");
}

var winX, winY
function screenCenter(objX, objY){
	if (parseInt(navigator.appVersion) >= 4) {
		winX = ((screen.availWidth*.5)-(objX*.5));
		winY = ((screen.availHeight*.5)-(objY*.5));
	}
}

function MiniPop(num) {
	popupwinX = "280";
	popupwinY = "260";

	if(num==1) imgName = "FindAccount.gif";
	else imgName = "NoEmail.gif";

	SimpleImgPop("/image/"+ imgName, 280,  260 );
}

function SimpleImgPop(imgSrc, imgWidth, imgHeight, isPrint){
	screenCenter(Number(imgWidth),Number(imgHeight));
	var p = window.open("","","width="+ imgWidth +", height="+ imgHeight +", left= "+ winX +",top="+ winY);
	var d = p.document.open();

	d.write("<html><meta http-equiv='imagetoolbar' content='no'><body leftmargin='0' topmargin='0'><img src='"+ imgSrc +"' width='"+ imgWidth +"' height='"+ imgHeight +"' style='cursor:hand' onclick='window.close();'></body></html>");
	d.close();
	if( typeof(isPrint) != 'undefined' ) p.print();
}

function MainPop(popupwinX,popupwinY,strSrc) {
	screenCenter(Number(popupwinX),Number(popupwinY));
	varMainWinPop = window.open(strSrc,"MainWinPop","width="+ popupwinX +", height="+ popupwinY +", left="+ winX +" ,top="+ winY);
}

function popFirstEntrance(seq){
	popupwinX = "800";
	popupwinY = "600";
	screenCenter(Number(popupwinX),Number(popupwinY));
	window.open("/Popup/FirstEntrance.asp?seq="+seq,"","width="+ popupwinX +", height="+ popupwinY +", left= "+ winX +",top="+ winY);
}

function popGetStudyGuide(seq){
	popupwinX = "800";
	popupwinY = "600";
	screenCenter(Number(popupwinX),Number(popupwinY));
	window.open("http://www.genienglish.com/StudyHelp/GetStudyGuide.asp?seq="+seq,"","width="+ popupwinX +", height="+ popupwinY +", left= "+ winX +",top="+ winY);
}

function findPassword() {
	findPasswordPop('');
//	location.href = "https://www.genikids.com/Member/getPassword.asp";
}

function findPasswordPop(A) {
	popupwinX = "650";
	popupwinY = "520";
	screenCenter(Number(popupwinX),Number(popupwinY));
	var FPPop = window.open("","FPPop","scrollbars=yes,width="+ popupwinX +", height="+ popupwinY +", left= "+ winX +",top="+ winY);

	if(document.Mfrm != undefined){
		if(document.Mfrm.BtxtName != undefined){
			var f = document.Mfrm;
			if(A != undefined){
				f.ProcessStep.value = 1
				f.FPinfo.value = A;
			}else{
				f.ProcessStep.value = 0;
				f.FPinfo.value = "";
			}
			f.target = "FPPop";
			f.action = strProtocol + "//www.genikids.com/Member/getPasswordPopup.asp";
			f.method = "post";
			f.submit();
			return;
		}
	}

	FPPop.document.location.href = "https://www.genikids.com/Member/getPasswordPopup.asp";
}

function memberRegister() {
	location.href = "/Member/gateMemberJoin.asp";
}

function userInfo() {
	location.href = "/Member/getMemberInfo.asp?ACTIONCODE=MODIFY";
}

function logout() {
	location.href = strHost + "/Member/LogOut.asp";
}

function expiredTerm() {
	window.open(strHost + "/Member/GetExpireDate.asp","ExprieDate","width=360,height=200;");
}

function useTimeSet() {
	//window.open("/Member/useTimeSet2.asp","useTimeSet","width=325,height=425;");
	//window.open("/Member/useTimeSet2.asp?opt=","useTimeSet","width=360,height=400,scrollbars=no,menubar=no,toolbar=no,status=no,resizable=no");
	document.location.href = strHost + "/ParentCorner/PC_main.asp?Cate=D&subCate=F";
}

function eduProgram(){
	window.open('/HelpGuide/tour.htm', '_blank', 'width='+screen.availWidth+',height='+screen.availHeight+',status=no')
}

function genikidsIntro(){
	window.open('/HelpGuide/tour2.htm', '_blank', 'width='+screen.availWidth+',height='+screen.availHeight+',status=no')
}

function companyIntro(){
	window.open("/HelpGuide/company.htm","geninews",'width=640,height=430,left=0,top=0,scrollbars=no,menubar=no,toolbar=no,status=no');
}

function newContentList(){
	var opop = window.open("/Contents/NewContentsList.asp","newgames",'width=500,height=450,left=0,top=0,scrollbars=yes,menubar=no,toolbar=no,status=no');
	opop.focus();
}

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 "";
}

var setCookie = function(name, value, expiredays) {
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate() + expiredays);
	todayDate.setHours(0,0,0);
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

function freeGift() {
	location.href = "/FreeGift/FreeGiftList.asp";
}

function studyRoom() {
	location.href = "/StudyRoom/progressStudy.asp";
}

function myhome() {
//	alert('¸¶ÀÌÈ¨ º¸¿ÏÀÛ¾÷ÁßÀÔ´Ï´Ù.');
	top.index.location.href = "/Myhome/Index.asp";
}

function addFavorite() {
//	top.bottom.location.href = "addLoginLog.asp?pageCode=AddFavor";
	window.external.AddFavorite('http://www.genikids.com/','¶È¶ÈÇÑ¾ÆÀÌ¸¸µé±â Áö´ÏÅ°Áî :::: www.genikids.com')
}

function setHomepage(obj) {
	obj = document.Homepage
//	alert(obj);
//	parent.bottom.location.href = "addLoginLog.asp?pageCode=setHomeP";
	obj.style.behavior='url (#default#homepage)';
	obj.setHomePage('http://www.genikids.com');
}

function checkReturn(objForm, e) {
	if ( e.keyCode == 13 ) {
		formCheck();
	}
}

function formCheck()
{
	var loginID = document.login.loginID.value;
	var password = document.login.password.value;
	//var refer_url = document.URL.replace('http://www.genikids.com','');
	var refer_url = escape(document.URL);
	document.login.refer_url.value = refer_url.replace(/&/g,'@');

	if (loginID.length == 0)
	{
		alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
		document.login.loginID.focus();
		return false
	}

	if (password.length == 0)
	{
		alert("¾ÏÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
		document.login.password.focus();
		return false
	}

	document.login.target = "LOGIN_SOCKET";
	//document.login.action = "/Member/LoginSocket.asp"
	document.login.action = "https://www.genikids.com/Member/LoginSocketSSL.asp"
	document.login.submit();
}

function contentSearch() {
	//alert("½Ã½ºÅÛ Á¡°Ë ÁßÀÔ´Ï´Ù.");
	location.href = "/Contents/SearchContents.asp";
}

function themeCorner() {
	//location.href = "/Contents/ThemeCorner.asp";
	location.href = "/Contents/ThemeCorner.asp?ThemeCate=3&ThemeNo=65&CurPage=4";
}

function parentCorner() {
		location.href = strHost + "/ParentCorner/PC_Main.asp";
}

function customerCenter() {
	location.href = strHost + "/CustomerCenter/CC_Main.asp";
}

function freeTakeCorner() {
	location.href = "/FreeTakeCorner/FreeMain.asp";
}

function GeniEnglishFreeTakeCorner() {
	location.href = "/FreeTakeCorner/freeGeniEnglish.asp";
}

function go_url(url)
{
	var child = null;
	child = window.open(url,'Notice','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,width=418,height=270,left=0,top=0');
	child.focus();
}

function moneyPage() {
	top.index.document.location.href = "/Payment/Payment_1_Step.asp";
	//top.index.document.location.href = "https://www.genikids.com/Payment/Payment_1_Step.asp";
}

function PCmoneyPage() {
	parent.document.location.href = "/Payment/Payment_1_Step.asp";
	//parent.document.location.href = "https://www.genikids.com/Payment/Payment_1_Step.asp";
}

function mailToHelp() {
	location.href = "/CustomerCenter/CC_Main.asp?target_link=mailTo.asp";
}

function getSitemap() {
	location.href = "/HelpGuide/sitemap.htm";
}

function goNews() {
	location.href = "/News/news_list.asp";
}

function goNotice() {
	location.href = "/News/notice_list.asp";
}

function goNoticeView(Nidx) {
	location.href = "/News/notice_content.asp?news_idx="+ Nidx;
}

function goUseBBS() {
	location.href = "/ParentCorner/PC_main.asp?Cate=B";
}

function lastLevelGame() {
	//alert("LastLevelGame");
	//Hanja My Level Go Button
	pageReload();
}

function pageReload(queryStr) {
	//alert(queryStr)
	var current_page = document.URL;
	queryStr_index = current_page.lastIndexOf("?");
	if (queryStr_index == -1)	{
		url = current_page;
	} else {
		url = current_page.substring(0,queryStr_index);
	}
	splited_url = url.split("/");
	if ( splited_url[3] != 'Payment' )	location.href = url+"?"+queryStr;
	if ( splited_url[3] == 'Contents')
	{
		if ( parent.ifrm )
		{
			parent.closeALRabbit();
		}
	}
}

function NewpageReload(queryStr) {
	var arrNew = new Array(), strURL = document.URL, arrTemp;
	if(strURL.indexOf("?") == -1){document.location.href = strURL +"?"+ queryStr ;return;}

	var arrVar = strURL.substr(strURL.indexOf("?")+1,strURL.length).split("&");
	var arrNewVar = queryStr.split("&");

	while(strKeyName = arrVar.shift()){
		if(strKeyName.indexOf("=") > 0 ){
			arrTemp = new Array();
			while(strNewKeyName = arrNewVar.shift()){
				strKeyName.split("=")[0].toLowerCase() == strNewKeyName.split("=")[0].toLowerCase() ? strKeyName = strNewKeyName : arrTemp.push(strNewKeyName) ;
			}
			arrNewVar = arrTemp;
			arrNew.push(strKeyName);
		}
	}
	document.location.href = strURL.substr(0, strURL.indexOf("?") + 1) + arrNew.concat(arrTemp).join("&");
}

function pageLoad(str) {
	var page_url = document.URL;
	splited_url = page_url.split("/");
	location.href = str;
	if ( splited_url[3] == 'Contents')
	{
		if ( parent.ifrm )
		{
			parent.closeALRabbit();
		}
	}
}

function contentView(str) {
	var strPageURL;
	//location.href = "/Contents/ContentsList.asp?strLink="+str;
	pageName = str
	switch (pageName){
		case "KoreanWordGame" :
			top.index.location.href = "/Contents/KoreanWordGame.asp";
			break;
		case "KoreanLangQuiz" :
			top.index.location.href = "/Contents/KoreanLangQuiz.asp";
			break;
		case "TypingGame" :
			top.index.location.href = "/Contents/TypingGame.asp";
			break;
		default:
			strWWW == "www" ? strPageURL = strHost + "/Contents/"+ pageName : strPageURL = "/Contents/"+ pageName ;
			top.index.location.href = strPageURL;
			break;
	}
}

function clickHelp(url) {
	popupwinX = "520";
	popupwinY = "400";
	screenCenter(Number(popupwinX),Number(popupwinY));
	//geniHelp = window.open("http://partner.genikids.com/help.asp?url="+url,"geniHelp","width=520, height=400, left=" + winX + ",top=" + winY);
	geniHelp = window.open("/HelpGuide/help.asp?url="+url,"geniHelp","width="+ popupwinX +", height="+ popupwinY +", left=" + winX + ",top=" + winY);
	geniHelp.focus();
}

var StudyGoal = function(){
	var strCode = "";
	GroupCode == "0100" ? strCode = "Kor_" : strCode = "Math_";
	clickHelp(strCode + CurLevel + "_0.htm");
}

var ParentGuide = function(){
	var strCode = "";
	GroupCode == "0100" ? strCode = "Kor_" : strCode = "Math_";
	clickHelp(strCode + CurLevel + "_"+ CurUnit +".htm");
}

var BookGuide = function(){
	OpenWindow(GuideContentConID,GuideContentisFree,GuideContentEndFrame);
//	viewBookimg(GroupCode, CurLevel, CurUnit);
}

function getScreenHeightResolution(){
	var strReturn = "100%";
	var isJS12=(window.screen)?true:false;
	if(isJS12){
		var SCRate = screen.width / screen.height;
		if( SCRate >= 1.6 ){
			//strReturn = String(Math.floor(screen.height * 1.3));
			strReturn = "81%";
		}
	}
	return strReturn;
}

function GameOpenFocus(gameURL) {
	secWin = window.open(gameURL,'gamewindow','fullscreen=1');
	if (!(secWin))
	{
		alert("ÆË¾÷¹æÁö ÇÁ·Î±×·¥ÀÌ ¼³Ä¡µÇ¾î ÀÖ½À´Ï´Ù.\nÆË¾÷Çã¿ëÀ¸·Î ¼³Á¤À» ¹Ù²Ù¾î ÁÖ¼¼¿ä.\n\n¼³Á¤À» ¹Ù²Ù¾îµµ ¶ßÁö ¾ÊÀ» °æ¿ì¿£ °í°´¼¾ÅÍ(02-2627-8600)·Î ¿¬¶ô¹Ù¶ø´Ï´Ù.");
	} else {
		secWin.focus();
	}
//	secWin = window.open(gameURL,'gamewindow','fullscreen=0');
}

// °ÔÀÓ¿¡ Ä«¿îÆ®¸¦ ³Ö´Â ºÎºÐÀÌ´Ù.
function Update_FeedStr(p,p2) {
	//alert("Update_FeedStr("+p+","+p2+")");
	arrCurrentPage = document.URL.split("/")
	PathInfo = arrCurrentPage[arrCurrentPage.length-2];
	intDotIndex = arrCurrentPage[arrCurrentPage.length-1].lastIndexOf(".");
	PageInfo = arrCurrentPage[arrCurrentPage.length-1].substring(0, intDotIndex);

//	alert(PathInfo);
	switch (PathInfo)
	{
	case "Contents" :
//		alert(PageInfo);
		switch (PageInfo)
		{
		case "ChineseChar" :
			if (!document.getElementById("c" + p)) {
				if ( !document.getElementById("mainswf") )
				{
					return false;
				}
				document.getElementById("mainswf").SetVariable("gcount0"+p, p2);
				document.getElementById("mainswf").TCallLabel("/","view_init");
				return false;
			}
			document.getElementById("c" + p).SetVariable("setCountByWeb",p2);
//			document.getElementById("c" + p).setVariable("gameindex",1);
//			document.getElementById("c" + p).TCallLabel("/","view_init");
			break;
		case "GeniEnglish" :
			if ( typeof(mainswf) != "undefined" ){
				document.getElementById("mainswf").counterSetting("gcount0"+p, p2);
			}else{
				document.getElementById("c" + p).setVariable("gameCount", p2);
				document.getElementById("c" + p).SetVariable("gameIndex",1);
				document.getElementById("c" + p).TCallLabel("/","view_init");
			}
			break;
		case "ThemeCorner" : break;
		case "Dinosaur" : break;
		case "KoreanLangPrintOut" : break;
		case "WorldTour" :
/*			if ( !document.getElementById("mainswf") )
			{
				return false;
				break;
			}
			document.getElementById("mainswf").SetVariable("setCountByWeb", p+"_"+p2);*/
			break;
		default :
//			alert(p+"="+p2);
			if (!document.getElementById("c" + p)) {
				if ( !document.getElementById("mainswf") ){
					return false;
				}
				document.getElementById("mainswf").SetVariable("gcount0"+p, p2);
				document.getElementById("mainswf").TCallLabel("/","view_init");
				return false;
			}
			//alert(document.getElementById("c" + p).GetVariable("gameCount"));
			document.getElementById("c" + p).SetVariable("gameCount",p2);
			document.getElementById("c" + p).SetVariable("gameIndex",1);
			document.getElementById("c" + p).TCallLabel("/","view_init");
		}
		break;
	case "FreeTakeCorner" :
		if (document.getElementById("c" + p)) {
			document.getElementById("c" + p).SetVariable("gameIndex",1);
			document.getElementById("c" + p).TCallLabel("/","view_init");
		}
		break;
	case "StudyRoom" :
		if (!document.getElementById("c" + p)) {
			if ( !document.getElementById("mainswf") )
			{
				return false;
			}
			document.getElementById("mainswf").SetVariable("gcount0"+p, p2);
			document.getElementById("mainswf").TCallLabel("/","view_init");
			return false;
		}
		document.getElementById("c" + p).SetVariable("gameCount",p2);
		document.getElementById("c" + p).SetVariable("gameIndex",1);
		document.getElementById("c" + p).TCallLabel("/","view_init");
		break;
	}
}

function getCashReceipt(TempTNO) {
	window.open("/Receipt/GetCashReceipt.asp?TempTNO="+TempTNO, "CashReceipt","width=410,height=675");
}


function MakeShortCut() {
	if ( confirm('Áö´ÏÅ°Áî ¹Ù·Î°¡±â ¾ÆÀÌÄÜÀ» ¹ÙÅÁÈ­¸é¿¡ »ý¼ºÇÕ´Ï´Ù.\n\n [ È®ÀÎ ]À» ´©¸£½Å ÈÄ ÆÄÀÏ ´Ù¿î·Îµå½Ã ¿­±â(È¤Àº ½ÇÇà)¹öÆ°À» ´­·¯ÁÖ¼¼¿ä.') ) location.href = "/DownLoads/GenikidsShortCut.exe";
}

function reSize(objSel)
{
	var objFrame = objSel;
	var objBody = objFrame.document.body;
	objFrame.style.height = objBody.scrollHeight + (objBody.offsetHeight - objBody.clientHeight);
//	alert(objBody.offsetHeight +'-'+ objBody.clientHeight+'+'+objBody.scrollHeight);
}

function closeALRabbit() {
	document.getElementById("AlRabbitPop").TCallLabel("/","unload");
	document.getElementById("ALRabbit").style.visibility = "hidden";
}
function openPop() {
	document.getElementById("ALRabbit").style.visibility = "";
}

function initPop(opt, level, sub) {
	//alert(opt + " " + level + " " + sub );
	if ( opt == "" ) {
		opt = "0";
	} else if ( opt == "9" ) {
		level = ( Math.floor(Math.random()*10) % 2 ) + 1;
	}
	if (level == "" ) {
		level = "4";
	}

	document.getElementById("AlRabbitPop").SetVariable("opt",opt);
	document.getElementById("AlRabbitPop").SetVariable("level",level);
	document.getElementById("AlRabbitPop").SetVariable("sub",sub);
	document.getElementById("AlRabbitPop").TCallLabel("/","view_init");
	openPop();
}

function initStudyPop(opt, level, sub, KorStudyNum, MatStudyNum, ChiStudyNum, EngStudyNum) {
	var A = document.getElementById("AlRabbitPop")
	A.SetVariable("KorStudyNum",KorStudyNum);
	A.SetVariable("MatStudyNum",MatStudyNum);
	A.SetVariable("ChiStudyNum",ChiStudyNum);
	A.SetVariable("EngStudyNum",EngStudyNum);
	initPop(opt, level, sub);
}

function initStudyTimePop(opt, level, sub, BreathingEndTime) {
	var A = document.getElementById("AlRabbitPop");
	A.SetVariable("BreathingEndTime",BreathingEndTime);
	initPop(opt, level, sub);
}


function printOut(CurLevel, strSection) {
	if(typeof(strSection) == 'undefined'){
		top.index.location.href = "/Contents/KoreanLangPrintOut.asp?GradeCode=2&CurLevel=" + CurLevel;
	}else if(strSection == 'Mat'){
		top.index.location.href = "/Contents/MathematicsPrintOut.asp?GradeCode=2&CurLevel=" + CurLevel;
	}
}

function goKoreanLang(CurLevel) {
	top.index.location.href = "KoreanLang.asp?CurLevel="+CurLevel;
}

function goMathematics(CurLevel) {
	top.index.location.href = "Mathematics.asp?CurLevel="+CurLevel;
}

function goCurriculum() {
	top.index.location.href = "/ParentCorner/PC_Main.asp?Cate=A&subCate=A&sort=C";
}

function goEngCurriculum() {
	top.index.location.href = "/ParentCorner/PC_Main.asp?Cate=A&subCate=D&sort=C";
}

function buyItem(ItemNo, ItemNm, Coin) {
	if ( confirm('´ÙÀ½ ¾ÆÀÌÅÛÀ» ±¸ÀÔÇÏ±â À§ÇØ ¸¶ÀÌÈ¨À¸·Î °¡½Ã°Ú½À´Ï±î? \n\n¾ÆÀÌÅÛ ÀÌ¸§ : '+ItemNm+'\nÇÊ¿äÇÑ ¶È¶ÈÁ¡¼ö : '+Coin+'Á¡') ) {
		myhome();
	}
}

function goShop() {
	//alert('Áö±Ý ¾ËÅä³¢ ²Ù¹Ì±â ¹öÆ°À» ´©¸£¼Ì¾î¿ä');
	myhome();
}

function goHome() {
	//alert('Áö±Ý Áý±¸°æ ¹öÆ°À» ´©¸£¼Ì¾î¿ä');
	myhome();
}

function setUnit() {
	location.href = "/ParentCorner/PC_Main.asp?Cate=D&subCate=E";
}

function LevelUnitControl() {
	setUnit(); //¿µ¾î ¿µ¿ª ´Ü°è, À¯´Ö Á¶Á¤ÇÏ±â..... Unit_Excess_Eng.fla
}

function goPreTest(sel) {
	if ( sel == 'KoreanLang' ) {
		GameOpenFocus('/Contents/ContentsFrame.asp?ConID=HANTEST');
	} else if ( sel == 'Mathematics' ) {
		GameOpenFocus('/Contents/ContentsFrame.asp?ConID=SUTEST');
	} else {
		alert('Àß¸øµÈ ÄÚµåÀÇ »çÀüÁø´ÜÀÔ´Ï´Ù. °ü¸®ÀÚ¿¡°Ô ¹®ÀÇÇÏ¿© ÁÖ¼¼¿ä.');
	}
	closeALRabbit();
}
function goKoreanTest(sel) {
	goContentsLevelTest(sel)
}

function goMathematicsTest(sel){
	goContentsLevelTest(sel)
}

function goContentsLevelTest(sel){  //ConID=KoreanLevelTest / MathLevelTest   , sel = 1,2,3 ..
	var strKorMathLevel = "";
	if ( GroupCode == "0100"){
		strKorMathLevel = "KoreanLevelTest"
	}else{
		strKorMathLevel = "MathLevelTest"
	}

	if ( typeof(sel) == "undefined" ) sel = CurLevel;
	if ( geniMemberLogin == "False" ) {
		alert("·Î±×ÀÎÀ» ¸ÕÀúÇØÁÖ¼¼¿ä.")
	}else if(parseInt(geniMemberUtype) == 2){
		if ( confirm('À¯·áÈ¸¿ø¸¸ »ç¿ë°¡´É ÇÕ´Ï´Ù. \nÀ¯·á»ç¿ë½ÅÃ»À» ÇÏ½Ã°Ú½À´Ï±î?') ) moneyPage();
	}else{
		if ( parseInt(MyLevel) < parseInt(CurLevel) || (parseInt(MyLevel) == parseInt(CurLevel) && parseInt(MyUnit) < parseInt(MaxLevelUnit))  ){ //|| parseInt(tmp_val) == 1
			initPop('10', MyLevel, MyUnit);		//´Ù¸¥°Å ¸¶Ä¡°í¿À±â
		}else if ((parseInt(MyLevel) == parseInt(CurLevel) && parseInt(MyUnit) == parseInt(MaxLevelUnit) && parseInt(tmp_val) == 0 ) || (parseInt(MyLevel) >= parseInt(CurLevel) && parseInt(tmp_val) == 1)){
			GameOpenFocus('/Contents/ContentsFrame.asp?ConID='+strKorMathLevel+'&CurLevel='+sel);
			closeALRabbit();
		}
	}
}

function getGeniEnglishCurriculum() {
	top.index.location.href = "/ParentCorner/PC_Main.asp?Cate=A&subCate=D&sort=C";
}

function EnglishInfo(sel){
	window.open('/HelpGuide/EnglishInfo'+sel+'.htm','EnglishInfo','width=660,height=600,left=180,top=20,scrollbars=yes,menubar=no,toolbar=no,status=no');
}

function getStudyNote(CurLevel, CurUnit) {
	//alert(CurLevel+'·¹º§ '+CurUnit+'À¯´Ö ÇÐ½À³ëÆ®º¸¿©ÁÖ¼À');
	window.open('http://www.genienglish.com/StudyHelp/GetStudyNote.asp?CurLevel='+CurLevel+'&CurUnit='+CurUnit,'StudyNote','width=520,height=540');
}

function getStudyGuide() {
	//alert('getStudyGuide');
	window.open('http://www.genienglish.com/StudyHelp/GetStudyGuide.asp','StudyGuide','width=660,height=600,left=180,top=20,scrollbars=yes,menubar=no,toolbar=no,status=no');
}

function getKoreanCounsel() {
//	alert('ÇÑ±Û ÇÐ½À»ó´ã');
	location.href = "/ParentCorner/PC_Main.asp?Cate=A&subCate=A&sort=A";
}
function getKoreanRecommend() {
//	alert('ÇÑ±Û ÃßÃµÁ¤º¸');
	location.href = "/ParentCorner/PC_Main.asp?Cate=A&subCate=A&sort=B";
}
function getMathCounsel() {
//	alert('¼ö¸® ÇÐ½À»ó´ã');
	location.href = "/ParentCorner/PC_Main.asp?Cate=A&subCate=B&sort=A";
}
function getMathRecommend() {
//	alert('¼ö¸® ÃßÃµÁ¤º¸');
	location.href = "/ParentCorner/PC_Main.asp?Cate=A&subCate=B&sort=B";
}
function goGameList(str) {
	location.href = "/FreeTakeCorner/"+str;
}
function alertLogin() {
	alert('·Î±×ÀÎÇØÁÖ¼¼¿ä.');
}
function alertFreeServ() {
	if ( confirm('À¯·áÈ¸¿ø¸¸ »ç¿ë°¡´É ÇÕ´Ï´Ù. \nÀ¯·á»ç¿ë½ÅÃ»À» ÇÏ½Ã°Ú½À´Ï±î?') ) moneyPage();
}
function getGeniEnglishHelpGuide() {
	top.index.location.href = "/Contents/GeniEnglish.asp?Mode=HelpGuide";
}
function ChangeCategory( str_idx, sel_idx, max_idx ) {
	for ( i=0; i < max_idx; i++ ) {
			if ( sel_idx == i ) {
//				alert('º¸ÀÓ'+i);
				document.getElementById(str_idx+i).style.display = '';
			} else {
//				alert('¾Èº¸ÀÓ->'+i);
				document.getElementById(str_idx+i).style.display = 'none';
			}
	}
}
/*
function initImg(opt, level) {
	return false;
}
function Update_Coin(score) {
	return false;
}
function Update_Point(score, lvl) {
	return false;
}
function Update_Pop(opt, lvl, sub) {
	return false;
}
*/
function GetKoreanAward() {
	window.open("/Contents/GetKoreanAward.asp","","fullscreen=1");
}

function PrintJSSWF(strURL, strwidth, strheight){
	document.open();
	//document.write( '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="'+ strwidth + '" height="'+ strheight + '">\r' );
	document.write( '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="/JScript/swflash.cab#version=9,0,28,0" width="'+ strwidth + '" height="'+ strheight + '">\r' );
	document.write( '<param name="movie" value="'+ strURL + '">\r' );
	document.write( '<param name="quality" value="high">\r' );
	document.write( '<param name="wmode" value="transparent">\r' );
//	document.write( '<param name="menu" value="false">\r' );
	document.write( '<param name="allowScriptAccess" value="always">\r' );
	document.write( '<param name="scale" value="exactfit">\r' );
	document.write( '<embed src="'+ strURL + '" quality="high" allowScriptAccess="always" allowFullScreen="false" scale="exactfit" devicefont="false" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+ strwidth + '" height="'+ strheight + '" wmode="transparent">\r' );
	document.write( '</embed>' );
	document.write( '</object>' );
	document.close();
}

function PrintJSSWFID(strURL, strwidth, strheight, strID){
	document.open();
	//document.write( '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="'+ strwidth + '" height="'+ strheight + '" id="'+ strID +'">\r' );
	if(isMSIE){document.write( '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="/JScript/swflash.cab#version=9,0,28,0" width="'+ strwidth + '" height="'+ strheight + '" id="'+ strID +'">\r' );
	document.write( '<param name="movie" value="'+ strURL + '">\r' );
	strURL.indexOf("13592.swf") > 0 ?  document.write( '<param name="quality" value="medium">\r' ) : document.write( '<param name="quality" value="high">\r' );
	if(strID != "GAMESWF") document.write( '<param name="wmode" value="transparent">\r' );
//	document.write( '<param name="menu" value="false">\r' );
	document.write( '<param name="allowScriptAccess" value="always">\r' );
	document.write( '<param name="scale" value="exactfit">\r' );
	document.write( '</object>' );
	}else{
	document.write( '<embed src="'+ strURL + '" quality="high" allowScriptAccess="always" allowFullScreen="false" scale="exactfit" devicefont="false" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+ strwidth + '" height="'+ strheight + '" id="'+ strID + '" wmode="transparent">\r</embed>' );
	//document.write( '<embed src="'+ strURL + '" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+ strwidth + '" height="'+ strheight + '" id="'+ strID + '"wmode="transparent">\r</embed>' );
	}
	document.close();
}


function PrintObj(id) {
	document.open();
	document.write(id.innerHTML); delete(id);
	document.close();
}

function goLogin(){
		var sel = document.login;
//		sel.target = "hidBottom";
		sel.action = "/Member/LoginVerify.asp";
		sel.submit();
}

function ParentAuthOff(){
	if( strProtocol == "http:" ){
		top.hidBottom.document.location.href = "/ParentCorner/PC_AuthOff.asp";
	}else{
		document.location.href = strHost + "/index.asp";
	}
}

function ParentPageLoad(cate, subcate) {
	location.href = "/ParentCorner/PC_main.asp?Cate="+cate+"&subcate="+subcate;
}

function setMemberModify() {
	document.location.href="/ParentCorner/PC_main.asp?Cate=E&subCate=A";
}

function getSearchResult() {
	var frm = document.search_frm;
	if ( frm.SearchKeyword.value == '' || frm.SearchKeyword.value == '°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.' ) {
		alert('°Ë»ö¾î¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä');
		frm.SearchKeyword.value = '';
		frm.SearchKeyword.focus();
		return false;
	}
	frm.action = '/Contents/SearchContents.asp';
	//return true;
	frm.submit();
}

function setSearchValue(strVal){
	document.search_frm.SearchKeyword.value = strVal;
}

var categoryChange = function(tab, sel, len) {		//tab:±¸ºÐÀÚ sel:¼±ÅÃµÈÀÎµ¦½º len:°³¼ö
	for ( i=0 ; i < len ; i++ )
		sel == i ? document.getElementById(tab + i).style.display = '' : document.getElementById(tab + i).style.display = 'none';
}

var goCurriculum = function() {
	top.index.location.href = "/ParentCorner/PC_Main.asp?Cate=A&subCate=B&sort=C";
}

var goMathPlayGround = function(val) {	//¼öÇÐ³îÀÌÅÍ
	top.index.location.href = "/Contents/MathematicsPlayGround.asp?CurLevel="+val;
}

var goMallGoodsList = function(upper, secode) {	//±³Àç´ã±â
	top.index.location.href = "/Mall/Goods/Goods.asp?UpperCatCode="+upper+"&seCode="+secode+"&SMode=view"
}

var GotoGameList = function( intVal ) {
	var strGameURL = "";
	switch ( parseInt(intVal) ){
		case 1 : strGameURL = "/Contents/KoreanLang.asp?curLevel=2&curUnit=3"; break;
		case 2 : strGameURL = "/Contents/Mathematics.asp?curLevel=2&curUnit=1"; break;
		case 3 : strGameURL = "/Contents/IntelThinking.asp?GradeCode=2"; break;
		case 4 : strGameURL = "/Contents/MathematicsPlayGround.asp?curLevel=3&curUnit="; break;
		case 5 : strGameURL = "/Contents/Mathematics.asp?curLevel=7&curUnit=1"; break;
		case 6 : strGameURL = "/Contents/StoryBook.asp?CurPage=77"; break;
		case 7 : strGameURL = "/Contents/NaturalScience.asp?gradeCode=7&CurUnit=3&page=1"; break;
		case 8 : strGameURL = "/Contents/StoryBook.asp?gradeCode=1&page=3"; break;
		case 9 : strGameURL = "/Contents/PlayCenter.asp?CurLevel=3"; break;
		case 10 : strGameURL = "/Contents/NaturalScience.asp?gradeCode=3&curUnit="; break;
		case 11 : strGameURL = "/Contents/StoryBook.asp?GradeCode=1"; break;
		case 12 : strGameURL = "/Contents/IntelThinking.asp?GradeCode=8&page=2"; break;
		case 13 : strGameURL = "/Contents/WorldTour.asp?CurLevel=3"; break;
		case 14 : strGameURL = "/Contents/MusicBox.asp?gradeCode=0&curUnit=1"; break;
		case 15 : strGameURL = "/Contents/StoryBook.asp?gradeCode=1&CurPage=2"; break;
		case 16 : strGameURL = "/Contents/Mathematics.asp?curLevel=9&curUnit=1"; break;
		case 17 : strGameURL = "/Contents/StoryBook.asp?gradeCode=1&CurPage=3"; break;
		case 18 : strGameURL = "/Contents/ThinkUpStory.asp?CurLevel=1&curUnit=1"; break;
		case 19 : strGameURL = "/Contents/StoryBook.asp?gradeCode=1&CurPage=3"; break;
		case 20 : strGameURL = "/Contents/StoryBook.asp?gradeCode=4&CurPage=3"; break;
		case 21 : strGameURL = "/Contents/NaturalScience.asp?gradeCode=11"; break;
		case 22 : strGameURL = "/Contents/WorldTour.asp?CurLevel=2&CurPage=3"; break;
		case 23 : strGameURL = "/Contents/StoryBook.asp?GradeCode=0&CurPage=11"; break;
		case 24 : strGameURL = "/Contents/ArtGallery.asp?gradeCode=0&curUnit=4"; break;
		case 25 : strGameURL = "/Contents/IntelThinking.asp?swfPageCode=&gradeCode=10&page=2"; break;
		case 26 : strGameURL = "/Contents/IntelThinking.asp?swfPageCode=&gradeCode=8&page=2"; break;
		case 27 : strGameURL = "/Contents/IntelThinking.asp?swfPageCode=&gradeCode=7&page=2"; break;
		case 28 : strGameURL = "/Contents/NaturalScience.asp?gradeCode=4&curUnit=1"; break;
		case 29 : strGameURL = "/Contents/IntelThinking.asp?swfPageCode=5&gradeCode=6&page=3 "; break;
		case 30 : strGameURL = "/Contents/StoryBook.asp?GradeCode=4&CurPage=2"; break;
		case 31 : strGameURL = "/Contents/ThinkUpStory.asp?CurLevel=1&curUnit=1"; break;
		case 32 : strGameURL = "/Contents/ThinkUpStory.asp?CurLevel=2&curUnit=3"; break;
		case 33 : strGameURL = "/Contents/ThinkUpStory.asp?CurLevel=2&curUnit=1"; break;
		case 34 : strGameURL = "/Contents/KoreanWordGame.asp?GradeCode=3"; break;
		case 35 : strGameURL = "/Contents/StoryBook.asp?gradeCode=4&curUnit="; break;
		case 36 : strGameURL = "/Contents/NaturalScience.asp?gradeCode=3&curUnit=2"; break;
		case 37 : strGameURL = "/Contents/ChineseChar.asp?curLevel=0&page=1"; break;
		case 38 : strGameURL = "/Contents/WorldTour.asp?CurLevel=3&curUnit=2"; break;
		case 39 : strGameURL = "/Contents/ThinkUpStory.asp?CurLevel=2&curUnit=3"; break;
		case 40 : strGameURL = "/Contents/MusicBox.asp?gradeCode=3&curUnit="; break;
		case 41 : strGameURL = "/Contents/ChineseChar.asp?curLevel=0&page=1"; break;
		case 42 : strGameURL = "/Contents/MusicBox.asp?GradeCode=0&swfPageCode=3"; break;
		case 43 : strGameURL = "/Contents/ThinkUpStory.asp?CurLevel=2&curUnit=1"; break;
		case 44 : strGameURL = "/Contents/PlayCenter.asp?CurLevel=4&CurUnit=3"; break;
		case 45 : strGameURL = "/Contents/ChineseChar.asp?curLevel=1&page=1"; break;
		case 46 : strGameURL = "/Contents/ChineseChar.asp?curLevel=1&page=1"; break;
		case 47 : strGameURL = "/Contents/StoryBook.asp?GradeCode=0&CurPage=5"; break;
		case 48 : strGameURL = "/Contents/KoreanLang.asp?curLevel=12&curUnit=3"; break;
		case 49 : strGameURL = "/Contents/IntelThinking.asp?swfPageCode=6&gradeCode=6"; break;
		case 50 : strGameURL = "/Contents/Mathematics.asp?curLevel=2&curUnit=2"; break;
		case 51 : strGameURL = "/Contents/PlayCenter.asp?CurLevel=5&CurUnit=2"; break;
		case 52 : strGameURL = "/Contents/StoryBook.asp?GradeCode=0&curPage=7"; break;
		case 53 : strGameURL = "/News/notice_content.asp?news_idx=448&page=1"; break;
	}
	//window.opener.location.href = strGameURL;
	//window.close();
	document.location.href = strGameURL;
}


var goMathPageLink = function(val, CurLevel){
	if ( parseInt(CurLevel) == 0  ) CurLevel = 1
	if ( CurLevel == undefined ) CurLevel = 1
	switch( parseInt(val) ){
		case 1: strMathPageLink = "Mathematics.asp?CurLevel="+CurLevel +"&GradeCode=1"; break;
		case 2: strMathPageLink = "MathematicsPrintOut.asp?CurLevel="+CurLevel+"&GradeCode=2" ; break;
		case 3: strMathPageLink = "MathematicsPlayGround.asp?CurLevel="+CurLevel+"&GradeCode=3" ; break;
		case 4: strMathPageLink = "MathematicsGuGuDanSong.asp?GradeCode=4" ; break;
		case 5: strMathPageLink = "MathematicsDiceGame.asp?GradeCode=5" ; break;
		case 6: strMathPageLink = "MathematicsElementaryschool.asp?GradeCode=6" ; break;
		case 7: strMathPageLink = "MathematicsMathKing.asp?GradeCode=7" ; break;
	}

	//top.index.location.href = "/Contents/"+strMathPageLink;
	top.index.location.href = "/Contents/Mathematics.asp?GradeCode="+ val +"&CurLevel="+ CurLevel;
}

var goKorPageLink = function(val, CurLevel){
	if ( parseInt(CurLevel) == 0  ) CurLevel = 1
	switch( parseInt(val) ){
		case 1: strMathPageLink = "KoreanLang.asp?CurLevel="+CurLevel +"&GradeCode=1"; break;
		case 2: strMathPageLink = "KoreanLangPrintOut.asp?CurLevel="+CurLevel+"&GradeCode=2" ; break;
		case 3: strMathPageLink = "KoreanWordGame.asp?GradeCode=3" ; break;
		case 4: strMathPageLink = "KoreanLangQuiz.asp?GradeCode=4" ; break;
		case 5: strMathPageLink = "TypingGame.asp?GradeCode=5" ; break;
		case 6: strMathPageLink = "KoreanLangElementaryschool.asp?GradeCode=6" ; break;
		case 7: strMathPageLink = "KoreanLetterCard.asp?GradeCode=7" ; break;
	}

	top.index.location.href = "/Contents/"+strMathPageLink;
}

var characterSound = function (opt, level, unit) {
	//alert(opt + " " + level + " " + unit );
	var objSound = document.getElementById("cSound");
	objSound.SetVariable("opt", opt);
	objSound.SetVariable("level", level);
	objSound.SetVariable("unit", unit);
	objSound.TCallLabel("/","view_init");
}

var popEvent080111 = function(Route,TNO){
	var event080111win = window.open("","event080111win","width=300,height=330");
	event080111win.document.open();
	event080111win.document.write("<form name='event080111frm' method='post' action='/Event/EventPop_080107.asp'><input type='hidden' name='divCode' value='1' /><input type='hidden' name='Route' value='"+Route+"' /><input type='hidden' name='TNO' value='"+ TNO+"' /></form>");
	event080111win.document.close();
	event080111win.document.event080111frm.submit();
}

var popEvent080111_PC = function(Route){
	var event080111win = window.open("/Popup/EventPop_080107T.asp?cmd="+ Route,"event080111win","width=300,height=330");
}

var goMall = function(){
	top.index.document.location.href = "/Mall/index.asp";
}

var createSWF = function (divID, swfID, strMovieSrc, divLeft, divTop, intWidth, intHeight, strVars){
	var oSWF;
	isMSIE ? oSWF = document.createElement( "OBJECT" ) : oSWF = document.createElement( "EMBED" );
	if ( isMSIE ) {
		oSWF.setAttribute("classid", "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000");
		oSWF.setAttribute("codebase", "/JScript/swflash.cab#version=9,0,28,0");
		oSWF.setAttribute("allowScriptAccess","always");
		//oSWF.setAttribute("quality","high");
	 	oSWF.setAttribute("scale","exactfit");
	 	oSWF.setAttribute("movie", strMovieSrc);
	 	if(strVars != undefined ) oSWF.setAttribute("flashVars", strVars);

		/*
		var oParam = document.createElement("param");
		oParam.setAttribute("name", "movie");
		oParam.setAttribute("value", strMovieSrc);

		var oParam1 = document.createElement("param");
		oParam1.setAttribute("name","quality");
		oParam1.setAttribute("value","high");

		var oParam2=document.createElement("param");
		oParam2.setAttribute("name","allowScriptAccess");
		oParam2.setAttribute("value","sameDomain");

		var oParam3=document.createElement("param");
		oParam3.setAttribute("name","scale");
		oParam3.setAttribute("value","exactfit");

		var oParam4=document.createElement("param");
		oParam4.setAttribute("name","allowScriptAccess");
		oParam4.setAttribute("value","always");
		oSWF.appendChild(oParam);
		oSWF.appendChild(oParam1);
		oSWF.appendChild(oParam2);
		oSWF.appendChild(oParam3);
		oSWF.appendChild(oParam4);
		*/
	}else{
		oSWF.setAttribute("type", "application/x-shockwave-flash");
		oSWF.setAttribute("pluginspage", "http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash");
		oSWF.setAttribute("src", strMovieSrc);
		oSWF.setAttribute("quality", "high");
		oSWF.setAttribute("align", "center");
		oSWF.setAttribute("scale", "showall");
		oSWF.setAttribute("quality", "high");
		oSWF.setAttribute("allowScriptAccess", "always");
		if(strVars != undefined ) oSWF.setAttribute("flashVars", strVars);
	}
	oSWF.setAttribute("id", swfID);
	oSWF.setAttribute("width", intWidth);
	oSWF.setAttribute("height", intHeight);
	oSWF.setAttribute("wmode", "transparent");

	createDIV(divID, divLeft, divTop, intWidth, intHeight).appendChild( oSWF );
	//return oSWF ;
}

var createDIV = function(divID, divLeft, divTop, divWidth, divHeight){
	var oDiv = document.createElement( 'DIV' ) ;
	oDiv.id 				= divID;
	oDiv.style.overflow	= 'hidden';
	oDiv.style.position	= 'absolute';
	oDiv.style.top			= divTop;
	oDiv.style.left			= divLeft;
	oDiv.style.width		= divWidth;
	oDiv.style.height		= divHeight;
	oDiv.style.visibility	= '';
	oDiv.style.zIndex 		= 300;
	//oDiv.style.border		= '1px blue solid';
	//oDiv.style.overflow = 'auto';
	oDiv.className		= "drag";

	document.body.appendChild( oDiv ) ;
	return oDiv ;
}

var removeObj = function(divObj) {
	document.body.removeChild(document.getElementById(divObj));
}

var removeObjOut = function(divObj) {
	document.body.removeChild(document.getElementById(divObj));
	top.hidBottom.document.location.href="/Member/LogOutStay.asp";
}

var FreeFeePop = function(ConID){
	var intRanCharacter =  Math.floor(Math.random()*10) % 5;
	if(typeof(ConID) == "undefined" ) ConID = "";
	createSWF("chargeAniDiv", "chargeAniSWF", "http://img.genikids.com/swf/chargeAni"+ intRanCharacter +".swf?objID=chargeAniDiv&ConID="+ConID, 200, 120, 550, 368);
}

var NoticeClose = function(divObj){
	removeObj(divObj);
	setCookie(divObj, "done", 1);
}

var TodayContentsSetting = function(){
	if( document.getElementById("divtodaycontents") != null )	removeObj("divtodaycontents");
	createSWF('divtodaycontents', 'swftodaycontents','http://img.genikids.com/Contents/swf/TodayContents.swf', 600, 390, 320, 220);
	var cToday = document.getElementById("swftodaycontents");
	cToday.SetVariable("ConArrange",ConArrange);
	cToday.SetVariable("todayConID",todayConID);
	cToday.SetVariable("ConStudyGoal",ConStudyGoal);
	cToday.SetVariable("ConStudyText",ConStudyText);
	cToday.SetVariable("ConNotice",ConNotice);
	cToday.SetVariable("objID","divtodaycontents");
}

var popSmartStar = function(){
	if(getCookie("SmartStarDiv") != "done") createSWF("SmartStarDiv", "SmartStarSWF", "http://img.genikids.com/Contents/swf/star_gift.swf?objID=SmartStarDiv", 170, 200, 320, 280);
}

var popStampHanSu = function(aa,bb,cc,dd,ee){		//ÇÑ±Û ¼öÇÐ ½ºÅÛÇÁ¹Þ±â(À¯Ãµ) -ÅÍÁø±Ö100810
	createSWF("StampHanSuDiv", "StampHanSuSWF", "http://img.genikids.com/Contents/swf/100723_stamppop.swf?objID=StampHanSuDiv&GroupCode="+GroupCode+"&intCountAllStamp="+aa+"&isReceiveStamp="+bb+"&isReceiveSmartStar="+cc+"&isDuplicateConID="+dd+"&intCountTodayStamp="+ee, 490, 200, 320, 280);
}

var initRightBar = function(){
	document.getElementById("objRightBar").counterSetting();
}

var setMyHomeContent = function(ConID){
	document.getElementById("MHswf").counterSetting();
}

//########### »ç¿ë¾ÈÇÔ ##########################################################################################
var NewYearLayer = function(intDivCode, strOption, intLuckyBag){	//ÄÜÅÙÃ÷ ½ÇÇà½Ã 7°¡Áö»ö ·£´ý º¹ÁÖ¸Ó´Ï ·¹ÀÌ¾î ¶ç¿ò (2008.01.31 ~ 2008.02.10)
	//intDivCode = 0(º¹ÁÖ¸Ó´Ï ´Ù ¸ðÀ¸Áö ¸øÇßÀ»¶§) ; intDivCode = 1(º¹ÁÖ¸Ó´Ï »ö ´Ù ¸ð¾ÒÀ»¶§) ; intLuckyBag = 0~6(¹ÞÀ» º¹ÁÖ¸Ó´Ï »ö);
	if(intDivCode == 1) intLuckyBag = "";
	createSWF("NewYear", "oNewYear", "http://img.genikids.com/Event/swf/NewYear"+ intDivCode + intLuckyBag +".swf?objID=NewYear"+ strOption, 200, 120, 600, 470);
}

var Sticker = function(intTotalCnt, intTodayCnt, isSameContents, isReceivePoint){	//ÄÜÅÙÃ÷ ½ÇÇà½Ã 1ÀÏ 10°³ ½ºÆ¼Ä¿ ¸ðÀ¸±â(2008.01.31 ~ 2008.02.10)
	if(intTotalCnt >= 51){
		if(getCookie("Sticker") != "done"){createSWF("StickerDiv", "StickerSWF", "http://img.genikids.com/Event/swf/Sticker2.swf?objID=StickerDiv", 200, 120, 600, 470);}
	}else if(isReceivePoint && intTotalCnt == 50)
		createSWF("StickerDiv", "StickerSWF", "http://img.genikids.com/Event/swf/Sticker1.swf?objID=StickerDiv&stickerCnt="+intTotalCnt, 200, 120, 600, 470);
	else if(intTodayCnt >= 11)
		createSWF("StickerDiv", "StickerSWF", "http://img.genikids.com/Event/swf/Sticker3.swf?objID=StickerDiv&stickerCnt="+intTotalCnt, 200, 120, 600, 470);
	else if(isSameContents)
		createSWF("StickerDiv", "StickerSWF", "http://img.genikids.com/Event/swf/Sticker4.swf?objID=StickerDiv&stickerCnt="+intTotalCnt, 200, 120, 600, 470);
	else if(intTotalCnt <= 50)
		createSWF("StickerDiv", "StickerSWF", "http://img.genikids.com/Event/swf/Sticker1.swf?objID=StickerDiv&stickerCnt="+intTotalCnt, 200, 120, 600, 470);
}

var PC_Stamp = function( TotalStamp, isReceivedStamp, isReceivedPoint){	//ºÎ¸ð ÄÚ³Ê ÇÐ½Àº¸°í¼­ ÄÜÅÙÃ÷ ½ÇÇà½Ã ½ºÅÆÇÁ º¸¿©ÁÖ±â
	window.open("/ParentCorner/PC_Stamp.asp?a="+ TotalStamp +"&b="+ isReceivedStamp +"&c="+ isReceivedPoint,"","width=440, height=690, left= 20,top=20");
}

var StickerClose = function(divObj){
	setCookie("Sticker","done",1);
	removeObj(divObj);
}

var ducdam = function(){	//´ö´ãÀÌº¥Æ®
	var posX = ranRange(150,800);
	var posY = ranRange(80,500);
	var RanValue = ( Math.floor(Math.random()*10) % 2 ) + 1;
	var RanCharacter = ( Math.floor(Math.random()*10) % 7 ) + 1;
	if(RanCharacter == 5) RanCharacter = 1;
	if(RanCharacter == 7) RanCharacter = 2;
	if (RanValue == 1){	// && !(RanCharacter == 5 || RanCharacter == 7 )){
	//	createSWF('Ducdam', 'swfDucdam','http://img.genikids.com/Event/swf/OlympicMedalChar.swf?objID=Ducdam',680, 270, 90, 170);
	//	createSWF('Ducdam', 'swfDucdam','http://img.genikids.com/Event/swf/OlympicMedalEvent.swf?objID=Ducdam',370, 270, 90, 170);
		createSWF('Ducdam', 'swfDucdam','http://img.genikids.com/Event/swf/ducdam'+RanCharacter+'.swf?objID=Ducdam',posX, posY, 90,170);
	//	createSWF('Ducdam', 'swfDucdam','http://img.genikids.com/Event/swf/09ChildrensDay.swf?objID=Ducdam&ducdamDetail='+RanCharacter,posX, posY, 90,170);
	}
}

var ducdamDetail = function(character){	//´ö´ã»ó¼¼º¸±â
	if( LoginID != ""){
		var RanCharacter = ( Math.floor(Math.random()*10) % 7 );
		if( document.getElementById("Ducdam") != null )	removeObj("Ducdam");
		//createSWF('DucdamDetail', 'swfDucdamDetail','http://img.genikids.com/Event/swf/09ChildrensDay'+character+'.swf?objID=DucdamDetail', 230, 120, 550, 400);
		createSWF('DucdamDetail', 'swfDucdamDetail','http://img.genikids.com/Event/swf/ducdamdetail'+character+'.swf?objID=DucdamDetail', 230, 120, 550, 400);
		//createSWF('DucdamDetail', 'swfDucdamDetail','http://img.genikids.com/Event/swf/OlympicMedalEvent'+ RanCharacter +'.swf?objID=DucdamDetail', 230, 120, 600, 470);
	}else
		alert("·Î±×ÀÎÀ» ¸ÕÀúÇØÁÖ¼¼¿ä.");
}

var MallEvent08 = function(intStep){
	if( intStep == 1 ){
		createSWF('MEventID', 'swfMEventID','http://img.genikids.com/Mall/Event/image/gift_movie02.swf?objID=MEventID', 370, 320, 400, 400);
	}else if( intStep == 2 ){
		removeObj("MEventID");
		parent.hidBottom.document.location.href="/Mall/Goods/setEventProcess.asp?cmd=999998"
		createSWF('MEventID', 'swfMEventID','http://img.genikids.com/Mall/Event/image/gift_movie03.swf?objID=MEventID', 370, 320, 400, 400);
	}
}

var showDivReplyThank = function(bbsseq){
	if(document.getElementById("lr_ReplyThank")) removeObj("lr_ReplyThank");
	//alert(document.getElementById("lr_ReplyThank"));
	createDIV("lr_ReplyThank", 400, 370, 365, 161);
	document.getElementById("lr_ReplyThank").innerHTML = ("<!--»ç¿ë¼ö±â µ¡±Û °¨»ç ·¹ÀÌ¾î-->"
		+ "<form name=\"EvtPhoneFrm\" action=\"EventPhoneSave.asp\" method=\"POST\"><input type=\"hidden\" name=\"bbsseq\" value=\""+bbsseq+"\">"
		+ "<table id=\"Table_01\" width=\"365\" height=\"161\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">"
		+ "	<tr><td colspan=\"3\"><img src=\"http://img.genikids.com/ParentCorner/image/080311_Event_Note1_01.gif\" width=\"365\" height=\"89\"></td></tr>"
		+ "	<tr><td><img src=\"http://img.genikids.com/ParentCorner/image/080311_Event_Note1_02.gif\" width=\"83\" height=\"57\"></td>"
		+ "		<td width=\"260\" height=\"57\" align=\"center\" valign=\"bottom\" bgcolor=\"7bc223\">"
		+ "		<table width=\"218\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">"
		+ "			<tr><td width=\"28\" align=\"center\"><label><input name=\"Evtmobile1\" type=\"text\" style=\"font-size: 15px; font-weight:bold; height:25px; color:#33333; border: 2 solid #ff0000\" size=\"3\" maxlength=\"3\" tabindex=1></label></td>"
		+ "	            <td width=\"7\" align=\"center\"><img src=\"http://img.genikids.com/ParentCorner/image/080311_Event_Note_06.gif\" width=\"7\" height=\"2\"></td>"
		+ "	            <td width=\"36\"><input name=\"Evtmobile2\" type=\"text\" style=\"font-size: 15px; font-weight:bold; height:25px; color:#33333; border: 2 solid #ff0000\" size=\"4\" maxlength=\"4\" tabindex=2></td>"
		+ "	            <td width=\"7\" align=\"center\"><img src=\"http://img.genikids.com/ParentCorner/image/080311_Event_Note_06.gif\" width=\"7\" height=\"2\"></td>"
		+ "	            <td width=\"37\"><input name=\"Evtmobile3\" type=\"text\" style=\"font-size: 15px; font-weight:bold; height:25px; color:#33333; border: 2 solid #ff0000\" size=\"4\" maxlength=\"4\" tabindex=3></td>"
		+ "	            <td width=\"103\" align=\"right\"><a href=\"#\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('080311_Event_Note_07','','http://img.genikids.com/ParentCorner/image/080311_Event_Note_08.gif',1)\"><img src=\"http://img.genikids.com/ParentCorner/image/080311_Event_Note_07.gif\" name=\"080311_Event_Note_07\" width=\"65\" height=\"30\" border=\"0\" onclick=\"PCSaveEventPhone();\"></a></td></tr>"
		+ "			<tr><td align=\"center\" colspan=\"4\" width=\"100\">&nbsp;</td><td colspan=\"2\" align=\"right\" width=\"115\"><input type=\"Checkbox\" name=\"chkinfo\" value=\"1\" checked><span class=\"style3\" >°³ÀÎÁ¤º¸º¯°æ</span></td></tr>"
		+ "       </table></td>"
		+ "		<td><img src=\"http://img.genikids.com/ParentCorner/image/080311_Event_Note1_04.gif\" width=\"22\" height=\"57\"></td></tr>"
		+ "	<tr><td colspan=\"3\"><img src=\"http://img.genikids.com/ParentCorner/image/080311_Event_Note1_05.gif\" width=\"365\" height=\"15\"></td></tr>"
		+ "</table></form>");
		document.getElementById("lr_ReplyThank").style.visibility='';
		document.EvtPhoneFrm.Evtmobile1.focus();
}

//chk if an object is an array or not.
var isArray = function (obj) {
//returns true is it is an array
	if(obj.constructor.toString().indexOf("function Array()") != -1)
		return true;
	else
		return false;
}

var GeniPoint1 = function(){
	window.open("/Mall/Popup/GeniPoint.htm","GeniPoint",'width=580,height=500,left=200,top=10,scrollbars=yes,menubar=no,toolbar=no,status=no');
}

function bluring(){
	if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
document.onfocusin=bluring;


var GiftBoxEvent = function(){
	var NowDay = new Date;
	var Nowyear = NowDay.getYear();
	var Nowmonth = NowDay.getMonth() + 1;
	var Nowday = NowDay.getDate();
	if ((Nowmonth+"").length < 2) { Nowmonth = "0" + Nowmonth; }
	if ((Nowday+"").length < 2) { Nowday = "0" + Nowday; }
	var ToDay = Nowyear +""+ Nowmonth  +""+  Nowday;

	var posX = ranRange(150,800);
	var posY = ranRange(80,500);
	var RanValue = Math.floor(Math.random()*6) + 1;
	if (parseInt(ToDay) < parseInt("20091227") && RanValue == "1" ){
		var RanCharacter = Math.floor(Math.random()*12) + 1;
		createSWF('XmasGiftBoxDiv', 'XmasGiftBoxSwf','http://img.genikids.com/Event/swf/XmasGiftBox'+RanCharacter+'.swf?objID=XmasGiftBoxDiv',posX, posY, 150,200);
	}else if(RanValue == "5"){
		//var RanCharacter = ( Math.floor(Math.random()*10) % 10 ) + 1;
		//createSWF('QuizKingGiftBoxDiv', 'QuizKingGiftBoxSwf','http://img.genikids.com/Event/swf/QuizKingGiftBox'+RanCharacter+'.swf?objID=QuizKingGiftBoxDiv',posX, posY, 90,150);
	}

}

var GiftBoxDetail = function(objName, character){
	//if( LoginID != ""){
		if( document.getElementById(objName+"Div") != null )	removeObj(objName+"Div");
		createSWF(objName+"DetailDiv", objName+"DetailSwf","http://img.genikids.com/Event/swf/"+objName+"Detail"+character+".swf?objID="+objName+"DetailDiv", 230, 120, 550, 400);
	//}else
	//	alert("·Î±×ÀÎÀ» ¸ÕÀúÇØÁÖ¼¼¿ä.");
}

var StickerLayer = function(eventName, intTotalCnt, intTodayCnt, isSameContents, isReceivePoint){ //½ºÆ¼Ä¿ ÀÌº¥Æ® MJs. (2008.12.08~2008.12.29)
	if (eventName == "Xmas"){
		StickerMaxCnt = 30;
		StickerMinCnt = 5;
		divWidth = 348;
		divHeight = 280;
		divPosX = 495;
		divPosY = 200;
	}else{
		if(eventName == "QuizKing"){
			StickerMaxCnt = 30;		//ÀüÃ¼ ½ºÆ¼Ä¿ °¹¼ö : Á¦ÇÑ¾øÀ½
		}else if(eventName == "KorBook"){
			StickerMaxCnt = 26;
		}
		StickerMinCnt = 9999;	//ÇÏ·ç ÃÖ¼Ò ½ºÆ¼Ä¿ °¹¼ö : Á¦ÇÑ¾øÀ½
		divWidth = 600;
		divHeight = 470;
		divPosX = 175;
		divPosY = 150;
	}
	if (eventName != "KorBook"){
		if(!(isReceivePoint) && intTotalCnt >= StickerMaxCnt){		//½ºÆ¼Ä¿ ´Ù ¸ð¾ÒÀ»¶§
			if(getCookie(eventName+"StickerDiv") != "done"){createSWF(eventName+"StickerDiv", eventName+"SWF", "http://img.genikids.com/Event/swf/"+eventName+"Sticker2.swf?objID="+eventName+"StickerDiv", divPosX, divPosY, divWidth, divHeight);}
		}else if(isReceivePoint && intTotalCnt == StickerMaxCnt){	//½ºÆ¼Ä¿ ÇÏ³ª ¹Þ°í ´Ù ¸ð¾ÒÀ»¶§
			createSWF(eventName+"StickerDiv", eventName+"SWF", "http://img.genikids.com/Event/swf/"+eventName+"Sticker1.swf?objID="+eventName+"StickerDiv&stickerCnt="+intTotalCnt, divPosX, divPosY, divWidth, divHeight);
		}else if(intTodayCnt >= StickerMinCnt && (eventName != "QuizKing" && eventName != "KorBook")){	//ÇÏ·ç ½ºÆ¼Ä¿ ÃÖ´ë 5Àå
			if(getCookie(eventName+"StickerDiv") != "done"){ createSWF(eventName+"StickerDiv", eventName+"SWF", "http://img.genikids.com/Event/swf/"+eventName+"Sticker3.swf?objID="+eventName+"StickerDiv&stickerCnt="+intTotalCnt, divPosX, divPosY, divWidth, divHeight);}
		}else if(isSameContents && (eventName == "QuizKing" || eventName == "KorBook")){					//ÀÌ¹ÌÇÑ ÄÜÅÙÃ÷
			if(getCookie(eventName+"StickerDiv") != "done"){ createSWF(eventName+"StickerDiv", eventName+"SWF", "http://img.genikids.com/Event/swf/"+eventName+"Sticker4.swf?objID="+eventName+"StickerDiv&stickerCnt="+intTotalCnt, divPosX, divPosY, divWidth, divHeight);}
		}else if(intTotalCnt <= StickerMaxCnt){	//½ºÆ¼Ä¿ ¹ÞÀ»¶§
			createSWF(eventName+"StickerDiv", eventName+"SWF", "http://img.genikids.com/Event/swf/"+eventName+"Sticker1.swf?objID="+eventName+"StickerDiv&stickerCnt="+intTotalCnt, divPosX, divPosY, divWidth, divHeight);
		}
	}else{
		if(intTotalCnt <= StickerMaxCnt){	//½ºÆ¼Ä¿ ¹ÞÀ»¶§
			createSWF(eventName+"StickerDiv", eventName+"SWF", "http://img.genikids.com/Event/swf/"+eventName+"Sticker1.swf?objID="+eventName+"StickerDiv&stickerCnt="+intTotalCnt, divPosX, divPosY, divWidth, divHeight);
		}

	}
}

var CookieLayerRemove = function(divObj){
	//alert(divObj)
	setCookie(divObj,"done",1);
	removeObj(divObj);
}

var getStickerLayer = function(eventName, stickerCnt){
	createSWF(eventName+"StickerDiv", eventName+"SWF", "http://img.genikids.com/Event/swf/"+eventName+"Sticker5.swf?objID="+eventName+"StickerDiv&stickerCnt="+stickerCnt, 300, 200, 400, 315);
}

var ranRange = function(min, max){	//MJs. 2008.12.11
	var randomNum = Math.floor(Math.random()*(max - min+1))+ min;
	return randomNum;
}

var WishSticker = function(intTotalCnt, intTodayCnt, isReceive, isQqang){	//ÄÜÅÙÃ÷ ½ÇÇà½Ã 1ÀÏ 10°³ ½ºÆ¼Ä¿ ¸ðÀ¸±â Max 32°³
	//alert(intTotalCnt+":"+intTodayCnt+":"+isReceive+":"+isQqang);
	if(isReceive){
		if(getCookie("WishStickerDiv") != "done"){createSWF("WishStickerDiv", "WishStickerSWF", "http://img.genikids.com/Event/swf/WishSticker1.swf?objID=WishStickerDiv&stickerCnt="+intTotalCnt+"&isQqang="+isQqang, 200, 120, 600, 470);}
		if( isQqang == "False" && document.getElementById("WishStickerBannerSwf")){ document.getElementById("WishStickerBannerSwf").counterSetting1();}
	}else if(intTodayCnt >= 11){
		if(getCookie("WishStickerDiv") != "done"){createSWF("WishStickerDiv", "WishStickerSWF", "http://img.genikids.com/Event/swf/WishSticker3.swf?objID=WishStickerDiv&stickerCnt="+intTotalCnt, 200, 120, 600, 470);}
	}else if(intTotalCnt >= 33){
		if(getCookie("WishStickerDiv") != "done"){createSWF("WishStickerDiv", "WishStickerSWF", "http://img.genikids.com/Event/swf/WishSticker2.swf?objID=WishStickerDiv&stickerCnt="+intTotalCnt, 200, 120, 600, 470);}
	}
}

var MSGMHAward = function(strTitle){
	alert("\""+strTitle+"\"À» ¹Þ¾Ò¾î¿ä!\n\n¸¶ÀÌÈ¨ ¾Ë¸²ÆÇ ¶Ç´Â ³» ¹æ¿¡¼­ È®ÀÎÇÏ¼¼¿ä~ \n\n\n\t\t¢Æ[ÀÌº¥Æ®]¢Æ\n\nÁö±Ý ¸¶ÀÌÈ¨ ³» ¹æ¿¡ »óÀå20°³¸¦ ¸ðÀ¸¸é »óÀå¿Õ ¿ÊÀ» µå·Á¿ä!!      ");
}

var PopMakeDinosaurMovie = function(strA){
	if ( getCookie('DinosaurPop') == 'done' && strA != undefined)
		return;

	popupwinX = "500";
	strA != undefined ? popupwinY = "650" : popupwinY = "630";
	screenCenter(Number(popupwinX),Number(popupwinY));
	window.open("/Popup/pop_umb.htm","","width="+ popupwinX +", height="+ popupwinY +", left= "+ winX +",top="+ winY);
	//if(typeof(MemberType)=="undefined" || MemberType == "2")
	//	window.open('/Popup/pop_umb.htm','','width=500,height=700,scrollbars=no');
	//else
	//	window.open('/Popup/pop_mb.htm','','width=500,height=670');
}
var Pop_mhhelp = function(){
		window.open('/Popup/pop_mhhelp.htm','','width=500,height=380,scrollbars=no');
}

var go08ChildrensDayTheme = function(){
	document.location.href="/Contents/ThemeCorner.asp?ThemeNo=14";
}

var ly_IntensiveStudy = function(KorStudyNum, MatStudyNum, ChiStudyNum, EngStudyNum, getExecStudyConID, getExecStudyGroupCode, ClickConID, EnglishLevel, getExecCharacter){	//ÁýÁßÇÐ½À¼³Á¤ ·¹ÀÌ¾î MJs.
	//if( document.getElementById("IntensiveStudyDiv") != null )	removeObj("IntensiveStudyDiv");
	createSWF("IntensiveStudyDiv", "IntensiveStudyDetailSwf","http://img.genikids.com/image/IntensiveStudy.swf?objID=IntensiveStudyDiv&KorStudyNum="+KorStudyNum+"&MatStudyNum="+MatStudyNum+"&ChiStudyNum="+ChiStudyNum+"&EngStudyNum="+EngStudyNum+"&getExecStudyConID="+getExecStudyConID+"&getExecStudyGroupCode="+getExecStudyGroupCode+"&ClickConID="+ClickConID+"&ELevel="+EnglishLevel+"&getExecCharacter="+getExecCharacter, 500, 200, 410, 305);
}

var OpenWindowByGroupCode = function(ConID, strGroupCode, CurLevel, CurUnit){
	strConType = "";
	if(strGroupCode=='0104') strConType = "GeniEnglish";
	intCurLevel = CurLevel;
	intCurUnit = CurUnit;
	//alert(strGroupCode+"|"+intCurLevel+"|"+intCurUnit);
	//alert(strConType)
	OpenWindow(ConID,'');
}

var PopLhythmDance = function(strA){
	if ( getCookie('LhythmDancePop') == 'done' && strA != undefined)
		return;

	popupwinX = "400";
	popupwinY = "660";
	screenCenter(Number(popupwinX),Number(popupwinY));
	window.open("/Popup/LhythmDance.htm","","width="+ popupwinX +", height="+ popupwinY +", left= "+ winX +",top="+ winY);
}

var goThemeCorner = function(tCate, tNo){
	if (tNo == "null" || tNo == "") tNo = 0;
	document.location.href="/Contents/ThemeCorner.asp?ThemeCate="+tCate+"&ThemeNo="+tNo;
}
var CharaterRoom = function(){
	MainPop(800,600,'/Popup/CharacterRoom.asp');
}

var showPackageInfo = function(){
	if(document.getElementById("PackageInfoDiv") == undefined ){
		createSWF("PackageInfoDiv", "PackageInfoSWF", "http://img.genikids.com/Payment/swf/pakege.swf?objID=PackageInfoDiv", 150, 80, 550, 720);
	}
}

var showBirthDayParty1 = function(){
	if(document.getElementById("BirthDayPartyDiv2") != null )	removeObj("BirthDayPartyDiv2");
	/*if(document.getElementById("BirthDayPartyDiv1") == undefined ){
		createSWF("BirthDayPartyDiv1", "BirthDayPartySWF1", "http://img.genikids.com/Payment/swf/pay_birth_pop.swf?objID=BirthDayPartyDiv1", 230, 200, 440, 350);
	}*/
	MainPop(440,350,'/Popup/EventBirthDaySong.htm');
}

var showBirthDayParty2 = function(){
	if(document.getElementById("BirthDayPartyDiv1") != null )	removeObj("BirthDayPartyDiv1");
	if(document.getElementById("BirthDayPartyDiv2") == undefined ){
		createSWF("BirthDayPartyDiv2", "BirthDayPartySWF2", "http://img.genikids.com/Payment/swf/pay_birthsp_pop.swf?objID=BirthDayPartyDiv2", 200, 200, 600, 550);
	}
}

var PicturePop = function(){
	window.open("/Popup/Popup_081229.htm","PicturePop",'width=480,height=390,left=100,top=50,scrollbars=no,menubar=no,toolbar=no,status=no');
}

var goBirthDayEvent = function(){
	top.opener.location.href = "/Payment/Payment_1_Step.asp?isClickPop=1";
	window.close();
}

var goParent_Auth = function(){
	//var target_link = ifrm.document.URL.replace('http://www.genikids.com','');
	var target_url = escape(document.URL);
	//alert(target_url);
	document.location.href= strHost + "/ParentCorner/PC_Auth.asp?target_url="+target_url;
}

var goThemeCornerSphinx = function(page){
	document.location.href="/Contents/ThemeCorner.asp?ThemeCate=5&SPage="+page;
}

var setBombSave = function(RecommendConID){	//½ÇÆÐ½ÃÀúÀå
	alert(top.hidBottom.document)
	top.hidBottom.document.location.href = "/Popup/Popup_SetBombSave.asp?RecommendConID="+RecommendConID;
}

function setCountBombTime(RecommendConID){	//½Ã°£°è»ê
	var BombTime = getCookie("CBomb");
	if (BombTime == "") BombTime = 0;
	if(parseInt(BombTime) < 600){
		countBombTime = parseInt(BombTime)+1;
		setCookie("CBomb", countBombTime , 1);
		setTimeout('setCountBombTime('+RecommendConID+')',1000);
	}else{
		getBombResultLayer(RecommendConID, 3);
		setBombSave(RecommendConID); //½ÇÆÐÀúÀå
	}
}

var goBombHint = function(groupCode, RecommendConID){	//ÄÁÅÙÃ÷Å¬¸¯½Ã ¿µ¿ªÀÌµ¿
	if(groupCode == "0100"){	//ÇÑ±Û
		top.opener.document.location.href="/Contents/KoreanLang.asp?isBombHint=1";
	}else{	//¼öÇÐ
		top.opener.document.location.href="/Contents/Mathematics.asp?isBombHint=1";
	}
	window.close();
}


var getBombLayer = function(RecommendConID){	//½Ã°£·¹ÀÌ¾î
	setTimeout('setCountBombTime('+RecommendConID+')',1000);
	var BombTime = getCookie("CBomb");
	if (BombTime == "") BombTime = 0;
	BombTime = 600 - parseInt(BombTime);
	if(BombTime != "0") createSWF("bombDiv", "bombSWF", "http://img.genikids.com/Popup/swf/bomb.swf?objID=bombDiv&BombTime="+BombTime+"&RecommendConID="+RecommendConID, 820, 470, 115, 220);
}

var getBombResultLayer = function(conid, BType){	//¼º°ø½ÇÆÐ ·¹ÀÌ¾î
	if( document.getElementById("bombDiv") != null )	removeObj("bombDiv");
	var BombTime = getCookie("CBomb");
	if (BombTime == "") BombTime = 0;
	BombTime = 600 - parseInt(BombTime);
	if(BType == "2"){	//¼º°ø
		createSWF("BombResultDiv", "BombResultSWF", "http://img.genikids.com/Popup/swf/popup_100208_2.swf?objID=BombResultDiv&BombTime="+BombTime, 300, 250, 350, 321);
	}else{
		createSWF("BombResultDiv", "BombResultSWF", "http://img.genikids.com/Popup/swf/popup_100208_3.swf?objID=BombResultDiv&BombTime="+BombTime, 300, 250, 350, 321);
		setBombSave(conid); //½ÇÆÐÀúÀå
	}
}
