
function UrlEncode(text)
{
	var SAFECHARS = "0123456789"
		+"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
		+"abcdefghijklmnopqrstuvwxyz"
		+"-_.!~*'()";
	var retval = "";
		
	for(var i = 0; i < text.length; i++)
	{
		if(SAFECHARS.indexOf(text.charAt(i)) != -1)
		{
			retval += text.charAt(i);
		}
		else if(text.charAt(i) == " ")
		{
			retval += "+";
		}
		else
		{
			retval += "%"+text.charCodeAt(i).toString(16);
		}
	}
	
	return retval;
}

function displayFlash()
{
	document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"770\" height=\"450\" VIEWASTEXT>");
	document.write("	<param name=\"movie\" value=\"Intro.swf\" />");
	document.write("	<param name=\"quality\" value=\"high\" />");
	document.write("	<param name=\"LOOP\" value=\"false\" />");
	document.write("	<param name=\"BGCOLOR\" value=\"#f4ebdb\" />");
	document.write("	<param name=\"menu\" value=\"false\" />");
	document.write("	<param name=\"scale\" value=\"noscale\" />");
	document.write("	<param name=\"allowScriptAccess\" value=\"sameDomain\" />");
	document.write("	<embed src=\"Intro.swf\" width=\"770\" height=\"450\" loop=\"False\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" bgcolor=\"#f4ebdb\" menu=\"false\" scale=\"noscale\"></embed>");
	document.write("</object>");
}

function displayTitle(text)
{
	document.write("<object type=\"application/x-shockwave-flash\" width=\"405\" height=\"32\" data=\"Images/loader.swf?path=Images%2Ftext.swf%3Ftext%3D"+UrlEncode(UrlEncode(text))+"\">");
	document.write("	<param name=\"movie\" value=\"Images/loader.swf?path=Images%2Ftext.swf%3Ftext%3D"+UrlEncode(UrlEncode(text))+"\" />");
	document.write("	<param name=\"quality\" value=\"high\" />");
	document.write("	<param name=\"menu\" value=\"false\" />");
	document.write("	<param name=\"wmode\" value=\"transparent\" />");
	document.write("</object>");
}
