/*
	Travel.js
	
	Aplicación: HotelMercado
	Autor     : WebHotel
	Desc      : Funcionalidad global
*/


// --------------------------------------------------------
// --- Declaración de Variables
var __SysBanner = null;
var m_VstPK     = "0";   // Visita Actual
var m_ChainPK   = null;    // Cadena PK 
var m_ChainName = null;    // Cadena Name
var m_HtPK      = null;    // Hotel PK
var m_HtName    = null;    // Hotel Name
var m_Sysadm	= false;

//var m_nMinHeight = 625;
var m_nMinHeight = 950;

var m_WndMenu   = "IFrmMenu";
var m_WndCont   = "IFrmCont";

// ------------------------------------
// ResetVars: Resetear Vars
function ResetVars()
{
	m_ChainPK   = null;
	m_ChainName = null;
	m_HtPK      = null;
	m_HtName    = null;
}

// ------------------------------------
// ITopWnd: Interfaz para localizar a Top
function ITopWnd() { return true; }

// ------------------------------------
// OnAppInit: Home
function OnAppInit()
{
	try
	{
		// --- Ajustar contenidos
		FitContent();
		
		// --- Status Bar
		//window.defaultStatus = "WebHotelPlus.com ... Tu Portal de Reservas";
		
		// --- Comenzar Carrusel de Banners
		__SysBanner = new CSysBanner( "idBanner", "/Images/Mercado/Banners/" );
		__SysBanner.AddBanner( "banner_roxy.swf", 22000 );
<!--		__SysBanner.AddBanner( "Mercado.swf", 10000 ); -->
		__SysBanner.Start();
	}
	catch(e) {}
}

// ------------------------------------
// FitContent: Ajustar contenido
function FitContent( nForzeHeight )
{
	var nMinHeight = 950;

	var cbDocHeight  = document.documentElement.clientHeight;
	var cbContTop    = document.getElementById( "idContPage" ).offsetTop;
	var cbFootHeight = document.getElementById( "idFootPage" ).offsetHeight;
	
	var cbContHeight = cbDocHeight - ( cbContTop + cbFootHeight + 30 );

	//if ( arguments.length > 0 )
	//	nMinHeight = ( (nMinHeight<nForzeHeight) ? nForzeHeight : nMinHeight);

	if( cbContHeight < m_nMinHeight )
		cbContHeight = m_nMinHeight;

	document.getElementById( "idContPage" ).style.height = cbContHeight + "px";
}

// ------------------------------------
// SetMinHeight: Ajustar contenido
function SetMinHeight( nHeight )
{
	m_nMinHeight = nHeight;
	FitContent();
}

// ------------------------------------
// RestoreMinHeight: Ajustar contenido
function RestoreMinHeight()
{
	m_nMinHeight = 950;
<!--	m_nMinHeight = 625; -->
	FitContent();
}

// --------------------------------------------------------
// --- Comandos Home

// ------------------------------------
// RecomendarA: Recomendar este sitio
function RecomendarA()
{
	var pWnd = CreatePopupWnd( -1, -1, 500, 230 );
	Pop_Load( "default.aspx?Tpl=Home/Pop_RecommendTo" );
}

// ------------------------------------
// OnHtMercado: Hotel Mercado
function OnHtMercado()
{
	var pWnd = CreatePopupWnd( -1, -1, 640, 400 );
	Pop_Load( "default.aspx?Tpl=Home/FOOT_HtMercado" );
}

// ------------------------------------
// OnAltaNuevo: Alta Nuevo Hotel
function OnAltaNuevo()
{
	try
	{
		WndLoad( m_WndCont, "default.aspx?Tpl=Home/ACC_Afilliation" );
	}
	catch(e) {}
}

// ------------------------------------
// OnCG: Condiciones Generales
function OnCG()
{
	var pWnd = CreatePopupWnd( -1, -1, 640, 400 );
	Pop_Load( "default.aspx?Tpl=Home/FOOT_CG" );
}

