<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

var puzzle_layers = new Array( "Layer1","Layer2","Layer3","Layer4");
var puzzle_objs = new Array( puzzle_layers.length );

function puzzle_getObjs()
{
    var nObjMax = puzzle_layers.length;
    
    for( nCount = 0; nCount < nObjMax; nCount++ )
    {
        puzzle_objs[nCount] = document.getElementById( puzzle_layers[nCount] );
    }
}

function MenuChange6( layerID )
{
    // layer °´Ã¼µéÀ» ¾ò¾î¿È!
    puzzle_objs[0] != null ? "" : puzzle_getObjs();


    if( layerID == puzzle_objs[0].id )
    {
        puzzle_objs[0].style.display = "";
        puzzle_objs[1].style.display = "none";
        puzzle_objs[2].style.display = "";
        puzzle_objs[3].style.display = "none";
    }
    else if( layerID == puzzle_objs[2].id )
    {
        puzzle_objs[0].style.display = "none";
        puzzle_objs[1].style.display = "";
        puzzle_objs[2].style.display = "none";
        puzzle_objs[3].style.display = "";
    } 
}

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 login_stat() {
	var loginstatus;
	loginstatus = getCookie('Joins_LoginStatus');
	var str;
	
    if (loginstatus == "True") {
		str = "<a href=http://login.joins.com/Logout.asp><font color=white>·Î±×¾Æ¿ô</font></a>";
	} else {
		str = "<a href=http://login.joins.com/login_ilgan.asp><font color=white>·Î±×ÀÎ</font></a>";
    }
	document.write (str);
}

function ViewAnswer( idx, media, dt, size )
{
	window.open( 'Answer.asp?idx=' + idx + '&Media=' + media + '&Date=' + dt + '&Size=' + size, 'Answer', 'toolbar=no ,location=no ,directories=no ,status=no ,menubar=no ,scrollbars=no ,resizable=no ,width=400 ,height=384');
}	

function puzzlecomplete(userid,puzzledate,correct,total,starttime,binkan,incorrectQuestion) {	
	if(binkan == "Y" || incorrectQuestion != "no") {
		var url = "html/pop02.html";
		window.open(url,'Puzzle','toolbar=no ,location=no ,directories=no ,status=no ,menubar=no ,scrollbars=no ,resizable=no ,width=300 ,height=250');
	} else {
		puzzle.opener = self;
		var url = "html/pop01.html";
		window.open(url,'Puzzle','toolbar=no ,location=no ,directories=no ,status=no ,menubar=no ,scrollbars=no ,resizable=no ,width=300 ,height=250');
	}
}

function show(part) {
	if (part=="row") {
		document.getElementById("rowimg").src="http://enportsimg.joins.com/enple/puzzle_h_key_on.gif";
		document.getElementById("colimg").src="http://enportsimg.joins.com/enple/puzzle_v_key.gif";
		document.getElementById("rowkey").style.display="";
		document.getElementById("colkey").style.display="none";
	}
	if (part=="col") {
		document.getElementById("rowimg").src="http://enportsimg.joins.com/enple/puzzle_h_key.gif";
		document.getElementById("colimg").src="http://enportsimg.joins.com/enple/puzzle_v_key_on.gif";
		document.getElementById("rowkey").style.display="none";
		document.getElementById("colkey").style.display="";
	}
}

function puzzlecomplete (userid, puzzledate, correct, total, starttime, binkan, incorrectQuestion) {		
	//return false;
	if (binkan == "Y") {
		//ºóÄ­ÀÏ °æ¿ì ºóÄ­ ÆË¾÷Ã¢
		var url = "http://isplusapp.joins.com/puzzle/wrong.asp?kind=1&wrong="+incorrectQuestion;
		window.open(url,'Puzzle','toolbar=no ,location=no ,directories=no ,status=no ,menubar=no ,scrollbars=no ,resizable=yes ,width=300 ,height=250');
	} else if (incorrectQuestion != "no") {
		//ºóÄ­Àº ¾ø´Âµ¥ Æ²¸° ¹®Á¦°¡ ÀÖÀ» °æ¿ì ÆË¾÷Ã¢		
		alert(incorrectQuestion);
		return false;
		var url = "http://isplusapp.joins.com/puzzle/wrong.asp?kind=2&wrong="+incorrectQuestion;
		window.open(url,'Puzzle','toolbar=no ,location=no ,directories=no ,status=no ,menubar=no ,scrollbars=no ,resizable=yes ,width=300 ,height=250');
	} else {
		//ÀüºÎ ´Ù ¸Â¾ÒÀ» °æ¿ì Á¤»óÀûÀ¸·Î ÁøÇà
		//location.href = "PuzzleFinish.asp?puzzledate="+puzzledate+"&correct="+correct+"&total="+total+"&starttime="+starttime;
		var url = "http://isplusapp.joins.com/puzzle/html/pop01.html?puzzledate="+puzzledate+"&correct="+correct+"&total="+total+"&starttime="+starttime ;
		window.open(url,'Puzzle','toolbar=no ,location=no ,directories=no ,status=no ,menubar=no ,scrollbars=no ,resizable=yes ,width=300 ,height=250');
	}
}
//-->