function placeAV(type, container, video, width, height, fullscreen, preview, autostart)
{
	//type: 1 - video, 2 - audio
	var s1 = new SWFObject("/player.swf", "mediaplayer", width, height, 6+type);
	s1.addParam("allowfullscreen",fullscreen);
	s1.addVariable("width",width);
	s1.addVariable("height",height);
	s1.addVariable("file",video);
	s1.addVariable("autostart", autostart);
	if (preview != "")
		s1.addVariable("image",preview);
	s1.write(container);
}

function placeVideo(container, video, width, height, fullscreen, preview)
{
	placeAV(1, container, video, width, height, fullscreen, preview, false)
}

function placeAudio(container, audio, width, autostart)
{
	placeAV(2, container, audio, width, 20, false, "", autostart);
}
