//function submitToTY(field) {
//	var doc = eval('document.' + field);
//	var type;
//	var url;
//	var email = 'null';
//	var name = 'user';
//	if(doc.kind[0].checked==true) {
//		type = 'error';
//	} else if(doc.kind[1].checked==true) {
//		type = 'suggestion';
//	} else {
//		type = 'other';
//	}
//	//check values
//	if(doc.email.value!='') {
//		email = doc.email.value;
//	}
//	if(doc.name.value!='') {
//		name = doc.name.value;
//	}
//	//construct URL
//	url = 'http://www.chasespaceonline.com/thankyou.htm?type=' + escape(type) + '&name=' + escape(name) + '&email=' + escape(email);
//	doc.next.value = url;
//}

//number of warnings issued to the user about link code
var warn=0;
	function checkFields(field) {
	var doc = eval('document.' + field);
	var term = false;

	if(doc.type[0].checked==false && doc.type[1].checked==false && doc.type[2].checked==false && doc.type[3].checked==false) {
		alert('Please tell me what kind of feedback this is');
		term = true;
	}
	if(doc.comment.value=='' && term==false) {
		alert('I need a comment before I can do anything!');
		term = true;
	}
	if(doc.name.value=='' && term==false) {
		if(confirm('I do not know who you are.\nContinue?')) {
			term = false;
		} else {
			term = true;
		}
	}
	if(doc.email.value=='' && term==false) {
		if(confirm('I need an email in order to reply to you.\nContinue Anyway?')) {
			term = false;
		} else {
			term = true;
		}
	}
	//insert code to terminate if invalid contents are entered.
	var commentLC = doc.comment.value.toLowerCase();
	if(commentLC.indexOf("[url=") != -1 || commentLC.indexOf("[link=") != -1 || commentLC.indexOf("<a href=") != -1) {
		if(warn==0) {
			term=true;
			alert("Warning: Links are not permitted in my feedback forms. Please remove any and all links and outside URL's, before" +
				  " trying to submit again.");
		} else if (warn==1) {
			term=true;
			alert("WARNING: Links are not permitted in my feedback forms. Do not try to submit again until they are all removed." +
				  " If you do, your IP address will be subject to banning, and the comment will be lost.");
		} else {
			//I gave them enough chances, let the ASP script take it from here.
			var inp2 = document.createElement('input');
			inp2.name = "BAD";
			inp2.value = "true";
			inp2.type = "hidden";
			doc.appendChild(inp2);
			//wipe out the comment, and dont let them try again!
			doc.comment.disabled = true;
			doc.comment.value = "";
			//term remains true, this form is submitting!
		}
		warn++;
	}
	if(term==false) {
//		submitToTY(field);
		//silly, but probably effective hacker deterrent; this script must execute for proper submission.
		var inp1 = document.createElement('input');
		inp1.name = "recip";
		inp1.value = "support@chasespaceonline.com";
		inp1.type = "hidden";
		doc.appendChild(inp1);
		doc.submit();
	} else {
		return false;
	}
}
//function getTYData() {
//	var l = 0;
//	var m = 0;
//	var stopPts = new Array();
//	var data = unescape(window.location);
//	var found = false;
//	var startPt;
//	var mids = new Array();
//	for (var k=0; k<=data.length; k++) {
//		if (data.charAt(k) == "?" ) {
//			found = true;
//			startPt = k;
//		}
//	}
//	if(found) {
//		var dataStr = data.substring(startPt,data.length);
//		for(var K=0; K<=dataStr.length; K++) {
//			if (dataStr.charAt(K) == "&") {
//				stopPts[l] = K
//				l++;
//			} else if(dataStr.charAt(K) == "=") {
//				mids[m] = K;
//				mids[m]++;
//				m++;
//			}
//		}
//		stopPt = dataStr.length;
//		var tstrt = dataStr.indexOf('type=');
//		var typeDat;
//		var type = dataStr.substring(mids[0],stopPts[0]);
//		if(type=='error') { typeDat='error report submission' } else if(type=='suggestion') { typeDat='suggestion' } else { typeDat='submission' }
//		var nstrt = dataStr.indexOf('name=');
//		var name = dataStr.substring(mids[1],stopPts[1]);
//		var estrt = dataStr.indexOf('email=');
//		var email = dataStr.substring(mids[2],dataStr.length);
//		var emess = (email!='null') ? 'Your email address has been recorded as \"' + email + 
//			'\" to help reply to your submission.' : 'I cannot reply' +
//			' to your submission because no email address was entered.';
//		document.getElementById('dat').innerHTML = 'for your ' + typeDat + ', ' + name + '<br><br>' +
//			emess + '<br><br><fo' +
//			'nt color="red">Abuse is taken seriously. Any abuse may result in removal of' +
//			' the feedback forms.</font>';
//	} else {
//		document.getElementById('dat').innerHTML = '<br>We\'re sorry, but there was an error when creating this web page. This ' +
//		'is usually caused by accessing this page directly from your URL bar. Try using a submission form to load this page next time!';
//	}
//}
