function setTabs() {if (preloadFlag == true){
		changeImg('TowerWeb_14', tab1_sticky);
		changeImg('TowerWeb_15', tab2_sticky);
		changeImg('TowerWeb_16', tab6_sticky);
		changeImg('TowerWeb_17', tab7_sticky);
		changeImg('TowerWeb_18', tab8_sticky);
}}

function newImg(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImg() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImg.arguments.length; i+=2) {
			document[changeImg.arguments[i]].src = changeImg.arguments[i+1];
		}
	}
}



var preloadFlag = false;
function preloadImg() {
	if (document.images) {	
		TowerWeb_14_over		= newImg("/tm/graphics_slices/TowerWeb_14-over.gif");
		TowerWeb_14_sticky	= newImg("/tm/graphics_slices/TowerWeb_14-sticky.gif");
		TowerWeb_15_over		= newImg("/tm/graphics_slices/TowerWeb_15-over.gif");
		TowerWeb_15_sticky	= newImg("/tm/graphics_slices/TowerWeb_15-sticky.gif");
		TowerWeb_16_over		= newImg("/tm/graphics_slices/TowerWeb_16-over.gif");
		TowerWeb_16_sticky	= newImg("/tm/graphics_slices/TowerWeb_16-sticky.gif");
		TowerWeb_17_over		= newImg("/tm/graphics_slices/TowerWeb_17-over.gif");
		TowerWeb_17_sticky	= newImg("/tm/graphics_slices/TowerWeb_17-sticky.gif");
		TowerWeb_18_over		= newImg("/tm/graphics_slices/TowerWeb_18-over.gif");
		TowerWeb_18_sticky	= newImg("/tm/graphics_slices/TowerWeb_18-sticky.gif");
		closed_folder			= newImg("/tm/graphics/navigation/closed_folder.gif");
		open_folder				= newImg("/tm/graphics/navigation/open_folder.gif");
		closed_arrow			= newImg("/tm/graphics/navigation/redMenuArrowClosed.gif");
		open_arrow				= newImg("/tm/graphics/navigation/redMenuArrowOpen.gif");
		
		// Leasing
		if (sticky[0] == "true"){
		tab1_sticky  = '/tm/graphics_slices/TowerWeb_14-sticky.gif';
		tab1_over	 = '/tm/graphics_slices/TowerWeb_14-sticky.gif';
		document.getElementById("submenu1").style.visibility = "visible";
		}
		else {
		tab1_sticky  = '/tm/graphics_slices/TowerWeb_14.gif';
		tab1_over	 = '/tm/graphics_slices/TowerWeb_14-over.gif';
		document.getElementById("submenu1").style.visibility = "hidden";
		};
		// Leasing Agents
		if (sticky[1] == "true"){
		tab2_sticky  = '/tm/graphics_slices/TowerWeb_15-sticky.gif';
		tab2_over	 = '/tm/graphics_slices/TowerWeb_15-sticky.gif';
		}
		else {
		tab2_sticky  = '/tm/graphics_slices/TowerWeb_15.gif';
		tab2_over	 = '/tm/graphics_slices/TowerWeb_15-over.gif';
		};
		// Mall
		if (sticky[5] == "true"){
		tab6_sticky   = '/tm/graphics_slices/TowerWeb_16-sticky.gif';
		tab6_over     = '/tm/graphics_slices/TowerWeb_16-sticky.gif';
		document.getElementById("submenu2").style.visibility = "visible";
		}
		else {
		tab6_sticky   = '/tm/graphics_slices/TowerWeb_16.gif';
		tab6_over     = '/tm/graphics_slices/TowerWeb_16-over.gif';
		document.getElementById("submenu2").style.visibility = "hidden";
		};
		// Directions
		if (sticky[6] == "true"){
		tab7_sticky   = '/tm/graphics_slices/TowerWeb_17-sticky.gif';
		tab7_over     = '/tm/graphics_slices/TowerWeb_17-sticky.gif';
		}
		else {
		tab7_sticky   = '/tm/graphics_slices/TowerWeb_17.gif';
		tab7_over     = '/tm/graphics_slices/TowerWeb_17-over.gif';
		};
		// Development
		if (sticky[7] == "true"){
		tab8_sticky   = '/tm/graphics_slices/TowerWeb_18-sticky.gif';
		tab8_over     = '/tm/graphics_slices/TowerWeb_18-sticky.gif';
		}
		else {
		tab8_sticky   = '/tm/graphics_slices/TowerWeb_18.gif';
		tab8_over     = '/tm/graphics_slices/TowerWeb_18-over.gif';
		};
		
		// Leasing Page Submenu
		if (sticky_sub[0] == "true"){sub0_sticky = '/tm/graphics/navigation/redMenuArrowClosed.gif'}
			else {sub0_sticky = '/tm/graphics/navigation/redMenuArrowSpacer.gif'};
		if (sticky_sub[1] == "true"){sub1_sticky = '/tm/graphics/navigation/redMenuArrowClosed.gif'}
			else {sub1_sticky = '/tm/graphics/navigation/redMenuArrowSpacer.gif'};	
		if (sticky_sub[2] == "true"){sub2_sticky = '/tm/graphics/navigation/redMenuArrowClosed.gif'}
			else {sub2_sticky = '/tm/graphics/navigation/redMenuArrowSpacer.gif'};	
		if (sticky_sub[3] == "true"){sub3_sticky = '/tm/graphics/navigation/redMenuArrowClosed.gif'}
			else {sub3_sticky = '/tm/graphics/navigation/redMenuArrowSpacer.gif'};	
		if (sticky_sub[4] == "true"){sub4_sticky = '/tm/graphics/navigation/redMenuArrowClosed.gif'}
			else {sub4_sticky = '/tm/graphics/navigation/redMenuArrowSpacer.gif'};	
		if (sticky_sub[5] == "true"){sub5_sticky = '/tm/graphics/navigation/redMenuArrowClosed.gif'}
			else {sub5_sticky = '/tm/graphics/navigation/redMenuArrowSpacer.gif'};	
		if (sticky_sub[6] == "true"){sub6_sticky = '/tm/graphics/navigation/redMenuArrowClosed.gif'}
			else {sub6_sticky = '/tm/graphics/navigation/redMenuArrowSpacer.gif'};	
		if (sticky_sub[7] == "true"){sub7_sticky = '/tm/graphics/navigation/redMenuArrowClosed.gif'}
			else {sub7_sticky = '/tm/graphics/navigation/redMenuArrowSpacer.gif'};	
		if (sticky_sub[8] == "true"){sub8_sticky = '/tm/graphics/navigation/redMenuArrowClosed.gif'}
			else {sub8_sticky = '/tm/graphics/navigation/redMenuArrowSpacer.gif'};	
		
		if (sticky_sub[9] == "true"){sub9_sticky = '/tm/graphics/navigation/redMenuArrowClosed.gif'}
			else {sub9_sticky = '/tm/graphics/navigation/redMenuArrowSpacer.gif'};	
		
		if (sticky_sub[10] == "true"){sub10_sticky = '/tm/graphics/navigation/redMenuArrowClosed.gif'}
			else {sub10_sticky = '/tm/graphics/navigation/redMenuArrowSpacer.gif'};	
		if (sticky_sub[11] == "true"){sub11_sticky = '/tm/graphics/navigation/redMenuArrowClosed.gif'}
			else {sub11_sticky = '/tm/graphics/navigation/redMenuArrowSpacer.gif'};	
		if (sticky_sub[12] == "true"){sub12_sticky = '/tm/graphics/navigation/redMenuArrowClosed.gif'}
			else {sub12_sticky = '/tm/graphics/navigation/redMenuArrowSpacer.gif'};	
		if (sticky_sub[13] == "true"){sub13_sticky = '/tm/graphics/navigation/redMenuArrowClosed.gif'}
			else {sub13_sticky = '/tm/graphics/navigation/redMenuArrowSpacer.gif'};
		if (sticky_sub[18] == "true"){sub18_sticky = '/tm/graphics/navigation/redMenuArrowClosed.gif'}
			else {sub18_sticky = '/tm/graphics/navigation/redMenuArrowSpacer.gif'};
			
		// Mall Page Submenu	
		if (sticky_sub[14] == "true"){sub14_sticky = '/tm/graphics/navigation/redMenuArrowClosed.gif'}
			else {sub14_sticky = '/tm/graphics/navigation/redMenuArrowSpacer.gif'};	
		if (sticky_sub[15] == "true"){sub15_sticky = '/tm/graphics/navigation/redMenuArrowClosed.gif'}
			else {sub15_sticky = '/tm/graphics/navigation/redMenuArrowSpacer.gif'};	
		if (sticky_sub[16] == "true"){sub16_sticky = '/tm/graphics/navigation/redMenuArrowClosed.gif'}
			else {sub16_sticky = '/tm/graphics/navigation/redMenuArrowSpacer.gif'};	
		if (sticky_sub[17] == "true"){sub17_sticky = '/tm/graphics/navigation/redMenuArrowClosed.gif'}
			else {sub17_sticky = '/tm/graphics/navigation/redMenuArrowSpacer.gif'};
		if (sticky_sub[19] == "true"){sub19_sticky = '/tm/graphics/navigation/redMenuArrowClosed.gif'}
			else {sub19_sticky = '/tm/graphics/navigation/redMenuArrowSpacer.gif'};
		if (sticky_sub[20] == "true"){sub20_sticky = '/tm/graphics/navigation/redMenuArrowClosed.gif'}
			else {sub20_sticky = '/tm/graphics/navigation/redMenuArrowSpacer.gif'};
		if (sticky_sub[21] == "true"){sub21_sticky = '/tm/graphics/navigation/redMenuArrowClosed.gif'}
			else {sub21_sticky = '/tm/graphics/navigation/redMenuArrowSpacer.gif'};
		if (sticky_sub[22] == "true"){sub22_sticky = '/tm/graphics/navigation/redMenuArrowClosed.gif'}
			else {sub22_sticky = '/tm/graphics/navigation/redMenuArrowSpacer.gif'};
		if (sticky_sub[23] == "true"){sub23_sticky = '/tm/graphics/navigation/redMenuArrowClosed.gif'}
			else {sub23_sticky = '/tm/graphics/navigation/redMenuArrowSpacer.gif'};
			
		preloadFlag = true;
		setTabs();
		setSubs();
	}
}

