// recent listings object function recentListings(){ this.imgs = new Array(); this.txts = new Array(); this.ids = new Array(); this.ids[0] = '287059'; this.imgs[0] = 'AccountImg.aspx?i=listings/287059-0_thumb.jpg'; this.txts[0] = ''; this.txts[0] += 'Price: $395,000   '; this.txts[0] += 'Beds: 4   '; this.txts[0] += 'Baths: 2 + 1 Half   '; this.ids[1] = '286987'; this.imgs[1] = 'AccountImg.aspx?i=listings/286987-0_thumb.jpg'; this.txts[1] = ''; this.txts[1] += 'Price: $22,500   '; this.txts[1] += 'Beds: 2   '; this.txts[1] += 'Baths: 1 Full   '; this.ids[2] = '286972'; this.imgs[2] = 'AccountImg.aspx?i=listings/286972-0_thumb.jpg'; this.txts[2] = ''; this.txts[2] += 'Price: $27,500   '; this.txts[2] += 'Beds: 3   '; this.txts[2] += 'Baths: 1 + 1 Half   '; 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/286990-0_thumb.jpg'; document.getElementById('f1_text').innerHTML = 'INVESTMENT OPPORTUNITY!    Price: $455,000   Beds: 3   Baths: 2 Full   '; gFeatID = '286990'; 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); }