
// dStts: Display Status
function dStts(oStatus) {
cStts = false;
if(document.images) {
  window.status = oStatus;
  cStts = true; }
}

// dService: Display Years of Service
function dService(dBase) {
var now = new Date;
var svcyears = now.getYear();
if(svcyears<=2000) { svcyears=svcyears+1900; }
svcyears = svcyears-dBase;
return svcyears;
}


// viewMLS: Switch MLS view to new location
function viewMLS(form) {
window.location = 'c21redtl.mv?' + form.ff_prpid.value;
}

// jDATE: Returns Julian Day
function jDATE() {
var jd = 0;
var today = new Date();
var Y = today.getYear();
if(Y<2000) {Y+=1900;}
if(Y<2000) {Y+=100;}
var M = today.getMonth()+1;
var D = today.getDate();
var UT = 12;
with (Math) { jd=367*Y-floor(7*(Y+floor((M+9)/12))/4)-floor(3*(floor((Y+(M-9)/7)/100)+1)/4)+floor(275*M/9)+D+1721028.5+UT/24.0; }
return jd;
}

// rNG: Random Number Generator
function rand(number) {
seed = (0x015A4E35 * seed) % 0x7FFFFFFF;
return (seed >> 16) % number;
}

// makeArray: Make An Array
function makeArray(elements) {
for(var i=0;i<elements;i++) { this[i] = null; }
this.length = elements;
}

jsI = true;
window.defaultStatus = 'CENTURY 21 Landmark Properties';
var rStts = 'CENTURY 21 Landmark Properties';
var now = new Date();
var seed = now.getTime() % 0x7FFFFFFF;
var dMsg;
var cStts = false;
var now = new Date;
var fstring = 'm'+now.getYear()+(now.getHours()+100)+(now.getMinutes()+100);
var xmouseadj = 10;
var ymouseadj = -161;

//viewMenu(elementIdentifier)
// Toggles the menu element into visibility
function viewMenu(id) {
 var layer;
 if(document.getElementById) {
  layer = document.getElementById(id).style;
  layer.visibility = 'visible'; }
 else
  if (document.layers) {
   layer = document.layers[id];
   layer.visibility = 'show'; }
  else
   if(document.all) {
    layer = document.all[id];
    layer.style.visibility = 'visible'; }
}
//hideMenu(elementIdentifier)
// Toggles the menu element into hiding
function hideMenu(id) {
 var layer;
 if(document.getElementById) {
  layer = document.getElementById(id).style;
  layer.visibility = 'hidden'; }
 else
  if (document.layers) {
   layer = document.layers[id];
   layer.visibility = 'hidden'; }
  else
   if(document.all) {
    layer = document.all[id];
    layer.style.visibility = 'hidden'; }
}

// number of CT scenes
var gCOUNT = 9;
var gIMGS = new makeArray(gCOUNT);
gIMGS[0] = '<img class="div008" src="images/ctscene_01.jpg" width="250" height="321" alt="Berries">';
gIMGS[1] = '<img class="div008" src="images/ctscene_02.jpg" width="250" height="321" alt="Coverd Bridge">';
gIMGS[2] = '<img class="div008" src="images/ctscene_03.jpg" width="250" height="321" alt="Ridgefield Parade">';
gIMGS[3] = '<img class="div008" src="images/ctscene_04.jpg" width="250" height="321" alt="Country Lane">';
gIMGS[4] = '<img class="div008" src="images/ctscene_05.jpg" width="250" height="321" alt="Winter Scene">';
gIMGS[5] = '<img class="div008" src="images/ctscene_06.jpg" width="250" height="321" alt="Hartford Fireworks">';
gIMGS[6] = '<img class="div008" src="images/ctscene_07.jpg" width="250" height="321" alt="Balloons">';
gIMGS[7] = '<img class="div008" src="images/ctscene_08.jpg" width="250" height="321" alt="Fall Colors">';
gIMGS[8] = '<img class="div008" src="images/ctscene_09.jpg" width="250" height="321" alt="Ridgefield">';

// number of Home scenes
var hCOUNT = 5;
var hIMGS = new makeArray(hCOUNT);
hIMGS[0] = '<img class="div007" src="images/homescene_01.jpg" width="250" height="345" alt="Country Living">';
hIMGS[1] = '<img class="div007" src="images/homescene_02.jpg" width="250" height="345" alt="Country Living">';
hIMGS[2] = '<img class="div007" src="images/homescene_03.jpg" width="250" height="345" alt="Country Living">';
hIMGS[3] = '<img class="div007" src="images/homescene_04.jpg" width="250" height="345" alt="Country Living">';
hIMGS[4] = '<img class="div007" src="images/homescene_05.jpg" width="250" height="345" alt="Country Living">';

