' + ' ' + '' + ' '; jQuery('#widget_contact_us_2').html($sHTML); } function realpage_blocks_movedate() { var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; var d = new Date(); $m = d.getMonth(); $Y = d.getYear(); $month1 = new Date(d.setMonth(d.getMonth() + 1)); $month15 = new Date(d.setMonth(d.getMonth() + 1)); $month15 = new Date($month15.setDate(15)); $month2 = new Date(d.setMonth(d.getMonth() + 2)); $month25 = new Date(d.setMonth(d.getMonth() + 2)); $month25 = new Date($month25.setDate(15)); $month3 = new Date(d.setMonth(d.getMonth() + 3)); $month35 = new Date(d.setMonth(d.getMonth() + 3)); $month35 = new Date($month35.setDate(15)); $month4 = new Date(d.setMonth(d.getMonth() + 4)); return '' + ' ' + ' ' + ' ' + ' ' + '' + ''; } function substr(value, start, end) { return value.substring(start, end); } function realpage_blocks_officehours() { $officehours = ""; if (isset($rpdata.propertyOfficeHours)) { $start = ""; $end = ""; $start = substr($rpdata.propertyOfficeHours[0]["dayOfWeek"], 0, 3); $open = $rpdata.propertyOfficeHours[0]["startTime1"]; $close = $rpdata.propertyOfficeHours[0]["endTime1"]; for (var i = 0; i < $rpdata.propertyOfficeHours.length; i++) { $value = $rpdata.propertyOfficeHours[i]; if (($open != $rpdata.propertyOfficeHours[i]["startTime1"]) || ($close != $rpdata.propertyOfficeHours[i]["endTime1"])) { if ($start == $end) { $officehours += $start; } else { $officehours += $start + '-' + $end; } $officehours += ": " + $open + " to " + $close + "
"; $start = substr($value["dayOfWeek"], 0, 3); } $end = substr($value["dayOfWeek"], 0, 3); $open = $rpdata.propertyOfficeHours[i]["startTime1"]; $close = $rpdata.propertyOfficeHours[i]["endTime1"]; } if ($start != $end) $officehours += $start + "-" + $end + ": " + $open + " to " + $close + "
"; if (($start == $end) && ($start != "")) $officehours += $start + ": " + $open + " to " + $close + "
"; } return $officehours; } function variable_get(prop_config) { if (prop_config == 'hide') { return 0; } else { return 1; } } function realpage_blocks_contact_form($moveDate) { var hideFlag = 'True'; $address = (hideAddress != hideFlag) ? "
Address
" : ""; $cityValue = (hideCity != hideFlag) ? "
City
" : ""; $stateValue = (hideState != hideFlag) ? '
State
' + '
" : ""; $zipCode = (hideZip != hideFlag) ? '
Zip
' : ""; $howdidyouhear = (hideRefer != hideFlag) ? '
How did you find out about our rental community?
' + '
' : ""; $noHousehold = (hideNoHouseHold != hideFlag) ? '
Number of occupants:
' : ""; $cmsg = (hideMessage != hideFlag) ? '
Comments:
' : ""; $cmoveDate = '
* Move-in Date (mm-dd-yyyy)
'; $chavePets = (hideHavePets != hideFlag) ? '
Do you (or will you) have pets?
' + '
Yes No
' : ""; $cpreferedCtc = (hidePreferedCtc != hideFlag) ? '
Contact me by:
' + '
phone e-mail
' : ""; $cdayOfWeek = (hideDayOfWeek != hideFlag) ? '
Best day/time to call:
' : ""; $cunitType = ""; var kpv = { "Studio+": 192, "1 Bed /1 Bath": 193, "1 Bed /2 Bath": 194, "2 Bed /1 Bath": 195, "2 Bed /2 Bath": 196, "3 Bed /1 Bath": 197, "3 Bed /2 Bath": 198, "3 Bed /3 Bath": 199 }; $bathRooms = 0; $bedRooms = 0; if (hideUnitType != hideFlag) { $cunitType = '
Unit Type
' + '
'; } else $cunitType = ""; } var reasonsArray = listofReasons.split('|'); $reason = (hideReason == hideFlag || listofReasons == '') ? "" : '
Reason
' + '
'; var $phoneNo = (hidePhoneNumber != hideFlag) ? '
*Phone
' + ' - ' + ' - x
' : ""; $propetyId = isset($rpdata.id) ? $rpdata.id : ""; $lcid = 4; $cid = f_getCookie('RP_LSWS_SEM'); $cid = $cid ? $cid : ""; $sHTML = '' + '' + '' + '
' + '
' + "
" + "
* First Name
" + "
" + '
' + "
" + '
* Last Name
' + '
' + '
' + $address + $cityValue + $stateValue + $zipCode + (($stateValue != '') ? "" : "") + $phoneNo + '
*Email
' + '
' + '' + '

Do not fill out this input form, it is for bot control purposes only.

