function Login()
{
	var ok=true;
	if(document.getElementById("txtUsuario").value=="")
	{
		alert(mensajes[0]);
		ok=false;
	}

	if(document.getElementById("txtClave").value=="")
	{
		alert(mensajes[1]);
		ok=false;
	}
	
	if(ok)
	{
		//llamada al servidor para eliminar la seccion
		dojo.io.bind({
		url: "Login.aspx",
		sync: true,
		mimetype: "text/plain",
		method: "post",
		content: {usuario: document.getElementById("txtUsuario").value, clave: document.getElementById("txtClave").value, accion: 'LG'},
		load:function(type, data, evt){
			var respuesta = eval("(" + data + ")");
			if(respuesta.resultado=="ok")
			{
				document.getElementById("divUsrPass").style.display="none";
				//document.getElementById("pClave").style.display="none";
				//document.getElementById("pRegistro").style.display="none";
				document.getElementById("pBienvenida").style.display="";
				document.getElementById("pBienvenida").innerHTML=mensajes[3] + " " +  respuesta.nombre;
			}
			else
			{
				alert(mensajes[2]);
			}
		},
		error: function() {
			alert('error');
		}
		});
	}
}


function Olvido(IdIdioma)
{
	var ok=true;
	if(document.getElementById("txtUsuario").value=="")
	{
		alert(mensajes[0]);
		ok=false;
	}

	if(ok)
	{
		//llamada al servidor para eliminar la seccion
		dojo.io.bind({
		url: "Login.aspx?IdIdioma="+IdIdioma,
		sync: true,
		mimetype: "text/plain",
		method: "post",
		content: {usuario: document.getElementById("txtUsuario").value, accion: 'OP'},
		load:function(type, data, evt){
			alert(mensajes[4]);
		},
		error: function() {
			alert('error');
		}
		});
	}
}

function Refrescar(page)
{
	if(document.Form1.__VIEWSTATE) 
	{ 
		document.Form1.__VIEWSTATE.disabled=true; 
	} 
	if(document.Form1.__EVENTTARGET) 
	{ 
		document.Form1.__EVENTTARGET.disabled=true; 
	} 
	if(document.Form1.__EVENTARGUMENT) 
	{ 
		document.Form1.__EVENTARGUMENT.disabled=true; 
	}

	document.Form1.action=page;
	document.Form1.submit();

}