/*
*フォーム未入力または、スペース（半角、全角）のみかの判別用JS。
*Coded by VISUAL ELEMENTS
*Coded at 2010.03.18
*http://www.visualelements.jp/
*Copyright (C)  VISUAL ELEMENTS All Rights Reserved.
*/

function checkSpaceOnly(formElement, mode) {
var str = document.getElementById('search_box').value;
//1.文字数チェック
if ( str.length == 0) {
return false;
//alert("0文字です");
search_box.focus();
search_box.select();
return false;
}
//2.空白チェック
for (var i = 0; i < str.length; i++) {
    if (str.charCodeAt(i) != 32 && str.charCodeAt(i) != 12288) {
      if (str.charCodeAt(i) == -127 && str.charCodeAt(i+1) == 64) {
        i++;
      } else {
        if (str.charCodeAt(i) == 13) {
          if (str.charCodeAt(i+1) == 10) {
            i++;
          }
        } else {
 //alert("入力されています");
 return true;
        }
      }
    }
 }
return false;
//alert("空白です");
search_box.focus();
search_box.select();
return false;
}
