<!--
function form_check(formname , input){
	array_first = new Array ;
	array_first = input.split(',');
	
	array_input = new Array ;
	array_fieldname = new Array ;
	
	for( j = 0 ; j < array_first.length ; j++ ){
	
		tmp_array = new Array ;
		tmp_array = array_first[j].split('=') ;
		
		array_input[j] = tmp_array[0] ;
		array_fieldname[j] = tmp_array[1] ;
		
	}
	
	for( k = 0 ; k < array_input.length ; k++ ){

		tmp_input = array_input[k];
		tmp_fieldname = array_fieldname[k];
    if(tmp_input != 'email'){
		
      if (formname.elements[array_input[k]].value == "" ){

      	alert(tmp_fieldname+"が入力されていません");
      	formname.elements[array_input[k]].focus();
        formname.elements[array_input[k]].style.backgroundColor = "RGB(255,233,90)";
      	return (false);
      }else{
        formname.elements[array_input[k]].style.backgroundColor = "RGB(255,255,255)";
      }
    }else{
      var theEmail  = formname.elements[array_input[k]].value;
      if(theEmail == ""){
        alert("メールアドレスを入力してください。");
        formname.email.focus();
        formname.email.style.backgroundColor = "RGB(255,233,90)";
        return (false);
      }

    	var newstr = "";
    	var at = false;
    	var dot = false;

      if (theEmail.indexOf("@") != -1){
    		at = true;
      } else if (theEmail.indexOf(".") != -1) {
    		dot = true;
      }

      for (var i = 0; i < theEmail.length; i++) {
    		ch = theEmail.substring(i, i + 1)
    		if ((ch >= "A" && ch <= "Z") || (ch >= "a" && ch <= "z")
    			|| (ch == "@") || (ch == ".") || (ch == "_")
    			|| (ch == "-") || (ch >= "0" && ch <= "9")) {
    			newstr += ch;
    			if (ch == "@") {
    				at=true;
    			}
    			if (ch == ".") {
    				dot=true;
    			}
    		}
      }
     if ((at != true) || (dot != true)) 
      {
        alert ("入力されたメールアドレスは\n不正なアドレスのようです。\n再度入力し直してください。");
        formname.email.focus();
        formname.email.style.backgroundColor = "RGB(255,233,90)";
        return (false);
      }

    }
	}

	
	return(true);
	
}

function double_check( target )
{

  var theEmail  = target.email.value;
  var theEmail2 = target.comment5.value;

 

 if (theEmail == "")
  {
    alert("メールアドレスを入力してください。");
    target.email.focus();
    target.email.style.backgroundColor = "RGB(248,242,143)";
	target.comment5.style.backgroundColor = "RGB(255,255,255)";
    return (false);
  }

	var newstr = "";
	var at = false;
	var dot = false;


 if (theEmail.indexOf("@") != -1)
  {
		at = true;
  } 
 else if (theEmail.indexOf(".") != -1) 
  {
		dot = true;
  }

 for (var i = 0; i < theEmail.length; i++) 
  {
		ch = theEmail.substring(i, i + 1)
		if ((ch >= "A" && ch <= "Z") || (ch >= "a" && ch <= "z")
			|| (ch == "@") || (ch == ".") || (ch == "_")
			|| (ch == "-") || (ch >= "0" && ch <= "9")) {
			newstr += ch;
			if (ch == "@") {
				at=true;
			}
			if (ch == ".") {
				dot=true;
			}
		}
  }
 if ((at != true) || (dot != true)) 
  {
    alert ("入力されたメールアドレスは\n不正なアドレスのようです。\n再度入力し直してください。");
    target.email.focus();
    target.email.style.backgroundColor = "RGB(248,242,143)";
	target.comment5.style.backgroundColor = "RGB(255,255,255)";
    return (false);
  }

 if (theEmail2 == "")
  {
    alert("メールアドレス（確認用）を入力してください。");
    target.comment5.focus();
    target.comment5.style.backgroundColor = "RGB(248,242,143)";
	target.email.style.backgroundColor = "RGB(255,255,255)";
    return (false);
  }

  if (theEmail2 != theEmail)
  {
    alert("二つのメールアドレスが一致しません。確認の上正しいメールアドレスを入力してください。");
    target.comment5.focus();
    target.comment5.style.backgroundColor = "RGB(248,242,143)";
    target.email.style.backgroundColor = "RGB(248,242,143)";
    return (false);
  }
  else
  {
    return (true);
  }

}
//-->