//<script>
<!--

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 popupBooking(id)	{
	//OpenPopup(URL, WindowName, Width, Height, Left, Top, Features)
	OpenPopup('popup_booking_dtl.asp?b='+id, 'BOOKING', 600, 500, 120, 50, 'scrollbars');
}

function popupTour(id)	{
	//OpenPopup(URL, WindowName, Width, Height, Left, Top, Features)
	OpenPopup( '../public/tour/hotel_tour.asp?i='+id, '', 700, 400, 150, 50);

}
function popupLogin(s)	{
	//OpenPopup(URL, WindowName, Width, Height, Left, Top, Features)
	//wPopup_Window = null;	// reset window object (may be invalid if closed)
	OpenPopup(s, 'ACCESO', 300, 350, 350, 150);
}

function PopupZeusZip(s)	{
	//OpenPopup(URL, WindowName, Width, Height, Left, Top, Features)
	OpenPopup(s, 'BOOKING', 885, 600, 120, 50, 'scrollbars');
}


function popupLink(id,id_hotel,id_city,acceso)	{
	//(URL, WindowName, Width, Height, Left, Top, Features)
	OpenPopup('../hotel/popup_portal_link.asp?h='+id_hotel+'&c='+id_city+'&latrop='+id+'&acceso='+acceso, 'PORTALES', 800, 100, 5, 200, 'scrollbars');
}

function popupContact(url ,Width, Height )   {
	OpenPopup(url,'Contactenos',Width, Height,'scrollbars=yes');
}

function popupContacts(url)   {
	OpenPopup(url,'Contactos',820, 370,'scrollbars=no');
}

function popupCredentials(url)   {
	OpenPopup(url,'Credenciales',300, 150,'scrollbars=no');
}

function PopupPrint_lst(url)	{
	if (!url) return false;
	
	wPopup_Window = null;	// reset window object (may be invalid if closed)
	OpenPopup(url, 'PrintPopup', 600, 500, 120, 50);
}

function PopupCustomerChoose(url)	{
	if (!url) return false;
	
	wPopup_Window = null;	// reset window object (may be invalid if closed)
	OpenPopup(url, 'customerChoose', 740, 460);
}
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



	/*********** 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;
	}



	// properties of the window to open
  var sFeatures = 
		"width=" + iWidth + "," 
		+ "height=" + iHeight + "," 
		+ "copyhistory=0," 
		+ "location=0," 
		+ "menubar=0," 
		+ "directories=0," 
		+ "resizable=1," 
		+ "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>
