    //Copyright(C) 1999 DeNA Co,,Ltd. All rights reserved.

    function isIE() {
        if (navigator.appName.toLowerCase().indexOf('microsoft') > -1) {
           return true;
        }
        return false;
    }

    function getValueFromCookie(key) {
        var cookies = document.cookie;
        var cValue = '';
        var index   = cookies.indexOf(key);
        if (index > -1) {
            if (cookies.indexOf(';',index) > 0) {
                cValue =  cookies.substring(
                              cookies.indexOf('=',index) + 1, cookies.indexOf(';',index));
            } else {
                cValue =  cookies.substring(
                              cookies.indexOf('=',index) + 1, cookies.length);
            }
        }
        return cValue;
    }
    
    function toEscape(encodeStr) {
        var retStr = '';
        for (var i=0; i<encodeStr.length; i++) {
            var c = encodeStr.charAt(i);
            if (c == '+') {
                retStr += '%20';
            } else {
                retStr += c;
            }
        }
        return retStr;        
    }
        
    function getNickName() {
        var encodeStr = getValueFromCookie('A_NICKNAME');
        if (getValueFromCookie('A_USERSTATUS').length > 0) {
            if (isIE()) {
                return unescape(encodeStr.substring(
                           encodeStr.indexOf('%u'), encodeStr.length));
            } else {
                return unescape(toEscape(encodeStr.substring(0,encodeStr.indexOf('%u')))); 
            }
        } else {
            return '';
        }
        /*if (isLogin()) {
            var ncnmStr = getValueFromCookie('ncnm');
            if (ncnmStr.length > 0) {
                return ncnmStr;
            } else {
                return '';
            }
        } else {
            return '';
        }*/
	//return document.cookie;

    }

    function isLogin() {
        if (getValueFromCookie('A_USERSTATUS').length > 0) {
            return true;
        } else {
            return false;
        }
        /*if (getValueFromCookie('TKT').length > 16) {
            return true;
        } else {
            return false;
        }*/
    }

    function showNickName() {
        var name = getNickName();
	if (name.length > 0) {
            document.write("ようこそ " + name + " さん！<BR>");
	} else {
	    document.write("ようこそ ゲスト さん！<BR>");
	}
	return;
    }

    function showLoginIcon() {
	if (isLogin()) {
            document.write("<a href=/dap/sv/Logout?><font size=2 color=white><b>ログアウト</b></font></a>");
	} else {
	    document.write("<a href=/dap/sv/Login?><font size=2 color=white><b>ログイン</b></font></a>");
	}
	return; 
    }

function jump_aURL(f)
{
        param = f.options[f.selectedIndex].value;
        if (param != "") {
                location = "%prop.http.server.path_EXC%" + param;
        }
}
function jump_rURL(f)
{
        param = f.options[f.selectedIndex].value;
        if (param != "") {
                location = param;
        }
}


function checkAll(checkBox)
{
	checkBox.checked=true;
	for (var i = 0 ; i < checkBox.length ; i++) {
		checkBox[i].checked=true;
	}
}

function refresh(){
     var AF = getValueFromCookie('BIDDERS_AF');

     if (AF.length > 0 && AF == "LVD" && parent.up != null){
       if(isIE()){
         parent.up.location.href = "http://www.livedoor.com/auction/up.html";
       }else{
         parent.up.location.reload();
       }
     }

     if (AF.length > 0 && AF == "a0054" && parent.tlac_top != null){
       if(isIE()){
         parent.tlac_top.location.href = "http://www.townlink.ne.jp/acfm_s.html";
       }else{
         parent.tlac_top.location.reload();
       }
     }
}


