var send_file = 'checksheet-s.php';
var form_id = '#sheet';
var action_word = '送信';
var color = '#F3D9D9';

function form_check() {
  count = 0;
  check_checked('#request1 #request2 #request3');
  check_checked('#work1 #work2 #work3 #work4 #work5 +#work0');
	check_tel('#tel1 #tel2 #tel3');
	check_mail('#mail2');
	check_empty('#name2');
  if (count>0) {
		if ($(form_id).attr('action')==send_file) {
			$('#submit').prev('em').remove();
			$('#submit').replaceWith('<input name="submit" type="submit" id="submit" tabindex="999" value="内容確認" />');
			$(form_id).attr('action','#');
		}
    return false;
	} else {
		if ($(form_id).attr('action')!=send_file) {
			$('#submit').before('<em>この内容で' + action_word + 'します。</em> ');
			$('#submit').replaceWith('<input name="submit" type="submit" id="submit" tabindex="999" value="' + action_word + '" />');
			$(form_id).attr('action',send_file);
			return false;
		}
	}
}


