//サイト内検索ボックスでのアラート時テキスト
var strAlertTxt = "検索キーワードを入力してください。";

//サイト内検索ボックスのデフォルトテキスト
var strDefTxt = "サイト内検索";
/**********************************************************
* 関数名　： searchForm_onSubmit
* 引数　　： id, デフォルトテキスト
* 戻り値　： true/false
* 処理概要： 検索フォームのSubmit時に呼ばれる関数
* 更新履歴： 2011.08.15 新規作成
***********************************************************/
function searchForm_onSubmit(strID, strDefTxt) {
	var el = document.getElementById(strID);
	if (el.value == "" || el.value == strDefTxt) {
		alert(strAlertTxt);
		return false;
	}
	return true;
}

/**********************************************************
* 関数名　： resetSearchBox
* 引数　　： id, デフォルトテキスト
* 戻り値　： なし
* 処理概要： 検索テキストボックスをリセットする
* 更新履歴： 2011.08.15 新規作成
***********************************************************/
function resetSearchBox(strID, strDefTxt) {
	var el = document.getElementById(strID);
	el.value = strDefTxt;
	el.style.color = 'gray';
	el.blur();
}

/**********************************************************
* 関数名　： input_clearTxt
* 引数　　： id, デフォルトテキスト
* 戻り値　： なし
* 処理概要： 検索ボックスのテキスト内容をクリアする
* 更新履歴： 2011.08.15 新規作成
***********************************************************/
	function input_clearTxt(strID, strDefTxt)
{
	if ( document.getElementById(strID).value == strDefTxt )
	{
		document.getElementById(strID).style.color = "#000000";
		document.getElementById(strID).value       = "";
	}
}

/**********************************************************
* 関数名　： input_putTxt
* 引数　　： id, デフォルトテキスト
* 戻り値　： なし
* 処理概要： 検索ボックスのテキスト内容をデフォルト値にリセットする
* 更新履歴： 2011.08.15 新規作成
***********************************************************/
	function input_putTxt(strID, strDefTxt)
{
	if ( document.getElementById(strID).value.length == 0 )
	{
		document.getElementById(strID).style.color = "#808080";
		document.getElementById(strID).value       = strDefTxt;
	}
}

