// データ修復
function setValue() {
  if (document.myForm.cnt.value) count = document.myForm.cnt.value;
  if (document.myForm.fvisit.value) first = document.myForm.fvisit.value;
  if (count < 1) {
    count=1;
    alert("回数入力が０以下です。回数を１にセットしました。")
  }
  if (count > 999) {
    count=999;
    alert("回数入力が１０００を超えてます。最大９９９です。回数を９９９にセットしました。")
  }
  if (isNaN(count)) {
    count=1;
    alert("回数入力が全角文字か、数字ではありません。回数を１にセットしました。")
  }
  if (first.length != 10) {
    first=today;
    alert("日付入力が10桁ではありません。今日の日付"+today+"にセットしました。")  }
  if (first.indexOf("/",0) != 4) {
    first=today;
    alert("日付入力の年と月の間に/がありません。今日の日付"+today+"にセットしました。")
  }
  if (first.lastIndexOf("/",9) != 7) {
    first=today;
    alert("日付入力の月と日の間に/がありません。今日の日付"+today+"にセットしました。")
  }
  if (first < "1999/04/29") {
    first="1999/04/29";
    alert("日付入力がクッキー導入以前です。1999/04/29にセットしました。")
  }
  if (first > today) {
    first=today;
    alert("日付入力が今日の日付を超えています。今日の日付"+today+"にセットしました。")
  }
	result = confirm("訪問回数"+count+","+"初回訪問日"+first);
	if (result) {
		set_data="count:"+count+",first:"+first+",last:"+today+",lastp:"+lastp;
		setCookieData(set_data);
	}
}
// データ修復終わり
