<!--


	/*
	 * Globals
	 *
	 */
	 
	 var gbLeaving = true;	// Global flag to see if user clicked on an internal site link
	 var gbExitPopupFlag = true; // Global flag	to turn on/off exit popup
	 var gstrExitUrl = 'pop_exit.jsp.htm';

	/*
	 * Purpose: Throw popup on site exit. Check global var to see if user came from the current domain. This will 
	 *	prevent a popup if the user clicks refresh, back, or forward button. Check global flag 'gbExitPopupFlag' 
	 *	to check if feature is even turned on.
	 */
	function exitPop(url) {
		if (gbLeaving && gbExitPopupFlag) {
			var win = window.open(url,'pop_exit.jsp.htm','toolbar=yes,width=550,height=500,directories=no,status=yes,scrollbars=1,resizable=yes,menubar=no,location=yes,left=50,top=50');
		}
	}


	/*
	 * Purpose: Set flag to false to prevent popup exit if user clicks on internal link
	 */
	function setLeavingFlagToFalse() { gbLeaving = false; }


	/*
	 * Purpose: Set gbLeaving flag to false on form submit event
	 */
	function initForm() {

		window.document.form.onsubmit = setLeavingFlagToFalse;
	}



	/*
	 * Purpose: Open footer urls in separate window
	 */
	function openNewUrlWindow(url, scroll, width, height) {	// scroll needs to be a 1 or 0
		bName = navigator.appName;
		bVer = parseInt(navigator.appVersion);
		if((bName == "Netscape" && bVer >= 3) || (bName == "Microsoft Internet Explorer" && bVer >= 4))
			br = "n3";
		else
			br = "n2";
		
		if(br == "n3") {
			prop = 'toolbar=no,width=' + width + ',height=' + height + ',left=430,top=200,directories=0,status=0,scrollbars=1' + scroll + ',resizable=yes,menubar=0,location=0,alwaysRaised=1,copyhistory=0';
			newWindow=window.open(url, 'lilone', prop);
		}
	}
	

	

	/*
	 * Purpose: Open license URL
	 */
	function openNewUrlWindowLicense(URLtoOpen) {
		bName = navigator.appName;
		bVer = parseInt(navigator.appVersion);
		if((bName == "Netscape" && bVer >= 3) || (bName == "Microsoft Internet Explorer" && bVer >= 4))
			br = "n3";
		else
			br = "n2";
		
		if(br == "n3") {
			newWindow=window.open(URLtoOpen, 'lilone','toolbar=no,width=520,height=550,left=430,top=200,directories=0,status=0,scrollbars=1,resizable=yes,menubar=0,location=0,copyhistory=0');
		}
	}

	
	function focusForm() {
  document.form.FN.focus();
}
function autofocus(field, limit, next, evt) {
  evt = (evt) ? evt : event;
  var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode :
                 ((evt.which) ? evt.which : 0));
  if (field.value.length == limit) {
    field.form.elements[next].focus();
  }
}

//-->
