/* 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='#b4bbc0';
  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 goSubmitnyu() {
  if (agree==0) {
    alert("Sorry.  You have to agree to adhere to the standards of use before you can download the logo.");
  } else if (agree==1 && document.enableform.box.value=='') {
      alert("You must enter your name to show your agreement!");
      document.enableform.box.focus();
  } else {
    var location=("http://steinhardt.nyu.edu/identity/nyu_logo_download");
    this.location.href = location;
  }
}

function goSubmitsteinhardt() {
  if (agree==0) {
    alert("Sorry.  You have to agree to adhere to the standards of use before you can download the logo.");
  } else if (agree==1 && document.enableform.box.value=='') {
      alert("You must enter your name to show your agreement!");
      document.enableform.box.focus();
  } else {
    var location=("http://steinhardt.nyu.edu/identity/steinhardt_logo_download");
    this.location.href = location;
  }
}

