<!--
var siteAddress = "auburn-realty.com";

/* PAGE ONLOAD EVENTS */

window.onload = function() {
  createMouseovers();
  };

function createMouseovers() {
  var overExt = "_ON";
  if (document.getElementsByTagName) {
    var imgs = document.getElementsByTagName("IMG")
    var i, dotAt, imgFile, imgExt, preloads = new Array(imgs.length);
    for (i = 0; i < imgs.length; i++) {
      if (hasClassName(imgs[i], "mouseover")) {
        dotAt  = imgs[i].src.lastIndexOf(".");
        if (dotAt > 0) {
          imgFile = imgs[i].src.substr(0,dotAt);
          imgExt  = imgs[i].src.substr(dotAt+1);
          if (imgFile.lastIndexOf(overExt) == imgFile.length - overExt.length) {
            // do nothing; image is already on
            }
          else {
            eval("imgs[i].onmouseover = function () {this.src = '" + imgFile + overExt + "." + imgExt + "'};");
            eval("imgs[i].onmouseout = function () {this.src = '" + imgFile + "." + imgExt + "'};");
            preloads[i]     = new Image;
            preloads[i].src = imgFile + overExt+ "." + imgExt;
            }
          }
        }
      }
    }
  }

function removeExtraSpaces(str) {
/*
  Remove any redundant spaces or line returns within the string and eliminate
  leading & trailing spaces and line returns. Requires regular expressions (availabe as of JavaScript 1.2).
  (Note that we use an eval statement to prevent earlier browsers from choking on the regex syntax.
  Also note that all the backslashes in the regex pattern have to be escaped as a result.)
*/
  var output = str;
  if (window.RegExp) {
    output = eval("output.replace(/[ \\t]{2,}/g,' ')");
    output = eval("output.replace(/[\\r\\n]{2,}/g,'\\r\\n')");
    output = eval("output.replace(/^[\\s]*/,'')");
    output = eval("output.replace(/[\\s]*$/,'')");
    }
  return output;
  }

// Iterates through all class names for an object and returns true if specified class name is found
function hasClassName(obj, className) {
  if (obj && obj.className) {
    var objClass = removeExtraSpaces(obj.className);
    arrClasses = objClass.split(" ");
    for (var c=0; c<arrClasses.length; c++) {
      if (className == arrClasses[c])
        return true;
      }
    }
  return false;
  }

function writeEmailAddress(addressee,subject) {
  var emailAddress = addressee + "@" + siteAddress;
  if (writeEmailAddress.arguments.length < 2) {
    subject = "Inquiry from " + siteAddress;
    }
  document.write("<a href=\"mailto:" + emailAddress + "?subject=" + subject + "\">" + emailAddress + "</a>");
  }
// -->