if (!document.trace) {
	this.trace = function(output) {
		//if (console.log && output) console.log(output);
	}
}


/*
window.addEvent('load', function() {
	var rotation = new FeatureRotation();
});
*/


var FeatureRotation = new Class({
	
	
	initialize : function() {
		this.embedFlash();
	},
	
	
	embedFlash : function() {
		
		var contentDefs = $('feature_definition').getChildren();
		var flashvars = {};
		
		// concat the swf URL into a string with the flash vars, since the object appears to break them... :P
		
		var embedURL = sn_swf_base_url + 'usaca_feature_rotation_shell.swf';
		
		for (var i = 0; i < contentDefs.length; ++i) {
			var element = contentDefs[i];
			var paramName = element.getProperty('id');
			var paramValue = element.getText();
			
			flashvars[paramName] = paramValue;
		}
	
		var params = {
			menu: 'false', 
			allowScriptAccess: 'always',
			wmode: 'opaque'
		};
	
		var attributes = {
			id: 'feature_rotation_shell'
		};
	
		swfobject.embedSWF(embedURL, 'feature_widget', '570', '250', '9.0.0', sn_swf_base_url + 'expressInstall.swf', flashvars, params, attributes);
	},
	
	
	toString : function() {
		return "[FeatureRotation]";
	}
});

