function getCookie(strName)
{
	var strArg = new String(strName + "=");	
	var nArgLen, nCookieLen, nEnd;
	var i = 0, j;
	
	nArgLen    = strArg.length;
	nCookieLen = document.cookie.length;
	
	if(nCookieLen > 0) {
		while(i < nCookieLen) {
			j = i + nArgLen;
			if(document.cookie.substring(i, j) == strArg) {
				nEnd = document.cookie.indexOf (";", j);
				if(nEnd == -1) nEnd = document.cookie.length;
				return unescape(document.cookie.substring(j, nEnd));
			}
			i = document.cookie.indexOf(" ", i) + 1;
			if (i == 0) break;
		}
	}
	
	return null;
}
function setCookie(strName, strValue, dateExpires, strPath, strDomain, isSecure)
{
   
	var strCookie;
	
	if(strName == "") return ;
		   
	strCookie = strName + "=" + escape(strValue) + 
		    ((dateExpires) ? "; expires=" + dateExpires.toGMTString() : "")  + 
	      	    ((strPath)     ? "; path="    + strPath : "") + 
	      	    ((strDomain)   ? "; domain="  + strDomain : "") + 
		    ((isSecure)    ? "; secure" : "");
	
	document.cookie = strCookie; 

}

function getValue(element) {
	var value = getCookie(element.name);

	if (value != null)
	{
		element.value = value;
		alert(getCookie(element.name));
	}
}

function authCheck() {
    var yeozawa_id = getCookie("id");
    if ( yeozawa_id == null )
    {
        
        parent.top.location.href="http://user.chosun.com/F10/certification.html";
    }
}
