//Copyright (c) 2007 paulgrant.ca
//http://www.paulgrant.ca

function SetSwf(sSrc, sDiv, sId, iWidth, iHeight)
{
	if(!sDiv)
		sDiv = "divTTC";

	if(!sId)
		sId = "swfTTC";

	if(!iWidth)
		iWidth = 750;

	if(!iHeight)
		iHeight = 413;

	var oDiv = document.getElementById(sDiv);
	if(!oDiv)
		return false;

	var sString = "<object"
	+ " id			='" + sId + "_obj'"
	+ " name		='" + sId + "_obj'"
	+ " classid		='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'"
	+ " codebase	='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#9,0,0,0'"
	+ " width		='" + iWidth + "'"
	+ " height		='" + iHeight + "'"
	+ " >"
	+ " <param name='movie'		value='" + sSrc + "'>"
	+ " <param name='loop'		value='true'>"
	//+ " <param name='menu'		value='false'>"
	+ " <param name='quality'	value='high'>"
	+ " <param name='allowScriptAccess' value='sameDomain'>"
	+ " <embed"
	+ " id			='" + sId + "_emb'"
	+ " name		='" + sId + "_emb'"
	+ " src			='" + sSrc + "'"
	+ " allowScriptAccess	='sameDomain'"
	+ " pluginspage	='http://www.macromedia.com/go/getflashplayer'"
	+ " type		='application/x-shockwave-flash'"
	+ " width		='" + iWidth + "'"
	+ " height		='" + iHeight + "'"
	+ " loop		='true'"
	//+ " menu		='false'"
	+ " quality		='high'"
	+ " >"
	+ " </embed>"
	+ " </object>";

	oDiv.innerHTML = sString;

	return true;
}

function SetImg(oImg, sUrl, iWidth, iHeight)
{
	if(!oImg)
		return false;

	oImg.src	= sUrl;
	oImg.width	= iWidth;
	oImg.height	= iHeight;

	return true;
}

//End.
