	function buyKoi(key) {
		var href = 'buyKoi.php?id=' + key;
		
		with(document.inputForm) {
			action = href;
			submit();	
		}
	}
	
	function changePage(newPage) {
		with(document.inputForm) {
			action = "koiForSale.php?page=" + newPage;
			submit();
		}
	}
	
	function setCompare(key) {
		var chkBox = document.getElementById('chk' + key);
		var i = 0;
		var n = 0;
		var strList;
		var s;
		
		with(document.inputForm) {
			if(chkBox.checked) {
				//Add this key to the compList
				if(compList.value.length < 1) {
					compList.value = key;
				} else {
					//compList isn't empty. does it have at least 2 entries?
					compList.value += '|' + key;
				}
			} else {
				//get a list of the items in compList
				strList = compList.value.split('|');
				compList.value = '';
				for(i = 0; i < strList.length; i++) {
					n = parseInt(strList[i]);
					if(n != key) {
						if(compList.value.length < 1) {
							compList.value = n;
						} else {
							compList.value += '|' + n;
						}
					}
				}
			}
		}
	}

	function showAll() {
		with(document.inputForm) {
			compList.value = '';
			submit();
		}
	}
		
	function showChecked() {
		with(document.inputForm) {
			submitIt.value = 'showChecked';
			submit();
		}
	}


