function ContentText(width,height,text,cssclass,color)
{
	this.id=getNewID();
	this.width=width;
	this.height=height;
	this.text=text;
	this.cssclass=cssclass;
	this.color=color;
	
	this.create=ContentTextCreate;
	this.setColor=ContentTextSetColor;
}

function ContentTextCreate()
{
	document.write('<div id="'+this.id+'" style="position:absolute;top:0px; left:0px; width:'+this.width+'px; height:'+this.height+'px;">');		
	document.write('<table class="'+this.cssclass+'" style="color:'+this.color+'"><tr><td >'+this.text+'</td></tr></table>');	
	document.write('</div>');
}

function ContentTextSetColor( color )
{
	var node = document.getElementById(this.id).firstChild;
	node.style.color = color;
}

////////////////////////////////////////////////////////////////////////////

function ContentImage(x,y,width,height,src)
{
	this.id=getNewID();
	this.width=width;
	this.height=height;
	this.x=x;
	this.y=y;
	this.img = new Image();
	this.img.src = src;
		
	this.create=ContentImageCreate;
	this.show=ContentImageShow;
	this.hide=ContentImageHide;
}

function ContentImageCreate()
{
	document.write('<div class="img_content" id="'+this.id+'" style="position:absolute;top:'+this.y+'px;left:'+this.x+'px;width:'+this.width+'px;height:'+this.height+'px;">');
	document.write('<img src="'+this.img.src+'" width="'+this.width+'" height="'+this.height+'" />');
	document.write('</div>');
}

function ContentImageShow()
{
	document.getElementById(this.id).style.visibility = 'visible';
}

function ContentImageHide()
{
	document.getElementById(this.id).style.visibility = 'hidden';
}
