

   function multiInputRowHandler( container_obj_id, item_id_prefix, max_row_num )
   {

      this.container_obj_id = container_obj_id;
      this.item_id_prefix = item_id_prefix;
      this.max_row_num = max_row_num;

      this.current_row_num = 0;
      this.row_template = '';


      this.init = function()
      {
         this.row_template = $.template( $('#' + this.container_obj_id )[0].innerHTML );
			$('#' + this.container_obj_id).html( '' );
      }


      this.addRow = function( target_row_id, value, event, forced_display )
      {
			if ( event && typeof event != 'undefined' && event.keyCode == 9 )
			{
			   return false;	
			}
         var target_row = parseInt( target_row_id.replace( this.item_id_prefix + '_', '' ) );
         var next_row_num = target_row + 1;
         if    (  (   this.current_row_num < this.max_row_num
                  &&  $('#' + this.item_id_prefix + '_' + next_row_num )[0] == null
						)
						|| forced_display
               )
         {
            this.current_row_num++;
            $('#' + this.container_obj_id).append( this.row_template , {
               'content_id': this.current_row_num
            });
	 			$('#' + this.item_id_prefix + '_' + this.current_row_num ).val( value != 'undefined' ? value : '' );
         }
      }


      this.init();
   }
