// external_script.js
function writeflash(DivID, ObjectID, WIDTH, HEIGHT, URL, bgcolor, params){
	var rand = Math.floor(Math.random() * 100);

	URL = URL + '?rand='+rand+''
	flashvars = "";
	for (i=0; i<params.length; i++){
		URL = URL + '&' + params[i];
		//flashvars = flashvars + params[i] + '&';
	}
	var d = document.getElementById(DivID);
	ihtml = '';
	ihtml += '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" WIDTH="'+WIDTH+'" HEIGHT="'+HEIGHT+'" id="'+ObjectID+'" ALIGN="">';
	ihtml += '<PARAM NAME=movie VALUE="'+URL+'">';
	ihtml += '<PARAM NAME=quality VALUE=high>';
	ihtml += '<PARAM NAME=wmode VALUE="transparent">';
	ihtml += '<PARAM NAME=bgcolor VALUE="'+bgcolor+'">';
	ihtml += '<PARAM NAME=AllowScriptAccess VALUE="always">';
	ihtml += '<EMBED src="'+URL+'" AllowScriptAccess="always" quality=high wmode=transparent bgcolor="'+bgcolor+'" WIDTH="'+WIDTH+'" HEIGHT="'+HEIGHT+'" NAME="'+ObjectID+'" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>';
	ihtml += '</OBJECT>';
	d.innerHTML = ihtml;
}