function GoMyStudyRoom(pProductCd)
{
	switch (pProductCd){
		case 'M': 
			top.location.href = 'http://math.edupia.com/';
			break;
		case 'E':
			top.location.href = 'http://english.edupia.com/';
			break;
		case 'K':
			top.location.href = 'http://korean.edupia.com/';
			break;
		case 'J':
			top.location.href = 'http://web95.edupia.com/';
			break;
		case 'S':
			top.location.href = 'http://science.edupia.com/';
			break;
		case 'A':
			top.location.href = 'http://stt.edupia.com/';
			break;
		case 'H':
			top.location.href = 'http://hanja.edupia.com/';
			break;
		case 'L':
			top.location.href = 'http://littlekorea.edupia.com/';
			break;
		case 'Q':
			top.location.href = 'http://thinkmath.edupia.com/';
			break;
		case 'V':
			top.location.href = 'http://mmath.edupia.com/';
			break;
		case 'D':
			top.location.href = 'http://funmath.edupia.com/';
			break;
		case 'G':
			top.location.href = 'http://science.edupia.com/';
			break
		case 'NJ':
			top.location.href = 'http://japanese.edupia.com/';
			break
		case 'NS':
			top.location.href = 'http://social.edupia.com/';
			break
		case 'GO':
			top.location.href = 'http://prov.edupia.com/mypage/modify/regmember.aspx';
			break
		case 'PA':
			top.location.href = 'http://phone.edupia.com/';
			break;
		case 'PB':
			top.location.href = 'http://phone.edupia.com/';
			break;
		case 'PS':
			top.location.href = 'http://storyphone.edupia.com/';
			break;
		case 'PW':
			top.location.href = 'http://storyphone.edupia.com/';
			break;
		case 'PD':
			top.location.href = 'http://storyphone.edupia.com/';
			break;
		default:
			break;
	}
}

function ChangeClass(obj){
	value = obj.value;
	if (value == "")
	{
		return;
	}
	valueArr = value.split(",");
	//alert(valueArr[0]+"/"+valueArr[1]+"/"+valueArr[2]);
	location.href = "http://jado.edupia.com/ebiz/user/common/jadoChangeClass.asp?changeClassid="+valueArr[0]+"&changeSchool="+valueArr[1]+"&changeGrade="+valueArr[2];
}

function GoRefSite(url) 
{
	if(url.indexOf("teach") > 0)
	{
		window.location.href = url;
	}
	else
	{
		if(url != "")		window.open(url,'','');
		else				return false;
	}
}

function goMessagew()
{  		
    w=open('http://club.edupia.com/community/asp/main/message/wmessage.aspx','message','width=520,height=520,scrollbars=yes'); 
	w.focus()
}

function goMessager()
{
	w=open('http://club.edupia.com/community/asp/main/message/rmessage.aspx','message','width=520,height=520,scrollbars=yes'); 
	w.focus()
}

function goMessage()
{
	w=open('http://club.edupia.com/community/asp/main/message/rmessage.aspx','message','width=520,height=520,scrollbars=yes'); 
	w.focus()
}

function goJadoMessage()
{
	w=open('http://club.edupia.com/community/asp/main/message/rmessage.aspx','message','width=520,height=520,scrollbars=yes'); 
	w.focus()
}




function goMyclub() 
{
	var idx
	idx = schcode.selectedIndex;
	if( idx != 0 && idx != 1) 
	{	
		window.location.href = "http://club.edupia.com/" + schcode.value;		
	}
}

function goMemProfile(uid) 
{  		
    w=open('http://www.edupia.com/memInfo/memBasisInfo.aspx?uid=' + uid ,'meminfo','width=477,height=393, top=100, left=100,scrollbars=no'); 
	w.focus()
}

//ÀÌ¹ÌÁö Å¬¸¯½Ã Å×Åõ¸® ¾Èº¸ÀÌ°Ô..
function allblur() {
  for (i = 0; i < document.links.length; i++)
	document.links[i].onfocus = document.links[i].blur;
}
function window.onload(){
	allblur();
}

function CheckMemCookie()
{
	var cookieName = "dkID";
	var memid = GetCookie(cookieName);
	if (memid != "" && memid != null)
	{
		Logon.userid.value = memid;
		Logon.chkMemID.checked = true;
	}
}

function SetCookieInfo()
{
	var cookieName = "dkID";
	if (Logon.chkMemID.checked)
	{
		var id = Logon.userid.value;
		var targetDate = new Date();
		targetDate.setYear(targetDate.getYear() + 1);
		
		document.cookie = cookieName + "=" + id + "; expires=" + targetDate.toUTCString() + "; path=/; domain=.edupia.com";
	}
	else
	{
		DelCookie(cookieName);
	}
	return true;
}

function GetCookie(sName) 
{
	var aCookie = document.cookie.split("; ");
	for (var i=0; i < aCookie.length; i++)
	{
		var aCrumb = aCookie[i].split("=");
		if (sName == aCrumb[0]) 
			return unescape(aCrumb[1]);
	}
	return null;
}

