/*
 * Default Marker: For Mapoot Properties
 */
 DefaultMarker.icon;
 DefaultMarker.marker;
 DefaultMarker.id;
 DefaultMarker.provider;
 DefaultMarker.owner_map_control;
 DefaultMarker.content;
 
function DefaultMarker(gps_point,gps_accurancy,id,provider,description,link_to_details,owner_mapcontrol){
 	this.provider=provider;
 	this.id=id;
 	this.owner_map_control=owner_mapcontrol;
 	if(gps_accurancy>=8){
 	  this.icon = owner_mapcontrol.getIcon('default');
 	}else{
 	if(gps_accurancy<=0){
 		owner_mapcontrol.sendGeocodeUpdate(this.provider,this.id);
 	}
 	this.icon = owner_mapcontrol.getIcon('default_aproximated');	
 	}
	this.marker = new GMarker(gps_point, this.icon);
  	this.content = "<b>"+description+"</b>";
  	this.content +='<br/><a target="_blank" onclick="open_popup(\''+link_to_details[0]+'\',\'Details\');return false;" href="'+link_to_details[0]+'">'+link_to_details[1]+'</a>';
	this.marker.bindInfoWindowHtml(this.content,{maxWidth:150} );
	GEvent.bind(this.marker,'click',this,this.markerClicked);
}

DefaultMarker.prototype.markerClicked=function(){
	this.owner_map_control.loadRightSideInfo(this.id,this.provider);
}

DefaultMarker.prototype.getMarker=function(){
	return this.marker; 	
}
DefaultMarker.prototype.getIcon=function(){
	return this.icon; 	
}

/*
 * Ebay Marker: For Ebay Properties
 */
 EbayMarker.icon;
 EbayMarker.marker;
 EbayMarker.id;
 EbayMarker.provider;
 EbayMarker.owner_map_control;
 EbayMarker.content;
 
function EbayMarker(gps_point,gps_accurancy,id,provider,description,link_to_details,owner_mapcontrol){
 	this.provider=provider;
 	this.id=id;
 	this.owner_map_control=owner_mapcontrol;
 	if(gps_accurancy>=8){
 	this.icon = owner_mapcontrol.getIcon('ebay');
 	}else{
 	if(gps_accurancy<=0){
 		owner_mapcontrol.sendGeocodeUpdate(this.provider,this.id);
 	}
 	this.icon = owner_mapcontrol.getIcon('ebay_aproximated');	
 	}
	this.marker = new GMarker(gps_point, this.icon);
  	this.content = "<b>"+description+"</b>";
  	this.content +='<br/><a target="_blank"  onclick="open_popup(\''+link_to_details[0]+'\',\'Details\');return false;" href="'+link_to_details[0]+'">'+link_to_details[1]+'</a>';
	this.marker.bindInfoWindowHtml(this.content,{maxWidth:150} );
	GEvent.bind(this.marker,'click',this,this.markerClicked);
}

EbayMarker.prototype.markerClicked=function(){
	this.owner_map_control.loadRightSideInfo(this.id,this.provider);
}

EbayMarker.prototype.getMarker=function(){
	return this.marker; 	
}
EbayMarker.prototype.getIcon=function(){
	return this.icon; 	
}