function showcasePositionImage( img, containerWidth, containerHeight, fill, autoHeight ) { var w = img.width; var h = img.height; var ratio = w/h; autoHeight = autoHeight || false; var imgW = 0; var imgH = 0; if( autoHeight || ratio >= 1 ) { // horizontal imgW = fill? containerWidth : Math.min( containerWidth, w ); //img.style.width = imgW + "px"; //img.style.height = "auto"; imgH = Math.floor( imgW / ratio ); } else { // vertical imgH = fill? containerHeight : Math.min( containerHeight, h ); //img.style.height = imgH + "px"; //img.style.width = "auto"; imgW = Math.floor( imgH * ratio ); } if( fill ) { if( autoHeight || imgW < containerWidth ) { imgW = containerWidth; imgH = Math.floor( imgW / ratio ); } if( imgH < containerHeight ) { imgH = containerHeight; imgW = Math.floor( imgH * ratio ); } } img.style.width = imgW + "px"; img.style.height = imgH + "px"; img.style.maxWidth = imgW + "px"; // counter-act some WP themes img.style.visibility = "visible"; // center it img.style.left = Math.floor( ( containerWidth - imgW ) / 2 ) + "px"; if( autoHeight ) { img.style.top = "0"; } else { img.style.top = Math.floor( ( containerHeight - imgH ) / 2 ) + "px"; } // special case for ddf if( img.closest('.region-DDF') ) { img.style.left = '0px'; img.style.top = '0px'; } } function showcaseAutoImage( img, margin, borderWidth, fill, autoHeight ) { if( img.parentNode.offsetWidth == 0 ) { setTimeout( function() { // f** IE showcaseAutoImage( img, margin, borderWidth, fill, autoHeight ); }, 100 ); return; } if( img.src && img.src.indexOf( "/progress" ) != -1 ) { return; } /* if( !img.width || !img.height ) { return; } */ /* // bill: in FF, the original "img" appears to have incorrect non-zero width // even though the image is not loaded var tempImage = new Image(); tempImage.src = img.src; if( tempImage.width == 0 || tempImage.height == 0 ) { if(img.onload ) { // already hooked up, no go? return; } img.onload = function() { showcaseAutoImage( this, margin, borderWidth, fill, autoHeight ); }; return; } */ img.style.margin = "0"; img.style.position = "absolute"; img.style.display = "block"; img.style.visibility = "visible"; var b = isNaN( borderWidth ) ? 1 : borderWidth; var inner = img.parentNode; var outer = img.parentNode.parentNode; var outerW = outer.offsetWidth; var outerH = outer.offsetHeight; var containerWidth = outerW - margin*2 - b*2; var containerHeight = outerH - margin*2 - b*2; inner.style.width = containerWidth + "px"; if( !autoHeight ) { inner.style.height = containerHeight + "px"; } inner.style.position = "absolute"; inner.style.left = margin + "px"; inner.style.top = margin + "px"; inner.style.overflow = "hidden"; // special case for ddf if( img.closest('.region-DDF') ) { img.style.left = '0px'; img.style.top = '0px'; } //inner.style.backgroundColor = "yellow"; if( outer.style.position != "absolute" ) { outer.style.position = "relative"; } if( img.src && img.src.indexOf( "/nophoto" ) != -1 ) { //img.onclick = null; //img.style.cursor = "default"; fill = false; } var progressElem = img.parentNode.querySelectorAll( ".progress" )[0]; if( progressElem ) { progressElem.parentNode.removeNode( progressElem ); } showcasePositionImage( img, containerWidth, containerHeight, fill, autoHeight ); if( autoHeight ) { var imgH = parseInt( img.style.height ); inner.style.height = imgH + "px"; outer.style.height = imgH + (margin*2) + "px"; } } var mrp_slideroll_images_96564 = []; var item = {}; item["img"] = new Image(); item["img"].src = "https://iss-cdn.myrealpage.com/HCwb8tEW0LY-pbpB6kbkOpQl7pIj1T7P6lLzwZI6PQ4/rs:auto:320:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzEvMC8zLzEwMTM4MTMwMS9lNzZhMjU5YmRiYTNiMmU1ODE0NjNmMDQ5OTY1YTZkOC5qcGVn"; item["url"] = "//idx.myrealpage.com/wps/mylistings/20976/listing.r2865483-2171-128-street-surrey-v4a-3v7.101381301"; item["desc"] = "$1,350,000 : 2171 128 Street Surrey"; item["banner"] = "//res.myrealpage.com/wps/rest/20976/l/showcase/101381301/img/ribbon/sold-banner"; item["recipLogo"] = ""; item["attribution"] = "Listed by eXp Realty"; mrp_slideroll_images_96564.push( item ); item["current"] = true; var item = {}; item["img"] = new Image(); item["img"].src = "https://iss-cdn.myrealpage.com/1Ec467LPy7whbi5pe4V0xOLwlL4XnEXlPZO69VnntPc/rs:auto:320:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzkvOC8zLzEwMTQ2NzM4OS9lMjljNzhjZmIyODE3YzQzYThjZDAwMWNhOTg2NDM2My5qcGVn"; item["url"] = "//idx.myrealpage.com/wps/mylistings/20976/listing.r2869972-48744-elk-view-road-chilliwack-v4z-1g9.101467389"; item["desc"] = "$700,000 : 48744 ELK VIEW Road Chilliwack"; item["banner"] = "//res.myrealpage.com/wps/img/pixel.gif"; item["recipLogo"] = ""; item["attribution"] = "Listed by eXp Realty"; mrp_slideroll_images_96564.push( item ); var item = {}; item["img"] = new Image(); item["img"].src = "https://iss-cdn.myrealpage.com/ig9tguQlFEdaKM57Uq9dkWUWPFBPt7qK-oBFDbRAWQ4/rs:auto:320:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzkvNS80Lzk3NjQ5NDU5LzUwOTVhYjU3ZmU0MjIyYjBkZGM4ZTI5Y2RlNzc3ZmUzLkpQRw"; item["url"] = "//idx.myrealpage.com/wps/mylistings/20976/listing.r2760393-12121-coughlin-court-mission-v4s-1c3.97649459"; item["desc"] = "$924,900 : 12121 COUGHLIN COURT Mission"; item["banner"] = "//res.myrealpage.com/wps/rest/20976/l/showcase/97649459/img/ribbon/custom-banner?txt=Lot+2-B&c=0x1f993b"; item["recipLogo"] = "\"Reciprocity"; item["attribution"] = "eXp Realty (Branch)"; mrp_slideroll_images_96564.push( item ); var item = {}; item["img"] = new Image(); item["img"].src = "https://iss-cdn.myrealpage.com/ID_yQKBEE6CnU3DH-q1-Fp_iLdP-v1smQD1It8GKpVc/rs:auto:320:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzYvOC83Lzk3ODI4Nzg2LzI3NGU0NDc4Njg1ZDliZjA0OWIxYmY4NzU4MWZiMjI5LkpQRw"; item["url"] = "//idx.myrealpage.com/wps/mylistings/20976/listing.r2744029-12161-coughlin-court-mission-v4s-1c3.97828786"; item["desc"] = "$1,999,900 : 12161 Coughlin Court Mission"; item["banner"] = "//res.myrealpage.com/wps/rest/20976/l/showcase/97828786/img/ribbon/custom-banner?txt=Lot+1-A&c=0x1f993b"; item["recipLogo"] = ""; item["attribution"] = "Listed by eXp Realty"; mrp_slideroll_images_96564.push( item ); var item = {}; item["img"] = new Image(); item["img"].src = "https://iss-cdn.myrealpage.com/0Lj_q_SagMi_sEVNnbFMsVKk3NbkVqOSbQFCEWbcjNE/rs:auto:320:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzMvNC82Lzk3MjEyNjQzLzQ1NGQzNTE0MzM1NzliNDI4NGY1Y2EzOTgxMjg3MDhmLmpwZw"; item["url"] = "//idx.myrealpage.com/wps/mylistings/20976/listing.r2810918-12041-coughlin-court-mission-v4s-1c3.97212643"; item["desc"] = "$1,999,900 : 12041 COUGHLIN COURT Mission"; item["banner"] = "//res.myrealpage.com/wps/rest/20976/l/showcase/97212643/img/ribbon/custom-banner?txt=Lot+4-D&c=0x1f993b"; item["recipLogo"] = "\"Reciprocity"; item["attribution"] = "eXp Realty (Branch)"; mrp_slideroll_images_96564.push( item ); document.write( "" + "" ); document.write( "\n
\n\t\n\t
\n\t\t\n\t\t\t