// ------------------------------------
// OnPP: Política de Privacidad
function OnPP()
{
	var pWnd = CreatePopupWnd( -1, -1, 640, 400 );
	Pop_Load( "default.aspx?Tpl=Home/FOOT_PP" );
}

// ------------------------------------
// OnCopyR: Copyright
function OnCopyR()
{
	var pWnd = CreatePopupWnd( -1, -1, 640, 400 );
	Pop_Load( "default.aspx?Tpl=Home/FOOT_CopyR" );
}


// --------------------------------------------------------
// --- Acceso y Salida

// ------------------------------------
// OnChainLogin: Login de Cadena
function OnChainLogin( sChainPK, sChainName )
{
	try
	{
		// --- Actualizar Código de Cadena
		m_ChainPK   = sChainPK;
		m_ChainName = sChainName;
		
		// --- Mostrar Menú Superior de Cadena
		Ds_Display( "idMenuInit",  "none"  );
		Ds_Display( "idChainMenu", "block" );
		
		// --- Cargar opción inicial
		Ch_Chain( true );
		
		// --- Mensaje de Bienvenida
		SetWelcomeMsg( m_ChainName );
	}
	catch(e){}
}

// ------------------------------------
// OnHotelLogin: Login de Hotel
function OnHotelLogin( sHtPK, sHtName )
{
	try
	{
		// --- Actualizar Código de Cadena
		m_HtPK   = sHtPK;
		m_HtName = sHtName;
		
		// --- Mostrar Menú Superior de Cadena
		Ds_Display( "idMenuInit", "none"  );
		Ds_Display( "idHtMenu",   "block" );
		
		// --- Cargar opción inicial
		Ht_Hotel( true );
		
		// --- Mensaje de Bienvenida
		SetWelcomeMsg( m_HtName );
	}
	catch(e){}
}

// ------------------------------------
// OnSysAdmLogin: Login de SysAdm
function OnSysAdmLogin()
{
	try
	{
		m_Sysadm	=	true;
		// --- Mostrar Menú Superior
		Ds_Display( "idMenuInit", "none"  );
		Ds_Display( "idSysMenu",  "block" );
		
		// --- Cargar opción inicial
		Sys_Chains( true );
	}
	catch(e){}
}

// ------------------------------------
// OnCloseSession: Cerrar Sessión
function OnCloseSession()
{
	try
	{
		// --- Resetear Variables
		ResetVars();
		
		// --- Restaurar Menús
		Ds_Display( "idMenuInit",  "block" );
		Ds_Display( "idChainMenu", "none"  );
		Ds_Display( "idHtMenu",    "none"  );
		Ds_Display( "idSysMenu",   "none"  );
		
		// --- Mensaje de Bienvenida
		SetWelcomeMsg( "Bienvenido a HotelMercado.com" );

		// --- Páginas de Incio
		WndLoad( m_WndMenu, "default.aspx?Tpl=Home/Menu",  true );
		WndLoad( m_WndCont, "default.aspx?Tpl=Home/Intro", true );
	}
	catch(e){}
}

// ------------------------------------
// SetWelcomeMsg: Mensaje de Bienvenida
function SetWelcomeMsg( sMsg )
{
	try
	{
		// --- Asignar Title
		Ds_SetAttribute( "idMsgUser", "title", sMsg );
		
		// --- Asignar Mensaje
		if( sMsg.length >= 46 )
			sMsg = sMsg.substring( 0, 42 ) + " ...";
			
		Ds_SetText( "idMsgUser", sMsg );
	}
	catch(e){}
}

// --------------------------------------------------------
// --- Cadena : Opciones de Primer Nivel

// ------------------------------------
// Ch_Chain: Opción de Cadena
function Ch_Chain( bReplace )
{
	try
	{
		// --- Menú Lateral
		WndLoad( m_WndMenu, "ChainUI.aspx?Tpl=Chain/Ch_Menu", bReplace );
		
		// --- Datos de Cadena
		WndLoad( m_WndCont, "ChainUI.aspx?Tpl=Chain/Ch_Intro", bReplace );
	}
	catch(e) {}
}

