Event.observe(window, "load", function(){
	ac();
	Event.observe("sct", "change", function(){
		if($F('sct')=="st1"){
			$("naviright3").innerHTML = '<form method="get" action="http://www.mumumu.org/~cinnamon/music/artist_search.php"><input type="text" id="search" name="s" autocomplete="off" /><input type="image" src="http://www.mumumu.org/~cinnamon/img/btn.gif" alt="検索" name="searchBtn2" id="search2" /><div id="suggest"></div></form>';
			ac();
		}else if($F('sct')=="st2"){
			$("naviright3").innerHTML = '<form method="get" action="http://www.mumumu.org/~cinnamon/music/song_search.php"><input type="text" id="search" name="s" autocomplete="off" /><input type="image" src="http://www.mumumu.org/~cinnamon/img/btn.gif" alt="検索" name="searchBtn2" id="search2" /></form>';
		}else if($F('sct')=="st3"){
			$("naviright3").innerHTML = '<form method="get" action="http://www.mumumu.org/~cinnamon/blog/"><input type="text" id="search" name="s" autocomplete="off" /><input type="image" src="http://www.mumumu.org/~cinnamon/img/btn.gif" alt="検索" name="searchBtn2" id="search2" /></form>';
		}
	},false);
},false);

function ac(){
	new Ajax.Autocompleter("search", "suggest", "http://www.mumumu.org/~cinnamon/music/complete.php", {
		paramName:"p",
		minChars:1
	});
}

function showHide(entryID, entryLink, htmlObj, type) {if (type == "comments") {extTextDivID = ('comText' + (entryID));extLinkDivID = ('comLink' + (entryID));} else {extTextDivID = ('extText' + (entryID));extLinkDivID = ('extLink' + (entryID));}if( document.getElementById ) {if( document.getElementById(extTextDivID).style.display ) {if( entryLink != 0 ) {document.getElementById(extTextDivID).style.display = "block";document.getElementById(extLinkDivID).style.display = "none";htmlObj.blur();} else {document.getElementById(extTextDivID).style.display = "none";document.getElementById(extLinkDivID).style.display = "block";}} else {location.href = entryLink;return true;}} else {location.href = entryLink;return true;}}

function check(){
var str="";
if(document.myform.author.value == "")str+="名前";
if(str.length>0){
window.alert(str+"を入力してください。");
return false;
}
return ture;
}
