function Graphic(graphic,graphicsLayer,visible,symbol,infoTemplate){
	//alert("graphic:" + graphicsLayer + ":" + visible);
	this.graphic = graphic;
	this.visible = visible;
	this.graphicsLayer = graphicsLayer;
	
	if (infoTemplate){
		this.infoTemplate = infoTemplate;
		this.graphic.setInfoTemplate(this.infoTemplate);
	}
	
	if (symbol){
		this.symbol = symbol;
		this.graphic.setSymbol(this.symbol);	
	}
	
	if(this.visible){
		this.graphicsLayer.add(this.graphic);
	}
}

function GraphicPrototype(){
	Graphic.prototype.show = function(){this.graphicsLayer.add(this.graphic);this.visible = true;}
	Graphic.prototype.hide = function(){this.graphicsLayer.remove(this.graphic);this.visible = false;}
	Graphic.prototype.setInfoTemplate = function(template){this.infoTemplate = template;this.graphic.setInfoTemplate(this.infoTemplate);}
	
}




