// ログイン
function login()
{
	var f = document.lForm;
	if (f.mailaddr.value == "") {
		alert("メールアドレスが入力されていません。");
		return false;
	}
	if (f.passwd.value == "") {
		alert("パスワードが入力されていません。");
		return false;
	}
	f.act.value = "login";
	f.action = "index.php";
	f.submit();	
}
// 並び替え
function changeSort(obj)
{
	var n = obj.selectedIndex;
	location.href = obj.options[n].value;
}	
// ワード検索
function searchBlog()
{
	var f = document.leftForm;
	f.act.value = "wordsearch";
	f.action = "search.php";
	f.submit();
	return true;
}
// // タグ検索
// function tagSearchBlog(tag)
// {
// 	
// // 	var f = document.leftForm;
// // 	f.act.value = "tagsearch";
// // 	f.tag.value = tag;
// // 	f.action = "search.php";
// // 	f.submit();
// 	return true;
// }
// アーカイブ
function archlist(mdate, userKey)
{
	var f = document.leftForm;
	f.mdate.value = mdate;
	f.u.value = userKey;
	f.action = "archive.php";
	f.submit();	
 	return true;
}
// 手書き再生
function wopen_b(id)
{
	var ourl = "http://tegaki.rw.to/blog/m.php?id=" + id;
	var cwin = window.open(ourl, "tegakiview" , "width=740,height=730,scrollbars=yes");
	cwin.focus();
	return false;
}
// エンターキー禁止
function onEnter(e)
{
	if (!e) var e = window.event;
	//enter		
	if (e.keyCode == 13) {
		return false;
	}
}
// へルプ
function popupAbout()
{
	window.open("../html/blog_about.html", "_blank", "width=780,height=700,scrollbars=yes");
	return false;

}
// 作者ページ
function pouupAuthor(uk)
{
	var cwin = window.open("about:blank", "tegakiview", "width=740,height=730,scrollbars=yes");
	var f = document.leftForm;
	f.target = "tegakiview";
	f.uk.value = uk;
	f.action = "../same_author.php";
	f.method = "POST";
	f.submit();
	cwin.focus();
	return false;		
}
// 手書き作品見る
function wopen(ofile) {
	var ourl = "http://tegaki.rw.to/m.php?f=" + ofile;
	var cwin = window.open(ourl, "tegakiview" , "width=740,height=730,scrollbars=yes");
	cwin.focus();
	return false;
}