function setSubs() {if (preloadFlag == true){
		// Leasing Page Submenu
		changeImg('menu0', sub0_sticky);
		changeImg('menu1', sub1_sticky);
		changeImg('menu2', sub2_sticky);
		changeImg('menu3', sub3_sticky);
		changeImg('menu4', sub4_sticky);
		changeImg('menu5', sub5_sticky);
		changeImg('menu6', sub6_sticky);
		changeImg('menu7', sub7_sticky);
		changeImg('menu8', sub8_sticky);
		changeImg('menu9', sub9_sticky);
		changeImg('menu10', sub10_sticky);
		changeImg('menu11', sub11_sticky);
		changeImg('menu12', sub12_sticky);
		changeImg('menu13', sub13_sticky);
		changeImg('menu18', sub18_sticky);
		// Mall Page Submenu
		changeImg('menu14', sub14_sticky);
		changeImg('menu15', sub15_sticky);
		changeImg('menu16', sub16_sticky);
		changeImg('menu17', sub17_sticky);
		changeImg('menu19', sub19_sticky);
		changeImg('menu20', sub20_sticky);
		changeImg('menu21', sub21_sticky);
		changeImg('menu22', sub22_sticky);
		changeImg('menu23', sub23_sticky);

}}

// pop up window
function popup(url) {
if (window && window.open && document && document.write){
high=575;wide=575;
siz="top=0,left=25,height="+high+",innerHeight="+high+",width="+wide+",innerWidth="+wide+",menubar=no,toolbar=no,scrollbars=yes,resizable=yes,status=no";

newwin = window.open(url,'newwin',siz);
newwin.document.close();
   }
else {alert("Your browser will not support this function.")}
}

// Tree Menu

function expand(thistag,thisfolder) {
   styleObj=document.getElementById(thistag).style;
   if (styleObj.display=='none') {styleObj.display='';
   changeImg(thisfolder,"/tm/graphics/navigation/open_folder.gif"); return true;}
   else {styleObj.display='none';
   changeImg(thisfolder,"/tm/graphics/navigation/closed_folder.gif"); return true;}
}

function expand2(thistag,thisfolder) {
   styleObj=document.getElementById(thistag).style;
   if (styleObj.display=='none') {styleObj.display='';
   changeImg(thisfolder,open_item); return true;}
   else {styleObj.display='none';
   changeImg(thisfolder,closed_item); return true;}
}

// gets parameters from passed strings
function getParams() {
var idx = document.URL.indexOf('?');
var params = new Array();
if (idx != -1) {
var pairs = document.URL.substring(idx+1, document.URL.length).split('&');
for (var i=0; i<pairs.length; i++) {
nameVal = pairs[i].split('=');
params[nameVal[0]] = nameVal[1];
   }
}
return params;
}
params = getParams();