function mediaPlayer(videoLink,targetId,fpConfig)
{
	// add the playlist to the json object
	fpConfig.playlist=[{}];
	// add the video to the playlist
	fpConfig.playlist[0].url=videoLink;

	// To build the domain name used to generate the product key, find the total
	// number of labels in the domain name and strip out all but the last two labels.
	// ie. foo.demo.smallworldlabs.com becomes smallworldlabs.com
	var numberDomainParts=location.hostname.match(/\./g).length;
	var domainName = location.hostname.split('.')[numberDomainParts - 1] + '.' + location.hostname.split('.')[numberDomainParts];
	fpConfig.key = hex_md5(domainName + "d5290009b444bcb9105").substring(11, 30);
	
	flowplayer(targetId,
	{
		src: "/swf/flowplayer.unlimited.swf",
		allowScriptAccess: "sameDomain",
		quality: "high",
		bgcolor: "#fffff",
		wmode: "transparent"
	},
	fpConfig);
}