// ------------------------------------
// Ch_Hotel: Opción de Hotel
function Ch_Hotel( bReplace )
{
	Ht_Hotel( bReplace );
}

// ------------------------------------
// Ch_Booking: Opción de Booking
function Ch_Booking( bReplace )
{
	Ht_Book( bReplace );
}


// ------------------------------------
// Sys_Estads: Opción de Informes de Sysadm
function Sys_Estads( bReplace )
{
	try
	{
		// --- Menú Lateral
		WndLoad( m_WndMenu, "default.aspx?Tpl=STAT/STAT_Menu", bReplace );
		
		// --- Datos de Cadena
		WndLoad( m_WndCont, "default.aspx?Tpl=STAT/STAT_Intro", bReplace );
	}
	catch(e) {}
}


// --------------------------------------------------------
// --- Estadísticas 

// ------------------------------------
// Stat_Monitor: Monitor
function Stat_Monitor()
{
	try
	{
		window.IFrmCont.location = "StatUI.aspx?RmtMethod=Mon_Monitor";
	}
	catch(e){}
}

// ------------------------------------
// Stat_Acc_Afill: Afiliaciones
function Stat_Acc_Afill()
{
	try
	{
		window.IFrmCont.location = "StatUI.aspx?RmtMethod=Acc_Afill";
	}
	catch(e){}
}

// ------------------------------------
// Stat_Acc_RecA: Recomendar A
function Stat_Acc_RecA()
{
	try
	{
		window.IFrmCont.location = "StatUI.aspx?RmtMethod=Acc_RecA";
	}
	catch(e){}
}

// ------------------------------------
// Stat_Acc_ContactWith: Contactar con
function Stat_Acc_ContactWith()
{
	try
	{
		alert( "En Progreso" );
		//window.IFrmCont.location = "StatUI.aspx?RmtMethod=Acc_ContactWith";
	}
	catch(e){}
}


// ------------------------------------
// Ch_Reports: Opción de Informes
function Ch_Reports( bReplace )
{
	try
	{
		// --- Menú Lateral
		WndLoad( m_WndMenu, "default.aspx?Tpl=Chain/ChRp_Menu", bReplace );
		
		// --- Datos de Cadena
		WndLoad( m_WndCont, "default.aspx?Tpl=Chain/ChRp_Intro", bReplace );
	}
	catch(e) {}
}

// --------------------------------------------------------
// --- Hotel : Opciones de Primer Nivel

// ------------------------------------
// Ht_Hotel: Opción de Hotel
function Ht_Hotel( bReplace )
{
	try
	{
		// --- Menú Lateral
		WndLoad( m_WndMenu, "HotelUI.aspx?Tpl=Hotel/Ht_Menu", bReplace );
		
		// --- Datos de Hotel
//		WndLoad( m_WndCont, "HotelUI.aspx?Tpl=Hotel/Ht_Intro", bReplace );
		Ht_DataAfill();
	}
	catch(e) {}
}

// ------------------------------------
// Ht_Book: Opción de Booking
function Ht_Book( bReplace )
{
	try
	{
		// --- Menú Lateral
		WndLoad( m_WndMenu, "HotelUI.aspx?Tpl=Hotel/HtBk_Menu", bReplace );
		
		// --- Datos de Hotel
//		WndLoad( m_WndCont, "HotelUI.aspx?Tpl=Hotel/HtBk_Intro", bReplace );
		HtBk_Dates();
	}
	catch(e) {}
}

// ------------------------------------
// Ht_Reports: Reports
function Ht_Reports( bReplace )
{
	try
	{
		// --- Menú Lateral
		WndLoad( m_WndMenu, "default.aspx?Tpl=Hotel/HtRp_Menu", bReplace );
		
		// --- Datos de Cadena
		WndLoad( m_WndCont, "default.aspx?Tpl=Hotel/HtRp_Intro", bReplace );
	}
	catch(e) {}
}

// --------------------------------------------------------
// --- Cadena : Opciones de Segundo Nivel

