// dla LOCVAR!! {literal}


<!-- Begin
/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Husay :: http://www.communitxt.net , heavily modified for secur acmosis@gmail.com */

var arrInput = new Array(0);
var arrInputValue = new Array(0);
/* nie dzialaja , do zmiany
function addInput() {
//arrInput.push(createInput(arrInput.length));
arrInput.push(arrInput.length);
//arrInputValue.push(arrInputValue.length);
arrInputValue.push("");
display();
}
*/

function display(id_display) {
document.getElementById(id_display).innerHTML="";
for (intI=0;intI<arrInput.length;intI++) {
document.getElementById(id_display).innerHTML+=createInput(arrInput[intI], arrInputValue[intI]);
}
}

function saveValue(intId,strValue) {
arrInputValue[intId]=strValue;
}  

function createInput(id,value) {
return (id+1) +" <input type='text' id='test "+ id +"' onChange='javascript:saveValue("+ id +",this.value)' value='"+ value +"' name=tx[" +  id  + "] class=\"input_field\" title=\"podaj datê urodzenia (Dd/Mm/Rrrr) lub wiek\"><br>";
}

/* nie dziala, do zmiany
function deleteInput() {
if (arrInput.length > 0) { 
arrInput.pop(); 
arrInputValue.pop();
}
display(); 
}
*/
function build_again(id_rysowania,id_countboxa)
{
//document.write(arrInput.length);

//alert("asd");
//document.getElementById('wyniki').innerHTML="hurraaa";

//    for (count = 0; count < addr_str.length; count++) 

//http://192.168.100.79/_pawel/szukaj/wyszukiwarka/testt.php?tx%5B%5D=pierwsze&tx%5B%5D=drugie&tx%5B%5D=trzecie#
//document.getElementById('wyniki').innerHTML="no values";

if ( getVars.length && ! (null ==safeGet.tx)  )
    {
//    alert("znalazlo!"+getVars.length);
  //  document.getElementById('wyniki').innerHTML=getVars[1];
  var y=0;
  document.getElementById(id_rysowania).innerHTML="";

	  //for(y=0;y<getVars.length;y++)
	  for(y=0;y<safeGet.tx.length;y++)
	    {
	    arrInput.push(arrInput.length);
	    //arrInputValue.push(arrInputValue.length);
	    arrInputValue.push("");
//	    document.getElementById('wyniki').innerHTML+=safeGet.tx[y] +":<br>";

	    document.getElementById(id_rysowania).innerHTML+=createInput(y, safeGet.tx[y]);
	    
	    arrInputValue[y]=safeGet.tx[y];
	    	    
	    document.getElementById(id_countboxa).value=y+1;
	    }

//	    alert(arrInputValue.length);

    
    }
}

function ustaw_pola(value,id_obiektu)
{

if(  parseInt(value)>=0 &&  parseInt(value)<= 12 )
{
//value=value-1;

//alert(value);
// uwaga ilosc pol od zera
// dodaj tyle pol ile trzeba (value-1) bo uzytkownik nie od 0 tylko od 1
    if((arrInput.length)<value)
    {

var xx=0;
//    alert("trzeba dodac"+(value-arrInput.length));

var temp_counter=0;

temp_counter=arrInput.length;

	  for(xx=0;xx<(value-temp_counter);xx++)
		{
		arrInput.push(arrInput.length);
		arrInputValue.push("");
		}

var xx=0;
    }
    else if( (arrInput.length) > value )
    {

//arrInput.splice(0,arrInput.length-(value));
//arrInputValue.splice(0,arrInput.length-(value));

var xx=0;
  //  alert("trzeba skasowac"+(arrInput.length-value));
temp_counter=arrInput.length;
	  for(xx=0;xx<(temp_counter-(value));xx++)
		{
		if (arrInput.length > 0) 
			{
		arrInput.pop();
		arrInputValue.pop();


//			alert("kasuje:"+xx);
			}
		}

		
    }
display(id_obiektu);
}


}
//build_again();

// {/literal} End -->
