
	// This routine auto-tabs between text fields (telephone nums)
	// i.e.
	// Phone Number : <br>
	// (<input onKeyUp="return autoTab(this, 3, event);" size="4" maxlength="3">) - 
	// <input onKeyUp="return autoTab(this, 3, event);" size="4" maxlength="3"> - 
	// <input onKeyUp="return autoTab(this, 4, event);" size="5" maxlength="4">
//	var isNN = (navigator.appName.indexOf("Netscape")!=-1);
//	function autoTab(input,len, e) {
//		var keyCode = (isNN) ? e.which : e.keyCode; 
//		var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46];
//		if(input.value.length >= len && !containsElement(filter,keyCode)) {
//			input.value = input.value.slice(0, len);
//			input.form[(getIndex(input)+1) % input.form.length].focus();
//		}
//		function containsElement(arr, ele) {
//			var found = false, index = 0;
//			while(!found && index < arr.length)
//			if(arr[index] == ele)
//				found = true;
//			else
//				index++;
//			return found;
//		}
//		function getIndex(input) {
//			var index = -1, i = 0, found = false;
//			while (i < input.form.length && index == -1)
//			if (input.form[i] == input)index = i;
//			else i++;
//			return index;
//		}
//		return true;
//	}
	function MM_openBrWindow(theURL,winName,features) { //v2.0
	  window.open(theURL,winName,features);
	}
	
	// The second number in the "onLoad" command in the body
	// tag determines the form's focus. Counting starts with '0'
	 function putFocus(formInst, elementInst) {
		if (document.forms.length > 0) {
			document.forms[formInst].elements[elementInst].focus();
		}
	 }
	 
	 function FocusSubmit(formInst) {
	 	form.submit.focus();
	 }
	 function FocusSearch(formInst) {
	 //	srch.search_for[0].focus();
	 }
	 
	 function checkEnter(event) { 	
		// enters form
		var code = 0;
		if (NS4)
			code = event.which;
		else
			code = event.keyCode;
		if (code==13)
			document.form.submit();
	 }
	 var iOld	= 0;
	function zCalc(oHandler,f1,f2,f3)
	{
		var oForm	= document.mainform;
		var oTF1	= oForm.elements[f1];
		var oTF2	= oForm.elements[f2];
		var oTF3	= oForm.elements[f3];
		//alert("mark-"+oTF1.value);

		if (!isNaN(oTF1.value) && !isNaN(oTF2.value))
			oTF3.value = parseFloat(oTF1.value) + parseFloat(oTF2.value);
		else			
			oHandler.value = iOld;

		iOld	= oHandler.value;

	}
	//simple javascript method of disabling a 2nd submission.
	function checkSubmit(s) {
		if (submitcount == 0)
		{
			s.value= " Processing... ";
			submitcount++;
			return true;
		}
		else 
		{
			alert("This form has already been submitted. Thanks!");
			return false;
		}
	}
	var submitcount=0;
	function doSel(obj) {
		for (i = 0; i < obj.length; i++)
		if (obj[i].selected == true)
		eval(obj[i].value);
	}	

