﻿// JScript File
var c=1;
var t;
var timer_is_on=0;

function TimerToggle()
{
if (!timer_is_on)
  {
   timer_is_on=1;
   timedCount();
  }
  else
  {
    clearTimeout(t);
    timer_is_on=0;
  }
}

function timedCount()
{
var divID = "prop_" + c;
var divIDZ = "prop_" + (c-1);
if(c==1)
{divIDZ = "prop_25";}
try
{document.getElementById(divIDZ).style.display = "none";}
catch(e){}
document.getElementById(divID).style.display = "block";
if(c==25)
{c=1;}
else
{
c=c+1;
}
t=setTimeout("timedCount()",4000);
}

function doTimer()
{
if (!timer_is_on)
  {
  timer_is_on=1;
  timedCount();
  }
}

    function showMap(id, address)
    {
        var map = "<iframe width=\"728\" height=\"350\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=" + address + "&amp;ie=UTF8&amp;hq=&amp;hnear=" + address + "&amp;z=16&amp;iwloc=A&amp;output=embed\"></iframe><br /><small><a href=\"http://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=" + address + "&amp;ie=UTF8&amp;hq=&amp;hnear=" + address + "&amp;z=16&amp;iwloc=A\" style=\"color:#0000FF;text-align:left\">View Larger Map</a></small>";
        var docID = "infoDIV_" + id;
        var docID2 = "infoDIV2_" + id;
        document.getElementById(docID2).innerHTML = map;
        document.getElementById(docID).style.display = "block";
        document.getElementById(docID2).style.textAlign = "left";
    }
    function showWalk(id, address)
    {
        var walkscore = "<iframe width=\"728\" height=\"350\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"WalkScore.aspx?address=" + address + "\"></iframe>";
        var docID = "infoDIV_" + id;
        var docID2 = "infoDIV2_" + id;
        document.getElementById(docID2).innerHTML = walkscore;
        document.getElementById(docID).style.display = "block";
        document.getElementById(docID2).style.textAlign = "left";
    }
    function showSchools(id, address, city, stateLong)
    {
        var schoolDIV = "<iframe width=\"728\" height=\"375\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"LocalSchools.aspx?address=" + address + "&city=" + city + "&stateLong=" + stateLong + "\"></iframe>";
        var docID = "infoDIV_" + id;
        var docID2 = "infoDIV2_" + id;
        document.getElementById(docID2).innerHTML = schoolDIV;
        document.getElementById(docID2).style.textAlign = "left";
        document.getElementById(docID).style.display = "block";
    }
    function showCity(id)
    {
        var cityDIV = document.getElementById("cityData").innerHTML;
        var docID = "infoDIV_" + id;
        var docID2 = "infoDIV2_" + id;
        document.getElementById(docID2).innerHTML = cityDIV;
        document.getElementById(docID2).style.textAlign = "left";
        document.getElementById(docID).style.display = "block";
    }
    function CloseDIV(id)
    {
        document.getElementById(id).style.display = "none";
    }
    function showIMG(id)
    {
        var imgDIV = "IMGS_" + id;
        var theIMGS = document.getElementById(imgDIV).innerHTML;
        var docID = "infoDIV_" + id;
        var docID2 = "infoDIV2_" + id;
        document.getElementById(docID2).innerHTML = theIMGS;
        document.getElementById(docID2).style.textAlign = "left";
        document.getElementById(docID).style.display = "block";
    }
