function go(par) { window.location = par; }

	function otros(par1,par2)
	{
		v1 = document.getElementById( par1 );
		v2 = document.getElementById( par2 );

	if( par2 != '' )
	{

		if(v1.checked)
			{
			v2.disabled = false;
			v2.style.display = 'block';
			}
		else
			{
			v2.disabled = true;
			v2.style.display = 'none';
			}
	}		
		
	}


function hOtros( tmp , si , no )
{
	tmp = document.getElementById( tmp );

	if( si != '' )
	{
		tmp_display1 = document.getElementById( si );
		tmp_input1 = document.getElementById( si );
		if( tmp.checked )
		{
			tmp_display1.style.display = 'block';
			tmp_input1.disabled = false;
		}
		else
		{
			tmp_display1.style.display = 'none';
			tmp_input1.disabled = true;
		}
	}

	if( no != '' )
	{
		tmp_display2 = document.getElementById( no);
		tmp_input2 = document.getElementById( no );
		if( tmp.checked == 'no' )
		{
			tmp_display2.style.display = 'block';
			tmp_input2.disabled = false;
		}
		else
		{
			tmp_display2.style.display = 'none';
			tmp_input2.disabled = true;
		}
	}
}

function makeselection( tmp , si , no )
{
	tmp = document.getElementById( tmp );

	if( si != '' )
	{
		tmp_display1 = document.getElementById( 'display[' + si + ']' );
		tmp_input1 = document.getElementById( si );
		if( tmp.value == 'si' && tmp.value != '---' )
		{
			tmp_display1.style.display = 'block';
			tmp_input1.disabled = false;
		}
		else
		{
			tmp_display1.style.display = 'none';
			tmp_input1.disabled = true;
		}
	}

	if( no != '' )
	{
		tmp_display2 = document.getElementById( 'display[' + no + ']' );
		tmp_input2 = document.getElementById( no );
		if( tmp.value == 'no' )
		{
			tmp_display2.style.display = 'block';
			tmp_input2.disabled = false;
		}
		else
		{
			tmp_display2.style.display = 'none';
			tmp_input2.disabled = true;
		}
	}
}

function makeselection2( tmp , si , no )
{
	tmp = document.getElementById( tmp );

	if( si != '' )
	{
		tmp_display1 = document.getElementById( 'display[' + si + ']' );
		tmp_input1 = document.getElementById( si );

		if( tmp.value == 'con_estudios' )
		{
			tmp_display1.style.display = 'block';
			tmp_input1.disabled = false;
		}
		else
		{
			tmp_display1.style.display = 'none';
			tmp_input1.disabled = true;
		}
	}

	if( no != '' )
	{
		tmp_display2 = document.getElementById( 'display[' + no + ']' );
		tmp_input2 = document.getElementById( no );
		if( tmp.value == 'escolarizado' )
		{
			tmp_display2.style.display = 'block';
			tmp_input2.disabled = false;
		}
		else
		{
			tmp_display2.style.display = 'none';
			tmp_input2.disabled = true;
		}
	}
}

function makeselection3( tmp , si , no , field_si , field_no)
{
	tmp = document.getElementById( tmp );

	if( si != '' )
	{
		tmp_display1 = document.getElementById( 'display[' + si + ']' );
		tmp_input1 = document.getElementById( si );

		if( tmp.value == field_si )
		{
			tmp_display1.style.display = 'block';
			tmp_input1.disabled = false;
		}
		else
		{
			tmp_display1.style.display = 'none';
			tmp_input1.disabled = true;
		}
	}

	if( no != '' )
	{
		tmp_display2 = document.getElementById( 'display[' + no + ']' );
		tmp_input2 = document.getElementById( no );
		if( tmp.value == field_no )
		{
			tmp_display2.style.display = 'block';
			tmp_input2.disabled = false;
		}
		else
		{
			tmp_display2.style.display = 'none';
			tmp_input2.disabled = true;
		}
	}
}

function makeselection4( tmp , notempty )
{
	tmp = document.getElementById( tmp );

	if( notempty != '' )
	{
		tmp_display1 = document.getElementById( 'display[' + notempty + ']' );
		tmp_input1 = document.getElementById( notempty );
		if( tmp.value != '' )
		{
			tmp_display1.style.display = 'block';
			tmp_input1.disabled = false;
		}
		else
		{
			tmp_display1.style.display = 'none';
			tmp_input1.disabled = true;
		}
	}
}

function makeselection5( tmp , notempty )
{
	tmp = document.getElementById( tmp );

	if( notempty != '' )
	{
		tmp_display1 = document.getElementById( 'display[' + notempty + ']' );
		tmp_input1 = document.getElementById( notempty );
		if( tmp.value == 'si' || tmp.value == 'a_veces' )
		{
			tmp_display1.style.display = 'block';
			tmp_input1.disabled = false;
		}
		else
		{
			tmp_display1.style.display = 'none';
			tmp_input1.disabled = true;
		}
	}
}

function openWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);
}

function potwierdz( text , link )
{
	if( confirm( text ) )
	{
		document.location = link;
	}
	else
	{
		return false;
	}
}

function selectme2(ten, dotego, arr1 , arr2) 
{
	if( arr1[ten.value] != null )
	{
		pom=arr1[ten.value].length;
		dotego.options.length=0;
		dotego.options[dotego.length]=new Option("---",-1);
		if(pom>0) 
		{
			for(licz=1; licz<pom; licz++) 
			{ 
				dotego.options[dotego.length]=new Option(arr1[ten.value][licz], arr2[ten.value][licz]);
			}
		}	
	}
}

function otros( select, display )
{
	if( select.value == 'Otros' )
	{
		display.style.display = 'inline';
	}
	else
	{
		display.style.display = 'none';
	}
}

function sin_con( select, display1, display2 )
{
	if( select.value == 'Sin permiso de residencia' )
	{
		display1.style.display = 'none';
		display2.style.display = 'inline';
	}
	else if( select.value == 'Con permiso de residencia' )
	{
		display1.style.display = 'inline';
		display2.style.display = 'none';
	}
	else
	{
		display1.style.display = 'none';
		display2.style.display = 'none';
	}
}

function si( select, display )
{
	if( select != null )
	{
		if( select.value == 'Si' )
		{
			display.style.display = 'inline';
		}
		else
		{
			display.style.display = 'none';
		}
	}
}