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_93404 = []; var item = {}; item["img"] = new Image(); item["img"].src = "https://iss-cdn.myrealpage.com/9ZVzDXh9PKD8VDoauaJN5v-0r_W7s4Mh1OWUmWaa-Z8/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzMvOC8wLzEwMzc3OTA4My9jY2ZkOGI1YTFkYjQ3YWU2YmY4NGJmM2RiYmFlN2I5My5qcGc"; item["url"] = "mylistings-103779083.property"; item["desc"] = "$350,000 : Playas del coco Playas del coco"; item["banner"] = "//res.myrealpage.com/wps/rest/37413/l/showcase/103779083/img/ribbon/custom-banner?txt=BEACH+PRIVATE+HOME&c=#4a90e2"; item["recipLogo"] = ""; item["attribution"] = "Listed by 011 (506) 88261211"; mrp_slideroll_images_93404.push( item ); item["current"] = true; var item = {}; item["img"] = new Image(); item["img"].src = "https://iss-cdn.myrealpage.com/qhihntliE-beAXbiDjX6VbofCM2KQb4yyn42I2-Adsc/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzgvMC8zLzEwMjU3OTMwOC9mODgwMzM2MmRkNjAyOGFjNGFlNThjZjdhMWNiYWI4ZS5qcGVn"; item["url"] = "mylistings-102579308.property"; item["desc"] = "$550,600 : Property close to the beach and 13km from the Liberia International Airport "; item["banner"] = "//res.myrealpage.com/wps/img/pixel.gif"; item["recipLogo"] = ""; item["attribution"] = "Listed by 011 (506) 88261211"; mrp_slideroll_images_93404.push( item ); var item = {}; item["img"] = new Image(); item["img"].src = "https://iss-cdn.myrealpage.com/JGwX8k0IdMuZY1o-1VLHlvZp3r_Gx3hKBlIIW6l5zoo/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzgvNC82LzEwMjYxODY0OC84NDk1Yjc0ODg2OTFiYjJhNGQ1ODE3MzYyZjRmNWE3ZC5KUEc"; item["url"] = "mylistings-102618648.property"; item["desc"] = "$100,000 : San Juanillo Beach "; item["banner"] = "//res.myrealpage.com/wps/img/pixel.gif"; item["recipLogo"] = ""; item["attribution"] = "Listed by 011 (506) 88261211"; mrp_slideroll_images_93404.push( item ); var item = {}; item["img"] = new Image(); item["img"].src = "https://iss-cdn.myrealpage.com/lyMBMVJNDCi41DR4gvQaNGRwcssNW_t63J8wslCkG5w/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzAvMy8xLzk4OTY0MTMwL2U3MzAzY2I5OTdkMzg3MDkyMjRiN2Y2NjA0YWZiOWQ3LkpQRw"; item["url"] = "mylistings-98964130.property"; item["desc"] = "$510,000 : Large Lot located at the heart of Playas Del Coco Commercial and Residential Playas Del Coco"; item["banner"] = "//res.myrealpage.com/wps/rest/37413/l/showcase/98964130/img/ribbon/custom-banner?txt=BEACH+PROPERTY&c=#1f993b"; item["recipLogo"] = ""; item["attribution"] = "Listed by 011 (506) 88261211"; mrp_slideroll_images_93404.push( item ); var item = {}; item["img"] = new Image(); item["img"].src = "https://iss-cdn.myrealpage.com/LSoj2ITjQwAX-67kkfF7vBR3kwNGgyLtzyfoYG11PPA/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzQvMi83LzEwNzQ2ODcyNC81N2QyM2UwOGU0MGJlNmE3NzNhMzRlZGMyZjc2ZmRlNC5qcGc"; item["url"] = "mylistings-107468724.property"; item["desc"] = "$210,000 : Playas del Coco Playas del coco"; item["banner"] = "//res.myrealpage.com/wps/rest/37413/l/showcase/107468724/img/ribbon/custom-banner?txt=BEACHFRONT+LOT&c=#1f993b"; item["recipLogo"] = ""; item["attribution"] = "Listed by 011 (506) 88261211"; mrp_slideroll_images_93404.push( item ); var item = {}; item["img"] = new Image(); item["img"].src = "https://iss-cdn.myrealpage.com/kNWxkbIgVP7RyCxChhIiKjVhAoFzoxHSg-6FZ_Xkvao/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzQvNy8yLzEwNDI2ODI3NC83ZTA4NWQ4NzcxNzM5M2FhMDcyYjA0MWVmZmFhZTg2OS5qcGc"; item["url"] = "mylistings-104268274.property"; item["desc"] = "$190,000 : Playas del Coco-Vista Perfecta Playas Del Coco"; item["banner"] = "//res.myrealpage.com/wps/img/pixel.gif"; item["recipLogo"] = ""; item["attribution"] = "Listed by 011 (506) 88261211"; mrp_slideroll_images_93404.push( item ); document.write( "" + "" ); document.write( "\n
\n\t\n\t
\n\t\t\n\t\t\t