// This function reurns the partial URL for a UID and photo number.
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;
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 MAIL TO:
var HTML
// who = NM or JP
// subject = Subject line, optional
// title = Mouseover caption
// text = visible text,default = email address
// font color to use, optional
// Called by
//
function decoder(who,subject,title,text, fontColor) {
if(who=="NM") eAdd = nailer("NMartinez","VirginiaCook");
if(who=="JP") eAdd = nailer("JPritchett","msn");
HTML = '" + text + "";
HTML = HTML + '>' + text + '';
// alert(HTML);
document.write(HTML);
}
function nailer(a,b) {
ea = a + "@" + b + ".com";
return ea;
}
// 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];
fullURL = srcname + p1 + ".jpg";
// resizeImage(divID, fullURL);
document['large' + divID].src = fullURL;
}
// 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
// imgLarge is the UID, imgName is the photo number, imgDesc is the description for the photo
function Unthumb(imgLarge, imgName, imgDesc) {
if(document.images) {
fullURL = highRes(imgLarge) + imgName + ".jpg";
resizeImage(imgLarge, fullURL);
document["large" + imgLarge].src=fullURL;
}
if (gImageCapableBrowser) {document.getElementById('photoDesc' + imgLarge).innerHTML = imgDesc;}
}
// This will resize the image
function resizeImage(imgLarge, fullURL) {
var img = new Image();
img.src = fullURL;
picWidth = img.width;
picHeight = img.height;
if (picWidth/525 > picHeight/300) {Scale = 525 / picWidth} else {Scale = 300 / picHeight};
document["large" + imgLarge].width = picWidth * Scale;
document["large" + imgLarge].height = picHeight * Scale;
// alert(Scale);
}
// Insert a static map for the image.
// imgLarge is the UID, MapAddress is the long land address
function UIDMap(imgLarge, MapAddress) {
if(document.images) {
// document["large" + imgLarge].src="../images/images_loading_map.gif";
fullURL = "http://maps.google.com/maps/api/staticmap?center=";
fullURL = fullURL + MapAddress + "&zoom=15&size=525x300&maptype=roadmap&sensor=false";
// Markers
fullURL = fullURL + "&markers=" + MapAddress
document["large" + imgLarge].width = 525;
document["large" + imgLarge].height = 300;
document["large" + imgLarge].src=fullURL;
}
if (document.getElementById('photoDesc' + imgLarge) != null) {
if (gImageCapableBrowser) {document.getElementById('photoDesc' + imgLarge).innerHTML = "Click any image to close map";}
}
}
// 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 using API V3
var mapV3
function loadV3(Lat, Lng) {
// 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";
var latlng = new google.maps.LatLng(Lat, Lng);
var myOptions = {
zoom: 15,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var mapV3 = new google.maps.Map(document.getElementById("map"), myOptions);
var marker = new google.maps.Marker({
position: latlng
});
marker.setMap(mapV3);
}
// Activate the map centered at Lat and Lng
function loadAreaMapV3(Area,Lat,Lng,Zoom) {
var latlng = new google.maps.LatLng(Lat, Lng);
var myOptions = {
zoom: Zoom,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
mapV3 = new google.maps.Map(document.getElementById("map_"+Area), myOptions);
}
function addMapPointV3(highrise,Lat,Lng,Address,Pic,File,Color) {
var myLatlng = new google.maps.LatLng(Lat, Lng);
var thumb = ""
var namelink = "" + highrise + ""
var thumblink = "" + thumb + ""
namelink = "" + namelink + ""
var html = "
| " + namelink + " | |
| " + Address + " | " + thumblink + " |