



var FlashHeader = new Class({
	Implements:[Events, Options],
	options: {
		swf: '',
		content: '',
		height: 323,
		width: 961,
		idContainer:'',
		idHeader:''
	},
	initialize: function(ele, options){
		this.setOptions(options);
		this.ele = ele;
		this.box = this.options.idContainer;
		this.h3 = this.options.idHeader;
		

		
		this.ele.removeProperty('class');
		
		$('flashtext').getElements('span').each(function(ele,ind){
			var txtcoords = ele.getPosition(ele.getParent());
			objtxt[ind] = {
				type: 'text',
				size: ele.getStyle('font-size').toInt(),
				font: ele.get('class'), 
				text: ele.get('html'),
				x: txtcoords.x, 
				y: txtcoords.y, 
				width: ele.getStyle('width').toInt(),
				fontColor: ele.getStyle('color')
			}
		});
		
		$('temphdr').set('styles',{'display':'none'});
		this.renderSwiff();
	},
	moveElements: function(){
		this.temp = new Element('div',{
			'styles':
				{'display':'block'},
			'id':'temphdr'
		});
		this.box.inject(this.temp);
		this.temp.inject(this.options.container);
	},
	renderSwiff: function(){

		$('objhtml').set('text',$('header').get('html'));
	}
});



/* TMS Page Templates Initialization */
var TMS = {
	common: function(){
		var header = new FlashHeader($('header'),{
			swf: 'swf/mainFlash_class.swf',
			height: '100%',
			width: '100%',
			idContainer:$('h3Container'),
			idHeader:$('flashtext'),
			container:'container'
		});	
	}
};

