	//- Console_AddRemove -//
	function Console_AddRemove(oFromSet, oToSet, bIsAll) {
		//+ unselect
		for (var hOption = 0; hOption < oToSet.length; hOption++) {
			oToSet.options[hOption].selected = false;
		}
		//+ move
		for (hOption = oFromSet.length; hOption != 0; hOption--) {
			if ((bIsAll == true) || (oFromSet.options[hOption - 1].selected == true)) {
				oToSet.options[oToSet.length] = new Option(oFromSet.options[hOption - 1].text, oFromSet.options[hOption - 1].value, false, true);
				oFromSet.options[hOption - 1] = null;
			}
		}
	}
	//- Console_Pack -//
	function Console_Pack(oSet, oField) {
		var cPack = '';
		for (var hOption = 0; hOption < oSet.length; hOption++) {
			cPack += ',' + oSet.options[hOption].value;
		}
		oField.value = cPack.substring(1);
	}

	//- DecodeZip -//
	function DecodeZip(xZip) {
		var cZip = xZip.replace(/\?/g, '');
		return cZip;
	}

	//- DecodeFon -//
	function DecodeFon(xFon) {
		var cFon = '';
		if (xFon.length >= 10) {
			cFon = xFon.substr(0, 3) + '-' + xFon.substr(3, 3) + '-' + xFon.substr(6, 4)
			if ((xFon.length == 15) && (xFon.substr(10, 5) != '?????')) {
				cFon += ' x' + xFon.substr(10, 5).replace(/\?/g, '');
			}
		}	
		return cFon;
	}

	//- ToggleImage -//
	function SetImage(oImage, cImage) {
		oImage.src = cImage;
	}

	function CheckEnter(oForm, cAction, e){
		var nCharacterCode;
		if (e && e.which) {
			e = e;
			nCharacterCode = e.which;
		} else {
			e = event;
			nCharacterCode = e.keyCode;
		}	 
		if(nCharacterCode == 13){
			oForm.Action.value = cAction;
			oForm.submit();
			return false;
		}
		return true;
	}

	function ExternalSiteLink(cUrl) {
	   var cMsg = "You are now leaving internetmortgage.com\'s web site. Internet Mortgage is a \nDivision of Bank of Blue Valley.  We do not endorse or guarantee the products, \ninformation or recommendations provided by linked sites and we are not liable for \nany failure of products or services advertised on those sites.  In addition, we \nrecommend that you review the privacy policy and security of linked sites as they \nmay be different than those followed by our institution.";
	   if (confirm(cMsg) == true) {
	      window.open("/Link.asp?Url=" + escape(cUrl));
	   }
	}
	
	function ToggleView(cBlock) {
	   var oElement = document.getElementById(cBlock);
	   var oDiv = document.getElementById(cBlock + 'Div');
	   var oDiv2 = document.getElementById(cBlock + 'Div2');
	   if (oElement.style.display == 'none') {
	      oElement.style.display = 'block';
	      oDiv2.style.display = 'block';
	      oDiv.style.display = 'none';
	   } else {
	      oElement.style.display = 'none';
	      oDiv.style.display = 'block';
	      oDiv2.style.display = 'none';
	   }
	}
	
	function CheckEnter(oForm, cAction, e){
		var nCharacterCode;
		if (e && e.which) {
			e = e;
			nCharacterCode = e.which;
		} else {
			e = event;
			nCharacterCode = e.keyCode;
		}	 
		if(nCharacterCode == 13){
			oForm.Action.value = cAction;
			oForm.submit();
			return false;
		}
		return true;
	}
	
//- ToggleCriteriaView -//
function ToggleCriteriaView(cBlock, cFieldName, cCriteria) { 
	var oElement = document.getElementById(cBlock);
	var oField = document.getElementById(cFieldName);
	var cValue = ((oField.type == 'checkbox') ? oField.checked.toString() : oField.value);
	var bIsTrue = false; 
	if (cCriteria.indexOf('|') >= 0) {
		var cArray = cCriteria.split('|'); 
		for (i = 0; i < cArray.length; i++) { 
			if ((cArray[i].length > 0) && (cArray[i].indexOf('!') >= 0)) { 
				if (cValue != cArray[i].substr(1, cArray[i].length)) { 
					bIsTrue = true; 
					break; 
				} 
			} else if (cValue == cArray[i]) { 
				bIsTrue = true; 
				break;
			} 
		} 
	} else if (cCriteria.indexOf('&') >= 0) { 
		var cArray = cCriteria.split('&'); 
		for (i = 0; i < cArray.length; i++) { 
		if ((cArray[i].length > 0) && (cArray[i].indexOf('!') >= 0)) { 
			if (cValue != cArray[i].substr(1, cArray[i].length)) { 
				bIsTrue = true; 
			} else { 
				bIsTrue = false; 
				break; 
			} 
		} else if (cValue != cArray[i]) { 
			bIsTrue = true; 
		} else { 
			bIsTrue = false; 
			break; 
		} 
		} 
	} else { 
		if (cCriteria.indexOf('!') >= 0) { 
			if (cValue != cCriteria.substr(1, cCriteria.length)) { 
				bIsTrue = true; 
			} else { 
				bIsTrue = false; 
			} 
		} else if (cValue == cCriteria) { 
			bIsTrue = true; 
		} else { 
			bIsTrue = false; 
		} 
	} 
	if (bIsTrue == true) { 
		oElement.style.display = 'block'; 
	} else { 
		oElement.style.display = 'none'; 
	} 
}