function Dest(pass) {
	document.getElementById('LDest').value=pass;
	document.getElementById('Listing').submit();
}
var openImg = new Image();
openImg.src = "../images/open.gif";
var closedImg = new Image();
closedImg.src = "../images/closed.gif";

function showBranch(branch){
	var objBranch = document.getElementById(branch).style;
	var objClass = document.getElementById(branch).className;
	if(objBranch.display=="block" ||(objClass=='obranch' && objBranch.display ==''))
		objBranch.display="none";
	else
		objBranch.display="block";
}

function swapFolder(img){
	objImg = document.getElementById(img);
	if(objImg.src.indexOf('closed.gif')>-1)
		objImg.src = openImg.src;
	else
		objImg.src = closedImg.src;
}
function expand(PassName,pass){
	for (var i = 0; i < document.Listing.elements.length; i++) {
		CElements = document.Listing.elements[i];
		if (CElements.value == pass && CElements.name==PassName){
			if(CElements.getAttribute('parentID')!=0){
				showBranch("br"+CElements.getAttribute('parentID'))
				expand(PassName,CElements.getAttribute('parentID'));
			}
		}
	}
}
function SetLabel(PassName,pass){
	CRegion=document.getElementById('CurrentRegion');
	for (var i = 0; i < document.Listing.elements.length; i++) {
		CElements = document.Listing.elements[i];
		if (CElements.value == pass && CElements.name==PassName){
			DisValue=CElements.getAttribute('DisValue');
			CRegion.value=DisValue + ':' + CRegion.value
			SetLabel(PassName,CElements.getAttribute('parentID'))
		}
	}
}
function ChangeLabel(PassName,pass){
	document.getElementById('CurrentRegion').value=""
	SetLabel(PassName,pass)
}

function hideSelect2()
{
	for (var i = 0; i<document.Listing.elements.length; i++) {
        if ((document.Listing.elements[i].type=="select-one")) {
			document.Listing.elements[i].style.visibility="hidden";
        }
    }
}

function unhideSelect2()
{
	for (var i = 0; i<document.Listing.elements.length; i++) {
        if ((document.Listing.elements[i].type=="select-one")) {
			document.Listing.elements[i].style.visibility="visible";
        }
    }
}

function PopEdit(){
	window.open('AmenitieList.cfm', 'Edit', 'width=700,height=450,scrollbars=no')
}
/*************************************************************************
  This code is from Dynamic Web Coding at http://www.dyn-web.com/
  Copyright 2003 by Sharon Paine 
  See Terms of Use at http://www.dyn-web.com/bus/terms.cfml
  regarding conditions under which you may use this code.
  This notice must be retained in the code as is!
*************************************************************************/

// leave in page for way to customize layout of tooltip 
// and avoid errors if onmouseovers/outs before page completely loaded
function doTooltip(e, msg) {
  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.show(e, msg);
}

function hideTip() {
  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.hide();
}

// variables for tooltip content 

	var T2 ='Do not put the address here.  Use this field if the property has a name in addition to its postal address such as "The Atrium at Greenwich".';
	var T3 ='The postal address of the property.  Do not use P.O. Box numbers. The address you insert here is used to locate the property on the map link.';
	var T4 ='The total rentable square footage of the entire building in which the available space is located. Enter only numbers here.';
	var T5 ='The actual year the building was constructed.';
	var T6 ='Enter the Lease Terms: Direct Lease, 1-3 years. Direct Lease 3-5 years. Sublease.';
//	var T6 ='Select one of the five drop down options: Direct Lease.1-3 years, Direct Lease 3-5 years Sublease, See comments below, TBD';
	var T7 ='Select one of the Drop Down menu options, Net Lease, Gross Lease with base year.';
	var T8 ='You need to be specific about the regions where your property appears to make the search function correctly.  Keep clicking each of the yellow folders to drop down until you find the specific area where your space is located.  It is best if you are as specific as possible, for instance, select: USA, Northeast, New England, Connecticut, Fairfield County, Town of Westport, Main Street, then <b>click on the round button to select.</b>  If you stop too soon, for instance at Westport instead of Main Street, your property will not show up if someone only wants Main Street in Westport and does not search further than that.  If you want to post in a region that does not appear, please email us at <u>Webmaster@theSmallTenant.com</u> and we will add the region.  You can go back into your posting and correct it at a later date after we have added the desired region.';
	var T9 ='This teaser field is limited to 95 characters. This appears on the search page classified listing form. Briefly note the highlights that will entice tenants to open the full data sheet.';
	var T10 ='<b>Required.</b> Name of company placing the ad.';
	var T11 ='<b>Required.</b> Name of contact person for the ad. Set "Display" to yes or no to appear on the classified ad and/or the data page.';
	var T12 ='<b>Required.</b> Direct dial for contact person. Set "Display" to yes or no to appear on the classified page and/or the data sheet.';
	var T13 ='<b>Optional.</b>  Address to which email messages for additional information will be sent. Set these to no if you do not want to be contacted by email by potential tenants for additional information.';
	var T14 ='<b>Optional.</b> Website that the property data sheet and/or classified ad will link to. Set these to no if you do not have a website or do not want a link.';
	var T15 ='You can list up to twenty available units of space in one building in the fields below.';
	var T16 ='Number of suite available such as 201, 2A, etc.';
	var T17 ='The amount of space available.  If the space is leased, you must set the available space to 0 to remove it from the list. Enter only numbers in this field.';
	var T18 ='If the space can be divided, note the smallest possible division so the space will show up when tenants are searching for smaller units of space, or break the space into individual units and list the combined space as "largest Contiguous Space" below. Enter only numbers in this field.';
	var T19 ='Important, <b>note the type of space for each unit</b>.  Buildings may have mixed uses, so it is necessary to note the space type individually, we do not auto fill this field from the first selection!';
	var T20 ='Note the floor on which the unit of space is available';
	var T21 ='Note the largest combination available. Enter only numbers in this field.';
	var T22 ='Select all the amenities that apply to your building. Select as many as you think apply.  If you would like to have us add amenities to the drop down menu, please send us your suggestions at <u>Webmaster@theSmallTenant.com</u>.';
	var T23 ='<b>Optional.</b> <b><i><font face="Comic Sans MS">theSmallTenant.com</font></i></b> permits five photos or images (e.g. floor plans)  for each property. Each image has two possibilities for upload, a thumb nail which appears at the bottom of the screen or next to the address and a "click to enlarge" image for viewers to see a larger version of the picture or image. Your thumbnail should be formatted to 125X125 pixels and the enlarged image should be in .jpg format for best loading performance. Adobe Acrobat(.pdf) can be used for floor plans.  If you have questions or difficulty uploading your images, contact us at <u>Webmaster@theSmallTenant.com</u>.  You can email us the images and your contact information and we will assist you with adding your images to the site.';
	var T24 ='Important. <b>You must save your data upon completion to have it added to the site.</b> We recommend you save periodically as you ad information, you can return to add or edit your information at any time.  Your information will not appear immediately, it comes to us for approval before it is added to the site to make sure your posting is operational.  We strive for 24 hour approval and your site is frequently up sooner than that.  If you have any questions, please direct them to <u>Webmaster@theSmallTenant.com</u>.';

