﻿/// <reference path="HillsideUI.js" />
/// <reference path="~/MapSearchControl.aspx" />
/// <reference path="HC-Utils.js" />
/// <reference path="../AjaxDataPages/MapObjects-Search.js" />


var strUrl = new String();
var map = null;
var strRows = new Array();
var strFields = new Array();
var strHTML;
var objMapSettings;
var objMarkers = new Array();
var listingCount = 0;
var averageLat = 0.0;
var averageLon = 0.0;
var objMapDropArr = new Array();
var pricetoslider = null;
var pricefromslider = null;
var minbedslider = null;
var minbathslider = null;


var IDXImagePath = "<img border=\"0\" src=\"images/idx.gif\" alt=\"IDX Logo\" />";

function showResultsList() {
	CallBackMLSSearch.Callback(MLSNumbers);
}

function onCallbackError(sender, e) {
	hillsideUI.showErrorPopup("Error Downloading Data", "Error Downloading Data. Please Try Again.");
	
	var message = e.get_message();
	if (isDebug) {
		alert("Callback Error: " + message);
		if (typeof (console) != "undefined") {console.log(message); }
	}
	
	// perform logic on message string here
}

function setPushpinHoverState(pushpin, isHover, markerIndex) {
	if (isHover) {
		pushpin.SetCustomIcon("<img src=\"images/Pushpin-LimeGreen-20x30.png\" width='20' height='30' alt='' id='hcPin_" + markerIndex + "' />");
	} else {
		pushpin.SetCustomIcon("<img src=\"images/Pushpin-20x30.png\" width='20' height='30' alt='' id='hcPin_" + markerIndex + "' />");
	}
}

function IsMapLoaded() {
	if (map) {
		return true;
	} else {
		return false;
	}
}
function setAnimatedMovementEnabled(enableMapAnimation) {
	//map.IsAnimationEnabled = enableMapAnimation;
	map.animatedMovementEnabled = enableMapAnimation;
	map.SetAnimationEnabled(enableMapAnimation);
}
function loadMap() {
	if (map) { return false; /* Don't re-create map object instance */ }

	objMapSettings = new mapSettings(IDXImagePath, 0, 0, 0, 0, 0, 0);
	map = new VEMap("mymapcontroldiv");
	setAnimatedMovementEnabled(false);
	map.LoadMap(AvgLatLon, 12);
	setAnimatedMovementEnabled(false);
	resizeMap();

	selectedAreaLayer = new VEShapeLayer();
	resultsLayer = new VEShapeLayer(); 

	// Make sure we track mouse up events on the map so we can handle the slider
	map.AttachEvent("onmouseup", function () {
		/* If the price slider is maxed, kill the "slide" event using the  */
		if (jQuery("#priceSlider").slider("option", "values")[1] > 1900000) { cancelPriceSlide = true; }
	});

	// Enable animation after 10 seconds - so the page's scripts get a chance to run before dealing with animation overhead
	setTimeout("setAnimatedMovementEnabled(true);", 10000)

	/*
	map.IsAnimationEnabled = true;
	map.animatedMovementEnabled = true;
	*/
	//map.SetAnimationEnabled(true);

	/* Add Layer(s) for selection polygon */
	selectedAreaLayer = new VEShapeLayer();
	resultsLayer = new VEShapeLayer();
	map.AddShapeLayer(selectedAreaLayer);
	map.AddShapeLayer(resultsLayer);

	// Added by: Dan L. 200-04-09
	map.AttachEvent("onclick", map_OnClick);

	/** Handle map state if any **/
	var state = self.location.hash;
	if (state && state.length > 10) {
		/* remove leading # */
		if (state.indexOf("#") == 0) { state = state.substring(1); }
		//loadMapState(state);
		setTimeout("loadMapState('" + state.replace("'", "") + "')", 500);
	}

}
function map_OnClick(e) {
	if (e.elementID != null) {
		var shape = map.GetShapeByID(e.elementID);
		if (shape && shape.markerIndex) {
			//consoleLog("shape.markerIndex: " + shape.markerIndex)
			hillsideUI.mappingTools.showPropertyDetails(objMarkers[shape.markerIndex].ln, objMarkers[shape.markerIndex].address);
		}
	}
}

