mtAttachEvent('load', mtUpdateScores);
mtAttachEvent('usersignin', mtUpdateScores);


			/* <![CDATA[ */
			function mtUpdateSignInWidget(u) {
				var separator = '&nbsp;&nbsp;|&nbsp;&nbsp;';
				var el = document.getElementById('signin-widget-content');
				var content = '';
				if (!el) return;
				if (u) {
					if (u && u.is_authenticated) {
						user = u;
						mtSaveUser();
					} else {
						// user really isn't logged in; so let's do this!
						return mtSignIn();
					}
				} else {
					u = mtGetUser();
				}
				if (u && u.name) {
					var url;
					if (u.is_authenticated) {
						if (u.is_author) {
							url = 'http://www.gizmodo.jp/mt/mt-cp.cgi?__mode=view&blog_id=1';
							url += '&static=' + encodeURIComponent( location.href );
						} else {
							url = u.url;
						}
					} else if (u.url) {
						url = u.url;
					} else {
						url = null;
					}
					if (url)
						content += '<a href="' + url + '" class="user_name"><span class="ic_userinfo spr"></span>' + u.name + '</a>';
					else
						content += '' + u.name + '';
					if (u.is_author)
						content += '<span class="user_edit"><a href="http://www.gizmodo.jp/mt/mt-cp.cgi?__mode=edit&blog_id=1&return_to=' + encodeURIComponent(document.URL) + '">編集</a>';
						content += separator + '<a href="javascript:void(0)" onclick="return mtSignOutOnClick()">サインアウト</a></span>';
					
				} else if (u && u.is_banned) {
					content = 'このブログにサインインする権限がありません。';
				} else {
					content = '<a href="javascript:void(0)" onclick="return mtSignInOnClick(\'signin-widget-content\')" class="ic_signin spr" title="サインイン"></a>';
					
					
					content += separator + '<a href="http://www.gizmodo.jp/mt/mt-cp.cgi?__mode=register&blog_id=1&return_to=' + encodeURIComponent(document.URL) + '" class="ic_signup spr" title="サインアップ（登録）"></a>';
					
					
				}
				el.innerHTML = content;
			}
			mtAttachEvent('usersignin', mtUpdateSignInWidget);
			mtUpdateSignInWidget();
			/* ]]> */

