var EffectSpeed = 200;



/**
*	Standaard alle links met # false laten returnen zodat er niet naar boven gegaan wordt
*/

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

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


function limitText(limitField, limitCount, limitNum)
{
	if (limitField.value.length > limitNum)
	{
		limitField.value = limitField.value.substring(0, limitNum);
	}
	else
	{
		limitCount.value = limitNum - limitField.value.length;
	}
}

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);
}



