	
	/* Modified version of 
	 * jQuery.fn.autoAdvance()
	 * original: http://www.pengoworks.com/workshop/jquery/field.plugin.htm
	 *
	 */
	// the autoAdvance() method
	$.fn.autoAdvance = function(e){
		// get the field
		$(this).keyup(function(e){
			// get the field
			var	$field = $(this);
			// get the maxlength for the field
			var iMaxLength = parseInt($field.attr("maxlength"), 10);
	
			// if the user tabs to the field, exit event handler
			// this will prevent movement if the field is already
			// field in with the max number of characters
			if( isNaN(iMaxLength) || ("|9|16|37|38|39|40|".indexOf("|" + e.keyCode + "|") > -1) ) return true;
	
			// if the value of the field is greater than maxlength attribute,
			// then move the focus to the next field
			if( $field.val().length >= $field.attr("maxlength") ){
				// move to the next field and select the existing value
				$field.next().focus();
			}		
		});		
	}