// number of Train scenes
var tCOUNT = 12;
var tIMGS = new makeArray(tCOUNT);
tIMGS[0] = '<img src="images/mn01_200x140.jpg" style="border:#cc6633 4px double;" width="200" height="140" alt="Branchville Station" title="Branchville Station"><br clear="all">Branchville Station (Ridgefield)';
tIMGS[1] = '<img src="images/mn02_200x140.jpg" style="border:#cc6633 4px double;" width="200" height="140" alt="Goldens Bridge Station" title="Goldens Bridge Station"><br clear="all">Goldens Bridge Station';
tIMGS[2] = '<img src="images/mn03_200x140.jpg" style="border:#cc6633 4px double;" width="200" height="140" alt="Katonah Station" title="Katonah Station"><br clear="all">Katonah Station';
tIMGS[3] = '<img src="images/mn04_200x140.jpg" style="border:#cc6633 4px double;" width="200" height="140" alt="Purdys Station" title="Purdys Station"><br clear="all">Purdy&#8217;s Station';
tIMGS[4] = '<img src="images/mn05_200x140.jpg" style="border:#cc6633 4px double;" width="200" height="140" alt="West Redding Station" title="West Redding Station"><br clear="all">West Redding Station (Redding)';
tIMGS[5] = '<img src="images/mn06_200x140.jpg" style="border:#cc6633 4px double;" width="200" height="140" alt="Wilton Station" title="Wilton Station"><br clear="all">Wilton Station';
tIMGS[6] = '<img src="images/mn07_200x140.jpg" style="border:#cc6633 4px double;" width="200" height="140" alt="Fairfield Station" title="Fairfield Station"><br clear="all">Fairfield Station';
tIMGS[7] = '<img src="images/mn08_200x140.jpg" style="border:#cc6633 4px double;" width="200" height="140" alt="Westport Station" title="Westport Station"><br clear="all">Westport Station';
tIMGS[8] = '<img src="images/mn09_200x140.jpg" style="border:#cc6633 4px double;" width="200" height="140" alt="South Norwalk Station" title="South Norwalk Station"><br clear="all">South Norwalk';
tIMGS[9] = '<img src="images/mn10_200x140.jpg" style="border:#cc6633 4px double;" width="200" height="140" alt="Darien Station" title="Darien Station"><br clear="all">Darien Station';
tIMGS[10] = '<img src="images/mn11_200x140.jpg" style="border:#cc6633 4px double;" width="200" height="140" alt="New Caanan Station" title="New Caanan Station"><br clear="all">New Caanan Station';
tIMGS[11] = '<img src="images/gc_200x137.jpg" style="border:#cc6633 4px double;" width="200" height="137" alt="Grand Centeral Terminal" title="Grand Centeral Terminal"><br clear="all">Grand Centeral Terminal';

// number of Air scenes
var aCOUNT = 8;
var aIMGS = new makeArray(aCOUNT);
aIMGS[0] = '<img src="images/at01_200x140.jpg" style="border:#cc6633 4px double;" width="200" height="140" alt="Northwest Airlines Airbus A320-212" title="Northwest Airlines Airbus A320-212"><br clear="all">Northwest Airlines<br>Airbus A320-212';
aIMGS[1] = '<img src="images/at02_200x140.jpg" style="border:#cc6633 4px double;" width="200" height="140" alt="Southwest Airlines Boeing 737-3H4" title="Southwest Airlines Boeing 737-3H4"><br clear="all">Southwest Airlines<br>Boeing 737-3H4';
aIMGS[2] = '<img src="images/at03_200x140.jpg" style="border:#cc6633 4px double;" width="200" height="140" alt="Song Boeing 757-232" title="Song Boeing 757-232"><br clear="all">Song<br>Boeing 757-232';
aIMGS[3] = '<img src="images/at04_200x140.jpg" style="border:#cc6633 4px double;" width="200" height="140" alt="US Airways Boeing 737-4B7" title="US Airways Boeing 737-4B7"><br clear="all">US Airways<br>Boeing 737-4B7';
aIMGS[4] = '<img src="images/at05_200x140.jpg" style="border:#cc6633 4px double;" width="200" height="140" alt="American Eagle Embraer ERJ-135ER" title="American Eagle Embraer ERJ-135ER"><br clear="all">American Eagle<br>Embraer ERJ-135ER';
aIMGS[5] = '<img src="images/at06_200x140.jpg" style="border:#cc6633 4px double;" width="200" height="140" alt="United Express Embraer 170-100ST" title="United Express Embraer 170-100ST"><br clear="all">United Express<br>Embraer 170-100ST';
aIMGS[6] = '<img src="images/at07_200x140.jpg" style="border:#cc6633 4px double;" width="200" height="140" alt="Delta Air Lines McDonnell Douglas MD-88" title="Delta Air Lines McDonnell Douglas MD-88"><br clear="all">Delta Air Lines<br>McDonnell Douglas MD-88';
aIMGS[7] = '<img src="images/at08_200x140.jpg" style="border:#cc6633 4px double;" width="200" height="140" alt="Delta Air Lines Boeing 737-832" title="Delta Air Lines Boeing 737-832"><br clear="all">Delta Air Lines<br>Boeing 737-832';

