
function sessionExists() {
    $.post("/vocentoid/usuarios.aspx?request=checkSession", "", function() { }, "xml");
}

function sessionExistsServer() {
    $.post("/vocentoid/usuarios.aspx?request=checkSessionServer", "", processSessionServer, "xml");
}

function getUserinSession() {
    $.post("/vocentoid/usuarios.aspx?request=getUserSession", "", processSessionData, "xml");
}


function getUserinSessionComunidad() {
    $.post("/vocentoid/usuarios.aspx?request=getUserSession", "", processSessionDataComunidad, "xml");
}


function processSessionServer(data,p) {
	
	
	

	if(data.documentElement.childNodes[0].nodeValue=="false") 
		{ 

			document.location.href="http://ladofemenino.hoymujer.com/login.php?s=hoymujer&amp;r="+document.location.href;

		}
	
}


function processSessionData(data, p) {

    if(data!=null)
    {

		
		

            $("#comment input:text").each(
            function(t) {
				


                if (this.id.indexOf("usuarioTB") > -1) {

					var nombre=data.documentElement.getElementsByTagName("string")[1];
                    $("#" + this.id).val(nombre.childNodes[0].nodeValue);
                    $("#" + this.id).keydown(function(e) { return false; });
                    $(document)[0].oncontextmenu = function() { return false; }

                }
                if (this.id.indexOf("emailTB") > -1) {

					var mail=data.documentElement.getElementsByTagName("string")[2];
                    $("#" + this.id).val(mail.childNodes[0].nodeValue);
                    $("#" + this.id).keydown(function(e) { return false; });
                    $(document)[0].oncontextmenu = function() { return false; }

                }
            }
            )
    }
   
  
}




function processSessionDataComunidad(data, p) {

    
    if (data != null) {
        $("input:text").each(

            function(t) {
               
                if (this.id.indexOf("firmareportajeTxt") > -1) {
					
					var nombre=data.documentElement.getElementsByTagName("string")[1];

					
                    $("#" + this.id).val(nombre.childNodes[0].nodeValue);
                    $("#" + this.id).keydown(function(e) { return false; });
                    $(document)[0].oncontextmenu = function() { return false; }

                }

            }
            )
    }


}
