<!--

function addopt(nValue, sText){
  // this routine adds a new item to our listbox
  document.projectReport.contacts.options[document.projectReport.contacts.options.length] = new Option(sText, nValue);
}

function clearcombo(el){
  // this routine clears out a listbox or combo box
  for (var i = el.options.length; i >= 0; i--){
    el.options[i] = null;
  }
  el.selectedIndex = -1;
}

function searchContacts() {
	var x = document.getElementById("contacts");
	clearcombo(x);
	var y = document.getElementById("searchcontacts");
	searchwords = y.value;
	if (searchwords == 'NONE' || searchwords == ''){
		// if they send an empty string
		addopt('', 'Enter a word to search');
	} else {
		// a non-empty string
		window.open("../contacts/getContacts.php?keywords=" +
			 searchwords, "gofetch",
			"toolbar=no,menubar=no,location=no,directories=no," +
			"resizeable=no,width=100,height=100,left=0,top=0");
		window.focus();
  }
}

function selectImplOrg(){
	document.projectReport.implOrganisation.checked = true;
}
function selectAIGF(){
	document.projectReport.aigfManager.checked = true;
}
function selectStatus(){
	document.projectReport.byStatus.checked = true;
}
function selectLocation(){
	document.projectReport.byLocation.checked = true;
}
//-->
