function VerVideo(){
	var xPosition = (screen.width/2)-200;
    window.open("Video.htm",null, "width=360,height=290px, top=200px,left=" + xPosition + ";");
}

function openCalendar(FormElement){
	var calendarwindow;
	url = "../calendar-es.html?formname=iform&formelement=" + FormElement;
	calendarwindow = window.open(url,"thewindow",				
"toolbar=no,LEFT=680,TOP=390,WIDTH=140px,HEIGHT=140px,status=no,scrollbars=no,resize=no,menubar=no");
calendarwindow.focus();
}

function openCapacities(){
	window.open("capacities-es.htm","thewindow","toolbar=no,LEFT=50,TOP=20,WIDTH=700px,HEIGHT=475px,status=no,menubar=no");
}

function ViewLargeImage(file, tit, w, h){
	myWindow = window.open("", null, "width=" + w + ",height=" + h + ", left=300, top=100, titlebar=no, toolbar=no, menubar=no"); 
	myWindow.document.write("<title>" + tit + "</title>");
	myWindow.document.write("<body background=images/preload.jpg leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
	myWindow.document.bgColor="black";
	myWindow.document.write("<img src=../images/cl/" + file +  ".jpg>");
	myWindow.document.write("</body>");
	myWindow.document.close(); 
}

function ViewLargeImageWithExt(file, tit, w, h){
	myWindow = window.open("", null, "width=" + w + ",height=" + h + ", left=350, top=75, titlebar=no, toolbar=no, menubar=no"); 
	myWindow.document.write("<title>" + tit + "</title>");
	myWindow.document.write("<body background=images/preload.jpg leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
	myWindow.document.bgColor="black";
	myWindow.document.write("<img src=../images/cl/" + file + ">");
	myWindow.document.write("</body>");
	myWindow.document.close(); 
}

function ViewLargeImageWithExtension(file, tit, w, h){
	myWindow = window.open("", null, "width=" + w + ",height=" + h + ", left=50, top=50, titlebar=no, toolbar=no, menubar=no, scrollbars=1"); 
	myWindow.document.write("<title>" + tit + "</title>");
	myWindow.document.write("<body background=images/preload.jpg leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
	myWindow.document.bgColor="black";
	myWindow.document.write("<img src=../images/" + file + " alt='Para salvar esta imagen, presione el botón derecho del ratón y seleccione la opción de Salvar foto como.'>");
	myWindow.document.write("</body>");
	myWindow.document.close(); 
}

function InvokeFlash(path, w, h)
{
	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' ");
	document.write("codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' ");
	document.write("width='" + w + "' height='" + h + "'><param name='movie' value='" + path + "'>");
	document.write("<param name='quality' value='high'>");
	document.write("<embed src='" +  path + "' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' ");
	document.write("type='application/x-shockwave-flash' width='" + w + "' height='" + h + "'></embed>");
	document.write("</object>");
}

function ValidateMeetingRequest(){
	d1 = document.form1.dia1.value;
	m1 = document.form1.mes1.value;
	a1 = document.form1.ano1.value;

	d2 = document.form1.dia2.value;
	m2 = document.form1.mes2.value;
	a2 = document.form1.ano2.value;

	h1 = document.form1.hora1.value;
	min1 = document.form1.minuto1.value;
	me1 = document.form1.meridiano1.value;

	h2 = document.form1.hora2.value;
	min2 = document.form1.minuto2.value;
	me2 = document.form1.meridiano2.value;

	tipo = document.form1.tipo.value;
	num  = document.form1.numasistentes.value;

	if (d1 == 0 || m1 == 0  || a1 == 0) {
		alert("Fecha del inicio del evento inválida!");       
	return false;
	}

	if (d2 == 0 || m2 == 0  || a2 == 0) {
		alert("Fecha final del evento inválida!");       
		return false;
	}

	if (h1 == 0 || min1 == "0" || me1 == 0) {
		alert("Horario inicial del evento inválido!");       
	return false;
	}

	if (h2 == 0 || min2 == "0" || me2 == 0) {
		alert("Horario final del evento inválido!");       
	return false;
	}

	if (tipo == "") {
		alert("Tipo del evento falta!");       
	return false;
	}

	var reg = new RegExp("[0-9]{1,3}");
	if (!reg.test(num)) {
  	alert("Número de asistentes inválido!");
  	return false;	
	}
return true;
}

function InvokeRandomFlash(folder)
{
    var ranNum= Math.round(Math.random());
    if (ranNum == 1)
		InvokeFlash("../movies/" + folder + "/themenu-es.swf", 577,194);	
	else
		InvokeFlash("../movies/" + folder + "/themenu2-es.swf", 577,194);
}

function ValidateJobForm()
{
	var txtLastNames = document.form1.txtLastNames.value;
	var txtFirstName = document.form1.txtFirstName.value;
	var txtEmail = document.form1.txtEmail.value;
	var txtPhone = document.form1.txtPhone.value;
	var ddlAreaInterest = document.form1.ddlAreaInterest.value;
	if (txtLastNames.length == 0) {
		alert("Falta ingresar el apellido!");
    return false; 
	}
	if (txtFirstName.length == 0) {
		alert("Falta ingresar el nombre!");
    return false; 
	}
	if (txtEmail.length == 0) {
		alert("Falta ingresar el E-mail!");
    return false; 
	}
	if (txtPhone.length == 0) {
		alert("Falta el teléfono!");
    return false; 
	}
	if (ddlAreaInterest == 0) {
		alert("Falta el area de interés!");
    return false; 
	}
	document.form1.btnSubmit.disabled=true;
	return true;
}

function ViewPhotoGallery(file, tit){
	
	myWindow = window.open("", null, 'width=600,height=400, left=125, top=50, fullscreen=no, titlebar=no'); 
	myWindow.document.write("<title>" + tit + "</title>");
	myWindow.document.write("<body background=images/preload.jpg leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>")
	myWindow.document.bgColor="black";
	myWindow.document.write("<img src=../images/gallery/" + file +  ".jpg>");
	myWindow.document.write("</body>");
	myWindow.document.close(); 
}


function Booking(hotelID)
{
//	document.writeln("<FORM action='https://reservations.ihotelier.com/onescreen.cfm' METHOD='GET' NAME='form1'>");
	document.writeln("<table width='170px' border=0 align'center' cellpadding='0' cellspacing='0'  border='0'><tr valign='top'><td>");

document.writeln("<img src='../images/backbooknow-es.gif'/></td></tr><tr><td>");

document.writeln("<table width='168px' cellpadding='0' cellspacing='0' border='0' align='center'>");

document.writeln("</td></tr><tr><td width='85px' class='resv'>Llegada:</td><td width='19px'  align=center><a		 href = javascript:openCalendar(\'DateIn\')><img src='../images/icon_calendar.jpg' border='0' alt='Date Format is mm/dd/yyyy'></a></td><td width='50px'><div align='right'><INPUT TYPE='TEXT' NAME='DateIn' SIZE='6' MAXLENGTH='10' STYLE='font-size: 11px;' value='mm/dd/yyyy'></div></td></tr><tr><td CLASS='resv'>No. de noches:</td><td></td><td><div	 align='right'><SELECT NAME='Length'>");
	
	var i = 1;
	while (i <= 30) {
		document.write("<option value='" + i + "'>" + i + "</option>");
		i++;
	}
	document.writeln("</SELECT></div></td></tr><tr><td class='resv'>No. habitaciones:</td><td></td><td><div align='right'><SELECT NAME='Rooms' STYLE='width:40'>");                                                          
	i = 1;
	while (i <= 5) {
		document.write("<option value='" + i + "'>" + i + "</option>");
		i++;
	}                                          
	document.writeln("</SELECT></div></td></tr><tr><td class='resv'>No. de adultos:</td><td></td><td><div align='right'><SELECT NAME='Adults'>");    
	i = 1;
	while (i <= 10) {
		document.write("<option value='" + i + "'>" + i + "</option>");
		i++;
	}
	document.writeln("</SELECT></div></td></tr><tr><td class='resv'>No. de niños:</td><td></td><td><div align='right'><SELECT NAME='Children'>");
	i = 0;
	while (i <= 10) {
		document.write("<option value='" + i + "'>" + i + "</option>");
		i++;
	}
	document.writeln("</SELECT></div></td></tr><tr><td colspan='3' style='padding-top:3px;' ALIGN=CENTER>");
	document.writeln("<A HREF='Javascript:document.form1.submit()'><IMG SRC='../images/checkavailability-es.gif' BORDER='0'></A>");
	document.writeln("<INPUT TYPE='HIDDEN' NAME='HotelID' VALUE='" + hotelID + "'>");
	document.writeln("<INPUT TYPE='HIDDEN' NAME='LanguageID' VALUE='2'>");
	document.writeln("</td></tr></table><hr size='1' color='bab19c'/></td></tr></table>");
	//document.writeln("</form>");
	
	}



