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 SHApuntarVisita( ident )	
{
    visitas = document.getElementById ( 'display[' + ident + ']' );
    if (visitas.style.display == 'none')
        visitas.style.display = 'block';
    else
        visitas.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 makeselection_pdt( 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 = false;
			tmp_input1.value = '';
		}
	}

	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 openWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);
}

function potwierdz( text , link )
{
	if( confirm( text ) )
	{
		document.location = link;
	}
	else
	{
		return false;
	}
}

function ConfirmSubmit( text , form)
{
	if( confirm( text ) )
	{
		form.submit();
	}
	else
	{
		return false;
	}
}


function selectme2(ten, dotego, arr1 , arr2) {

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 show( id )
{
	otr = document.getElementById( 'otros[' + id + ']' );

	d = document.getElementById( 'displ[' + id + ']' );
	i = document.getElementById( 'lang_name[' + id + ']' );
	s = document.getElementById( 'lang_mark[' + id + ']' );
	if( d.style.display == 'none' )
	{
		d.style.display = 'block';
		i.disabled = false;
		s.disabled = false;
		otr.style.display = 'none';
	}
	else
	{
		d.style.display = 'none';
		i.disabled = true;
		s.disabled = true;
		otr.style.display = 'inline';
	}
}

function makeVisible( 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';
		}
		else
		{
			tmp_display1.style.display = 'none';
		}
	}

	if( no != '' )
	{
		tmp_display2 = document.getElementById( 'display[' + no + ']' );
		tmp_input2 = document.getElementById( no );
		if( tmp.value == field_no )
		{
			tmp_display2.style.display = 'block';
		}
		else
		{
			tmp_display2.style.display = 'none';
		}
	}
}

function popupWindow( path, obrazek  ){
	//var img 
	//img = new Image();
	//img.src = obrazek;
    //openWindow( path,'csp','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=no,width='+(img.width+20)+',height='+(img.height+40)+',left=20,top=0');
	openWindow( path,'csp','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,width=620,height=620,left=20,top=0');
	
}