   function show_online2()
     	{
		xmlhttp=GetXmlHttpObjectSix();
		if (xmlhttp==null)
		  {
			alert ("Your browser does not support XMLHTTP!");
			return;
		  }
		var url="../js/online.php";
		url=url+"?sid="+Math.random();
		xmlhttp.onreadystatechange=stateChanged_online_show2;
		xmlhttp.open("GET",url,true);
		xmlhttp.send(null);
	}

	function stateChanged_online_show2()
	  {
		if (xmlhttp.readyState==4)
		{
if(xmlhttp.responseText.length != "kajop")
{
             document.getElementById("online").value = xmlhttp.responseText;
}
		}
}   

function show_online_page()
	{
		xmlhttp=GetXmlHttpObjectSix();
		if (xmlhttp==null)
		  {
			alert ("Your browser does not support XMLHTTP!");
			return;
		  }
		var url="../js/online.php";
		url=url+"?sid="+Math.random();
		xmlhttp.onreadystatechange=stateChanged_show_online_page;
		xmlhttp.open("GET",url,true);
		xmlhttp.send(null);
		

	}
	
	
	function stateChanged_show_online_page()
	  {
		if (xmlhttp.readyState==4)
		{
		setTimeout('show_online_page()',12000);
                  alert("hay");
		document.getElementById("online").innerHTML = xmlhttp.responseText;
		}
	  }


