//-- invullen van 'Geef uw zoekterm' bij onblur op tekstveld
function FillInSearch(lblsearch)
{
	if(document.getElementById('emailSubscribe').value == "")
	{
		document.getElementById('emailSubscribe').value = lblsearch;
	}
}

//-- inschrijven op nieuwsbrief links
function checkSubsribe()
{
	//var objForm = $(this).parents("form");
	var objForm = $("#frmSubscribe");
	$.post(strPath + "ajax_subscribe.php",objForm.serialize(), function(data){

		if (data.error != "")
		{
			$('#errorSubscribe').html(data.error);
			$('#emailSubscribe').addClass("error");
		}
		else
		{
			$('#frmSubscribe').html(data.message)
			$('#frmSubscribe').addClass("error");
		}
	
	},"json");
}


//you tube filmpjes
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 += '<div style="width:100%;text-align:center;"><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 += '<param name="wmode" value="opaque">';
	h += '<embed  wmode="opaque" type="' + mt + '"';

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

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

	document.write(h);
}

