// JavaScript Document

function makexmlhttp(){
	
	var xmlhttp = null;
	if(window.XMLHttpRequest){
		
		xmlhttp = new XMLHttpRequest();
	}
	else{
		
		try{
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch(e){
			
			window.alert("Your website doens't support AJAX. Please update your browser to use this site.");
		}
	}
	return xmlhttp;
}

function Invoeren(){

	// hond code
	var code = document.getElementById('code').value;
	
	showlayer('vader');
	
	document.getElementById('vaderhond').innerHTML = '<img src="_images/ajax-loader.gif" width="43" height="11" alt="loading" />';
	
	var xmlhttp = makexmlhttp();
	
	var url="_php/GetHondGegevens.php";
	url=url+"?code="+code;
	xmlhttp.open("GET",url,true);
	
	xmlhttp.onreadystatechange = function(){
		
		if(xmlhttp.readyState == 4){
			
			document.getElementById('vaderhond').innerHTML = xmlhttp.responseText;
		}
	
	}
	
	xmlhttp.send('');
	
}


function Invoeren2(){

	// hond code
	var code = document.getElementById('code2').value;
	
	showlayer('moeder');
	
	document.getElementById('moederhond').innerHTML = '<img src="_images/ajax-loader.gif" width="43" height="11" alt="loading" />';
	
	var xmlhttp = makexmlhttp();
	
	var url="_php/GetHondGegevens2.php";
	url=url+"?code="+code;
	xmlhttp.open("GET",url,true);
	
	xmlhttp.onreadystatechange = function(){
		
		if(xmlhttp.readyState == 4){
			
			document.getElementById('moederhond').innerHTML = xmlhttp.responseText;
		}
	
	}
	
	xmlhttp.send('');
	
}

function Invoeren3(){

	// hond code
	var code = document.getElementById('code3').value;
	
	showlayer('fokker');
	
	document.getElementById('fokker_veld').innerHTML = '<img src="_images/ajax-loader.gif" width="43" height="11" alt="loading" />';
	
	var xmlhttp = makexmlhttp();
	
	var url="_php/GetHondGegevens3.php";
	url=url+"?code="+code;
	xmlhttp.open("GET",url,true);
	
	xmlhttp.onreadystatechange = function(){
		
		if(xmlhttp.readyState == 4){
			
			document.getElementById('fokker_veld').innerHTML = xmlhttp.responseText;
		}
	
	}
	
	xmlhttp.send('');
	
}


var xmlHttp

function HondSuggest(str)
{

document.getElementById('dropdown').innerHTML = '<img src="_images/ajax-loader.gif" width="43" height="11" alt="loading" />';

if (str.length==0)
  { 
  document.getElementById("dropdown").innerHTML="";
  return;
  }
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="_php/HondSuggest.php";
url=url+"?q="+str;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
} 

function stateChanged() 
{ 
if (xmlHttp.readyState==4)
{ 
document.getElementById("dropdown").innerHTML=xmlHttp.responseText;
}
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}

function HideDropdown(){
	
	document.getElementById('dropdown').style.display = 'none';
	document.getElementById('dropdown').style.visibility = 'hidden';
}

function ShowDropdown(){

	document.getElementById('dropdown').style.display = 'block';
	document.getElementById('dropdown').style.visibility = 'visible';
}




function HondSuggest2(str)
{

document.getElementById('dropdown2').innerHTML = '<img src="_images/ajax-loader.gif" width="43" height="11" alt="loading" />';

if (str.length==0)
  { 
  document.getElementById("dropdown2").innerHTML="";
  return;
  }
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="_php/HondSuggest2.php";
url=url+"?q="+str;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged2;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
} 

function stateChanged2() 
{ 
	if (xmlHttp.readyState==4)
	{ 
	document.getElementById("dropdown2").innerHTML=xmlHttp.responseText;
	}
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}

function HideDropdown2(){
	
	document.getElementById('dropdown2').style.display = 'none';
	document.getElementById('dropdown2').style.visibility = 'hidden';
}

function ShowDropdown2(){

	document.getElementById('dropdown2').style.display = 'block';
	document.getElementById('dropdown2').style.visibility = 'visible';
}


function HondSuggest3(str)
{

document.getElementById('dropdown3').innerHTML = '<img src="_images/ajax-loader.gif" width="43" height="11" alt="loading" />';

if (str.length==0)
  { 
  document.getElementById("dropdown3").innerHTML="";
  return;
  }
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="_php/HondSuggest3.php";
url=url+"?q="+str;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged3;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
} 

function stateChanged3() 
{ 
	if (xmlHttp.readyState==4)
	{ 
	document.getElementById("dropdown3").innerHTML=xmlHttp.responseText;
	}
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}

function HideDropdown3(){
	
	document.getElementById('dropdown3').style.display = 'none';
	document.getElementById('dropdown3').style.visibility = 'hidden';
}

function ShowDropdown3(){

	document.getElementById('dropdown3').style.display = 'block';
	document.getElementById('dropdown3').style.visibility = 'visible';
}

function HondSuggest4(str)
{

document.getElementById('dropdown').innerHTML = '<img src="_images/ajax-loader.gif" width="43" height="11" alt="loading" />';

if (str.length==0)
  { 
  document.getElementById("dropdown").innerHTML="";
  return;
  }
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="_php/HondSuggest4.php";
url=url+"?q="+str;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged4;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
} 

function stateChanged4() 
{ 
	if (xmlHttp.readyState==4)
	{ 
	document.getElementById("dropdown").innerHTML=xmlHttp.responseText;
	}
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}

function HideDropdown4(){
	
	document.getElementById('dropdown').style.display = 'none';
	document.getElementById('dropdown').style.visibility = 'hidden';
}

function ShowDropdown4(){

	document.getElementById('dropdown').style.display = 'block';
	document.getElementById('dropdown').style.visibility = 'visible';
}

function Nesten(){

	// hond code
	var code = document.getElementById('code').value;
	
	document.getElementById('nesten').innerHTML = '<img src="_images/ajax-loader.gif" width="43" height="11" alt="loading" />';
	
	var xmlhttp = makexmlhttp();
	
	var url="_php/GetNest.php";
	url=url+"?code="+code;
	xmlhttp.open("GET",url,true);
	
	xmlhttp.onreadystatechange = function(){
		
		if(xmlhttp.readyState == 4){
			
			document.getElementById('nesten').innerHTML = xmlhttp.responseText;
		}
	
	}
	
	xmlhttp.send('');
	
}
