/*
 * InputValueSelecter - v1.0 - 2011-04-25
 *
 * @author henning braun
 * @link http://picsellzimmer.yehoudie.de
 * @mail mail@yehoudie.de
 *
 * Copyright (c) 2011 Henning Braun
 */

/**
* InputValueSelecter
*
* @param input_id array of input ids
*/

function InputValueSelecter(inputs_id)
{
   this.inputs_ln = inputs_id.length;
   this.inputs = new Array();
   
   this.addListener(inputs_id);
}

InputValueSelecter.prototype.addListener = function (ids)
{
   var i = 0;
   var input;

   for (i=0; i<this.inputs_ln; i++)
   {
      input = document.getElementById(ids[i]);
      
      addEvent(input, 'focus', this.inputValueSelecter, input.name, this);
   }
}

InputValueSelecter.prototype.inputValueSelecter = function (e)
{
   var target = eventTarget(e);
//    var scope_name = target.name+'_focus';
//    var scope = registered_events[scope_name];

      /// Aktionen
   target.select();

   return cancelEvent(e);
}