function hideMapLoadingProgress() { document.getElementById("MapLoading").style.display = "none"; }
function showMapLoadingProgress() {
	var mapPos = $("#mymapcontroldiv").offset();

	$("#MapLoading").css({zIndex: '1000000', display: "", width: ($("#mymapcontroldiv").width() - 2) + "px", height: ($("#mymapcontroldiv").height() - 2) + "px", paddingTop: "120px", 
		top: mapPos.top.toString() + "px", 
		left: mapPos.left.toString() + "px"});
}

var getPriceRange = function () { return jQuery("#priceSlider").slider("option", "values"); };
var getMinBeds = function () { return jQuery("#bedsSlider").slider("value"); };
var getMinBaths = function () { return jQuery("#bathsSlider").slider("value"); };

var topleft;
var bottomright;
var UndoCheckbox = false;

function doSearch() {
	try {
		map.ClearDirections;
	} catch (ex) { /* DO NOTHING */ }

	map.DeleteRoute();
	document.getElementById('DirectionsResult').innerHTML = "";

	if (!IsMapLoaded()) { return; }

	/* Make sure we reset the button state */
	hillsideUI.mappingTools.setDrawingButtonsState(false);

	currentPageIndex = 0;
	/* Set The HTML */
	document.getElementById("MapLoading").innerHTML = "Loading Map - Please Wait...&#160;<img src='images/spinner.gif' alt='Loading...' width='16' height='16' border='0' style='display: inline;' />";
	showMapLoadingProgress();

	SetStatus("<span style=\"color: red;\">Searching... <img src=\"images/spinner.gif\" alt=\"Loading...\" width=\"16\" height=\"16\" border=\"0\" style=\"display: inline;\" /></span>");
	

	// consoleLog("priceRange: " + getPriceRange());

	
	strUrl = "AjaxDataPages/MLSSearch.aspx?wID=" + CurrentAgent.WebID + "&MLS=" + CurrentAgent.Board
	strUrl += "&Polygon=" + escape(selectedPolygonWKT);
	strUrl += getSearchParamsQS();

	// Save the current search data to a cookie
	var searchFormState = { City: document.getElementById("City").value, PropType: document.getElementById("PropType").value, PriceFrom: getPriceRange()[0], PriceTo: getPriceRange()[1], MinBeds: getMinBeds(), MinBaths: getMinBaths(), MaxMapListings: MaxMapListings, SearchVisibleMap: ($('#SearchVisibleMap').attr('checked') ? 'true' : 'false'), SearchToken: SearchToken, Sort: getSortField() };
	// Removed until we can persist the drawing: Polygon: (selectedPolygonWKT),
	_setCookie("searchFormState", JSON.stringify(searchFormState));

	if (UndoCheckbox) {
		$("#SearchVisibleMap").attr('checked', false);
		UndoCheckbox = false;
	}

	/*
	strUrl += "&SelectedTopLeft=" + SelectedTopLeft;
	strUrl += "&SelectedBottomRight=" + SelectedBottomRight;
	*/
	//alert("strUrl: " + strUrl);

	//$('objDebugURL').innerHTML = "<a href='" + strUrl + "'>" + strUrl + "</a>";

	objMarkers = new Array();
	pushpinShapes = new Array();

	getData();
}

/// <remarks>Returns a value including a leading ampersand</remarks>
function getSearchParamsQS() {
	view = map.GetMapView();
	topleft = view.TopLeftLatLong;
	bottomright = view.BottomRightLatLong;
	UndoCheckbox = false;
	if (areaBox && areaBox.GetID()) {
		//if (!$("SearchVisibleMap").checked) {alert("SearchVisibleMap not checked");}
		// Override the area boundaries because the user has drawn an area
		// Reverse SelectedTopLeft & SelectedBottomRight because they are set wrong in an external script - temporary fix, needs to be looked into and then updated
		topleft = SelectedBottomRight;
		bottomright = SelectedTopLeft;
		$("#SearchVisibleMap").attr('checked', true);
		UndoCheckbox = true;
	}
	var searchParams = "&City=" + escape($("#City").val());
	searchParams += "&PropType=" + $("#PropType").val();
	searchParams += "&Lat1=" + bottomright.Latitude;
	searchParams += "&Lat2=" + topleft.Latitude;
	searchParams += "&Lon2=" + bottomright.Longitude;
	searchParams += "&Lon1=" + topleft.Longitude;
	searchParams += "&PriceFrom=" + (getPriceRange()[0]);
	//searchParams += "&PriceFrom=" + $("PriceFrom").value;
	searchParams += "&PriceTo=" + (getPriceRange()[1]);
	//searchParams += "&PriceTo=" + $("PriceTo").value;
	searchParams += "&MinBeds=" + getMinBeds();
	//searchParams += "&MinBeds=" + $("MinBeds").value;
	searchParams += "&MinBaths=" + getMinBaths();
	//searchParams += "&MinBaths=" + $("MinBaths").value;
	searchParams += "&MaxMapListings=" + MaxMapListings;
	searchParams += "&SearchVisibleMap=" + ($('#SearchVisibleMap').attr('checked') ? 'true' : 'false');
	searchParams += "&SearchToken=" + SearchToken;
	searchParams += "&Sort=" + escape(getSortField());
	return searchParams;
}

