menu_state = {};
function doOver(id) {
	menu_state[id] = true;
	showMenu(id);
}
function doOut(id) {
	menu_state[id] = false;
	setTimeout("hideMenu('"+id+"')",200);
}
function showMenu(id){
	document.getElementById(id).style.display = "inline";
}
function hideMenu(id) {
	if (!menu_state[id]) {
		document.getElementById(id).style.display = "none";
	}
}
function propOn(img,spn) {
	document.getElementById(img).src='docs/images/trans.gif';
	document.getElementById(spn).style.display='inline';
}
function propOff(img,spn) {
	document.getElementById(img).src='docs/images/trans.gif';
	document.getElementById(spn).style.display='none';
}

prop_cur = 1;
safari=(navigator.userAgent.indexOf('Safari')!=-1);
function swapImg(i) {
	var j;
	prop_cur = i;
	if (safari) {
		document.getElementById("img_src").src = 'docs/images/trans.gif';
	}

	//document.getElementById("img_src").src = 'docs/images/gallery238/' + prop_imgs[i];
	document.getElementById("img_src").src = prop_imgs[i].src;
	
	for (j=1;j <= prop_tot;j++) {
		document.getElementById("a_"+j).className = "off";
	}
	document.getElementById("a_"+i).className = "on";
}

function nextImg() {
	if (prop_cur == prop_tot) {
		prop_cur = 1;
	} else {
		prop_cur += 1;
	}
	swapImg(prop_cur);
}
function prevImg() {
	if (prop_cur == 1) {
		prop_cur = prop_tot;
	} else {
		prop_cur -= 1;
	}
	swapImg(prop_cur);
}
function showLease() {
	hideTenant();
	if (navigator.appName == 'Microsoft Internet Explorer') {
		document.getElementById("prop_lease").style.left = "175px";
		document.getElementById("prop_lease_box").style.width = "100%";
	}
	if (document.getElementById("prop_lease").style.display == "none") {
		document.getElementById("prop_lease").style.display = "inline";
	} else {
		hideLease();
	}
}
function hideLease() {
	document.getElementById("prop_lease").style.display = "none";
}

function showTenant() {
	hideLease();
	if (navigator.appName == 'Microsoft Internet Explorer') {
		document.getElementById("prop_tenant").style.left = "175px";
		document.getElementById("prop_tenant_box").style.width = "100%";
	}
	if (document.getElementById("prop_tenant").style.display == "none") {
		document.getElementById("prop_tenant").style.display = "inline";
	} else {
		hideTenant();
	}
}
function hideTenant() {
	document.getElementById("prop_tenant").style.display = "none";
}


function showMap() {
	if (navigator.appName == 'Microsoft Internet Explorer') {
		document.getElementById("prop_map").style.left = "275px";
		document.getElementById("prop_map").style.width = "367px";
		document.getElementById("prop_map_box").style.width = "100%";
	}
	if (document.getElementById("prop_map").style.display == "none") {
		document.getElementById("prop_map").style.display = "inline";
	} else {
		hideMap();
	}
}
function hideMap() {
	document.getElementById("prop_map").style.display = "none";
}

function bodyload() {
	document.getElementById("layoutcontent").style.display = "inline";
}
function mapDoOver(obj,id) {
	var newTop = 0;
	var lbl = document.getElementById(id);
	obj.className="map_dot_on";
	obj.style.zIndex = "2000";
	lbl.style.display="inline";
}
function mapDoOut(obj,id) {
	obj.className='map_dot';
	obj.style.zIndex = "1004";
	document.getElementById(id).style.display = "none";
}

function getProp(obj,prop) {
	if(window.getComputedStyle) {
		compStyle = window.getComputedStyle(obj,null);
		return parseInt(compStyle[prop],10);
	} else if (obj.currentStyle) {
		return parseInt(obj.currentStyle[prop],10);
	} else {
		return parseInt(obj.style[prop],10);
	}
}