
function showItem(file, type, container) {
	switch(type) {
		case "video":     playVideo(file, container); break;
		case "wallpaper": showWallpaper(file, container); break;
		case "image":
		case "photo":     showPhoto(file, container); break;
		case "audio":     playAudio(file, container); break;
	}
}

function playVideo(videoFile, container) {
	var flash = new FlashObject("/VictoryVision/videos/player_buf2.swf?movieFile=" + videoFile, "vision", "270", "250", "8", "#000000");
	flash.addParam("WMode", "transparent");
	flash.addParam("Quality", "High");
	flash.addParam("scale", "noborder");
	flash.addParam("allowscriptaccess", "always");
	
	flash.write(container);
}
function showWallpaper(wallpaperFile, container) {
	var playerDiv = document.getElementById(container);
	
	var objHTML = 
		'<img src="' + wallpaperFile + '" border="0" width="270" height="202" />' +
		'<p>PC users: Right click the image on the left and select "Set as Wallpaper/Background" from the options.</p>' +
		'<p>Mac users: Click and hold on the image, then select "Save this link as..." from the options.</p>';
		
	playerDiv.innerHTML = objHTML;
	
}
function showPhoto(photoFile, container) {
	var playerDiv = document.getElementById(container);
	
	var objHTML = '<img src="' + photoFile + '" border="0" width="264" height="171" />';
	playerDiv.innerHTML = objHTML;
}
function playAudio(audioFile, container) {
	var flash = new FlashObject(audioFile, "vision", "264", "250", "7", "#000000");
	//flash.addParam("WMode", "transparent");
	flash.addParam("Quality", "High");
	
	flash.write(container);
}