function calcHeight(id){ 
	var the_height=document.getElementById(id).contentWindow.document.body.scrollHeight;
	document.getElementById(id).height=the_height;
}

var activeButton = 'thumbnail';
function listingsButtonOver(id, buttonName) {
	if (((activeButton == 'map')&&(id == 'thumbButton'))||((activeButton == 'thumbnail')&&(id == 'showMapButton'))){
		document.getElementById(id).src = 'lib/images/view/' + buttonName + 'ShortActive.gif';
		document.getElementById(id).style.cursor='pointer';
	}
}
function listingsButtonOut(id, buttonName) {
	if (((activeButton == 'map')&&(id == 'thumbButton'))||((activeButton == 'thumbnail')&&(id == 'showMapButton'))){
		document.getElementById(id).src = 'lib/images/view/' + buttonName + 'Short.gif';
		document.getElementById(id).style.cursor='default';
	}
}
function setPropCompare(propID) {
	if (document.getElementById(propID).checked){
		document.getElementById(propID).checked = false;
		document.getElementById(propID+'_image').src='lib/images/search/bookmarkBtn.gif';
	}
	else {
		document.getElementById(propID).checked = true;
		document.getElementById(propID+'_image').src='lib/images/search/bookmarkBtnActive.gif';
	}
}
function hoverPropCompare(propID,action){			
	if ((document.getElementById(propID).checked == true)&&(action == 'out')){
	}
	else if ((document.getElementById(propID).checked == false)&&(action == 'in')){
		document.getElementById(propID+'_image').src='lib/images/search/bookmarkBtnActive.gif';
	}
	else if (action == 'in') {
		document.getElementById(propID+'_image').src='lib/images/search/bookmarkBtnActive.gif';
	}
	else if (action == 'out') {
		document.getElementById(propID+'_image').src='lib/images/search/bookmarkBtn.gif';
	}
}
function myProperties() {
	window.location = 'myProperties.cfm'
}
function bookmarkedProperty(propertyID){
	document.getElementById('bookmarkedText'+propertyID).innerHTML = '<a href="javascript:void(0)" onMouseUp="removeFromBookmarks(' + propertyID + ');"><img src="lib/images/search/bookmarkBtnActive.gif" id=' + propertyID + '_image" alt="Bookmark Property ' + propertyID + '" border="0"></a>';
}
function addToBookmarks(propertyID){
	document.getElementById('bookmarkIframe').src="bookmarksIframe.cfm?addBkmkPropertyID=" + propertyID + "&propertyIDCheck=" + propertyID;
}
function bookmarkProperty(propertyID){
	document.getElementById('bookmarkedText'+propertyID).innerHTML = '<a href="javascript:void(0)" class="sideMenu" onMouseUp="addToBookmarks(' + propertyID + ');"><img src="lib/images/search/bookmarkBtn.gif" id=' + propertyID + '_image" alt="Bookmark Property ' + propertyID + '" border="0"></a>';
}
function removeFromBookmarks(propertyID){
	document.getElementById('bookmarkIframe').src="bookmarksIframe.cfm?deleteBkmkPropertyID=" + propertyID + "&propertyIDCheck=" + propertyID;
}
