var IFramedHtmlContent = Class.create();
Object.extend(IFramedHtmlContent.prototype, {
	initialize: function(iframeID, htmlText){
		this.iframeID = iframeID;
		this.iframeSource = $(iframeID);
		if(typeof(this.iframeSource)=='undefined')
			throw 'iframe with id \'' + iframeID + '\' is undefined;';
		this.writeHtml(htmlText);
	},
	
	writeHtml: function(htmlText){
		if (!this.iframeSource.contentWindow)
			throw 'contentWindow of iframe[id \'' + this.iframeID + '\'] is undefined;';
		with(this.iframeSource.contentWindow.document) {
			open();
			write(htmlText);
			close();
		}
	}
});

// [AtlasScript]
if (typeof (Sys) != "undefined")
	Sys.Application.notifyScriptLoaded();
// [/AtlasScript]