<!--
  function ToDay () {
    var d=new Date();
    var day=d.getDate();
    var month=d.getMonth() + 1;
    var year=d.getFullYear();
		return year + "-" + month + "-" + day;
	}
	
  function fromHTMLtoXML(val)
	{
		val = val.replace(/&amp;/g,'%26'); 
		val = val.replace(/&lt;/g,'%3C');
		val = val.replace(/&gt;/g,'%3E');
		val = val.replace(/&nbsp;/g,'%20');
		val = val.replace(/&shy;/g,'%20');
		return val;
	}
	function lastLedenPage() {
		document.getElementById('page_num_leden').value = eval(document.getElementById('max_pages_leden').value);
		requestLedenPage();
	}


	function highLightItem(val) {
		document.getElementById (val).style.background = '#DDDDDD';
	}

	function hideItem(val) {
		document.getElementById (val).style.background = '#FFFFFF';
	}
   
	var selectedItem;
	var selectedSize;
	var downX = 0;
	
	function handleToernooiDeelnameResponse() {    
		if (http.readyState == 4) { 
			if(http.status==200) { 
				var results=http.responseText; 
				//alert(results);
				document.getElementById(selectedItem).innerHTML = results;
				selectedSize= eval (document.getElementById('table' + selectedJudoka).rows.length) * 20;
				if (document.getElementById(selectedItem).style.height == selectedSize+'px')
				{
					hideJudokaInfo();  
				}
				else
				{ 
					document.getElementById(selectedItem).style.display= '';
					//intShow=setInterval('show()',1);
					document.getElementById(selectedItem).style.height=selectedSize+'px';
				}
		  	}	 
		} 
	} 

	function modalDialogShowGastenboek() //IE
	{
		if(navigator.appName.indexOf('Microsoft')!=-1)
			window.showModalDialog("./addgastenboek.php",window,	"dialogWidth:500px;dialogHeight:600px;edge:Raised;center:Yes;help:No;Resizable:no;Maximize:no");
		else
			window.open("./addgastenboek.php", "", "width=500px,height=600");
	}

	function showJudokaInfo(theItem){
		selectedItem=theItem;
		selectedJudoka = selectedItem.substr(4);
		
		var url = "scripts/toernooi_resultaten.php"; // The server-side script 
		var param = 'lidnummer=' + selectedJudoka;
		http.open("POST", url, true); 
		http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		http.onreadystatechange = handleToernooiDeelnameResponse; 
		http.send(param); 
   }

	function hideJudokaInfo()
	{   var upSize = document.getElementById(selectedItem).style.height;
	//if (upSize>21){
	//	upSize=upSize-20;
	//	document.getElementById(selectedItem).style.height=upSize+'px';
	//} else{
		document.getElementById(selectedItem).style.height='0px';
		document.getElementById(selectedItem).style.display='none';
		//clearInterval(intHide);	}
	}

   function handleHttpResponse() {    
	if (http.readyState == 4) { 
		  if(http.status==200) { 
			var results=http.responseText; 
			//alert(results);
			document.getElementById('mainbody').innerHTML = results;
		  } 
	   } 
	} 

   function getMenuItem(val) {
		http.open("GET", val, true); 
		http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		http.onreadystatechange = handleHttpResponse; 
		http.send(null); 
   }

		function handleInsertResponse() {    
			if (http.readyState == 4) 
			{ 
				if(http.status==200) 
				{ 
					var results=http.responseText;
					//self.status = results;
					//alert(results);
			alert ('Bedankt voor uw bericht. \nNadat de inhoud gecontroleerd is zal deze al dan niet op de website geplaatst worden. \nM.v.g. Judo Essink Support');
					self.close();
				}	
			}
		} 
	
        function saveGastenboekRecord() { 
			var url = "./scripts/gastenboek_insert.php"; // The server-side script 
			$titel = document.getElementById ('titel').value;
			if ($titel=='') 
			{
				alert ('Titel moet ingevuld zijn!');
				document.getElementById ('titel').focus();
				return;
			}
			$tekst = document.getElementById ('tekst').value;
			if ($tekst=='') 
			{
				alert ('Tekst moet ingevuld zijn!');
				document.getElementById ('tekst').focus();
				return;
			}
			$email = document.getElementById ('email').value;
			var param= 'titel=' + $titel + '&tekst=' + $tekst + '&email_adres=' + $email;
            http.open("POST", url, false); 
            http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
            http.onreadystatechange = handleInsertResponse; 
			//alert(param);
            http.send(param); 
			
        }
		
	function getHTTPObject() { 
	var xmlhttp; 

	if(window.XMLHttpRequest){ 
	  xmlhttp = new XMLHttpRequest(); 
	} 
	else if (window.ActiveXObject){ 
	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 
	  if (!xmlhttp){ 
		xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); 
	  } 
	} 
	return xmlhttp; 
	} 
	
var http = getHTTPObject(); // We create the HTTP Object 

