/**
 * JavaScript methods to be used by the Property Search Form.
 * 
 * @author: BCDIT, C.A.
 */

/**
 * Method that will clean the arrival date of the form.
 */
function cleanInitialDate() {
	document.frmPropertySearch.arrivalDate.value = "";
}

/**
 * Method that will clean the departure date of the form.
 */
function cleanFinalDate() {
	document.frmPropertySearch.departureDate.value = "";
}

/**
 * Method that will show additional photos of the
 * property.
 */
function openAdditionalPhotos(context, action, idProperty) {
	window.open('/' + context + '/Main.php?do=' + action + "&propertyId=" + idProperty, null, "WIDTH=650, HEIGHT=500, STATUS=YES, TOOLBAR=NO, MENUBAR=NO, LOCATION=NO, SCROLLBARS=YES");
	return;
}

/**
 * Method that will show the additional information for
 * a property.
 *
 * @param idProperty The id of the property.
 */
function openAdditionalInfoProperty(context, idProperty) {
	window.open('/' + context + '/Main.php?do=openPropertyMoreInfoAction' + "&id=" + idProperty, null, "WIDTH=650, HEIGHT=650, STATUS=YES, TOOLBAR=NO, MENUBAR=NO, LOCATION=NO, SCROLLBARS=YES");
	return;
}

function openOwnerInfo(context, idProperty) {
	window.open('/' + context + '/Main.php?do=showOwnerInformationAction' + "&id=" + idProperty, null, "WIDTH=650, HEIGHT=650, STATUS=YES, TOOLBAR=NO, MENUBAR=NO, LOCATION=NO, SCROLLBARS=YES");
	return;
}