function writeFlash(p) {
	writeEmbed(
	'D27CDB6E-AE6D-11cf-96B8-444553540000',
	'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
	'application/x-shockwave-flash',
	p
	);
}

function writeEmbed(cls, cb, mt, p) {
	var h = '', n;

	h += '<object classid="clsid:' + cls + '" codebase="' + cb + '"';
	h += typeof(p.id) != "undefined" ? 'id="' + p.id + '"' : '';
	h += typeof(p.name) != "undefined" ? 'name="' + p.name + '"' : '';
	h += typeof(p.width) != "undefined" ? 'width="' + p.width + '"' : '';
	h += typeof(p.height) != "undefined" ? 'height="' + p.height + '"' : '';
	h += typeof(p.align) != "undefined" ? 'align="' + p.align + '"' : '';
	h += '>';

	for (n in p)
	h += '<param name="' + n + '" value="' + p[n] + '">';

	h += '<embed type="' + mt + '"';

	for (n in p)
	h += n + '="' + p[n] + '" ';

	h += '></embed></object>';

	document.write(h);
}

//-- EXTERNAL LINKS

$(document).ready(function()
{
	$("a[href=#]").click(function()
	{
		return false;
	})

	$("a[rel=external]").click(function()
	{
		$(this).attr("target", "_blank");
	})
});



		jQuery(document).ready(function() {

			$("a.fancy").fancybox({
			'titlePosition'  : 'inside',
			'transitionIn'	:	'elastic',
			'transitionOut'	:	'elastic'
			});
		});	
