function showFlash (Path, Width, Height)
{
	html = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + Width + '" height="' + Height + '" id="videoplayer" align="middle">' +
			'	<param name="allowScriptAccess" value="sameDomain" />' +
			'	<param name="movie" value="' + Path + '" />' +
			'	<param name="loop" value="false" />' +
			'	<param name="quality" value="high" />' +
			'	<param name="bgcolor" value="#ffffff" />' +
			'	<embed src="' + Path + '" loop="false" quality="high" bgcolor="#ffffff" width="' + Width + '" height="' + Height + '" name="videoplayer" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />' +
			'</object>';
	return html;
}
function showVideo (Basepath, ProjectsID, ProjectsMediaID, Type, Width, Height)
{
	Path = Basepath + 'videoplayer.swf?ProjectsID=' + ProjectsID + '&ProjectsMediaID=' + ProjectsMediaID;
	return showFlash(Path, Width, Height);
}
function showImage (Path, Width, Height, Alt, Title)
{
	return '<img id="imagemain" src="' + Path + '" alt="' + Alt + '" title="' + Title + '" style="width:' + Width + 'px; height:' + Height + 'px;" alt="' + Alt + '" title="' + Title + '">';
}

function showMedia (ProjectsID, ProjectsMediaID, Type, Title, Alt, Width, Height)
{
	if (Width == 0) {
		Width = 500;
	}
	if (Height == 0) {
		Height = 320;
	}
	Basepath = imageprojectsbaseurl + ProjectsID + '/pictures/';
	switch (Type) {
		case 'flv':
			Ret = showVideo(imagebaseurl, ProjectsID, ProjectsMediaID, Type, Width, Height);
			break;
		case 'swf':
			Path = Basepath + ProjectsMediaID + '.' + Type;
			Ret = showFlash(Path, Width, Height);
			break;
		default:
			Path = Basepath + ProjectsMediaID + '.' + Type;
			Ret = showImage(Path, Width, Height, Alt, Title);
			break;
	}
	document.getElementById("imagebox").innerHTML = Ret;
	
	document.getElementById("nav_images").style.height = (Height)+"px"; // -33
	
	document.getElementById("imagetitle").innerHTML = Title;
	
	document.getElementById("imagenav_"+imagenavactive).src = DirWebroot+'images/nav_image.gif';
	document.getElementById("imagenav_"+ProjectsMediaID).src = DirWebroot+'images/nav_image_active.gif';
	imagenavactive = ProjectsMediaID;
	
	return false;
}
