var isDHTML = 0;
var isLayers = 0;
var isAll = 0;
var isID = 0;
currDisplay = "none"
if (document.getElementById) {isID = 1; isDHTML = 1;}
else {
browserVersion = parseInt(navigator.appVersion);
if ((navigator.appName.indexOf('Netscape') != -1) && (browserVersion == 4)) {isLayers = 1; isDHTML = 1;}
else {
if (document.all) {isAll = 1; isDHTML = 1;}
}}

function findDOM(objectID,withStyle) {
  var menuArea = "menuArea";
  if (withStyle == 1) {
    if (isID) { return (document.getElementById(objectID).style) ; }
    else { 
      if (isAll) { return (document.all[objectID].style); }
      else {
        if (isLayers) { return (document.layers[menuArea].layers[objectID]); }
      };
    }
   }
   else {
     if (isID) { return (document.getElementById(objectID)) ; }
     else { 
       if (isAll) { return (document.all[objectID]); }
       else {
         if (isLayers) { return (document.layers[menuArea].layers[objectID]); }
       };
     }
   }
}

function toggleDisplay(objectID) {
  if (isAll || isID) {
    if (currDisplay != "none") {
        domStyle = findDOM(currDisplay,1);
        domStyle.display='none';
    }
    if (currDisplay != objectID) {
       domStyle = findDOM(objectID,1);
       domStyle.display='block';
       currDisplay=objectID;
    } else {
       domStyle = findDOM(objectID,1);
       domStyle.display='none';
       currDisplay="none";
    }
  }
  return;
}
var currentGraphicDiv = "property_graphic_1";
var quoteTimeout = 15000;
var NumOfQuotes = 3;
var QuoteNo = Math.floor((Math.random()*NumOfQuotes)) + 1;

quoteItems = new Array();
quoteItems[1] = "<p>&quot;Erica is a delight to work with. She helps eliminate the frustration from real estate transactions and is very well connected to what is going on in the market. She helped us find the exact house we needed in Oak Park in only a few weeks.&quot;<br><span id='quote_name'>Kevin, Sara and William</span></p>";
quoteItems[2] = "<p>&quot;We turned to Erica after our Bucktown property went unsold for nine months. Within one month she repositioned the marketing and sold the property at the price we hoped for. Erica managed the entire sale and made the experience very straightforward.&quot;<br><span id='quote_name'>Simon and John</span></p>";
quoteItems[3] = "<p>&quot;We recently had a 1031 exchange to deal with and we worked very closely with Erica. We found her to be a dedicated, hard working person, totally committed to the task at hand. She followed up on every request and attended to the smallest detail with professionalism and speed. We knew what we were looking for, and she helped us to expedite the search within the given time frame. We will surely use her again when the time arises.&quot;<br><span id='quote_name'>Proce Enterprises</span></p>";

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function showQuote() {
    QuoteNo = QuoteNo + 1;
    if (QuoteNo > NumOfQuotes) {
       QuoteNo = 1;
    }
    obj = document.getElementById('quote');
    obj.innerHTML = quoteItems[QuoteNo];
    fadeInDiv('quote', 0)
    setTimeout("showQuote()", quoteTimeout);
}

function fadeInDiv(divId, opacity) {
  if (opacity <= 100) {
	setOpacity(divId, opacity);
	opacity += 5;
	window.setTimeout("fadeInDiv('"+divId+"',"+opacity+")", 100);
  }
}

function setOpacity(divId, opacity) {
  var div = document.getElementById(divId);
  div.style.visibility = 'visible';
  opacity = (opacity == 100)?99.999:opacity;
  div.style.filter = "alpha(opacity:"+opacity+")";
  div.style.KHTMLOpacity = opacity/100;
  div.style.MozOpacity = opacity/100;
  div.style.opacity = opacity/100;
}

function changePic(imageName) {
  document.property_graphic.src = "images/" + imageName;
}

function changeGraphicDiv(divName) {
  document.getElementById(currentGraphicDiv).style.visibility = "hidden";
  document.getElementById(divName).style.visibility = "visible";
  currentGraphicDiv = divName;
}

