function pick(n, min, max)
//this function is used to randomize the header images
{
 var values = [], i = max;
 while(i >= min) values.push(i--);
 var results = [];
 var maxIndex = max;
 
for(i=1; i <= n; i++)
 {
  maxIndex--;
  var index = Math.floor(maxIndex * Math.random());
  results.push(values[index]);
  values[index] = values[maxIndex];
 }

 for (i=0; i < results.length; i++)
 {
  results[i]=results[i]-1;
 }
 return results;
}

function openNewWindow(url)
{
 popupWin=window.open(url, 'new_window', 'scrollbars, dependent, width=300, height=300, left=5, top=5')
}

//this script is for the drop-down content on the resident and management services pages
function toggle(contentID)
{
 var this_id = contentID.substr(5);
 for ( var i=1; i <= 20; i++)
 {
  content_id = "drop_" + i;
  if (document.getElementById(content_id))
  {
   if (i == this_id)
   {
    if (document.getElementById(content_id).style.display == "inline-block")
    {
     document.getElementById(content_id).style.display = "none";
    }
    else
    {
     document.getElementById(content_id).style.display = "inline-block";
    }
   }
   else
   {
    document.getElementById(content_id).style.display = "none";
   }
  }
 }
}