// ------------------------------------
// Ch_SelectHotel: Seleccionar Hotel
function Ch_SelectHotel()
{
	try
	{
		// --- Mostrar Popup
		var sURL = "ChainUI.aspx?RmtMethod=Ch_SelectHotel&Ch_PK=" + m_ChainPK;
		var pWnd = CreatePopupWnd( -1, -1, 720, 400 );
		
		Pop_Load( sURL );
	}
	catch(e) {}
}

// ------------------------------------
// Ch_OnSelectHotel: Notificación de Hotel Seleccionado
function Ch_OnSelectHotel( Ht_PK, Ht_Name )
{
	try
	{
		// --- Guardar PK
		m_HtPK   = Ht_PK;
		m_HtName = Ht_Name;
		
		// --- Componer Mensaje
		var sMsg = m_ChainName + " - " + Ht_Name;
		SetWelcomeMsg( sMsg );
		
		// --- Opción de Hotel
//		Ht_Book(false);
		Ht_Hotel( false )
	}
	catch(e) {}
}

// ------------------------------------
// Ch_DataAfill: Datos de Afiliación
function Ch_DataAfill()
{
	try
	{
		var sURL = "ChainUI.aspx?RmtMethod=Ch_DataAfill&Ch_PK=" + m_ChainPK;
		WndLoad( m_WndCont, sURL );
	}
	catch(e) {}
}

// ------------------------------------
// Ch_DataAdmRsv: Datos de Administración y Reservas
function Ch_DataAdmRsv()
{
	try
	{
		var sURL = "ChainUI.aspx?RmtMethod=Ch_DataAdmRsv&Ch_PK=" + m_ChainPK;
		WndLoad( m_WndCont, sURL );
	}
	catch(e) {}
}

// ------------------------------------
// Ch_DataInfo: Información
function Ch_DataInfo()
{
	try
	{
		var sURL = "ChainUI.aspx?RmtMethod=Ch_DataInfo&Ch_PK=" + m_ChainPK;
		WndLoad( m_WndCont, sURL );
	}
	catch(e) {}
}

// ------------------------------------
// Ch_ServMultimedia: Servicios Multimedia
function Ch_ServMultimedia()
{
	Ch_Services( "Ch_ServMultimedia" );
}

// ------------------------------------
// Ch_ServPortales: Servicios Venta en Portales
function Ch_ServPortales()
{
	Ch_Services( "Ch_ServPortales" );
}

// ------------------------------------
// Ch_ServWHStar: Servicios WHStar
function Ch_ServWHStar()
{
	Ch_Services( "Ch_ServWHStar" );
}

// ------------------------------------
// Ch_ServPubli: Servicios Publicidad
function Ch_ServPubli()
{
	Ch_Services( "Ch_ServPubli" );
}

// ------------------------------------
// Ch_ServOtros: Servicios Otros
function Ch_ServOtros()
{
	Ch_Services( "Ch_ServOtros" );
}

// ------------------------------------
// Ch_Services: Servicios
function Ch_Services( sTpl )
{
	try
	{
		var sURL = "ChainUI.aspx?RmtMethod=Ch_Services&Ch_PK=" + m_ChainPK + "&Tpl=" + sTpl;
		WndLoad( m_WndCont, sURL );
	}
	catch(e) {}
}

// ------------------------------------
// Ch_ShowVideo: Muestra el vídeo de una Cadena
function Ch_ShowVideo( Ch_PK )
{
	try
	{
		var sURL = "ChainUI.aspx?RmtMethod=Ch_ShowVideo&Ch_PK=" + Ch_PK;
		var pWnd = CreatePopupWnd( -1, -1, 560, 280 );
		
		Pop_Load( sURL );
	}
	catch(e) {}
}


// --------------------------------------------------------
// --- Hotel : Opciones de Segundo Nivel

// ------------------------------------
// Ht_Dummy: En breve
function Ht_Dummy()
{
	alert( "Esta opción estará disponible brevemente." );
}

