function doTooltip(e, ar) {
    if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
    var cntnt = wrapTipContent(ar);
    var tip = document.getElementById( Tooltip.tipID );
    Tooltip.show(e, cntnt);
}

function hideTip() {
    if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
    Tooltip.hide();
}
function wrapTipContent(ar) {
    var cntnt = "";
    if ( ar[0] ) cntnt += '<div class="txt">' + ar[0] + '</div>';
    if ( ar[1] ) cntnt += '<div class="img"><img src="' + ar[1] + '" border="2"></div>';
    return cntnt;
}

// Community pop up here
var messages = new Array();
// array elements: image file name, optional text
//
//sunset farms
messages[0] = ['<div align="left"><b>Sunset Farms</b><br>99th Ave and Broadway Rd.<br>Phoenix<br><br></div>','http://calexhomes.com/images/mapRO/SFmapSM.gif'];
//
//artesian ranch
messages[1] = ['<div align="left"><b>Artesian Ranch</b><br>Ocotillo Rd and Gilbert Rd.<br><i>Now Open!</i><br><br></div>','http://calexhomes.com/images/mapRO/ARmapSM.gif'];
//
//dobson place II
messages[2] = ['<div align="left"><b>Dobson Place II</b><br>Galveston Rd and Gilbert Rd<br>Chandler<br><br></div>','http://calexhomes.com/images/mapRO/DPmapSM.gif'];
//
//skyline ranch
messages[3] = ['<div align="left"><b>Skyline Ranch</b><br>Hunt Highway and Ellsworth Rd<br>Queen Creek<br><br></div>','http://calexhomes.com/images/mapRO/SRmapSM.gif'];
//
//crestfield manor
messages[4] = ['<div align="left"><b>Crestfield Manor</b><br>Heritage Rd and Felix Rd<br>Florence<br><br></div>','http://calexhomes.com/images/mapRO/CMmapSM.gif'];


var imageHandler = { 
    path:"/images/", 
    imgs:[], preload:function() { for(var i=0;arguments[i];i++) {
    var img=new Image(); img.src=this.path+arguments[i]; this.imgs[this.imgs.length]=img;}}
}

imageHandler.preload("");