//<script>
<!--

function popupMail(id,m)	{
	//OpenPopup(URL, WindowName, Width, Height, Left, Top, Features)
	OpenPopup('popup_email.asp?i='+id+'&idm='+m, 'MAIL', 608, 510, 269, 159);
}

function popupPlan(id)	{
	//OpenPopup(URL, WindowName, Width, Height, Left, Top, Features)
	OpenPopup('popup_plan_dtl.asp?i='+id, 'PLAN', 600, 400, 120, 50, 'scrollbars');
}

function popupAverage(s)	{
	//OpenPopup(URL, WindowName, Width, Height, Left, Top, Features)
	OpenPopup(s, 'AVERAGE', 600, 300, 120, 50, 'scrollbars');
}

function popupBooking(id)	{
	//alert("id2:"+id);
	//OpenPopup(URL, WindowName, Width, Height, Left, Top, Features)
	OpenPopup('popup_booking_dtl.asp?b='+id, 'BOOKING', 600, 500, 120, 50, 'scrollbars');
}
function popupBookingv(id,v)	{
		//OpenPopup(URL, WindowName, Width, Height, Left, Top, Features)		
	OpenPopup('popup_booking_dtl.asp?b='+id+'&v='+v, 'BOOKING', 600, 500, 120, 50, 'scrollbars');
}
function popupRooming(id)	{
	//OpenPopup(URL, WindowName, Width, Height, Left, Top, Features)
	OpenPopup('popup_rooming_lst.asp?b='+id, 'BOOKING', 600, 500, 120, 50, 'scrollbars');
}
function popupRoomingXls(id)	{
	//OpenPopup(URL, WindowName, Width, Height, Left, Top, Features)
	OpenPopup('popup_rooming_xlst.asp?b='+id, 'BOOKING', 600, 500, 120, 50, 'scrollbars');
}
function PopupBooking_lst(s)	{
	//OpenPopup(URL, WindowName, Width, Height, Left, Top, Features)
	OpenPopup(s, 'BOOKING', 800, 510, 120, 50, 'scrollbars');
}
function PopupAgencySabre_lst(s)	{
	//OpenPopup(URL, WindowName, Width, Height, Left, Top, Features)
	OpenPopup(s, 'SABRE', 220, 150, 450, 150);
}
function popupTour(id)	{
	//OpenPopup(URL, WindowName, Width, Height, Left, Top, Features)
	OpenPopup( '../public/tour/'+id+'/index.asp', '', 700, 400, 150, 50);

}
function popupPicture(id,hotel)	{
	//OpenPopup(URL, WindowName, Width, Height, Left, Top, Features)
	OpenPopup( '../public/popup_picture_gallery.asp?h='+hotel+'&i='+id, '', 700, 400, 150, 50);

}
function popupCityPicture(id,city)	{
	//OpenPopup(URL, WindowName, Width, Height, Left, Top, Features)
	OpenPopup( '../public/popup_city_gallery.asp?c='+city+'&i='+id, '', 700, 400, 150, 50);

}
function PopupBookingHotel_lst(s)	{
	//OpenPopup(URL, WindowName, Width, Height, Left, Top, Features)
	OpenPopup(s, 'BOOKING', 800, 510, 120, 50, 'scrollbars');
}

function PopupBookingEmployeeCompany_lst(s)	{
	//OpenPopup(URL, WindowName, Width, Height, Left, Top, Features)
	OpenPopup(s, 'BOOKING', 800, 510, 120, 50, 'scrollbars');
}

function PopupBookingEmployeeCompany_xlst(s)	{
	//OpenPopup(URL, WindowName, Width, Height, Left, Top, Features)
	OpenPopup(s, 'BOOKING', 800, 510, 120, 50, 'scrollbars');
}

function popupMaps(x,y,v,t)	{
	//OpenPopup(URL, WindowName, Width, Height, Left, Top, Features)
	OpenPopup('popup_maps.asp?x='+x+'&y='+y+'&v='+v+'&t='+t, 'BOOKING', 620, 430, 127, 55, 'scrollbars');

	
	
}
 
function popupLink(acceso,id,id_city,cd_section, id_hotel, in_special_link,in_special_link_hotel)	{
	var id_masteragency;
	
	//OpenPopup(URL, WindowName, Width, Height, Left, Top, Features)	
	switch (cd_section) {	
		case 0 : // hotel 
			OpenPopup('../hotel/popup_portal_link.asp?h='+id_hotel+'&acc='+acceso+'&id='+id+'&c='+id_city+'&section='+cd_section+'&sl='+in_special_link+'&slh='+in_special_link_hotel, 'PORTALES', 800,100, 5, 200, resizable=false,'scrollbars');
			break;
		case 1: // sysad
			OpenPopup('../sysad/popup_portal_link.asp?h='+id_hotel+'&acc='+acceso+'&id='+id+'&c='+id_city+'&section='+cd_section+'&sl='+in_special_link, 'RESERVAS', 800,100, 5,200, resizable=false,'scrollbars');
			break;
		case 2: // masteragency
			id_masteragency=id_hotel;
			OpenPopup('../masteragency/popup_portal_link.asp?m='+id_masteragency+'&acc='+acceso+'&id='+id+'&section='+cd_section+'&sl='+in_special_link, 'PORTALES', 800,100, 5, 200, resizable=false,'scrollbars');
			break;
		case 3: // link planes
			OpenPopup('../hotel/popup_portal_link.asp?h='+id+'&acc='+acceso+'&id='+ id_city, 'PLANES', 800,100, 5, 200, resizable=false,'scrollbars');
			break;
			
	}
		
}

