﻿/*

Writes a Flash object to the DOM at runtime. This is to avoid
the Internet Explorer ActiveX control Activation that occurs
when the object is defined in the target html page.

*/

function CreateFlashObject(containerId, flashMovie, selectedTab, width, height)
{
	var container = document.getElementById(containerId);
	
	var html = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="' + width + '" height="' + height +'" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">';
	html += '	<param name="movie" value="' + flashMovie + '">';
	html += '	<param name="quality" value="high">';
	html += '	<param name="FlashVars" VALUE="SelectedHeader=' + selectedTab + '">';
	html += '	<embed src="' + flashMovie + '" FlashVars="SelectedHeader=' + selectedTab + '" quality="high" bgcolor="#ffffff" width="' + width + '" height="' + height + '" name="Header" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	html += '</object>';

	container.innerHTML = html;
}

/*

Shows an image in a popup window

*/

function showImage(img, width, height)
{
	window.open("/ShowImage.php?Image=" + img, null, "height=" + (height + 16) + ",width=" + (width + 15) + ",status=no,toolbar=no,menubar=no,location=no");
}