	function popwin(w,h,t,l, destfile)
	{
		var loc = 'width=' + w + ',height=' + h + ',top=' + t + ',left=' + l;
		calc_handle = window.open(destfile,"calc",",,,status,,scrollbars,resizable," + loc);
		if(parseInt(navigator.appVersion) >= 4)
		{
			calc_handle.window.focus();
		}
	}
	function eventKeyUp(e)
	{
		var nKeyPressed;
		var oSrcElement;

		if(!document.all)	// not IE
		{
			nKeyPressed	= e.which;
			oSrcElement	= e.target;
		}
		else	// IE
		{
			nKeyPressed	= window.event.keyCode;
			oSrcElement	= window.event.srcElement;
		}

		if(oSrcElement.type == "text" && nKeyPressed != 9 && nKeyPressed != 16 && nKeyPressed != 17)
		{
			nMaxLength		= oSrcElement.getAttribute("maxlength");
			sNextElement	= oSrcElement.getAttribute("next");

			if(nMaxLength != null && sNextElement != null)
			{
				if(oSrcElement.value.length >= nMaxLength)
					//eval("oSrcElement.form['" + sNextElement + "']").focus();
					getThis(sNextElement).focus();
			}
		}
	}

	function init()
	{
		if(window.document.captureEvents != null)
			document.captureEvents(Event.KEYUP)
		window.document.onkeyup = eventKeyUp;
	}