// ------------------------------------
// Ht_DataAfill: Datos de Afiliación
function Ht_DataAfill()
{
	try
	{
		if( !__CheckForHotel() )
			return;
			
		var sURL = "HotelUI.aspx?RmtMethod=Ht_DataAfill&Ht_PK=" + m_HtPK;
		WndLoad( m_WndCont, sURL );
	}
	catch(e) {}
}

// ------------------------------------
// Ht_DataAdm: Facturación
function Ht_DataAdm()
{
	try
	{
		if( !__CheckForHotel() )
			return;
			
		var sURL = "HotelUI.aspx?RmtMethod=Ht_DataAdm&Ht_PK=" + m_HtPK;
		WndLoad( m_WndCont, sURL );
	}
	catch(e) {}
}

// ------------------------------------
// Ht_DataRsv: Reservas
function Ht_DataRsv()
{
	try
	{
		if( !__CheckForHotel() )
			return;
			
		var sURL = "HotelUI.aspx?RmtMethod=Ht_DataRsv&Ht_PK=" + m_HtPK;
		WndLoad( m_WndCont, sURL );
	}
	catch(e) {}
}

// ------------------------------------
// Ht_DataInfo: Información
function Ht_DataInfo()
{
	try
	{
		if( !__CheckForHotel() )
			return;
			
		var sURL = "HotelUI.aspx?RmtMethod=Ht_DataInfo&Ht_PK=" + m_HtPK;
		WndLoad( m_WndCont, sURL );
	}
	catch(e) {}
}

// ------------------------------------
// Ht_ServPortales: Servicios Venta en Portales
function Ht_ServPortales()
{
	Ht_Services( "Ht_ServPortales" );
}

// ------------------------------------
// Ht_ServWHStar: Servicios WHStar
function Ht_ServWHStar()
{
	Ht_Services( "Ht_ServWHStar" );
}

// ------------------------------------
// Ht_ServOtros: Servicios Otros
function Ht_ServOtros()
{
	Ht_Services( "Ht_ServOtros" );
}

// ------------------------------------
// Ht_Services: Servicios
function Ht_Services( sTpl )
{
	try
	{
		if( !__CheckForHotel() )
			return;
			
		var sURL = "HotelUI.aspx?RmtMethod=Ht_Services&Ht_PK=" + m_HtPK + "&Tpl=" + sTpl;
		WndLoad( m_WndCont, sURL );
	}
	catch(e) {}
}


// --------------------------------------------------------
// --- Hotel - Booking: Opciones de Segundo Nivel

// ------------------------------------
// HtBk_ServHotel: Servicios de Hotel
function HtBk_ServHotel()
{
	try
	{
		if( !__CheckForHotel() )
			return;
			
		var sURL = "HotelUI.aspx?RmtMethod=HtBk_ServHotel&Ht_PK=" + m_HtPK;
		WndLoad( m_WndCont, sURL );
	}
	catch(e) {}
}

// ------------------------------------
// HtBk_ServRooms: Servicios de Habitación
function HtBk_ServRooms()
{
	try
	{
		if( !__CheckForHotel() )
			return;
			
		var sURL = "HotelUI.aspx?RmtMethod=HtBk_ServRooms&Ht_PK=" + m_HtPK;
		WndLoad( m_WndCont, sURL );
	}
	catch(e) {}
}

// ------------------------------------
// HtBk_ServOcio: Servicios de Ocio
function HtBk_ServOcio()
{
	try
	{
		if( !__CheckForHotel() )
			return;
			
		var sURL = "HotelUI.aspx?RmtMethod=HtBk_ServOcio&Ht_PK=" + m_HtPK;
		WndLoad( m_WndCont, sURL );
	}
	catch(e) {}
}

// ------------------------------------
// HtBk_Rooms: Gestión de Habitaciones
function HtBk_Rooms()
{
	try
	{
		if( !__CheckForHotel() )
			return;
			
		var sURL = "HotelUI.aspx?RmtMethod=HtBk_Rooms&Ht_PK=" + m_HtPK;
		WndLoad( m_WndCont, sURL );
	}
	catch(e) {}
}