function popupLink_Publicity(acceso,id,id_city,cd_section, id_hotel, in_special_link,cd_parameter)	{
	//OpenPopup(URL, WindowName, Width, Height, Left, Top, Features)
	OpenPopup('../hotel/popup_portal_link.asp?h='+id_hotel+'&acc='+acceso+'&id='+id+'&c='+id_city+'&section='+cd_section+'&sl='+in_special_link+'&cd='+cd_parameter, 'PORTALES', 800,100, 5, 200, resizable=false,'scrollbars');
	//OpenPopup('../sysad/popup_portal_link.asp?latrop='+id, 'PORTALES', 800, 100, 5, 200, 'scrollbars');
}



function popupContact(url ,Width, Height )   {
	OpenPopup(url,'Contactenos',Width, Height,'scrollbars=yes');
}

function PopupCustomerChoose(url)	{
	if (!url) return false;
	
	wPopup_Window = null;	// reset window object (may be invalid if closed)
	OpenPopup(url, 'customerChoose', 740, 460,'','','scrollbars=true');
}
function PopupMessenger(url)	{

	OpenPopup(url, 'Destinatarios', 800, 520,'','','scrollbars=true');
	
}

function PopupAgreementIFrame(s)	{
	//OpenPopup(URL, WindowName, Width, Height, Left, Top, Features)
	OpenPopup(s, 'ACUERDOS_IFRAME', 750, 200, 136, 189,'resizable=false');
}
function PopupDayAviability_lst(s)	{
	//OpenPopup(URL, WindowName, Width, Height, Left, Top, Features)
	OpenPopup(s, 'BOOKING', 600, 400, 120, 50, 'scrollbars');
}

function popupProperties(id_upload, id_city,id_hotel,param,cd_parameter)	{
	var swidth=813;
	var sheight;
	
	if(id_upload==0){
		
		sheight=634;
	}
	else
	{
		sheight=336;
	} 
	//OpenPopup(URL, WindowName, Width, Height, Left, Top, Features)
	OpenPopup('popup_publicity.asp?i='+id_upload+'&c='+id_city+'&h='+id_hotel+'&p='+param+'&cd='+cd_parameter, 'PUBLICITY', swidth, sheight, 124, 37, 'scrollbars');
}

var wPopup_Window = null;
/***************************************************************************************
OpenPopup
- Open a new window with the <URL> Page.
- The window could be called <WindowName>, by default: wBlank.
- The position and size of the window may be expressed in the following variables:
   	Position: <Left>, <Top>
   	Size: <Width>, <Height>
***************************************************************************************/
function OpenPopup(URL, WindowName, Width, Height, Left, Top, Features)	{
	// Position and size from the new window
	var iLeft=150, iTop=50, iWidth=0, iHeight=0;
	var iScrollBars=0;	// for Scrollbars
	var iStatus=0;			// for Status Bar
    var iResizable = 0;

	/*********** CHECKING PARAMETERS ************/
	// window name
	if (!WindowName) WindowName = 'wBlank';
	
	// width and height of the window
  if (!Width || !Height)	{
		iWidth = parseInt(screen.availWidth / 2);
		iHeight = parseInt(screen.availHeight / 2);
	}
	else	{
		iWidth = parseInt(Width);
		iHeight = parseInt(Height);
	}

  // center the window if not passed (left, top)
  if (!Left || !Top)	{
		iLeft = parseInt((screen.availWidth - iWidth) / 2);
		iTop = parseInt((screen.availHeight - iHeight) / 2);
	}
	else	{
		iLeft = parseInt(Left);
		iTop = parseInt(Top);
	}
	
	
	if (Features)	{
		var s = Features.toLowerCase();

		//check for scrollbars
		if (s.indexOf('scrollbars')!=-1) iScrollBars=1;

		//check for status bar.
		if (s.indexOf('status')!=-1) iStatus=1;
		
		//check for resizable property.
		if (s.indexOf('resizable')==-1) iResizable=1; else iResizable=0;
	}



	// properties of the window to open
  var sFeatures = 
		"width=" + iWidth + "," 
		+ "height=" + iHeight + "," 
		+ "copyhistory=0," 
		+ "location=0," 
		+ "menubar=0," 
		+ "directories=0," 
		+ "resizable=" + iResizable + ","  
		+ "scrollbars=" + iScrollBars + "," 
		+ "status=" + iStatus + "," 
		+ "titlebar=0," 
		+ "toolbar=0," 
		+ "hotkeys=0," 
		+ "screenx=" + iLeft + ","  //NS Only
		+ "screeny=" + iTop + ","	//NS Only
		+ "left=" + iLeft + ","     //IE Only
		+ "top=" + iTop;			//IE Only
	
	wPopup_Window = window.open(URL, WindowName, sFeatures);

	// set the focus over it.
	window.setTimeout("try {if (wPopup_Window.focus) wPopup_Window.focus();} catch(e) {e=null;}", 500);

	return wPopup_Window;
}
//-->
//</script>
