function ApiWindow()
{
}
ApiWindow.prototype.Popup = function(docURL, imageURL, header, description)
{
	var objWriter = new HtmlWriter(imageURL, header, description)
	return window.showModalDialog(docURL, objWriter, "status=no;dialogWidth:300px;dialogHeight:300px");
}

function HtmlWriter(imageURL, header, description)
{
	this.imageURL = (imageURL != null)? imageURL : "";
	this.header = (header != null)? header : "";
	this.description = (description != null)? description : "";
}

HtmlWriter.prototype.write = function(doc, imageID, headerID, descID)
{
	if(imageID != null)
		doc.all[imageID].src = this.imageURL;
	if(headerID != null)
		doc.all[headerID].innerHTML = this.header;
	if(descID != null)
		doc.all[descID].innerHTML = this.description;
}


apiWindow = new ApiWindow();
