var pageURL = window.location.toString();
var lengthURL = pageURL.length;

if (pageURL.lastIndexOf("/enter", lengthURL)+1 >0) {
	pageURL = pageURL.replace("/enter", "");
	//alert(pageURL);
	document.location = pageURL;
}

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_check() {
	if(window.event.keyCode==13){ 
		login_send();
	return ; 
	} 
}*/

function getCookie2(uName,uName2)		//ÄíÅ°¿­ Áß¿¡ uName2ÀÇ °ªÀ» ±¸ÇÑ´Ù 
{
	var string = getCookie(uName);
	
	var flag = string.indexOf(uName2+'=');
	if (flag != -1) 
	{ 
		flag += uName2.length + 1
		end = string.indexOf('&', flag) 

		if (end == -1) end = string.length
		return unescape(string.substring(flag, end))
	}
	else
	{
		return ""
	}
}

function getCookieArray(varname1,varname2) {
		varname ="["+varname1+"]["+varname2+"]"
		varname += "=";
		startpos = document.cookie.indexOf(varname);
		if (startpos >= 0) {
			startpos += varname.length;
			endpos = document.cookie.indexOf(";", startpos);
			if (endpos == -1) endpos = document.cookie.length;
			return unescape(document.cookie.substring(startpos, endpos));
		}
}

function gopage1 () {
	
	document.location.href = document.all.iorder1.value + ".html";
}


function gopage2 () {
	document.location.href = document.all.iorder2.value + ".html";
}
/*
if ((getCookie('Joins_LoginStatus') != 'True') || (document.domain!="ilgan.joins.com")){	
	document.location.href = "http://login.joins.com/login_ilgan.asp?TargetUrl="+window.location.href;
}
*/
function saveBlog() {
	if ((getCookie('Joins_LoginStatus') != 'True')){					

	}else{
		var f = document.frmcartoon;
		var userID = getCookie2('MemArray','MemID')
		f.user_id.value = userID;
		window.open("about:blank","Blog","top=200,left=350,width=200,height=200");
		f.action = "http://ispgm.joins.com/asp/blog/sendblog.asp ";
		f.target = "Blog";
		f.method = "post";
		f.submit();
	}
}

/*
if ((getCookie('Joins_LoginStatus') != 'True')  || (getCookie('Joins_ValidLogin') != 'True') ){	
	document.location.href = "http://login.joins.com/login_ilgan.asp?TargetUrl="+window.location.href;
}
*/

//document.href = "http://ilgan.joins.com";

function gomycmtlist() {
	var codeform = parent.document.forms.codes;
	document.location.href="http://isplussvc.joins.com/comment/mylist.asp?aid="+codeform.aid.value+"&contcode="+codeform.contcode.value+"&ctype="+codeform.atype.value;	
}

