function reloadForeclosures(week,day,county,isnew) { if (isnew == "true") browserHistory.put(section + "|" + week + "|" + day + "|" + county); datapage = "__getforeclosures.php"; busy = true; if (carea == "main") { carea = "scroll"; oarea = "main"; } else { carea = "main"; oarea = "scroll"; } try { $('piccol').style.overflow = "hidden"; } catch (e) { } if (!hasmoved) { $('scontent').setStyle({ height: $('maincontent').getHeight() + "px" }); hasmoved = true; } else $('scontent').setStyle({ height: $('scontent').getHeight() + "px" }); new Ajax.Updater('testarea','http://realestate.alexcooper.com/data/' + datapage + '?week=' + week + '&day=' + day + '&county=' + county, { onComplete: function() { $('scontent').style.overflow = "hidden"; new Effect.Morph('scontent', { duration: 0.5, style: 'height: ' + $('testarea').getHeight() + 'px', afterFinish: function() { $(carea + 'content').innerHTML = $('testarea').innerHTML; new Effect.Parallel( [ new Effect.Fade(oarea + 'content', { from: 1.00, to: 0.01 }), new Effect.Appear(carea + 'content', { from: 0.00, to: 1.00 }) ], { duration: 1, afterFinish: function() { $(oarea + 'content').innerHTML = " "; $('testarea').innerHTML = ""; busy = false; } }); } }); } }); } function loadForeclosure(id) { if (busy == true) return; section = "foreclosures-details"; historyid = parseInt(currenthistoryid) + 1; browserHistory.put(section + "|" + id + "|" + historyid); currenthistoryid = historyid; handleHistory(section + "|" + id + "|" + historyid); } function switchForeclosures() { if (busy == true) return; if (section == "foreclosures") return; morphForeclosures(); // Switch to Foreclosures Here section = "foreclosures"; reloadForeclosures("","","","true"); } function morphForeclosures() { $('featuredtab').morph('color: #FFFFFF;background-color: #1e3046;'); $('foreclosuretab').morph('color: #1e3046;background-color: #FFFFFF;'); new Effect.Fade('pageheader', { duration: 0.5, afterFinish: function() { $('pageheader').innerHTML = "Upcoming Foreclosures"; new Effect.Appear('pageheader', { duration: 0.5 }); } }); }