function DelCookie(sName)
{
	document.cookie = sName + "=; expires=Sun, 01-Jan-1995 01:00:00 GMT; path=/; domain=.edupia.com";
}

//·Î±×ÀÎÀü Ã¼Å©¹Ú½º Ã¼Å©ÇÏ±â
function LoginCheck(sType) {
	if (Logon.userid.value == "") {
		alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!");
		Logon.userid.focus();
		return;
	}
	if (Logon.passwd.value == "") {
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!");
		Logon.passwd.focus();
		return;
	}
	
	if(sType == "B" || sType == null)
	{
		//¾ÆÀÌµð ÀúÀå
		SetCookieInfo();
	}

	//º¸¾ÈÁ¢¼Ó Ã¼Å©
	if(Logon.securityChk.checked)
	{
		Logon.action = "https://sso.edupia.com/sso/logon.aspx";
	}
	//else¸é ±×´ë·Î submit
	
	Logon.submit();
}


function enter( e ) {
	if(e.type == "keypress") var whichCode = e.keyCode;
	if ( whichCode == 13 ) {
		LoginCheck('B');
	}
}

function enterA( e ) {
	if(e.type == "keypress") var whichCode = e.keyCode;
	if ( whichCode == 13 ) {
		LoginCheck('A');
	}
}

var num=0;
function LoginOption(img){

	if(num == 0){
		img.src='img/icon_check_on.gif';
		num=1;
	}
	
	else if(num == 1){
		img.src='img/icon_check.gif';
		num=0;
	}
}

//ÆË¾÷¶ç¿ì±â
function openWin(url,width,height){

	window.open(url,'','width='+width+',height='+height+',scrollbars=no,resized=no');

}

//ÆË¾÷¶ç¿ì±â02
function openWin02(url,width,height){

	window.open(url,'','width='+width+',height='+height+',scrollbars=yes,resized=no');

}
//¿ÞÂÊ ¸Þ´º ·¹ÀÌ¾î(¼­ºêÆîÄ§)
var wName = '';
var sName = '';
var oldTd = '';
function sMenu(url,what,tdname,bgImg,fColor){
	if( wName != what ) {

		if( wName !='' ) {
			wName.style.display = "none";
			oldTd.style.fontWeight='';
			oldTd.style.color='';
			oldTd.background='/images/include/common/'+bgImg+'1.gif';
		}
		
		if( tdname.style.fontWeight != '' ){
			oldTd.background='/images/include/common/'+bgImg+'1.gif';
			oldTd.style.fontWeight='';
			oldTd.style.color='';
		}

		what.style.display = '';
		if( url != '' )
			location.href=url;
		tdname.background='/images/include/common/'+bgImg+'2.gif';
		tdname.style.fontWeight='bold';
		tdname.style.color=fColor;
		wName = what;
		oldTd = tdname;
		sName = tdname;

	} else {
		what.style.display = "none";
		tdname.background='/images/include/common/'+bgImg+'1.gif';
		tdname.style.fontWeight='';
		tdname.style.color='';
		wName = '';
		sName = '';
	}
}

function sTD(tdName){
	tdName.style.fontWeight='bold';
}


//¿ÞÂÊ ¸Þ´º ·¹ÀÌ¾î onMouseOut(¼­ºêÆîÄ§)
function sOut(what,tdname,bgImg,fColor){
	if(what.style.display==''){
		tdname.background='/images/include/common/'+bgImg+'2.gif';
		tdname.style.fontWeight='bold';
		tdname.style.color=fColor;
	}
	if(what.style.display=='none'){
		tdname.background='/images/include/common/'+bgImg+'1.gif';
		tdname.style.fontWeight='';
		tdname.style.color='';
	}
}

//¿ÞÂÊ ¸Þ´º ·¹ÀÌ¾î onMouseOver(¼­ºêÆîÄ§)
function sOver(what,tdname,bgImg,fColor){
	if(what.style.display==''){
		tdname.background='/images/include/common/'+bgImg+'2.gif';
		tdname.style.fontWeight='bold';
		tdname.style.color=fColor;
	}
	if(what.style.display=='none'){
		tdname.background='/images/include/common/'+bgImg+'2.gif';
		tdname.style.color=fColor;
	}
}

//¿ÞÂÊ ¸Þ´º ·¹ÀÌ¾î(¼­ºê¾øÀ½)
function nsMenu(url,tdname,bgImg,fColor){
	if( sName != tdname ){
		if( tdname.style.fontWeight != '' ){
			oldTd.background='/images/include/common/'+bgImg+'1.gif';
			oldTd.style.fontWeight='';
			oldTd.style.color='';
		}
		if( wName !='' ) {
			oldTd.background='/images/include/common/'+bgImg+'1.gif';
			oldTd.style.fontWeight='';
			oldTd.style.color='';
		}
		if( url != '' )
			location.href=url;
		tdname.background='/images/include/common/'+bgImg+'2.gif';
		tdname.style.fontWeight='bold';
		tdname.style.color=fColor;
		sName = tdname;
		oldTd = tdname;
		if (wName){
			wName.style.display='none';
		}
	}
	else{
		tdname.background='/images/include/common/'+bgImg+'1.gif';
		tdname.style.fontWeight='';
		tdname.style.color='';
		sName = '';
		wName = '';
	}
}