function getData() {
	$.get(strUrl, dataLoaded, 'text');
}

// Example form state data: {"City": "<ALL>", "PropType": "ALL", "Lat1": 39.51622507751165, "Lat2": 39.86126309800853, "Lon2": -104.61318969726562, "Lon1": -105.33897399902344, "PriceFrom": 3150000, "PriceTo": 99000000, "MinBeds": 2, "MinBaths": 2, "MaxMapListings": 100, "SearchVisibleMap": "false", "SearchToken": "5744DCA3A378B1E0EC94929DFFD20A6C9DDDEB8B6712B2EF2FA811C2BF8A3189", "Polygon": "-104.95307922363283 39.71114841604473, -104.98191833496095 39.70771490453352, -105.00560760498048 39.725936973609194, -104.99496459960938 39.75867177956938, -104.94998931884766 39.78031044748797, -104.86553192138673 39.763422313690086, -104.95307922363283 39.71114841604473", "Sort": ""}
function loadFormState(loadFields) {
	// Save the current search data to a cookie
	var searchFormState;
	var cookieData = _getCookie("searchFormState");
	if (cookieData && cookieData.length > 6) {
		// Example: { City: $("City").value, PropType: $("PropType").value, Lat1: bottomright.Latitude, Lat2: topleft.Latitude, Lon2: bottomright.Longitude, Lon1: topleft.Longitude, PriceFrom: pricefromslider.value, PriceTo: pricetoslider.value, MinBeds: minbedslider.value, MinBaths: minbathslider.value, MaxMapListings: MaxMapListings, SearchVisibleMap: $('SearchVisibleMap').checked.toString(), SearchToken: SearchToken, Polygon: (selectedPolygonWKT), Sort: getSortField() };
		//consoleLog("cookieData: " + cookieData);
		searchFormState = JSON.parse(cookieData);
		if (loadFields) {
			// Set data to form fields
			$("#City").val(searchFormState.City);
			$("#PropType").val(searchFormState.PropType);
			// Disabled: need to add support for adding the polygon to the map onload: selectedPolygonWKT = searchFormState.Polygon;
		}
	} else {
		//consoleLog("No Cookie Data to load");
		// Set Default Values
		searchFormState = { City: "<ALL>", PropType: "ALL", PriceFrom: 100000, PriceTo: 350000, MinBeds: 2, MinBaths: 1, Sort: "" };
	}
	return searchFormState;
}
//SetStatus("hello");

function SetStatus(Message) {
	try {
		document.getElementById("objMapSearchStatus").innerHTML = Message;
	} catch (err) {

	}
}

function showTab(tabIndex) {
	jQuery("#tabs").tabs('select', tabIndex);
}

// getSortField() is here for future functionality!!!
function getSortField() {return $("#SortResults").val() + "";}