' + '
' + $noHousehold + $cmsg + '
' + '
' + $cmoveDate + $cunitType + $howdidyouhear + //$cpriceRange + $chavePets + $cpreferedCtc + $cdayOfWeek + $reason + '
'; return $sHTML; } function validPhone(b) { var a = window.event ? b.keyCode : b.which; if (a == 0 || a == 8) return true; if (a > 47 && a < 58) return true; else return false; } function autoTab(b, t, to) { var a = window.event ? b.keyCode : b.which; if (a != 9 && a != 16 && ((a > 47 && a < 58) || (a > 95 && a < 106))) { if ($(t).val().length >= $(t).attr("maxlength")) $('#' + to).focus(); } } function backspaceOnly(b, t, from) { var a = window.event ? b.keyCode : b.which; if (a == 8) { if ($(t).val().length == 0) { var noErrors = true; try { $('#' + from)[0].setSelectionRange($(t).attr("maxlength"), $(t).attr("maxlength")); } catch (err) { // IE8 does not recognize setSelectionRange, just making sure it doesn't break the page. noErrors = false; } if(noErrors) $('#' + from).focus(); } } } $.fn.serializeObject = function () { var o = {}; var a = this.serializeArray(); var t = ""; $.each(a, function () { t = this.value; t = t.replace(/"/g, """); // Needs to be a better solution to this. But replacing with %22 (like it should be) was also killing the PHP (breaking up the POST array the same way unescaped "&"'s were). t = encodeURIComponent(t); // Encode "&"'s and such. The original code on stackoverflow doesn't (http://stackoverflow.com/questions/1184624/serialize-form-to-json-with-jquery). if (o[this.name] !== undefined) { if (!o[this.name].push) { o[this.name] = [o[this.name]]; } o[this.name].push(t || ''); } else { o[this.name] = t || ''; } }); return o; }; function validateme() { var error = 0; var foxusset = false; var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; var f = $('#firstname'); try { if (f.val() == '') { f.css('borderColor', 'red'); f.focus(); foxusset = true; error++; } else { f.css('borderColor', ''); } } catch (e) { } try { f = $('#lastname'); if (f.val() == '') { f.css('borderColor', 'red'); if (!foxusset) { f.focus(); foxusset = true; } error++; } else { f.css('borderColor', ''); } } catch (e) { } try { f = $('#movedate'); if (f.val() == '') { f.css('borderColor', 'red'); if (!foxusset) { f.focus(); foxusset = true; } error++; } else { f.css('borderColor', ''); } } catch (e) { } try { f = $('#email'); if (f.val() == '') { f.css('borderColor', 'red'); if (!foxusset) { f.focus(); foxusset = true; } error++; } else if (f.val() != '') { if (reg.test(f.val()) == false) { f.css('borderColor', 'red'); if (!foxusset) { f.email.focus(); foxusset = true; } error++; } } else { f.css('borderColor', ''); } } catch (e) { } if (($('#email').val() || ($('#dayPhone1').val() && $('#dayPhone2').val() && $('#dayPhone3').val()))) { $('#cu_2_error_phone_and_email').css('display', 'none'); $('#email').css('borderColor', ''); $('#dayPhone1').css('borderColor', ''); $('#dayPhone2').css('borderColor', ''); $('#dayPhone3').css('borderColor', ''); } else { $('#cu_2_error_phone_and_email').css('display', 'block'); $('#email').css('borderColor', 'red'); $('#dayPhone1').css('borderColor', 'red'); $('#dayPhone2').css('borderColor', 'red'); $('#dayPhone3').css('borderColor', 'red'); error++; } var today = f_todayYYYYMMDD(); var splits = $('#movedate').val().split('-'); splits[0] = (splits[0].length == 1) ? '0' + splits[0] : splits[0]; splits[1] = (splits[1].length == 1) ? '0' + splits[1] : splits[1]; var moveInDate = splits[2] + '-' + splits[0] + '-' + splits[1]; if (moveInDate < today) { $('#cu_2_error_move_in_date_in_past').css('display', 'block'); $('#movedate').css('borderColor', 'red'); error++; } else { $('#cu_2_error_move_in_date_in_past').css('display', 'none'); $('#movedate').css('borderColor', ''); } if (error != 0) { document.getElementById('cu_2_error').style.display = 'block'; return false; } return true; } function f_todayYYYYMMDD() { var today = new Date(); var dd = today.getDate(); var mm = today.getMonth() + 1; var yyyy = today.getFullYear(); return yyyy + '-' + (mm < 10 ? '0' : '') + mm + '-' + (dd < 10 ? '0' : '') + dd; } function f_getCookie(cookieName) { var cookieValue = document.cookie; var cookieStart = cookieValue.indexOf(" " + cookieName + "="); if (cookieStart == -1) { cookieStart = cookieValue.indexOf(cookieName + "="); } if (cookieStart == -1) { cookieValue = null; } else { cookieStart = cookieValue.indexOf("=", cookieStart) + 1; var cookieEnd = cookieValue.indexOf(";", cookieStart); if (cookieEnd == -1) { cookieEnd = cookieValue.length; } cookieValue = unescape(cookieValue.substring(cookieStart, cookieEnd)); } return cookieValue; }