/**
 * @author baer
 * 
 * generates your audioshuffle swf:
 * 
 * objId		= id of div containing the swf
 * width		= width of flash area
 * height		= height of flash area
 * bgcolor		= background color of swf area, e.g. #FFFFFF
 * 
 * 
 */

// handle GET parameter
HTTP_GET_VARS=new Array();
strGET=document.location.search.substr(1,document.location.search.length);
if(strGET!='')
{
	gArr=strGET.split('&');
	for(i=0;i<gArr.length;++i)
		{
		v='';vArr=gArr[i].split('=');
		if(vArr.length>1){v=vArr[1];}
		HTTP_GET_VARS[unescape(vArr[0])]=unescape(v);
		}
}

function GET(v)
{
if(!HTTP_GET_VARS[v]){return 'undefined';}
return HTTP_GET_VARS[v];
}


// build shuffle 
 
function buildAudioShuffle (objId,width,height,bgcolor,settingsFile,feedFile)
{
	if (!settingsFile) settingsFile = "typo3conf/ext/scm_product/res/audioshuffle/settings.xml";
	if (!feedFile) feedFile = "http://sandbox.scmshop.de/?eID=tx_scmproduct_audioshuffle";
	
	var flashvars = {
		playerid: "mp3audioshuffle",
		settings: settingsFile,
		feed: feedFile
	};
	if (GET('preplay') != "undefined") {
		flashvars['preplay'] = GET('preplay');
	}
	var params = {
		menu: "false",
		scale: "noScale",
		allowFullscreen: "false",
		allowScriptAccess: "always",
		bgcolor: bgcolor
	};
	var attributes = {
		id:"mp3audioshuffle"
	};
	swfobject.embedSWF("typo3conf/ext/scm_product/res/audioshuffle/mp3shuffle.swf", objId, width+"px", height+"px", "9.0.0", "typo3conf/ext/scm_product/res/audioshuffle/expressInstall.swf", flashvars, params, attributes);
	
}