// ------------------------------------
// HtBk_Tars: Gestión de Tarifas
function HtBk_Tars()
{
	try
	{
		if( !__CheckForHotel() )
			return;
			
		var sURL = "HotelUI.aspx?RmtMethod=HtBk_Tars&Ht_PK=" + m_HtPK;
		WndLoad( m_WndCont, sURL );
	}
	catch(e) {}
}

// ------------------------------------
// HtBk_Dates: Gestión de Temporadas
function HtBk_Dates()
{
	try
	{
		if( !__CheckForHotel() )
			return;
			
		var sURL = "HotelUI.aspx?RmtMethod=HtBk_Dates&Ht_PK=" + m_HtPK;
		WndLoad( m_WndCont, sURL );
	}
	catch(e) {}
}


// ------------------------------------
// HtBk_Rooming: Rooming List
function HtBk_Rooming()
{
	try
	{
		if( !__CheckForHotel() )
			return;
			
		var sURL = "http://www.webhotelclub.com/administracion/roomingHt.aspx?Ht_PK=" + m_HtPK;
		WndLoad( m_WndCont, sURL );
	}
	catch(e) {}
}


// --------------------------------------------------------
// --- Reports : Reservas

// ------------------------------------
// RepRsv_HtFilter: Filtro para Hoteles
function RepRsv_HtFilter()
{
	try
	{
		if( !__CheckForHotel() )
			return;
			
		var sURL = "RepUI.aspx?RmtMethod=RepRsv_HtFilter&Ht_PK=" + m_HtPK;
		WndLoad( m_WndCont, sURL );
	}
	catch(e) {}
}

// ------------------------------------
// RepFacturas_Hotel
function RepFacturas_Hotel()
{
	try
	{
		if( !__CheckForHotel() )
			return;
			
		var sURL = "Facturas/HT_PK/"+m_HtPK + "/" + m_HtPK + "_FacturasHotel.htm";
		WndLoad( m_WndCont, sURL );
	}
	catch(e) {}
}



// ------------------------------------
// RepRsv_ChFilter: Filtro para Cadenas
function RepRsv_ChFilter()
{
	try
	{
		var sURL = "RepUI.aspx?RmtMethod=RepRsv_ChFilter&Ch_PK=" + m_ChainPK;
		WndLoad( m_WndCont, sURL );
	}
	catch(e) {}
}


// --------------------------------------------------------
// --- Sys : Opciones de Primer Nivel

// ------------------------------------
// Sys_Chains: Opción de Cadenas
function Sys_Chains( bReplace )
{
	try
	{
		// --- Menú Lateral
		WndLoad( m_WndMenu, "SysUI.aspx?Tpl=Sys/Ch_Menu", bReplace );
		
		// --- Datos de Cadena
<!--		WndLoad( m_WndCont, "SysUI.aspx?Tpl=Sys/Ch_Intro", bReplace ); -->
		WndLoad( m_WndCont, "SysUI.aspx?RmtMethod=SysCh_List", bReplace );
	}
	catch(e) {}
}


// ------------------------------------
// SysCh_Selected: Selección de Cadena
function SysCh_Selected( sChPK, sChName )
{
	try
	{
		// --- Actualizar Código de Cadena
		m_ChainPK   = sChPK;
		m_ChainName = sChName;
		
		// --- Mensaje de Bienvenida
		SetWelcomeMsg( m_ChainName );
		
		// --- Cargar opción inicial
//		Ch_DataAfill();
		Ch_SelectHotel();
	}
	catch(e){}
}

// ------------------------------------
// SysCh_List: Servicios
function SysCh_List()
{
	try
	{
		var sURL = "SysUI.aspx?RmtMethod=SysCh_List";
		WndLoad( m_WndCont, sURL );
	}
	catch(e) {}
}

// ------------------------------------
// SysCh_HtList: Listado de Hoteles
function SysCh_HtList( sOrder, sFilter )
{
	try
	{
		var sURL = "SysUI.aspx?RmtMethod=SysCh_RsvList";
		
		if( null != sOrder )
			sURL += "&f_Order=" + sOrder;
			
		if( null != sFilter )
			sURL += "&f_Filter=" + sFilter;
			
		WndLoad( m_WndCont, sURL );

	}
	catch(e) {}
}



