﻿function popUpEmailForm(pageTitle, configFile, uid) {
	newCenteredWindow(AppPath + '/popups/EmailForm.aspx?pageTitle='+pageTitle+'&configFile='+configFile+'&uid='+uid, 'emailForm', 480, 480, 0, 0, 0, 0, 0, 0, 0);
}

function popUpFindAHomeMaps(mapType)
{
    newCenteredWindow(AppPath + '/popups/MapsPopup.aspx?mapType='+mapType, 'Maps', 900, 900, 1, 1, 0, 0, 0, 0, 0);
}

function popUpGoogleMap(address, citystatezip, desc, latitude, longitude, uid)
{
    newCenteredWindow(AppPath + '/popups/Map.aspx?addr='+address+'&csz='+citystatezip+'&desc='+desc+'&lat='+latitude+'&lng='+longitude+'&uid='+uid, 'Maps', 650, 650, 0, 0, 0, 0, 0, 0, 0);
}

function popUpFindAHomeMorePictures(mlsNumber, photoCount)
{
    newCenteredWindow(AppPath + '/popups/PropertyPictures.aspx?MlsNumber='+mlsNumber+'&photos='+photoCount, 'MorePictures', 800, 480, 0, 0, 0, 0, 0, 0, 0);
}

function newCenteredWindow(a_str_windowURL, a_str_windowName, a_int_windowWidth, a_int_windowHeight, a_bool_scrollbars, a_bool_resizable, a_bool_menubar, a_bool_toolbar, a_bool_addressbar, a_bool_statusbar, a_bool_fullscreen) {
  var int_windowLeft = (screen.width - a_int_windowWidth) / 2;
  var int_windowTop = (screen.height - a_int_windowHeight) / 2;
  var str_windowProperties = 'height=' + a_int_windowHeight + ',width=' + a_int_windowWidth + ',top=' + int_windowTop + ',left=' + int_windowLeft + ',scrollbars=' + a_bool_scrollbars + ',resizable=' + a_bool_resizable + ',menubar=' + a_bool_menubar + ',toolbar=' + a_bool_toolbar + ',location=' + a_bool_addressbar + ',statusbar=' + a_bool_statusbar + ',fullscreen=' + a_bool_fullscreen + '';
  var obj_window = window.open(a_str_windowURL, a_str_windowName, str_windowProperties)
    if (parseInt(navigator.appVersion) >= 4) {
      obj_window.window.focus();
    }
}
function getYearForDisclaimer() {
            var dt = new Date();
            document.write(dt.getFullYear());
        }
function getLastUpdatedDate() {
    var dt = new Date();
    document.write(dt.toLocaleDateString());
}
function rotateRealtorValueAds(){
 $(document).ready(function() {
            try {
                     
                // Your code here	    
                $('#divRealtorAdsImages').cycle({
                    fx: 'fade',
                    speed: 4000,
                    timeout: 50,
                    pause: 1,
                    random: 1
                }); //end cycle call	
            } catch (e) { }
        });
}
