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_27711 = [];
var item = {};
item["img"] = new Image();
item["img"].src = "https://iss-cdn.myrealpage.com/iSZhubNkn9_g1GeutrOPBVyTXcjlsgFG2SswR7eWEgc/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzEvOS8wLzExMDI3NjA5MS9mZTZiZjc4ZmUzMDZlOTMzYzk1MmJkNWQxMzBhY2JmYy5qcGVn";
item["url"] = "mylistings-110276091.property";
item["desc"] = "$1,798,000 : 1467 E 20th Avenue Vancouver";
item["banner"] = "//res.myrealpage.com/wps/rest/20196/l/showcase/110276091/img/ribbon/new-banner";
item["recipLogo"] = "";
item["attribution"] = "Listed by RE/MAX Crest Realty";
mrp_slideroll_images_27711.push( item );
item["current"] = true;
var item = {};
item["img"] = new Image();
item["img"].src = "https://iss-cdn.myrealpage.com/uGJY0mhqgSNIF0eoAtSlivg5hmdkQQFhqsEylUzgdIQ/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzEvOS8wLzExMDI3NjA5MS8zZmEwODQ4Yzg4YmFiODhlNGZmNjc4ZWE1Y2Y5ODE2ZC5qcGVn";
item["url"] = "mylistings-110276091.property";
item["desc"] = "$1,798,000 : 1467 E 20th Avenue Vancouver";
item["banner"] = "//res.myrealpage.com/wps/rest/20196/l/showcase/110276091/img/ribbon/new-banner";
item["recipLogo"] = "";
item["attribution"] = "Listed by RE/MAX Crest Realty";
mrp_slideroll_images_27711.push( item );
var item = {};
item["img"] = new Image();
item["img"].src = "https://iss-cdn.myrealpage.com/DDSxfvys_ivkSgvOxchPcpZrOlejTnAxYUBYk9MY4jk/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzEvOS8wLzExMDI3NjA5MS85ODU5NWJiOTQ4ZTc1NDQzNzE4MzhhYjkxNGI3NDJlNC5qcGVn";
item["url"] = "mylistings-110276091.property";
item["desc"] = "$1,798,000 : 1467 E 20th Avenue Vancouver";
item["banner"] = "//res.myrealpage.com/wps/rest/20196/l/showcase/110276091/img/ribbon/new-banner";
item["recipLogo"] = "";
item["attribution"] = "Listed by RE/MAX Crest Realty";
mrp_slideroll_images_27711.push( item );
var item = {};
item["img"] = new Image();
item["img"].src = "https://iss-cdn.myrealpage.com/3krQxSAqkdPn9JzgwQi3NW1xE3w0ed3mhHRYRRrmSDc/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzEvOS8wLzExMDI3NjA5MS9hNmI2N2E4NzhlZDVhNGJiMTQ2YjM0NjBlOWUwMTY3MC5qcGVn";
item["url"] = "mylistings-110276091.property";
item["desc"] = "$1,798,000 : 1467 E 20th Avenue Vancouver";
item["banner"] = "//res.myrealpage.com/wps/rest/20196/l/showcase/110276091/img/ribbon/new-banner";
item["recipLogo"] = "";
item["attribution"] = "Listed by RE/MAX Crest Realty";
mrp_slideroll_images_27711.push( item );
var item = {};
item["img"] = new Image();
item["img"].src = "https://iss-cdn.myrealpage.com/7jc4sSy4w57BJJf4BJoy_omvLkmPokCOz04W0c9ZmPQ/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzcvMi8xLzExMDIyNzEyNy9hYjhkYjFjODQwZGJlNGNjNThhN2FiMWU1YmQ4MjIxMS5qcGc";
item["url"] = "mylistings-110227127.property";
item["desc"] = "$1,175,000 : 1372 Saturna Drive ";
item["banner"] = "//res.myrealpage.com/wps/rest/20196/l/showcase/110227127/img/ribbon/custom-banner?txt=Parksville+House%21&c=#4a90e2";
item["recipLogo"] = "";
item["attribution"] = "See Realtor.ca for full listing details.";
mrp_slideroll_images_27711.push( item );
var item = {};
item["img"] = new Image();
item["img"].src = "https://iss-cdn.myrealpage.com/dNINKw_7-GDKthF6H2nDw6Nsezwkgkp9G4lodEokKNk/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzcvMi8xLzExMDIyNzEyNy85N2IyOGU3OWIwNTVhY2YwYmFkNDM5ZGI1N2ZjMTZiYi5qcGc";
item["url"] = "mylistings-110227127.property";
item["desc"] = "$1,175,000 : 1372 Saturna Drive ";
item["banner"] = "//res.myrealpage.com/wps/rest/20196/l/showcase/110227127/img/ribbon/custom-banner?txt=Parksville+House%21&c=#4a90e2";
item["recipLogo"] = "";
item["attribution"] = "See Realtor.ca for full listing details.";
mrp_slideroll_images_27711.push( item );
var item = {};
item["img"] = new Image();
item["img"].src = "https://iss-cdn.myrealpage.com/2oNawk7nsztMB__zifVIZBDh9TBxCsF0DUAF1piGUrI/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzcvMi8xLzExMDIyNzEyNy9lMmQyODgwMGJhMDlhNjA4MjZhN2VhZjIwY2UxNjZjMi5KUEc";
item["url"] = "mylistings-110227127.property";
item["desc"] = "$1,175,000 : 1372 Saturna Drive ";
item["banner"] = "//res.myrealpage.com/wps/rest/20196/l/showcase/110227127/img/ribbon/custom-banner?txt=Parksville+House%21&c=#4a90e2";
item["recipLogo"] = "";
item["attribution"] = "See Realtor.ca for full listing details.";
mrp_slideroll_images_27711.push( item );
var item = {};
item["img"] = new Image();
item["img"].src = "https://iss-cdn.myrealpage.com/01EZ4d_A-t2fmYS4LZTRJc1KEnSBn-nBi9nPFYaoRCQ/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzcvMi8xLzExMDIyNzEyNy9iYWQ2MDA2ODNjZDllNjJlYzE1YjBiZWFiN2I2NDMzNC5qcGc";
item["url"] = "mylistings-110227127.property";
item["desc"] = "$1,175,000 : 1372 Saturna Drive ";
item["banner"] = "//res.myrealpage.com/wps/rest/20196/l/showcase/110227127/img/ribbon/custom-banner?txt=Parksville+House%21&c=#4a90e2";
item["recipLogo"] = "";
item["attribution"] = "See Realtor.ca for full listing details.";
mrp_slideroll_images_27711.push( item );
var item = {};
item["img"] = new Image();
item["img"].src = "https://iss-cdn.myrealpage.com/zGpdWjIPqmTrGzRLAhGB9IC_tIwvPGXspDQHumzmX60/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzUvNS8zLzExMDE5NzM1NS85ODc4MGJhZTJjNmI2ZjVhOWJhMjQxNjZmODkwZTRkZi5qcGVn";
item["url"] = "mylistings-110197355.property";
item["desc"] = "$299,900 : 501 1250 Burnaby Street Vancouver";
item["banner"] = "//res.myrealpage.com/wps/rest/20196/l/showcase/110197355/img/ribbon/custom-banner?txt=Ocean+View%21&c=#4a90e2";
item["recipLogo"] = "";
item["attribution"] = "Listed by RE/MAX Crest Realty";
mrp_slideroll_images_27711.push( item );
var item = {};
item["img"] = new Image();
item["img"].src = "https://iss-cdn.myrealpage.com/uzAN2QundCW3yMtlqB-tU5llqbkclwRsC9BFtz_vdHM/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzUvNS8zLzExMDE5NzM1NS9lNDQ4YjY4Yzk1NDJlNTg5ODMxYjRkZDQ2YTc4NDUzYy5qcGVn";
item["url"] = "mylistings-110197355.property";
item["desc"] = "$299,900 : 501 1250 Burnaby Street Vancouver";
item["banner"] = "//res.myrealpage.com/wps/rest/20196/l/showcase/110197355/img/ribbon/custom-banner?txt=Ocean+View%21&c=#4a90e2";
item["recipLogo"] = "";
item["attribution"] = "Listed by RE/MAX Crest Realty";
mrp_slideroll_images_27711.push( item );
var item = {};
item["img"] = new Image();
item["img"].src = "https://iss-cdn.myrealpage.com/_MJmVPf1BEQ97npCnbn3wc6Gdc5qCWxwYRNdJZWveNY/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzUvNS8zLzExMDE5NzM1NS80YzZmM2Q2MzlmNTgxYTk2NDdjNmNjNmRkZWE0NjkzZS5qcGVn";
item["url"] = "mylistings-110197355.property";
item["desc"] = "$299,900 : 501 1250 Burnaby Street Vancouver";
item["banner"] = "//res.myrealpage.com/wps/rest/20196/l/showcase/110197355/img/ribbon/custom-banner?txt=Ocean+View%21&c=#4a90e2";
item["recipLogo"] = "";
item["attribution"] = "Listed by RE/MAX Crest Realty";
mrp_slideroll_images_27711.push( item );
var item = {};
item["img"] = new Image();
item["img"].src = "https://iss-cdn.myrealpage.com/OUxPzIyYihTv1BaeMAKCbzeR0bUrdXCbZW2hAz5j1Ps/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzUvNS8zLzExMDE5NzM1NS9lYmE5M2ZiZmYzNTI0MWU4YzkyZTM5YmNhMjhhM2I5Yy5qcGVn";
item["url"] = "mylistings-110197355.property";
item["desc"] = "$299,900 : 501 1250 Burnaby Street Vancouver";
item["banner"] = "//res.myrealpage.com/wps/rest/20196/l/showcase/110197355/img/ribbon/custom-banner?txt=Ocean+View%21&c=#4a90e2";
item["recipLogo"] = "";
item["attribution"] = "Listed by RE/MAX Crest Realty";
mrp_slideroll_images_27711.push( item );
var item = {};
item["img"] = new Image();
item["img"].src = "https://iss-cdn.myrealpage.com/yvoxS_AvVzhP2te7vDV1EeNwmrnK4K0s4EpCNEBcPdU/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzcvNS8zLzExMDE5NzM1Ny85NzRjNjAwNWRlYjNkOTEyODEyMGNlZjAxMzZmYTNkMy5qcGVn";
item["url"] = "mylistings-110197357.property";
item["desc"] = "$299,900 : 1205 1250 Burnaby Street Vancouver";
item["banner"] = "//res.myrealpage.com/wps/rest/20196/l/showcase/110197357/img/ribbon/custom-banner?txt=Penthouse%21&c=#4a90e2";
item["recipLogo"] = "";
item["attribution"] = "Listed by RE/MAX Crest Realty";
mrp_slideroll_images_27711.push( item );
var item = {};
item["img"] = new Image();
item["img"].src = "https://iss-cdn.myrealpage.com/S-Vab2R3QQ26_uaDFIBzJXTEZyS1fCHWw1oWUUwzIBY/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzcvNS8zLzExMDE5NzM1Ny9kNWIyY2JkMDIxNGE3Y2Q3ZTZmOTcxYjIwZTVjNmVhZC5qcGVn";
item["url"] = "mylistings-110197357.property";
item["desc"] = "$299,900 : 1205 1250 Burnaby Street Vancouver";
item["banner"] = "//res.myrealpage.com/wps/rest/20196/l/showcase/110197357/img/ribbon/custom-banner?txt=Penthouse%21&c=#4a90e2";
item["recipLogo"] = "";
item["attribution"] = "Listed by RE/MAX Crest Realty";
mrp_slideroll_images_27711.push( item );
var item = {};
item["img"] = new Image();
item["img"].src = "https://iss-cdn.myrealpage.com/1pyOBVXJsnrxnXivYKamsYbJli1VvKnTqkiEkqizjGc/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzcvNS8zLzExMDE5NzM1Ny9mMjFlMGNiYWM5ODIyZTQyNDViOWIwYWMzMmM0N2IzMS5qcGVn";
item["url"] = "mylistings-110197357.property";
item["desc"] = "$299,900 : 1205 1250 Burnaby Street Vancouver";
item["banner"] = "//res.myrealpage.com/wps/rest/20196/l/showcase/110197357/img/ribbon/custom-banner?txt=Penthouse%21&c=#4a90e2";
item["recipLogo"] = "";
item["attribution"] = "Listed by RE/MAX Crest Realty";
mrp_slideroll_images_27711.push( item );
var item = {};
item["img"] = new Image();
item["img"].src = "https://iss-cdn.myrealpage.com/2J5f75EOEtVHFnrGPuPD9cCfadBnEA3cmAFwctwOREU/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzcvNS8zLzExMDE5NzM1Ny9iMmUyMWRlOTQ0NDMyMzRmMGY4NGRhM2UyM2JmNWY2Ni5qcGVn";
item["url"] = "mylistings-110197357.property";
item["desc"] = "$299,900 : 1205 1250 Burnaby Street Vancouver";
item["banner"] = "//res.myrealpage.com/wps/rest/20196/l/showcase/110197357/img/ribbon/custom-banner?txt=Penthouse%21&c=#4a90e2";
item["recipLogo"] = "";
item["attribution"] = "Listed by RE/MAX Crest Realty";
mrp_slideroll_images_27711.push( item );
document.write( "