function memcheck(ad){
			jQuery.ajax({
				type: "POST",
				url: "http://www.happyrich.jp/api/member.aspx",
				dataType : "json",
				data: {"type": "auth","key": jQuery.cookie('hrahyas')},
				success: function(mem){
					if (mem){
						jQuery('.nickname').text(mem.nickname);
						jQuery('.membox').show();
					}else if(ad != 0){						
						location.href=ad; 
					}else{
						jQuery('.genbox').show();
				}
				},
				error : function(XHR, status, errorThrown){
				}
			});
			}
			

function relogin(){
				jQuery.cookie('hrahyas', null,{ path: '/'});
				jQuery.cookie('HappyrichSESSID', null,{ path: '/'});
				window.location.href="https://www.hyaa.jp/happyrich_ssl/ssl_relogin.html"
			}
			
function logout(){
				jQuery.cookie('hrahyas', null,{ path: '/'});
				jQuery.cookie('HappyrichSESSID', null,{ path: '/'});
				window.location.href="https://www.hyaa.jp/happyrich_ssl/ssl_logout.html";
			}