function show_page_new()
	{
		xmlhttp=GetXmlHttpObject();
		if (xmlhttp==null)
		  {
			alert ("Your browser does not support XMLHTTP!");
			return;
		  }
		var url="/js/new.php";
		url=url+"?sid="+Math.random();
		xmlhttp.onreadystatechange=stateChanged_show_page_new;
		xmlhttp.open("GET",url,true);
		xmlhttp.send(null);
	}
	
	function show_late_page()
	{
		xmlhttp=GetXmlHttpObject();
		if (xmlhttp==null)
		  {
			alert ("Your browser does not support XMLHTTP!");
			return;
		  }
		var url="../js/page_late.php";
		url=url+"?sid="+Math.random();
		xmlhttp.onreadystatechange=stateChanged_show_late_page;
		xmlhttp.open("GET",url,true);
		xmlhttp.send(null);
		

	}
	
	
	function stateChanged_show_late_page()
	  {
		if (xmlhttp.readyState==4)
		{
		setTimeout('show_late_page()',60000);
		document.getElementById("Show_late").innerHTML = xmlhttp.responseText;
		}
	  }
	  
	
	function stateChanged_show_page_new()
	  {
		if (xmlhttp.readyState==4)
		{
		  if(document.getElementById("page_new_id").innerHTML == "Show")
		    {
			
			document.getElementById("page_new_id").innerHTML = "Hide";
			document.getElementById("page_new").innerHTML = xmlhttp.responseText;
			
			}
		else {
		
		document.getElementById("page_new").innerHTML = "Onbekend Aantal aanvragen";
		document.getElementById("page_new_id").innerHTML = "Show";
		
		}
		
		}
	  }
	
	
	function promo_lid_page()
	{
		xmlhttp=GetXmlHttpObject();
		if (xmlhttp==null)
		  {
			alert ("Your browser does not support XMLHTTP!");
			return;
		  }
		var url="/js/promo.php";
		url=url+"?sid="+Math.random();
		xmlhttp.onreadystatechange=stateChanged_promo_lid_page;
		xmlhttp.open("GET",url,true);
		xmlhttp.send(null);
	}
	  function stateChanged_promo_lid_page()
	  {
		if (xmlhttp.readyState==4)
		{
		
			document.getElementById("promo").innerHTML = xmlhttp.responseText;
		
		}
	  }

	  function promo_lid(id)
	    {
		xmlhttp=GetXmlHttpObject();
		if (xmlhttp==null)
		  {
			alert ("Your browser does not support XMLHTTP!");
			return;
		  }
		var url="/js/promo.php";
		url=url+"?promo="+id+"&sid="+Math.random();
		xmlhttp.onreadystatechange=stateChanged_promo_lid;
		xmlhttp.open("GET",url,true);
		xmlhttp.send(null);
		}
	 
	  function degra_lid(id)
	    {
		xmlhttp=GetXmlHttpObject();
		if (xmlhttp==null)
		  {
			alert ("Your browser does not support XMLHTTP!");
			return;
		  }
		var url="/js/promo.php";
		url=url+"?degra="+id+"&sid="+Math.random();
		xmlhttp.onreadystatechange=stateChanged_promo_lid;
		xmlhttp.open("GET",url,true);
		xmlhttp.send(null);
		}
		
		
	  function stateChanged_promo_lid()
	  {
		if (xmlhttp.readyState==4)
		{
		promo_lid_page();
		
		old = document.getElementById("promo").innerHTML;
		document.getElementById("promo").innerHTML = old+"<br> Done!";
		}
	  }
	 
	  function GetXmlHttpObject()
	  {
		if (window.XMLHttpRequest)
		{
		  // code for IE7+, Firefox, Chrome, Opera, Safari
		  return new XMLHttpRequest();
		}
		if (window.ActiveXObject)
		{
		  // code for IE6, IE5
		  return new ActiveXObject("Microsoft.XMLHTTP");
		}
	  return null;
	 }
	function chatopen()
	 {
	  if(document.getElementById("chat").style.display == "none")
	   {
             if(document.getElementById("travel").style.display != "none")
              {
                document.getElementById("travel").style.display = "none";
              }
	    document.getElementById("chat").style.display = "inline";
            document.getElementById("chattext").scrollTop = document.getElementById("chattext").scrollHeight;
            document.getElementById("chat").focus();
            show_chat2();
	   }
	   else {
	    document.getElementById("chat").style.display = "none";
	   }
	 
	 }
	function travelopen()
	 {
	  if(document.getElementById("travel").style.display == "none")
	   {
             if(document.getElementById("chat").style.display != "none")
              {
                document.getElementById("chat").style.display = "none";
              }
	    document.getElementById("travel").style.display = "inline";
	   }
	   else {
	    document.getElementById("travel").style.display = "none";
	   }
	 
	 }

	 function checkKeycode(e) {
var keycode;
if (window.event) keycode = window.event.keyCode;
else if (e) keycode = e.which;
if(keycode == 13){
chataddtext();
}
}

   function travellijst()
     	{
		xmlhttp=GetXmlHttpObjectFive();
		if (xmlhttp==null)
		  {
			alert ("Your browser does not support XMLHTTP!");
			return;
		  }
var waarde = '';
[0]
for(i = 0; i < document.getElementsByName('vervoer').length; i++){
  if(document.getElementsByName('vervoer')[i].checked){
   waarde = document.getElementsByName('vervoer')[i].value;
   break;
   }
}
               	
		var url="../js/travellijst.php";
		url=url+"?sid="+Math.random()+"&waarde="+waarde;
		xmlhttp.onreadystatechange=stateChanged_travellijst;
		xmlhttp.open("GET",url,true);
		xmlhttp.send(null);
	}

	function stateChanged_travellijst()
	  {
		if (xmlhttp.readyState==4)
		{
              document.getElementById("travelresult").innerHTML = xmlhttp.responseText;
		}
	  }

   function show_chat2()
     	{
		xmlhttp=GetXmlHttpObjectTwo();
		if (xmlhttp==null)
		  {
			alert ("Your browser does not support XMLHTTP!");
			return;
		  }
		var url="../js/chat_show.php";
		url=url+"?sid="+Math.random()+"&new";
		xmlhttp.onreadystatechange=stateChanged_chat_show2;
		xmlhttp.open("GET",url,true);
		xmlhttp.send(null);
	}

	function stateChanged_chat_show2()
	  {
		if (xmlhttp.readyState==4)
		{
if(xmlhttp.responseText.length != "kajop")
{
             document.getElementById("chattext").value = xmlhttp.responseText;
            document.getElementById("chattext").scrollTop = document.getElementById("chattext").scrollHeight;
}
		}
	  }

   function show_chat()
     	{
		xmlhttp=GetXmlHttpObjectThree();
		if (xmlhttp==null)
		  {
			alert ("Your browser does not support XMLHTTP!");
			return;
		  }
		var url="../js/chat_show.php";
		url=url+"?sid="+Math.random();
		xmlhttp.onreadystatechange=stateChanged_chat_show;
		xmlhttp.open("GET",url,true);
		xmlhttp.send(null);
	}

	function stateChanged_chat_show()
	  {
		if (xmlhttp.readyState==4)
		{
	  if(document.getElementById("chat").style.display == "none")
	   {
		     setTimeout('show_chat()',15000);
if(xmlhttp.responseText.length != "kajop")
{
             document.getElementById("toggel").style.backgroundColor = "red";
             document.getElementById("toggel").style.color= "black";
}
            } else {
		     setTimeout('show_chat()',4000);
}
if(xmlhttp.responseText.length > 50)
{
             document.getElementById("chattext").value = xmlhttp.responseText;

            document.getElementById("chattext").scrollTop = document.getElementById("chattext").scrollHeight;
}
		}
	  }
	 
   function chataddtext()
     	{
		xmlhttp=GetXmlHttpObjectFour();
		if (xmlhttp==null)
		  {
			alert ("Your browser does not support XMLHTTP!");
			return;
		  }
		if(document.getElementById("newchattext").value.length > 1)
		 {
		var url="../js/balk_add.php";
		url=url+"?sid="+Math.random();
		url=url+"&txt="+document.getElementById("newchattext").value;
		xmlhttp.onreadystatechange=stateChanged_chataddtext;
		xmlhttp.open("GET",url,true);
		xmlhttp.send(null);
      }
	}

	function stateChanged_chataddtext()
	  {
		if (xmlhttp.readyState==4)
		{
                document.getElementById("newchattext").value= "";
		show_chat();
document.getElementById("newchattext").focus();
		}
	  }






	 
	  function GetXmlHttpObjectOne()
	  {
		if (window.XMLHttpRequest)
		{
		  // code for IE7+, Firefox, Chrome, Opera, Safari
		  return new XMLHttpRequest();
		}
		if (window.ActiveXObject)
		{
		  // code for IE6, IE5
		  return new ActiveXObject("Microsoft.XMLHTTP");
		}
	  return null;
	 }
	  function GetXmlHttpObjectTwo()
	  {
		if (window.XMLHttpRequest)
		{
		  // code for IE7+, Firefox, Chrome, Opera, Safari
		  return new XMLHttpRequest();
		}
		if (window.ActiveXObject)
		{
		  // code for IE6, IE5
		  return new ActiveXObject("Microsoft.XMLHTTP");
		}
	  return null;
	 }
	  function GetXmlHttpObjectThree()
	  {
		if (window.XMLHttpRequest)
		{
		  // code for IE7+, Firefox, Chrome, Opera, Safari
		  return new XMLHttpRequest();
		}
		if (window.ActiveXObject)
		{
		  // code for IE6, IE5
		  return new ActiveXObject("Microsoft.XMLHTTP");
		}
	  return null;
	 }
	  function GetXmlHttpObjectFour()
	  {
		if (window.XMLHttpRequest)
		{
		  // code for IE7+, Firefox, Chrome, Opera, Safari
		  return new XMLHttpRequest();
		}
		if (window.ActiveXObject)
		{
		  // code for IE6, IE5
		  return new ActiveXObject("Microsoft.XMLHTTP");
		}
	  return null;
	 }
	  function GetXmlHttpObjectFive()
	  {
		if (window.XMLHttpRequest)
		{
		  // code for IE7+, Firefox, Chrome, Opera, Safari
		  return new XMLHttpRequest();
		}
		if (window.ActiveXObject)
		{
		  // code for IE6, IE5
		  return new ActiveXObject("Microsoft.XMLHTTP");
		}
	  return null;
	 }

   function show_balk()
	{
		xmlhttp=GetXmlHttpObjectOne();
		if (xmlhttp==null)
		  {
			alert ("Your browser does not support XMLHTTP!");
			return;
		  }
		var url="../js/balk.php";
		url=url+"?sid="+Math.random();
		xmlhttp.onreadystatechange=stateChanged_show_balk;
		xmlhttp.open("GET",url,true);
		xmlhttp.send(null);
		

	}
	
	
	function stateChanged_show_balk()
	  {
		if (xmlhttp.readyState==4)
		{
		setTimeout('show_balk()',29000);
		document.getElementById("balk").innerHTML = xmlhttp.responseText;
		}
	  }

	  function GetXmlHttpObjectSix()
	  {
		if (window.XMLHttpRequest)
		{
		  // code for IE7+, Firefox, Chrome, Opera, Safari
		  return new XMLHttpRequest();
		}
		if (window.ActiveXObject)
		{
		  // code for IE6, IE5
		  return new ActiveXObject("Microsoft.XMLHTTP");
		}
	  return null;
	 }