var activeslideshow = false; var hasmoved = false; function reloadProperties(page,isnew) { var perpage = globalperpage; if (isnew == "true") browserHistory.put(section + "|" + page + "|" + perpage); datapage = "__getfeatured.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 + '?page=' + page + '&perpage=' + perpage, { 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 = " "; $('scontent').setStyle({ height: "auto" }); $('testarea').innerHTML = ""; busy = false; } }); } }); } }); } function loadFeatured(id) { if (busy == true) return; section = "featured-details"; browserHistory.put(section + "|" + id); handleHistory(section + "|" + id); } function loadGallery(id) { if (busy == true) return; section = "gallery"; browserHistory.put(section + "|" + id); handleHistory(section + "|" + id); } function loadDetails(page) { if (section == "featured-details") datapage = "__getfeatureddetails.php"; if (section == "foreclosures-details") datapage = "__getforeclosuresdetails.php"; if (section == "gallery") datapage = "__getgallery.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 + '?id=' + page, { onComplete: function() { new Effect.Morph('scontent', { duration: 0.5, style: 'height: ' + $('testarea').getHeight() + 'px', afterFinish: function() { window.scrollTo(0, 1); $(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 = " "; $('scontent').setStyle({ height: "auto" }); $('testarea').innerHTML = ""; busy = false; initLightbox(); } }); } }); } }); } function morphFeatured() { $('foreclosuretab').morph('color: #FFFFFF;background-color: #1e3046;'); $('featuredtab').morph('color: #1e3046;background-color: #FFFFFF;'); new Effect.Fade('pageheader', { duration: 0.5, afterFinish: function() { $('pageheader').innerHTML = "Upcoming Auctions"; new Effect.Appear('pageheader', { duration: 0.5 }); } }); } function switchFeatured() { if (busy == true) return; if (section == "featured") return; morphFeatured(); // Switch to Featured Here section = "featured"; reloadProperties(1,"true"); } function loadGallerySlideshow(id) { // //if (activeslideshow == true) // return false; //activeslideshow = true; day = new Date(); uid = day.getTime(); eval("page" + uid + " = window.open('http://realestate.alexcooper.com/smoothgallery/demo.php?id=" + id + "','" + uid + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=460,height=345');"); }