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_36783 = [];
var item = {};
item["img"] = new Image();
item["img"].src = "https://iss-cdn.myrealpage.com/8U8xjNs24-wFk2hMxVivqK51DED6Yxl6e5GQaYevX9Q/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzcvMy85LzEwODc4OTkzNy9mYjYwOTViNjhiNDViZTljMjNkY2M4YjMyOWMwYmZkZi5qcGVn";
item["url"] = "http://www.normcholak.com/norms-listings/l/listing.e4488530-2942-kostash-drive-sw-edmonton-t6w-3j8.108789937";
item["desc"] = "$1,095,000 : 2942 KOSTASH Drive SW Edmonton";
item["banner"] = "//res.myrealpage.com/wps/img/pixel.gif";
item["recipLogo"] = "";
item["attribution"] = "Courtesy of Norm Cholak of REMAX River City";
mrp_slideroll_images_36783.push( item );
item["current"] = true;
var item = {};
item["img"] = new Image();
item["img"].src = "https://iss-cdn.myrealpage.com/DZbl0CxZpW9l9uxCcSg1nRqS_QV469EephdHHu5kgMM/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzYvNC85LzEwODA5NTk0Ni8wMDU1ZjI4ZDBjNWU2ZWU2OTdmYjgyNTY4YTM3OWMzNS5qcGVn";
item["url"] = "http://www.normcholak.com/norms-listings/l/listing.e4474991-4401-10360-102-street-nw-edmonton-t5j-0k6.108095946";
item["desc"] = "$1,050,000 : 4401 10360 102 Street NW Edmonton";
item["banner"] = "//res.myrealpage.com/wps/img/pixel.gif";
item["recipLogo"] = "";
item["attribution"] = "Courtesy of Norm Cholak of REMAX River City";
mrp_slideroll_images_36783.push( item );
var item = {};
item["img"] = new Image();
item["img"].src = "https://iss-cdn.myrealpage.com/ZtZmcCTYEUaDZ7nSYlpCH2mo9JLAKgsJ91LXtMZBGqs/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzIvMy8xLzEwODMwNTEzMi9iYzU3ODA4ZmYyZDE2ZmIyZDMwYTEzNTI3ZDIzNjM2MS5qcGVn";
item["url"] = "http://www.normcholak.com/norms-listings/l/listing.e4478959-610-albany-way-nw-edmonton-t6v-0h3.108305132";
item["desc"] = "$648,000 : 610 ALBANY Way NW Edmonton";
item["banner"] = "//res.myrealpage.com/wps/img/pixel.gif";
item["recipLogo"] = "";
item["attribution"] = "Courtesy of Norm Cholak of REMAX River City";
mrp_slideroll_images_36783.push( item );
var item = {};
item["img"] = new Image();
item["img"].src = "https://iss-cdn.myrealpage.com/ku_XkXZ_O8Vx91UQdzK4dUw8EzZPVHCbeDG1ONiR7ew/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzYvMy8yLzEwODkzNzIzNi80MGIzOGFmOWUxNjYzMmIyNjYzZTdhZjYxZTExNGJmNy5qcGVn";
item["url"] = "http://www.normcholak.com/norms-listings/l/listing.e4491297-10543-35-avenue-nw-edmonton-t6j-2m1.108937236";
item["desc"] = "$525,000 : 10543 35 Avenue NW Edmonton";
item["banner"] = "//res.myrealpage.com/wps/rest/25319/l/showcase/108937236/img/ribbon/new-banner";
item["recipLogo"] = "";
item["attribution"] = "Courtesy of Norm Cholak of REMAX River City";
mrp_slideroll_images_36783.push( item );
var item = {};
item["img"] = new Image();
item["img"].src = "https://iss-cdn.myrealpage.com/bSFodZ5FF6sbiynGGBLCVm-osFx6jttuGlc3GQj3CR0/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzkvNi8yLzEwODYyMzI2OS9jYWQ5NWZjMmY1ZjZhZWU3ZGM1NzFkMTQwYTcwZDFkMC5qcGVn";
item["url"] = "http://www.normcholak.com/norms-listings/l/listing.e4484844-15827-133-street-nw-edmonton-t6v-1e5.108623269";
item["desc"] = "$518,800 : 15827 133 Street NW Edmonton";
item["banner"] = "//res.myrealpage.com/wps/img/pixel.gif";
item["recipLogo"] = "";
item["attribution"] = "Courtesy of Norm Cholak of REMAX River City";
mrp_slideroll_images_36783.push( item );
var item = {};
item["img"] = new Image();
item["img"].src = "https://iss-cdn.myrealpage.com/2eWvhcXFw-L6XtMU2uRBlT8uU35gZqSD2uo30LqS6Ew/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzYvOC8xLzEwODgxOTE4Ni9mOWRhNThhZDBlMzNlY2JmMzk5OWY0MGQ5YWQ2YmI3Yy5qcGVn";
item["url"] = "http://www.normcholak.com/norms-listings/l/listing.e4489089-2314-lemieux-place-nw-edmonton-t6r-0c2.108819186";
item["desc"] = "$398,000 : 2314 LEMIEUX Place NW Edmonton";
item["banner"] = "//res.myrealpage.com/wps/img/pixel.gif";
item["recipLogo"] = "";
item["attribution"] = "Courtesy of Norm Cholak of REMAX River City";
mrp_slideroll_images_36783.push( item );
var item = {};
item["img"] = new Image();
item["img"].src = "https://iss-cdn.myrealpage.com/gR47LNay5aFDuJz4k8CqHtj-vQvHZsp9l4SLaUgXIoI/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzkvMS8zLzEwODg5NzMxOS85NGUyYmQ5NzY5MjE1NmEzNmQzYjljNjI4NTllM2ZhMi5qcGVn";
item["url"] = "http://www.normcholak.com/norms-listings/l/listing.e4490527-30-445-brintnell-boulevard-nw-edmonton-t5y-0v5.108897319";
item["desc"] = "$326,500 : 30 445 BRINTNELL Boulevard NW Edmonton";
item["banner"] = "//res.myrealpage.com/wps/img/pixel.gif";
item["recipLogo"] = "";
item["attribution"] = "Courtesy of Norm Cholak of REMAX River City";
mrp_slideroll_images_36783.push( item );
var item = {};
item["img"] = new Image();
item["img"].src = "https://iss-cdn.myrealpage.com/JZkSMmw3lM--c6xyrpj2p7FveBkHMnzHpb_ND7uhUuA/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzgvOS8yLzEwODU4NDI5OC9lZjMwYmMyNGJjMGNjZTEyMTYyYmM0M2Y3MWU1ZWU1NS5qcGVn";
item["url"] = "http://www.normcholak.com/norms-listings/l/listing.e4484245-1603-11027-87-avenue-nw-edmonton-t6g-2p9.108584298";
item["desc"] = "$308,500 : 1603 11027 87 Avenue NW Edmonton";
item["banner"] = "//res.myrealpage.com/wps/img/pixel.gif";
item["recipLogo"] = "";
item["attribution"] = "Courtesy of Norm Cholak of REMAX River City";
mrp_slideroll_images_36783.push( item );
var item = {};
item["img"] = new Image();
item["img"].src = "https://iss-cdn.myrealpage.com/-3pRN9a4IPmh_7rsODnfcIqR-MeSTl0iw5eSNj-XDko/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzYvNS80LzEwODc3MTQ1Ni83YjlmNWFhZmRkZWM1NzU0YjUyMTJmOGExNDVmNGJjNi5qcGVn";
item["url"] = "http://www.normcholak.com/norms-listings/l/listing.e4488038-305-18126-77-street-nw-edmonton-t5z-0n7.108771456";
item["desc"] = "$178,800 : 305 18126 77 Street NW Edmonton";
item["banner"] = "//res.myrealpage.com/wps/img/pixel.gif";
item["recipLogo"] = "";
item["attribution"] = "Courtesy of Norm Cholak of REMAX River City";
mrp_slideroll_images_36783.push( item );
var item = {};
item["img"] = new Image();
item["img"].src = "https://iss-cdn.myrealpage.com/Nx3B_B0bCyq6HZb3Pnr3uPhv5OLzB5-_7EfcXo_jqzc/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzUvMS8wLzEwODcwNDAxNS8wNTJiMDAxNmQxNTliMTMxNjg4MDcwZGM2ZDI0NjkxMS5qcGVn";
item["url"] = "http://www.normcholak.com/norms-listings/l/listing.e4486563-316-245-edwards-drive-sw-edmonton-t6x-1j9.108704015";
item["desc"] = "$174,500 : 316 245 EDWARDS Drive SW Edmonton";
item["banner"] = "//res.myrealpage.com/wps/img/pixel.gif";
item["recipLogo"] = "";
item["attribution"] = "Courtesy of Norm Cholak of REMAX River City";
mrp_slideroll_images_36783.push( item );
var item = {};
item["img"] = new Image();
item["img"].src = "https://iss-cdn.myrealpage.com/FSG5jrMhmTXFixkhmmRHo43BDeVj9A72vM6hnZ67WzQ/rs:auto:0:0:0/g:sm/aHR0cDovL3MzLmFtYXpvbmF3cy5jb20vbXJwLWxpc3RpbmdzLzcvMi8wLzEwODcwNDAyNy85MDNiZGVmYWRiMjA5OWY0NGNkMDM3OWI0YWRlYWE3NS5qcGVn";
item["url"] = "http://www.normcholak.com/norms-listings/l/listing.e4486571-308-14004-26-street-nw-edmonton-t5y-1y4.108704027";
item["desc"] = "$99,000 : 308 14004 26 Street NW Edmonton";
item["banner"] = "//res.myrealpage.com/wps/img/pixel.gif";
item["recipLogo"] = "";
item["attribution"] = "Courtesy of Norm Cholak of REMAX River City";
mrp_slideroll_images_36783.push( item );
document.write( "