function highRes(UID) {
return "http://ntreispictures.marketlinx.com/MediaDisplay/" + UID.substr(UID.length-2,2) + "/hr" + UID + "-";
}
function loadMLSImage(imageUID,imagePic,imageDesc) {
if (gImageCapableBrowser) {
document.getElementById('imageTable').style.visibility="visible";
document.getElementById('mapTable').style.visibility="hidden";
document.getElementById('photoDesc').innerHTML = imageDesc;
fullURL = highRes(imageUID) + imagePic + ".jpg";
document.imagePoster.src = fullURL;
// if (document.imagePoster.width > 450) {document.imagePoster.width = 450};
// alert(document.imagePoster.width);
return false;
}
else {
return true;
}
}
// Used to open email window for client report
var win = null;
function newWindow(mypage,myheight,mywidth) {
var settings = 'height=' + myheight + ',';
settings += 'width=' + mywidth + ',';
settings += 'top=100,';
settings += 'left=200,';
settings += 'resizable,scrollbars,status,toolbar';
// alert(settings);
// alert(mypage);
Newwin = window.open(mypage,"",settings);
// Newwin.document.open();
// win.window.focus();
}
// CREATE MAILTO:
function mailer(address,domain,type,fontColor) {
if (type=="") type = 'com';
var text = address + "@" + domain + "." + type;
var target = text
var html = '' + text + '';
return html;
}
function email(who) {
if(who=="NM") return "NMartine" + "z@Virg" + "iniaCook.com";
if(who=="JP") return "mailto:JPritchett@msn.com";
}
// CONTROLS MLS PANELS IN HIGHRISES
var srcname = "";
// New function to open up panel and thumbnails
function unhideDetails(divID) {
srcname = highRes(divID);
// Are there any photos?
if (arguments.length > 1) {
// Load individual thumbs
for (var i = 1; i < arguments.length; i++) {
PicCode = arguments[i];
document["p" + divID + '-' + PicCode].src = srcname + PicCode + ".jpg";
}
// Load large image
p1 = arguments[1];
document['large' + divID].src = srcname + p1 + ".jpg";
// resizeImage(divID);
}
// Reveal panel
var item = document.getElementById(divID);
if (item) {
item.className=(item.className=='hidden')?'unhidden':'hidden';
}
}
// Used to close the detail panel
function hideAll(divID) {
var item = document.getElementById(divID);
item.className='hidden'
}
// Show large image for the selected thumbnail
function NewUnthumb(imgLarge, imgName, imgDesc) {
if(document.images) {
document["large" + imgLarge].src=highRes(imgLarge) + imgName + ".jpg";
// resizeImage(imgLarge);
}
if (gImageCapableBrowser) {document.getElementById('photoDesc' + imgLarge).innerHTML = imgDesc;}
}
function resizeImage(imgLarge) {
picWidth = document["large" + imgLarge].width;
picHeight = document["large" + imgLarge].height;
if (picWidth/450 > picHeight/300) {Scale = 450 / picWidth} else {Scale = 300 / picHeight};
document["large" + imgLarge].width = picWidth * Scale;
document["large" + imgLarge].height = picHeight * Scale;
// alert(Scale);
}
// Show large image for the selected thumbnail
function Unthumb(imgLarge, imgName, imgDesc) {
if(document.images) { document["large" + imgLarge].src=highRes(imgLarge) + imgName + ".jpg";}
if (gImageCapableBrowser) {document.getElementById('photoDesc' + imgLarge).innerHTML = imgDesc;}
}
// USED TO CONTROL VIRTUAL TOURS
function insertVT (ipxName) {
var appletString = " ";
// alert(appletString);
return appletString;
}
function loadVT (ipxName, ipxDesc) {
document.getElementById('VTDesc').innerHTML = ipxDesc;
appletCell.innerHTML = insertVT(ipxName)
}
var opacity
var useImage
function canManipulateImages() {
if (document.images)
return true;
else
return false;
}
function loadPosterImage(imageURL, photoText) {
if (gImageCapableBrowser) {
document.getElementById('imageTable').style.visibility="visible";
document.getElementById('mapTable').style.visibility="hidden";
document.imagePoster.src = imageURL;
document.getElementById('photoDesc').innerHTML = photoText;
return false;
}
else {
return true;
}
}
function loadPromoImage(imageURL, photoText) {
if (gImageCapableBrowser) {
document.imagePoster.src = imageURL;
document.getElementById('photoDesc').innerHTML = photoText;
return false;
}
else {
return true;
}
}
gImageCapableBrowser = canManipulateImages();
var map
// Activate an individual map
function load(Lat, Lng) {
if (GBrowserIsCompatible()) {
// Make map table visible
document.getElementById('imageTable').style.visibility="hidden";
document.getElementById('mapTable').style.visibility="visible";
// Explain how to get back
// document.getElementById('photoDesc').innerHTML = "Click any thumbnail to return photo view";
map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(Lat, Lng), 15);
map.addControl(new GSmallMapControl());
map.addOverlay(new GMarker(new GLatLng(Lat, Lng)));
}
}
// Activate the map centered at Lat and Lng
function loadAreaMap(Area,Lat,Lng,Zoom) {
map = new GMap2(document.getElementById("map_"+Area));
map.addControl(new GSmallMapControl());
map.setCenter(new GLatLng(Lat,Lng), Zoom);
}
// Activate the map centered at Lat and Lng
function loadCityMap(Lat,Lng,Zoom) {
map = new GMap2(document.getElementById("mapCity"));
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
map.addControl(new GScaleControl());
map.setCenter(new GLatLng(Lat,Lng), Zoom);
}
// This will reset the center and zoom of the city map
function zoomCityMap(Lat,Lng,Zoom) {
map.setCenter(new GLatLng(Lat,Lng), Zoom);
}
// Add an individual map pointer
function addMapPoint(highrise,Lat,Lng,Address,Pic,File,Color) {
var point = new GLatLng(Lat,Lng);
var marker = new GMarker(point);
var thumb = ""
var namelink = "" + highrise + ""
var thumblink = "" + thumb + ""
namelink = "" + namelink + ""
var html = "
| " + namelink + " | |
| " + Address + " | " + thumblink + " |