//¿ÞÂÊ ¸Þ´º ·¹ÀÌ¾î onMouseOut(¼­ºê¾øÀ½)
function nsOut(tdname,bgImg,fColor){
	if(sName == tdname){
		tdname.background='/images/include/common/'+bgImg+'2.gif';
		tdname.style.fontWeight='bold';
		tdname.style.color=fColor;
	}
	else{
		tdname.background='/images/include/common/'+bgImg+'1.gif';
		tdname.style.fontWeight='';
		tdname.style.color='';
	}
}

//¿ÞÂÊ ¸Þ´º ·¹ÀÌ¾î onMouseOver(¼­ºê¾øÀ½)
function nsOver(tdname,bgImg,fColor){
		tdname.background='/images/include/common/'+bgImg+'2.gif';
		tdname.style.cursor='hand';
		tdname.style.color=fColor;
}

// rollover
var changedImg;
function EImgChg(flag) 
{
	source=event.srcElement;
	if (source.name == "") 
	{ return false;  }

	if(changedImg == source.name)
	return;

	else if (document.images && source.tagName=="IMG") {
		imgElement = source.name;  // ÀÌ¹ÌÁö name
		imgPath = source.src;   // ÀÌ¹ÌÁö src ¼Ó¼º°ª

		imgPathLen = imgPath.length;
		imgPathFlag = imgPath.lastIndexOf("/");
		imgName = imgPath.substring(0,imgPathFlag+1);

		document.images[imgElement].src =  imgName + imgElement + "_" + flag + ".gif";  
		
	}
}

//select box onChange

function goselect(form) {
	var myindex=form.go.selectedIndex
	window.location=(form.go.options[myindex].value);
}


// layer
function LayerSH(LayerName,Status) 
{
	LayerN = document.all[LayerName].style;
	if (Status == 'show') LayerN.display = '';
	if (Status == 'hide') LayerN.display = 'none';
}

//µ¿¿µ»ó Play
var g_Browser = navigator.appName;

function PlayClick()
{
  document.WMPlay.Play();
}

//µ¿¿µ»ó stop
function StopClick()
{
  document.WMPlay.Stop();
  if (g_Browser == "Netscape")
  {
    document.WMPlay.SetCurrentPosition(0);
  }
  else
  {
    document.WMPlay.CurrentPosition = 0;
  }
}

//µ¿¿µ»ó pause
function PauseClick()
{
  document.WMPlay.Pause();
}

// À½¾Çµè±â ÄÁÆ®·Ñ
function init(){
	var img = new Image();
	img.src = "/images/eyeWhat/eyeProduct/eyeHangul/btn_off.gif";
	var form = document.onoff.button;
	form.src = img.src;
	document.onoff.status.value = '1';
}
	
function musicOff() {
	document.midi.stop();
}

function musicOn() {
	document.midi.play();
}

function changeButton() {
	
	if (document.onoff.status.value == '1') {
		document.onoff.status.value = '0'
		var img = new Image();
		img.src = '/images/eyeWhat/eyeProduct/eyeHangul/btn_on.gif';
		document.onoff.button.src= img.src;
		musicOff();
	}
	else {
		document.onoff.status.value = '1'
		var img = new Image();
		img.src = '/images/eyeWhat/eyeProduct/eyeHangul/btn_off.gif';
		document.onoff.button.src ='/images/eyeWhat/eyeProduct/eyeHangul/btn_off.gif';
		musicOn();
	}
}


function goFriendAdd(id)
{
	w=open('http://club.edupia.com/community/asp/main/friend/fadd.aspx?keyfield=id&key='+ id,'myfriend','width=500,height=400,scrollbars=no'); 
	w.focus();
}


function goFriendList()
{
	w=open('http://club.edupia.com/community/asp/main/friend/friend.aspx?flag=i','myfriend','width=500,height=400,scrollbars=no'); 
	w.focus();
}


function goSsongalUrl(strSsongCD)
{
	self.close();
	self.opener.location = 'http://club.edupia.com/' + strSsongCD;
	
}

function goBlogUrl(strUserId)
{
	self.close();
	self.opener.location = 'http://blog.edupia.com/' + strUserId;
	
}

function goMyclubNew() 
	{
		var idx
		
		idx = schcode.selectedIndex;
		
		if( idx == 1)
		{
			if(schcode.value !="")
			{
				window.location.href = "http://blog.edupia.com/" + schcode.value;		
			}
			else
			{
				window.location.href = "http://blog.edupia.com/happyblog/openstep1.aspx";
			}
		}
		if( idx != 0 && idx != 1 && idx !=2) 
		{	
			window.location.href = "http://club.edupia.com/" + schcode.value;		
		}	
	}
//2006.05.22 ±èÃ¶È£ Ãß°¡ IE¹Ý¿µ°Ç
function __ws__(id){
document.write(id.text);id.id='';
}