function CallBackGraph(url,ContentId,fun,RefRate)
{
  this.URL=url;
  this.Refresh=RefRate*1000;
  this.recallFunction=fun;
  this.ContentId=ContentId;
}

CallBackGraph.prototype.CacheImage=function()
{ // TURNS THE STRING INTO AN IMAGE OBJECT
	var ImageObject = new Image();
	ImageObject.src = this.URL;
	return ImageObject;
}

CallBackGraph.prototype.loadImage=function()
{
	self.defaultStatus = "Done";
	this.Image=this.CacheImage();
    var oThis = this;
    this.Image.onload = function(){ oThis.OnLoad(); };
}

CallBackGraph.prototype.OnLoad = function()
{
	var img = document.getElementById("cbGraph" + this.ContentId); 
	img.src=this.Image.src
	rfun=this.recallFunction + "('" + this.URL + "','" + this.ContentId + "')";
    intR=window.setTimeout(rfun,this.Refresh);
}

