_GET = {};

function readURL() {
  var tLoc = "", tPairs = "";
  var tGet = [];
  var foundGet = -1;
  tLoc = window.location + "";
  foundGet = tLoc.indexOf('?');
  if (foundGet > -1) {
  	_GET[badData] = true;
    tLoc = tLoc.substring(foundGet + 1, tLoc.length);
    tPairs = tLoc.split('&');
    for (var i = 0; i < tPairs.length; i++) {
      tGet = tPairs[i].split('=');
      if(tGet[1]) {_GET[tGet[0]] = decodeURIComponent(tGet[1].replace(/\+/g,' '));}
    }
  }
  else {
  	_GET['badData'] = true;
  }
}
function badData(field) {
	if (_GET[field] || _GET['badData']) {return false;} else {return true;}
}

counter = 0;
function monitor() {
	counter++;
	if(counter > 1) {return false;}
	return true;
}

function getText(field, text) {
	if (badData(field)) {
		document.write("<span class=\"errorText\">" + text + "</span>");
	} else {
		document.write(text);
	}
}
readURL();