if (typeof Prototype == 'undefined')
	alert("You must place {!$javascript_include} before {!$coverflow_js}");

(function() {
	 var rpid;
	 $A(document.getElementsByTagName("script")).findAll( function(s) {
		 return (s.src && s.src.match(/coverflow\.js(\?.*)?$/))
	 }).each( function(s) {
		 var path = s.src.replace(/coverflow\.js(\?.*)?$/,'');
		 var includes = s.src.match(/\?.*remotepropertyid=(.*)$/);
		 rpid = includes[1];
	});
	var params = {};
	params.scale = "noscale";
	params.salign = "tl";
	params.wmode = "transparent";
	var attributes = {};
	var div = "coverflow";
	var width = $("coverflow").getWidth();
	var height = $("coverflow").getHeight();
	var flashvars = {
		folderPath: "/coverflow/"+rpid+"/"+width+"/"+height+"/"
	};
	swfobject.embedSWF("/xml/flash/coverflow.swf", div, width, height, "9.0.0", false, flashvars, params, attributes);
}).onLoad();
