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";
}
}
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "$248,800" );
document.write( "
" );
document.write( "
" );
document.write( "9055 ASHWELL Road" );
document.write( "
" );
document.write( "
Listed by Royal Lepage Wheeler Cheam
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "$349,900" );
document.write( "
" );
document.write( "
" );
document.write( "9055 ASHWELL Road" );
document.write( "
" );
document.write( "
Listed by HomeLife Advantage Realty Ltd (Vedder)
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "$749,900" );
document.write( "
" );
document.write( "
" );
document.write( "45900 SOUTH SUMAS Road" );
document.write( "
" );
document.write( "
Listed by RE/MAX Nyda Realty Inc.
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "$749,900" );
document.write( "
" );
document.write( "
" );
document.write( "46554 PINE Avenue" );
document.write( "
" );
document.write( "
Listed by HomeLife Advantage Realty Ltd
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "$799,900" );
document.write( "
" );
document.write( "
" );
document.write( "45306 BALMORAL Avenue" );
document.write( "
" );
document.write( "
Listed by RE/MAX Nyda Realty Inc. (Vedder North)
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "$799,900" );
document.write( "
" );
document.write( "
" );
document.write( "46521 BROOKS Avenue" );
document.write( "
" );
document.write( "
Listed by Pathway Executives Realty Inc.
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "$805,000" );
document.write( "
" );
document.write( "
" );
document.write( "5574 CAYMAN Drive" );
document.write( "
" );
document.write( "
Listed by Century 21 Creekside Realty (Luckakuck)
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "$835,000" );
document.write( "
" );
document.write( "
" );
document.write( "45752 STEVENSON Road" );
document.write( "
" );
document.write( "
Listed by RE/MAX Nyda Realty Inc.
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "$849,900" );
document.write( "
" );
document.write( "
" );
document.write( "6255 DUNDEE Place" );
document.write( "
" );
document.write( "
Listed by RE/MAX Nyda Realty Inc.
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "$849,900" );
document.write( "
" );
document.write( "
" );
document.write( "46213 HAK\'WELES Road" );
document.write( "
" );
document.write( "
Listed by RE/MAX Nyda Realty Inc. (Vedder North)
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "$849,900" );
document.write( "
" );
document.write( "
" );
document.write( "9604 JOHNSON Street" );
document.write( "
" );
document.write( "
Listed by HomeLife Advantage Realty Ltd
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "$883,200" );
document.write( "
" );
document.write( "
" );
document.write( "45752 STEVENSON Road" );
document.write( "
" );
document.write( "
Listed by RE/MAX Truepeak Realty
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "$888,900" );
document.write( "
" );
document.write( "
" );
document.write( "8707 CORNWALL Crescent" );
document.write( "
" );
document.write( "
Listed by Pathway Executives Realty Inc (Yale Rd)
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "$889,000" );
document.write( "
" );
document.write( "
" );
document.write( "3972 SLESSE Road" );
document.write( "
" );
document.write( "
Listed by Performance Power Play Realty
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "$924,000" );
document.write( "
" );
document.write( "
" );
document.write( "45408 CARRIAGE Way" );
document.write( "
" );
document.write( "
Listed by Select Real Estate
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "$929,900" );
document.write( "
" );
document.write( "
" );
document.write( "432 MAPLE FALLS Road" );
document.write( "
" );
document.write( "
Listed by RE/MAX Nyda Realty Inc. (Garrison Crossing)
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "$949,900" );
document.write( "
" );
document.write( "
" );
document.write( "45430 BERNARD Avenue" );
document.write( "
" );
document.write( "
Listed by Pathway Executives Realty Inc (Yale Rd)
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "$949,900" );
document.write( "
" );
document.write( "
" );
document.write( "45663 HENDERSON Avenue" );
document.write( "
" );
document.write( "
Listed by Oakwyn Realty Ltd.
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "$964,800" );
document.write( "
" );
document.write( "
" );
document.write( "5191 TESKEY Road" );
document.write( "
" );
document.write( "
Listed by eXp Realty (Branch)
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "
" );
document.write( "$974,900" );
document.write( "
" );
document.write( "
" );
document.write( "6010 GLENMORE Drive" );
document.write( "
" );
document.write( "
Listed by Pathway Executives Realty Inc (Yale Rd)
" );
document.write( "
" );
document.write( "
" );