function dload (tf) {
	ck=document.cookie.indexOf("user_id");
//	alert(ck);
	pn=location.pathname;
	if (ck>=0) {
		location.href="/auth/dl.php?tf="+tf+"&pn="+pn;
	} else {
    	void(window.open("/auth/auth.html?tf="+tf+"&pn="+pn, "", "top=150,left=200,width=440,height=270"));
	}
}

function dload_direct() {
    location.href='dl.php';
}

function login_pop (tf) {
	ck=document.cookie.indexOf("user_id");
//	alert(ck);
	pn=location.pathname;
	if (ck>=0) {
		location.href=tf;
	} else {
    	void(window.open("/auth/auth2.html?tf="+tf+"&pn="+pn, "", "top=150,left=200,width=440,height=270"));
	}
}