function dataLoaded(response) {
	strHTML = response.responseText ? response.responseText : response;
	strRows = strHTML.split("\n");
	//alert(strHTML);

	if (strRows.length <= 1) {
		if (strHTML.toLowerCase().indexOf("error:") > -1 || strHTML.toLowerCase().indexOf("warning:") > -1) {
			document.getElementById("ListingCount").innerHTML = "<span style=\"color: red; font-weight: 700;\">" + strHTML + "</span>";
			alert(strHTML);
			return;
		} else {
			/* Do Nothing - No Listings Due to Specific Criteria */
		}
	}

	if (strRows.length > 1) {
		document.getElementById("ListingCount").innerHTML = strRows.length - 1;
	} else {
		document.getElementById("ListingCount").innerHTML = "0 <b>Tip: Try Zoom Out</b>";
		SetStatus("");
		hideMapLoadingProgress();
	}
	if ((strRows.length - 1) == 100) { document.getElementById("ListingCount").innerHTML = "100+ (First 100 Matches Displayed)"; }

	SetStatus("Search Complete");
	hideMapLoadingProgress();
	loadMapMarkers();
	showListingsPage(0);

	/* Show the MAP tab */
	jQuery("#tabs").tabs('select', 0);
	/* ACTIVATE jQuery Accordion */
	$("#accordion").accordion('activate', 1);

	/* Make sure the content is displayed across all browsers */
	setTimeout("setAccordionPanelCrossBrowser();", 500);
	setTimeout("setAccordionPanelCrossBrowser();", 1500);
	setTimeout("setAccordionPanelCrossBrowser();", 2500);
	setTimeout("setAccordionPanelCrossBrowser();", 5000);
	// Should not need this (generally), but delays in browser load + animation time (content expanding into place)
	setTimeout("setAccordionPanelCrossBrowser();", 15000);

	loadComboBoxes(objMapDropArr);
	
	consoleLog("dataLoaded(): About to re-add area polygon...");
	if (isPolygonSupported) {
		var polygon = new VEShape(VEShapeType.Polygon, polygonPoints);
		// Old Color: 170, 150, 150
		polygon.SetFillColor(new VEColor(0, 102, 255, 0.40));
		polygon.SetLineColor(new VEColor(33, 145, 192, 0.90));
		polygon.SetLineWidth(3);
		polygon.HideIcon();

		selectedAreaLayer.DeleteAllShapes();
		selectedAreaLayer.AddShape(polygon);

		polygonId = polygon.GetID();
		consoleLog("Added polygonId: " + polygonId);
	}

}

function getComboBoxAllValues(combobox) {
	var selectedItem = "";
	selectedItem = combobox.getSelectedItem();
	if (selectedItem) {
		return [selectedItem.get_value(), selectedItem.get_text()];
	}
	return "";
}

function getComboBoxValue(combobox) {
	var selectedValue = "";
	selectedValue = combobox.getSelectedItem();
	if (selectedValue) {
		return selectedValue.get_value();
	}
	return "";
}

function getComboBoxItem(combobox) {
	var selectedItem = "";
	selectedItem = combobox.getSelectedItem();
	if (selectedItem) {
		return selectedItem.get_text();
	}
	return "";
}

function getComboBoxText(combobox) {
	return combobox.get_text();
}

function loadComboBoxes(droplist) {
	var newItem;
	StartComboBox.beginUpdate();
	EndComboBox.beginUpdate();
	var objArrayDropList = new Array();
	objArrayDropList = droplist;
	var mpoint = "";

	for (var i = 0; i < objArrayDropList.length; i++) {
		mpoint = new VELatLong(parseFloat(objArrayDropList[i].lat), parseFloat(objArrayDropList[i].lon));
		newItem = new ComponentArt.Web.UI.ComboBoxItem();
		//var stext = objArrayDropList[i].address + "|" + mpoint;
		var stext = objArrayDropList[i].address;
		newItem.set_text(stext);
		var val = i + "|" + mpoint;
		newItem.set_value(val);
		StartComboBox.addItem(newItem);
		EndComboBox.addItem(newItem);
	}
	StartComboBox.collapse();  // the above unfortunately results in an expand
	StartComboBox.enable();
	StartComboBox.endUpdate();
	EndComboBox.collapse();
	EndComboBox.endUpdate();
	EndComboBox.endUpdate();

}

var DirTab;
function getDirections(ToAddress) {
	document.getElementById("alerttext").innerHTML = "To Address: " + ToAddress;
	//document.getElementById("DirectionsBox").innerHTML = "To Address: " + ToAddress;
	document.getElementById('alertdiv').style.visibility = 'visible';
	return;

	/* Show the Directions Tab */
	/* ACTIVATE jQuery Accordion */
	$("#accordion").accordion('activate', 2);
}

