﻿var AutenticarUsuarioPortal="/Services/AutenticarService.svc/ajaxEndpoint/AutenticarUsuarioPortal";var ReAutenticarUsuarioPortal="/Services/AutenticarService.svc/ajaxEndpoint/ReAutenticarUsuarioPortal";var EstaAutenticadoUsuarioPortal="/Services/AutenticarService.svc/ajaxEndpoint/EstaAutenticadoUsuarioPortal";var SalirUsuarioPortal="/Services/AutenticarService.svc/ajaxEndpoint/SalirUsuarioPortal";var ActualizarUsuarioPortal="/Services/AutenticarService.svc/ajaxEndpoint/ActualizarUsuario";var ListServicios="/Services/AutorizacionService.svc/ajaxEndpoint/ListServicios";var GetUsuarioActual="/Services/AutenticarService.svc/ajaxEndpoint/GetUsuarioActual";var RenderReporteEnSession="/Services/ReporteService.svc/ajaxEndpoint/RenderReporteEnSession";var RenderReporteImprimibleEnSession="/Services/ReporteService.svc/ajaxEndpoint/RenderReporteImprimibleEnSession";var GetInfoReporte="/Services/ReporteService.svc/ajaxEndpoint/GetInfoReporte";var EnviarSugerencia="/Services/ReporteService.svc/ajaxEndpoint/EnviarSugerencia";var GetReporteDefecto="/Services/ReporteService.svc/ajaxEndpoint/GetReporteDefecto";var GetValoresInforme="/Services/ReporteService.svc/ajaxEndpoint/GetValoresInforme";var GeoReferenceServiceGetPointList="/Services/GeoReferenceService.svc/ajaxEndpoint/GetPointList";var GeoReferenceServiceGetMapaSinBBox="/Services/GeoReferenceService.svc/ajaxEndpoint/GetMapaSinBBox";var GeoReferenceServiceGetMapaSinBBoxID="/Services/GeoReferenceService.svc/ajaxEndpoint/GetMapaSinBBoxID";var GeoReferenceServiceBuscarDireccion="/Services/GeoReferenceService.svc/ajaxEndpoint/BuscarDireccion";var GetValoresRestringidos="/Services/UtilesService.svc/ajaxEndpoint/GetNombresRestringidos";var GetMaximoMesesSinActualizacion="/Services/UtilesService.svc/ajaxEndpoint/GetMaximoMesesSinActualizacion";var GetComunas="/Services/UtilesService.svc/ajaxEndpoint/GetComunas";var ListPuntoInteres="/Services/GeoReferenceService.svc/ajaxEndpoint/ListPuntoInteres";var MiSeleccion="/Services/UtilesService.svc/ajaxEndpoint/MiSeleccion";var RenovarPropiedad="/Services/PropiedadService.svc/ajaxEndpoint/Renovar";var DesactivarPropiedad="/Services/PropiedadService.svc/ajaxEndpoint/Desactivar";var DestacarPropiedad="/Services/PropiedadService.svc/ajaxEndpoint/Destacar";var paginasMensajeSesion=new Array("^http://(.)*/AnalisisEnLinea/Default.aspx$");function TieneMensajeSession(){for(var a in paginasMensajeSesion){var b=new RegExp(paginasMensajeSesion[a],"i");if(document.location.toString().match(b)!=null){return true}}return false}function callService(service,body,onRecived,onError){var xmlhttp=GetXmlHttp();xmlhttp.open("POST",service,true);xmlhttp.setRequestHeader("Content-type","application/json");xmlhttp.send(body);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){if(xmlhttp.status==200){var result=eval("("+xmlhttp.responseText+")").d;onRecived(result)}else{var error;try{error=eval("("+xmlhttp.responseText+")");if(error.ExceptionType=="Vmk.PI.Servicios.SessionExpiredException"){if(TieneMensajeSession()){alert("Su sesión ha expirado.");document.location.href="/"}return}}catch(err){if(xmlhttp.responseText!=""){error={Message:xmlhttp.responseText}}else{error={Message:xmlhttp.statusText}}}onError(error)}}}}var progids=new Array("Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP");function GetXmlHttp(){var c=null;if(window.XMLHttpRequest){c=new XMLHttpRequest()}else{if(window.ActiveXObject){for(var a=0;a<progids.length&&c==null;a++){try{c=new ActiveXObject(progids[a])}catch(b){}}}}return c};
