﻿//******************************************************************
//.s. Paramentros de entrada:
//
//	pUrl		    : URL absoluta del servicio.
//  pChannelKey	    : ChannelKey entregada por prestige
//  pUrlReservas    : Direccion de la página de reservas
//  pNumItems	    : (OPCIONAL) Número de items a mostrar
//  pUrlCSS		    : (OPCIONAL) Origen de la hoja de estilos
//.s.

function PSTop5(pUrl,pChannelKey,pUrlReservas,pNumItems,pUrlCSS)
{
	try
	{
		var html;
		var url;
		var params = window.location.href.toString();
		
		if (!pUrl)
		{
			html = "<div style='font:normal 14px Tahoma'>No se han encontrado la url de conexión con el engine.<br/>No se puede ejecutar Prestige Booking Engine</div>";
			document.write(html);
			return;
		}
		
		if (!pChannelKey || pChannelKey == "") 
		{
			html = "<div style='font:normal 14px Tahoma'>No se ha encontrado el ChannelKey.<br/>No se puede ejecutar Prestige Booking Engine</div>";
			document.write(html);
			return;
		}
			
		url		= pUrl + "?channelkey=" + pChannelKey + "&numitems=" + pNumItems + "&css=" + (pUrlCSS ? escape(pUrlCSS) : "") + "&urlrsv=" + escape(pUrlReservas);
		html	= "<iframe src=\"" + url + "\" name='PBookingTop5' id='PBookingTop5' scrolling='no' allowtransparency='true' style='width:100%;height:100%;' frameborder='0'></iframe>";
		document.write(html);
	}
	catch(e)
	{
		document.write("Prestige Software:<br/>Se ha producido un error en el cliente al ejecutar la aplicación.<br/>Póngase en contacto con su proveedor.");
	}
}

//******************************************************************
//.s. Paramentros de entrada:
//
//	pUrl		: URL absoluta del servicio.
//  pChannelKey	: ChannelKey entregada por prestige
//  pUrlCSS		: (OPCIONAL) Origen de la hoja de estilos
//.s.

function PSSugerencia(pUrl,pChannelKey,pUrlReservas,pUrlCSS)
{
	try
	{
		var html;
		var url;
		var params = window.location.href.toString();
		
		if (!pUrl)
		{
			html = "<div style='font:normal 14px Tahoma'>No se han encontrado la url de conexión con el engine.<br/>No se puede ejecutar Prestige Booking Engine</div>";
			document.write(html);
			return;
		}
		
		if (!pChannelKey || pChannelKey == "") 
		{
			html = "<div style='font:normal 14px Tahoma'>No se ha encontrado el ChannelKey.<br/>No se puede ejecutar Prestige Booking Engine</div>";
			document.write(html);
			return;
		}
			
		url		= pUrl + "?channelkey=" + pChannelKey + "&css=" + (pUrlCSS ? escape(pUrlCSS) : "") + "&urlrsv=" + escape(pUrlReservas);
		html	= "<iframe src=\"" + url + "\" name='PBookingSugerencia' id='PBookingSugerencia' scrolling='no' allowtransparency='true' style='width:100%;height:100%;' frameborder='0'></iframe>";
		document.write(html);
	}
	catch(e)
	{
		document.write("Prestige Software:<br/>Se ha producido un error en el cliente al ejecutar la aplicación.<br/>Póngase en contacto con su proveedor.");
	}
}

//******************************************************************
//.s. Paramentros de entrada:
//
//	pUrl		    : URL absoluta del servicio.
//  pChannelKey	    : ChannelKey entregada por prestige
//  pUrlReservas    : Direccion de la página de reservas
//  pNumItems	    : (OPCIONAL) Número de items a mostrar
//  pUrlCSS		    : (OPCIONAL) Origen de la hoja de estilos
//  
//.s.

function PSPromociones(pUrl,pChannelKey,pUrlReservas,pNumItems,pUrlCSS)
{
	try
	{
		var html;
		var url;
		var params = window.location.href.toString();
		
		if (!pUrl)
		{
			html = "<div style='font:normal 14px Tahoma'>No se han encontrado la url de conexión con el engine.<br/>No se puede ejecutar Prestige Booking Engine</div>";
			document.write(html);
			return;
		}
		
		if (!pChannelKey || pChannelKey == "") 
		{
			html = "<div style='font:normal 14px Tahoma'>No se ha encontrado el ChannelKey.<br/>No se puede ejecutar Prestige Booking Engine</div>";
			document.write(html);
			return;
		}
			
		url		= pUrl + "?channelkey=" + pChannelKey + "&numitems=" + pNumItems + "&css=" + (pUrlCSS ? escape(pUrlCSS) : "") + "&urlrsv=" + escape(pUrlReservas);
		html	= "<iframe src=\"" + url + "\" name='PBookingPromociones' id='PBookingPromociones' scrolling='no' allowtransparency='true' style='width:100%;height:100%;' frameborder='0'></iframe>";
		document.write(html);
	}
	catch(e)
	{
		document.write("Prestige Software:<br/>Se ha producido un error en el cliente al ejecutar la aplicación.<br/>Póngase en contacto con su proveedor.");
	}
}