// ------------------------------------
// SysCh_UsrList: Listado de usuarios
function SysCh_UsrList( sOrder, sFilter )
{
	try
	{
		var sURL = "SysUI.aspx?RmtMethod=SysCh_UsrList";
		
		if( null != sOrder )
			sURL += "&f_Order=" + sOrder;
			
		if( null != sFilter )
			sURL += "&f_Filter=" + sFilter;
			
		WndLoad( m_WndCont, sURL );
	}
	catch(e) {}
}

// ------------------------------------
// SysCh_RsvList: Listado de Reservas
function SysCh_RsvList( sOrder, sFilter )
{
	try
	{
		var sURL = "SysUI.aspx?RmtMethod=SysCh_RsvList";
		
		if( null != sOrder )
			sURL += "&f_Order=" + sOrder;
			
		if( null != sFilter )
			sURL += "&f_Filter=" + sFilter;
			
		WndLoad( m_WndCont, sURL );
	}
	catch(e) {}
}

// ------------------------------------
// Sys_Users: Opción de Usuarios
function Sys_Users( bReplace )
{
	try
	{
		// --- Menú Lateral
		WndLoad( m_WndMenu, "SysUI.aspx?Tpl=Sys/Usr_Menu", bReplace );
		
		// --- Intro a Usuarios
		WndLoad( m_WndCont, "SysUI.aspx?Tpl=Sys/Usr_Intro", bReplace );
	}
	catch(e) {}
}

// ------------------------------------
// SysUsr_Filter: Filtro para selección de usuarios
function SysUsr_Filter()
{
	try
	{
		WndLoad( m_WndCont, "SysUI.aspx?Tpl=Sys/Usr_Filter" );
	}
	catch(e) {}
}

// ------------------------------------
// Sys_Rsvs: Opción de Reservas
function Sys_Rsvs( bReplace )
{
	try
	{
		// --- Menú Lateral
		WndLoad( m_WndMenu, "SysUI.aspx?Tpl=Sys/Rsv_Menu", bReplace );
		
		// --- Intro a Usuarios
		WndLoad( m_WndCont, "SysUI.aspx?Tpl=Sys/Rsv_Intro", bReplace );
	}
	catch(e) {}
}

// ------------------------------------
// SysRsv_Filter: Filtro para selección de reservas
function SysRsv_Filter()
{
	try
	{
		WndLoad( m_WndCont, "SysUI.aspx?Tpl=Sys/Rsv_Filter" );
	}
	catch(e) {}
}

// ------------------------------------
// Sys_Utils: Opción de Utilidades
function Sys_Utils( bReplace )
{
	try
	{
		// --- Menú Lateral
		WndLoad( m_WndMenu, "SysUI.aspx?Tpl=Sys/Ut_Menu", bReplace );
		
		// --- Intro a Usuarios
		WndLoad( m_WndCont, "SysUI.aspx?Tpl=Sys/Ut_TCred", bReplace );
	}
	catch(e) {}
}

// ------------------------------------
// SysUt_TCred: Chequear TCrédito
function SysUt_TCred()
{
	try
	{
		WndLoad( m_WndCont, "SysUI.aspx?Tpl=Sys/Ut_TCred" );
	}
	catch(e) {}
}


// ------------------------------------
// SysUt_Reenv_bono: Reeviar bonos de WHP
function SysUt_Reenv_bono()
{
	try
	{
		WndLoad( m_WndCont, "SysUI.aspx?Tpl=Sys/Ut_Reenv_bono" );
	}
	catch(e) {}
}


// --------------------------------------------------------
// --- Utilidades

// ------------------------------------
// __CheckForHotel: Chequea si hay un Hotel activo
function __CheckForHotel()
{
	// --- Si estamos en cadena ...
	if( m_HtPK == null )
	{
		alert( "Debe seleccionar primero un Hotel para trabajar con esta opción." );
		return false;
	}

	return true;
}