function getHTTPObject() {
    var xmlhttp = false;
    
 	if (window.ActiveXObject)
 	{
     	xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
 	}
 	else
    {
        xmlhttp = new XMLHttpRequest();
    }
    return xmlhttp;
}

function getit(vid) { // requires vid=div id, vfunc = function, vvars=vars

	var xmlhttp = getHTTPObject();
	xmlhttp.open("GET", "./engine.php?func=getit&id="+vid,true); // Open verbinding via GET, via deze URL en communiceer asynchroon
	xmlhttp.onreadystatechange = function()  { 
    	if (xmlhttp.readyState == 4) 
    	{
        	document.getElementById('specs' + vid).innerHTML =  xmlhttp.responseText; 
    	}
    	else
    	{
        	//document.getElementById('row' + vid).getElementsByTagName('select')[0].disabled = true; 
    	}
    }
	xmlhttp.send(null) // Verstuur de request
}

if (document.getElementById('results'))
{
	tds = document.getElementById('results').getElementsByTagName('td');
	for (i = 0; i < tds.length; i++)
	{
		if (tds[i].className == 'zoek_naam')
		{
			tds[i].getElementsByTagName('a')[0].onclick = function()
			{
				this.rid = this.id.substr(1,this.id.length-1);
				if (document.getElementById('specs' + this.rid).style.display == 'block')
				{
					document.getElementById('specs' + this.rid).style.display = 'none';
				}
				else
				{
					document.getElementById('specs' + this.rid).style.display = 'block';
					getit(this.rid);
				}
				return false;
			}
		}
	}
}

if (document.all && document.getElementById('image_1'))
{
	var slideShowSpeed = 12000;
	var ppic = new Array();
	ppic[0] = '';
	ppic[1] = '_2';
	ppic[2] = '_3';
	ppic[3] = '_4';
	ppic[4] = '_5';
	
	var t;
	var j = 0;
	var p = ppic.length;
	
	function runSlideShow() 
	{
		document.getElementById('fppic').style.filter="blendTrans(duration=4)";
		document.getElementById('fppic').filters.blendTrans.Apply();
		document.getElementById('fppic').src = '/images_main/home_image' + ppic[parseInt(j)] + '.jpg';
		document.getElementById('fppic').filters.blendTrans.Play();
		j = j + 1;
		if (j > (p - 1))
		{
			 j = 0;
		}
		t = setTimeout('runSlideShow()', slideShowSpeed);
	}
	runSlideShow();	
}

document.getElementById('logo').onclick = function()
{
	document.location.href="/";
}

document.getElementById('uitvaart').onclick = function()
{
	window.open("http://www.uitvaart.nl");
}

