function chk_cookie(name){
	var result=null;
	var mycookie=""+document.cookie+";";
	var searchname=""+name+"=";
	var startofcookie=mycookie.indexOf(searchname);
	var endofcookie;

	if(startofcookie!=-1){
		startofcookie+=searchname.length;
		endofcookie=mycookie.indexOf(";",startofcookie);
		result=unescape(mycookie.substring(startofcookie,endofcookie));
	}
	return result;
}
var r=new Date();
if(chk_cookie('scotturmanandmary')=='fallinginlove'){
	document.write('<a href=/member/logout.phtml><img border=0 src=/images/logout.gif></a>')
}
else{
	document.write('<script language=\"JavaScript\" src=\"/chk_login.phtml?r='+r.getTime()+'\"></script>');
}

