/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Lee Underwood | http://javascript.internet.com/ */
var agree=0;  // 0 = 'no', 1 = 'yes'

function agree2() {
  if (!document.getElementById) return false;
  agree=1;
  document.getElementById('box').style.background='#fff000';
  if (agree) {
    document.getElementById('enterName').style.visibility = 'visible';
  }
  document.enableform.box.focus();
}

function disagree() {
  if (!document.getElementById) return false;
  agree=0;
  if (!agree) {
    document.getElementById('enterName').style.visibility = 'hidden';
  }
  document.enableform.done.focus();
}

function goSubmit() {
  if (agree==0) {
    alert("DISAGREE: Please continue looking at the rest of the website");
  } else if (agree==1 && document.enableform.box.value=='') {
      alert("You must enter your name!");
      document.enableform.box.focus();
  } else {
    alert("AGREE: Please complete the rest of the Form");
  }
}