function Ajax() {
    this.Init = function () {
        pHTTPhandler = false;
        if (!pHTTPhandler && typeof XMLHttpRequest!='undefined') {
            pHTTPhandler = new XMLHttpRequest();
        }
        return pHTTPhandler;
    }
}

function processAjax() {
    this.pHTTPRequest = null;
    
    this.meer_info = function() {
        var divID = "scroll";
        if (typeof(arguments[0])!='undefined')
        	divID = arguments[0];

        var pAjax = new Ajax();
        pHTTPRequest = pAjax.Init();
        pHTTPRequest.onreadystatechange=function() {
            if (pHTTPRequest.readyState==1) {
            }
            if (pHTTPRequest.readyState==4) {
                document.getElementById(divID).innerHTML = pHTTPRequest.responseText;
                Cufon.replace('h1', { fontFamily: 'VistaSlabAltReg' 			}	);
                Cufon.replace('ul', { fontFamily: 'Vista Sans OT Medium'	}, {hover: true });
                Cufon.replace('h2', { fontFamily: 'Vista Sans OT Medium' 	}, {hover: true });
                Cufon.replace('h3', { fontFamily: 'Vista Sans OT Medium' 	}	);
            }
        }
 
        var strParams = "type=meer_info&hoofd_id="+arguments[1]+"&nav_id="+arguments[2]+"&sub_id="+arguments[3]+"&ExtraInfoId="+arguments[4];
        pHTTPRequest.open('POST', '/include/ajax.php', true);
        pHTTPRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
        pHTTPRequest.setRequestHeader('Connection', 'close');
        pHTTPRequest.send(strParams);   
    }  
    
    this.favofrits = function() {
        var divID = "scroll";
        if (typeof(arguments[0])!='undefined')
        	divID = arguments[0];

        var pAjax = new Ajax();
        pHTTPRequest = pAjax.Init();
        pHTTPRequest.onreadystatechange=function() {
            if (pHTTPRequest.readyState==1) {
            }
            if (pHTTPRequest.readyState==4) {
                document.getElementById(divID).innerHTML = pHTTPRequest.responseText;
                Cufon.replace('h1', { fontFamily: 'VistaSlabAltReg' 			}	);
                Cufon.replace('ul', { fontFamily: 'Vista Sans OT Medium'	}, {hover: true });
                Cufon.replace('h2', { fontFamily: 'Vista Sans OT Medium' 	}, {hover: true });
                Cufon.replace('h3', { fontFamily: 'Vista Sans OT Medium' 	}	);
            }
        }
 
        var strParams = "type=favofrits&favofrits_id="+arguments[1];
        pHTTPRequest.open('POST', '/include/ajax.php', true);
        pHTTPRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
        pHTTPRequest.setRequestHeader('Connection', 'close');
        pHTTPRequest.send(strParams);   
    } 
    
    this.agenda = function() {
        var divID = "scroll";
        if (typeof(arguments[0])!='undefined')
        	divID = arguments[0];

        var pAjax = new Ajax();
        pHTTPRequest = pAjax.Init();
        pHTTPRequest.onreadystatechange=function() {
            if (pHTTPRequest.readyState==1) {
            }
            if (pHTTPRequest.readyState==4) {
                document.getElementById(divID).innerHTML = pHTTPRequest.responseText;
                Cufon.replace('h1', { fontFamily: 'VistaSlabAltReg' 			}	);
                Cufon.replace('ul', { fontFamily: 'Vista Sans OT Medium'	}, {hover: true });
                Cufon.replace('h2', { fontFamily: 'Vista Sans OT Medium' 	}, {hover: true });
                Cufon.replace('h3', { fontFamily: 'Vista Sans OT Medium' 	}	);
            }
        }
 
        var strParams = "type=agenda&start="+arguments[1]+"&maand="+arguments[2]+"&arrow="+arguments[3];
        pHTTPRequest.open('POST', '/include/ajax.php', true);
        pHTTPRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
        pHTTPRequest.setRequestHeader('Connection', 'close');
        pHTTPRequest.send(strParams);   
    } 
     
  }
  
var pProcess = new processAjax();