function DoAlert(text) {
	document.getElementById("alerttext").innerHTML = text;
	document.getElementById('alertdiv').style.visibility = 'visible';
}

function AjaxError(err) {
	hillsideUI.showErrorPopup('Error: ' + err.status, '<b>Error:</b> ' + err.status + '<br /><b>StatusText:</b> ' + err.statusText)
	//alert('Error: ' + err.status + '\nStatusText: ' + err.statusText);
}

function zoomToCity() {
	resetSetMapView = true;
	map.SetZoomLevel(9);
	doSearch();
}

var ErrorFlag_SetScreen = false;
var frameWidth = 0;
var frameHeight = 0;

/* onResize helps control run-away resize events when the browser is resized */
var resizeTimer = 0;
function onResize() {
	if (resizeTimer)
		clearTimeout(resizeTimer);

	resizeTimer = setTimeout(resizeMap, 550);
}


var MapTopOffset = 0;
var MapLeftOffset = 200;
//var TabStripHeightOffset = 20;
var objAccordionResize = null;

function resizeMap() {
	try {
		jQuery("div#accordion div.ui-accordion-content-active").css({ height: 300 + "px" });
		if (typeof objAccordionResize != "undefined" && objAccordionResize) { clearTimeout(objAccordionResize); }
		objAccordionResize = setTimeout('jQuery("div#accordion").accordion("resize");', 1000);

		setScreenInfo();
		var TabPanelWidth = (frameWidth - MapLeftOffset);
		var TabPanelHeight = (frameHeight - MapTopOffset);
		
		/* Set New jQuery UI Elements offsets */
		MapTopOffset = $("#tabs ul").height();
		// Set the "tabs" main area width - makes the tab strip extend all the way across
		$("#tabs").css({ width: TabPanelWidth + "px" });
		// Resize Tab Panels
		if ($("#PropertyDetailsFrame").length) {
			resizeElement($("#PropertyDetailsFrame"), TabPanelWidth, TabPanelHeight);
		}
		/*
		if ($("accordion")) {
			$("accordion").setStyle({height: frameHeight});
		}
		*/
		// Update Map Size
		$('#mymapcontroldiv').css({ height: (window.innerHeight - 31) + 'px' });
		map.Resize();
		if (map) {
			map.Resize((frameWidth - MapLeftOffset), (frameHeight - MapTopOffset));
			/* InfoBox Positioning fix from: http://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/6ba3fc7c-7201-4bfe-88db-f86b9b9903bf/ */
			window.ero.setBoundingArea(new Msn.VE.Geometry.Point(0, 0), new Msn.VE.Geometry.Point((frameWidth - MapLeftOffset), (frameHeight - MapTopOffset)));
		}
		document.getElementById("mymapcontroldiv").style.width = (frameWidth - MapLeftOffset) + "px";
		document.getElementById("mymapcontroldiv").style.height = (frameHeight - MapTopOffset) + "px";
		document.body.style.width = frameWidth + "px";
		document.body.style.height = frameHeight + "px";
		
		//Disabled For Accordion: document.getElementById("ListingResultsBox").style.height = (frameHeight - TabStripHeightOffset) + "px";
	} catch (e) {
		/* don't do anything - 
		this does not really cause a problem
		- this function probably will be run again and it should have valid frameWidth and frameHeight values */
		window.status = e;
	}
}

function resizeElement(el, width, height) {
	return $(el).css({ width: width + 'px', height: height + 'px' });
}

