/**
	streetview info pane
	index: index into marker[] array, used to fish out data
	map: GMap2 used to calculate positioning
	parentDIV: name of the parent DIV
	**/
function streetInfoPane(parentDIV, map, index) {

	this.parentDIV = parentDIV; 
	this.data = infoWins[index].data; 
	this.id = "streetDetailsPane";
	this.map = map;
	this.width = 205; 			// info window width
	this.height = 63;			// info window height
	this.padding = 25;
	_this = this;
	
	this.display = function() {
		html = "";
		html += "<div id='str_details'>";
		//html += "<div class='str_addr'>" +this.data['address'] +"</div>";
		html += "<p class='str_addr'>" +this.data['price'] +"</p>";
		html += "<p>" +this.data['bedrooms'] +" br " +this.data['bathrooms'] +" ba ";
		if(this.data['sqft']) html += this.data['sqft'] +" sqft</p>";
		html += "<a href='" +this.data['propURL']+"'>More Details</a>";
		html += "</div>";
		html += "<img id='str_photo' width=70 height=54 src='" +this.data['picURL']+ "'>";
		
		this.container = document.createElement("div");
		$(this.container).attr("id",this.id);
		/** position element in lower right corner of map **/
		var p = this.positionDiv();
		$(this.container).css("top", p['y'] +"px");
		$(this.container).css("left", p['x'] +"px");
		$(this.container).css("width", this.width +"px");
		$(this.container).css("height", this.height +"px");
		
		$(this.container).append(html);
		$("#"+this.parentDIV).append(this.container);
		$(this.container).css("display","block");
	}
	
	this.positionDiv = function() {
		var size = this.map.getSize();
		var p = new Array();
		p['x'] = size.width - this.width - this.padding;
		p['y'] = size.height - this.height - this.padding;
		return p;
	}
	
	this.destroy = function() {
		$(this.container).remove();	
	}
}
