function jx( url, elementos, s_valores, method )
{

	method = method || 'POST';
	s_valores = s_valores || '';

	document.body.style.cursor = 'wait';
	var i;
	var con_ajax;
	var resultado = '';
	var parametros = '';

	try
	{
		con_ajax = new ActiveXObject( "Msxml2.XMLHTTP");
	} catch (e)
	{
		try
		{
			con_ajax = new ActiveXObject( "Microsoft.XMLHTTP");
		}
		catch (e)
		{
			con_ajax = false;
		}
	}

	if ( ! con_ajax && typeof XMLHttpRequest != 'undefined' )
	{
		con_ajax = new XMLHttpRequest();
	}

	if ( s_valores != '' )
	{
		parametros = s_valores;
	}
	else
	{
		var amp = '';
		for ( i = 0; i < elementos.length; i++ )
		{
			if ( elementos[i].name != 'undefined' )
			{
				parametros += amp + elementos[i].name + '=' + elementos[i].value;
				amp = '&';
			}
		}
	}

	// si el metodo es GET se agrega el ? a la url de la consulta
	url += ( method == 'POST' )?'':'?' + parametros;

	con_ajax.open( method, url, true );
	con_ajax.onreadystatechange = function()
	{
		if ( con_ajax.readyState == 4 )
		{
			if ( con_ajax.status == 200 )
			{
				resultado = con_ajax.responseText;
				eval( resultado );
				document.body.style.cursor = 'default';
			}
		}
	}
	con_ajax.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded');
	if ( method == 'POST' )
	{
		con_ajax.send( parametros );
	}
	else
	{
		con_ajax.send( null );
	}
}


function check_login()
{
	if ( logueado != true )
		document.getElementById('login_tapa').style.display = 'block';
}