var currentPageIndex = 0;
function showListingsPage(PageIndex) {
	
	var strHtml = "";
// NOW Write out the page
	if (PageIndex >= ListingPages.length) {
		PageIndex = ListingPages.length - 1;
	}
	document.getElementById("ListingResultsBox").style.display = "none";
	currentPageIndex = PageIndex;
	strHtml = "<div id=\"ListingPage" + (PageIndex) + "\">\n" + ListingPages[PageIndex] + "\n</div>\n";

	strHtml += "<div align=\"center\">";
	if (currentPageIndex > 0) {
		strHtml += "<img src=\"images/MapPageArrow-Back.png\" style=\"cursor: pointer; display: inline;\" alt=\"Previous Page\" onmousedown=\"showListingsPage(" + (currentPageIndex - 1) + ")\" />";
	}
	strHtml += "<span class=\"PageStatus\">Page " + (currentPageIndex + 1) + "/" + (ListingPages.length) + "</span>";
	if (currentPageIndex <= ListingPages.length && ListingPages.length != 1) {
		strHtml += "	<img src=\"images/MapPageArrow-Next.png\" style=\"cursor: pointer; display: inline;\" alt=\"Next Page\" onmousedown=\"showListingsPage(" + (currentPageIndex + 1) + ")\" />";
	}
	// Append IDX and HUD logos - Equal.gif
	if (!IDXLogoURL || IDXLogoURL.length < 2) {IDXLogoURL = "images/idx.gif";}
	strHtml += "	<div align=\"center\"><img src=\"" + IDXLogoURL + "\" alt=\"Internet Data eXchange\" border=\"0\" style=\"display: inline;\" /><img src=\"images/Equal.gif\" alt=\"HUD - Equal Housing\" border=\"0\" style=\"display: inline;\" /></div>";
	
	strHtml += "</div>";

	document.getElementById("ListingResultsBox").innerHTML = strHtml;

	/* ACTIVATE jQuery Accordion */
	$("#accordion").accordion('activate', 1);
	$("#ListingResultsBox").slideDown();


	//new Effect.BlindDown("ListingResultsBox", { duration: 1.25 });
	if (userAgentLC.indexOf("chrome") > -1 || userAgentLC.indexOf("webkit") > -1) { $("#ListingResultsBox").css({ height: 500 + 'px' }); }
}

function SaveListing(ListingID, Address, Price, Status, Cmy, CallbackResponseID) {
	/* Copied from CMA */
	/*try {
	var strProgressHTML = "Saving...<img src=\"images/spinner.gif\" alt=\"Loading...\" width=\"16\" height=\"16\" border=\"0\" style=\"display: inline;\" />";
	$(CallbackResponseID).innerHTML = strProgressHTML;
	} catch (ex) {/*Do Nothing!* /}
	try {
	setTimeout("$('" + CallbackResponseID + "').innerHTML = '';", 1200);
	} catch (ex) {/*Do Nothing!* /}
	*/

	webuiListingLinksCallBack.Callback("SaveListing", ListingID, Address, Price, Status, Cmy, CallbackResponseID);
}
function showListingMsg(ListingID, Msg) {
	/* Copied from CMA */
	//$("CallbackResponse_" + ListingID).innerHTML = Msg;
	alert(Msg);
}

function startGetDirections(addr, lat, lon) {
	/* the Lat & Lon are used - the address is just there for show */
	for (var i = 0; i < EndComboBox.get_itemCount(); i++) {
		var item = EndComboBox.getItem(i);
		if (trim(item.get_text()) == trim(addr)) {
			var val = i + "|" + lat + "," + lon;
			EndComboBox.selectItem(item);
			EndComboBox.focus();
			break;
		}
	}

	/* ACTIVATE jQuery Accordion */
	$("#accordion").accordion('activate', 2);

}

function addCommas(nStr) {
	nStr += '';
	x = nStr.split('.');
	x1 = x[0];
	x2 = x.length > 1 ? '.' + x[1] : '';
	var rgx = /(\d+)(\d{3})/;
	while (rgx.test(x1)) {
		x1 = x1.replace(rgx, '$1' + ',' + '$2');
	}
	return '$' + x1 + x2;
}



function trim(st) {
	var len = st.length;
	var begin = 0;
	end = len - 1;
	var CR = String.fromCharCode(13);
	var LF = String.fromCharCode(10);

	while ((st.charAt(begin) == " " || st.charAt(begin) == CR || st.charAt(begin) == LF) && (begin < len)) {
		begin++;
	}
	while ((st.charAt(end) == " " || st.charAt(end) == CR || st.charAt(end) == LF) && (begin < end)) {
		end--;
	}
	return st.substring(begin, end + 1);
}

function getEndComboCookie() {
	if (!_getCookie("HCScript=EndAddr") == null) {
		EndComboBox.set_text("HCScript=EndAddr");
	} else {
		EndComboBox.set_text("Select or Type in Address");
	}

}

function getStartComboCookie() {
	if (!_getCookie("HCScript=StartAddr") == null) {
		StartComboBox.set_text("HCScript=StartAddr");
	} else {
		StartComboBox.set_text("Select or Type in Address");
	}
}



