function openSearch(me, inputName) {

    if (document.getElementsByName(inputName)[0].value.length > 0) {
        url = me.action + "?"+inputName+"=" + document.getElementsByName(inputName)[0].value;
    } else {
        return false;
    }

    newWindow(url, 'ZoekResultaten', 520, 550, 1);

}


function openDictId(me, dicId) {
    url = me.href +"woordenboek/"+dicId;
    newWindow(url, 'Woordenboek', 512, 750);
}

function openDict(me) {
    newWindow(me.href, 'Woordenboek', 512, 750);
	return false;
}



function openColofon(me) {
    newWindow(me.href, 'Colofon', 520, 550);
	return false;
}


function parentReload(me, querystring) {
    window.opener.location = me+querystring;
}

function openDictionary(theHref) {
//	if (!(this.getAttribute)) theHref= event.srcElement.getAttribute('orighref');
//	else theHref= e.getAttribute('href');
    newWindow(theHref, 'Woordenboek', 512, 750, 0);
}
function createDictionaryLinks(me) {
	if (!me) me=document.getElementsByTagName('body').item(0);

	var allLinks= me.getElementsByTagName('a');
	for (var i=0; i<allLinks.length; i++ )
	{
		if (allLinks[i].getAttribute('href') && allLinks[i].getAttribute('href').indexOf('woordenboek/')>-1) {
			//addEvt(allLinks[i]);
			//allLinks[i].setAttribute('orighref',allLinks[i].getAttribute('href'));
			allLinks[i].href='javascript:openDictionary(\'' + allLinks[i].getAttribute('href') + '\');';
		}
	}
}
//function addEvt(el) {
//	if (el.addEventListener) el.addEventListener ("click",openDictionary,false);
//	else if (el.attachEvent) el.attachEvent ("onclick",openDictionary);
//	else el.onclick = openDictionary;
//}
