// recent listings object function recentListings(){ this.imgs = new Array(); this.txts = new Array(); this.ids = new Array(); this.ids[0] = '265192'; this.imgs[0] = 'AccountImg.aspx?i=listings/265192-0_thumb.jpg'; this.txts[0] = ''; this.txts[0] += '2 Family , Bayonne   '; this.txts[0] += 'Price: $355,000   '; this.txts[0] += 'Beds: 4   '; this.txts[0] += 'Baths: 2 Full   '; this.ids[1] = '265195'; this.imgs[1] = 'AccountImg.aspx?i=listings/265195-0_thumb.jpg'; this.txts[1] = ''; this.txts[1] += '1 Family Bayonne   '; this.txts[1] += 'Price: $359,900   '; this.txts[1] += 'Beds: 3   '; this.txts[1] += 'Baths: 2 Full   '; this.ids[2] = '264603'; this.imgs[2] = 'AccountImg.aspx?i=listings/264603-0_thumb.jpg'; this.txts[2] = ''; this.txts[2] += 'Franklin Twp One Family   '; this.txts[2] += 'Price: $375,000   '; this.txts[2] += 'Beds: 3   '; this.txts[2] += 'Baths: 2 Full   '; this.pos = -1; this.nextListing = function(){ this.pos = (this.pos == 2) ? 0 : this.pos + 1; this.newListing(this.pos); } this.prevListing = function(){ this.pos = (this.pos == 0) ? 2 : this.pos - 1; this.newListing(this.pos); } this.newListing = function(new_pos){ if(this.txts.length > 0){ document.getElementById('recent_listings').style.visibility = 'visible'; document.getElementById('recent_listings').style.display = 'block'; if(f2_scroller){ f2_scroller.d_element.style.visibility = 'hidden'; if(f2_scroller.timer) clearTimeout(f2_scroller.timer); } this.pos = new_pos; document.getElementById('f2_img').src = this.imgs[this.pos]; document.getElementById('f2_text').innerHTML = this.txts[this.pos]; f2_scroller = new textScroller('f2_text', 'f2_textwindow', 'f2_scroller', 1); f2_scroller.scroll(); } else { document.getElementById('recent_listings').style.visibility = 'hidden'; document.getElementById('recent_listings').style.display = 'none'; } } this.listID = function(){ return this.ids[this.pos]; } } // global scroller objects var f1_scroller; var f2_scroller; var recentObj; var gFeatID; function initScrollers(){ document.getElementById('f1_img').src = 'AccountImg.aspx?i=listings/237963-0_thumb.jpg'; document.getElementById('f1_text').innerHTML = 'Bayonne Co-op   Price: $210,000   Beds: 2   Baths: 1 Full   '; gFeatID = '237963'; document.getElementById('featured_home').style.visibility = 'visible'; document.getElementById('featured_home').style.display = 'block'; f1_scroller = new textScroller('f1_text', 'f1_textwindow', 'f1_scroller', 1); f1_scroller.scroll(); recentObj = new recentListings(); recentObj.newListing(0); }