function send(entry, subentry, items, language) {
	document.data_form.entry.value=entry;
	document.data_form.subentry.value=subentry;
	document.data_form.items.value=items;
	document.data_form.language.value=language;
	document.data_form.submit()
}

	
var newwindow = ''; 
function popitup(url) {
	//stopSound();
	if (!newwindow.closed && newwindow.location) { 
			newwindow.location.href = url;
			newwindow.focus();
	} else { 
			newwindow=window.open(url,'name','top=70,left=110,height=660,width=900,scrollbars=yes,resizable=yes,toolbar=yes');
			newwindow.focus();
	}
}

var start_time = new Date;
function redirect(url) {
	var end_time = new Date;
	var time_spent = end_time.getTime() - start_time.getTime();
	// alert(time_spent);
	document.formulier.redirect.value=url;
	document.formulier.time_spent.value=time_spent;
	document.formulier.submit();
	//window.location.href=url; 
}

<!-- Voorlees functie and then Popup -->

function play_popitup(url, sound) {
	popitup(url);
	DHTMLSound(sound);
	argument = url; // extra variable 'argument' needed, so it can be recognized within the scope of setTimeout() function
	// setTimeout("popitup(argument)", 3000);
}

function stopSound()	{
	DHTMLSound('niets.mp3');
}

function click_clear()	{
	document.searchForm.words.value= "";
}

function make_visible() {
	obj = document.getElementById("frame1");
	obj.style.visibility='visible';
	obj1 = document.getElementById("list1");
	obj1.style.visibility='hidden';
	obj1.style.height='0px';		
}

function make_visible1(a) {
	obj = document.getElementById("frame1");
	obj.style.visibility='hidden';
	obj.style.height='0px';
	obj1 = document.getElementById("list1");
	obj1.style.visibility='visible';
	obj1.style.height='400px';
	obj1.style.width='730px';
	obj1.style.overflow='auto';
	document.location.href=a;
}


// Cross-browser implementation of element.addEventListener()
function addListener(element, type, expression, bubbling) {
    bubbling = bubbling || false;

    if (window.addEventListener) { // Standard
        element.addEventListener(type, expression, bubbling);
        return true;
    } else if (window.attachEvent) { // IE
        element.attachEvent('on' + type, expression);
        return true;
    } else return false;
}

//This is what i want to do whenever someone clicks on the page
function itHappened(evt) {

    //Get the clicket element
    var tg = (window.event) ? evt.srcElement : evt.target;
    //If it is an A element
    if (tg.nodeName == 'A') {
        //And it is not an internal link
        if (tg.href.indexOf(location.host) == -1) {
            //Replace all odd characters, so that it works with Analytics Niavgation analysis
            var url = tg.href.replace(/[^a-z|A-Z]/g, "_");
            var str = '/outgoinglink/' + url;
            try {
                var pageTracker = _gat._getTracker("UA-1473650-18");
				pageTracker._trackPageview(str);
            }
            catch (err) {
                //alert('error: ' + err);
            }
        }
    }
}
//Add the click listener to the document
addListener(document, 'click', itHappened);
