var Color= new Array();
Color[1] = "ff";
Color[2] = "f8";
Color[3] = "ee";
Color[4] = "e8";
Color[5] = "dd";
Color[6] = "d7";
Color[7] = "cc";
Color[8] = "c7";
Color[9] = "bb";
Color[10] = "b6";
Color[11] = "aa";
Color[12] = "a6";
Color[13] = "99";

function waittofade() {
	if (document.getElementById('fade')) {
    setTimeout("fadeIn(13)", 1);
 }
}

function fadeIn(where) {
    if (where >= 1) {
        document.getElementById('fade').style.backgroundColor = "#ffff" + Color[where];
		  if (where > 1) {
			  where -= 1;
			  setTimeout("fadeIn("+where+")", 200);
			} else {
			  where -= 1;
			  setTimeout("fadeIn("+where+")", 200);
			  document.getElementById('fade').style.backgroundColor = "transparent";
			}

    }
}

function checkValues(myvalue) {
	f = document.forms[0];
	if (f.name.value == '') {
		alert("Name must be filled in.");
		waittofade();
		return false;
	}
	if (f.company.value == '') {
		alert("Company must be filled in.");
		waittofade();
		return false;
	}
	if (f.email.value == '') {
		alert("Email must be filled in.");
		waittofade();
		return false;
	}
	if (f.phone.value == '') {
		alert("Phone number must be filled in.");
		waittofade();
		return false;
	}
	if (f.project.value == '') {
		alert("Project must be filled in.");
		waittofade();
		return false;
	}
	if (f.emailto.selected.value == 0) {
		alert("You must choose someone to receive notification.");
		waittofade();
		return false;
	}
	for (var c = 0; c < myvalue; c++) {
		var desc = "description[" + c + "]";
		if (f[desc].value == '') {
			alert("The description for file #" + (c+1) + " must be filled in");
			waittofade();
			return false;
		}
	}
	return true;
}

function checkIt(what, formnum) {
	if (what.checked) {
		if (confirm("Are you sure you want to DELETE this file?")) {
			document.forms["FORM" + formnum].submit();
		}
	} else {
	}
}

						


