﻿/* Require swfobject.js and prototype */



/* Add flash content to given container and */
function create(containerid, contentid, flashfile, w, h) {
	if (swfobject.hasFlashPlayerVersion("9")) {
		// check if SWF hasn't been removed, if this is the case, create a new alternative content container
		var c = document.getElementById(contentid);
		if (!c) {
			var d = document.createElement("div");
			d.setAttribute("id", contentid);
			document.getElementById(containerid).appendChild(d);
		}
		// create SWF
	    var att = { data:flashfile, width:w, height:h, id:contentid, name:contentid };
	    var par = { wmode:"transparent", allowfullscreen:"true" };
	    var o = swfobject.createSWF(att, par, contentid);
	}
}

function remove(contentid) {
	swfobject.removeSWF(contentid);
}	
