// JavaScript Document

function changeImages() {
	if (document.layers) {
		for (var z=0; z<changeImages.arguments.length; z+=3) {
		   document.layers[changeImages.arguments[z+2]].document[changeImages.arguments[z]].src = changeImages.arguments[z+1];
		}
	}
	
	else if (document.images) {
			 for (var z=0; z<changeImages.arguments.length; z+=3) {
				document[changeImages.arguments[z]].src = changeImages.arguments[z+1];
			 }
		}
}




function ShowDiv(el_name1, el_name2, x_adjust, y_adjust)
{
	x = doc_getRealLeft(el_name1);
	y = doc_getRealTop(el_name1);

	document.getElementById(el_name2).style.display="block";
	document.getElementById(el_name2).style.left = x-x_adjust+"px";
	document.getElementById(el_name2).style.top = y-y_adjust+"px";
	
	
/*   var arVersion = navigator.appVersion.split("MSIE")
   var version = parseFloat(arVersion[1])
   if ((version >= 5.5) && (document.body.filters)) 
   {
	 var img = document.images[el_name1]
	 var imgName = img.src.toUpperCase()
	 if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
	 {
		var imgID = (img.id) ? "id='" + img.id + "' " : ""
		var imgClass = (img.className) ? "class='" + img.className + "' " : ""
		var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
		var imgStyle = "display:inline-block;" + img.style.cssText 
		if (img.align == "left") imgStyle = "float:left;" + imgStyle
		if (img.align == "right") imgStyle = "float:right;" + imgStyle
		if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
		var strNewHTML = "<span " + imgID + imgClass + imgTitle
		+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
		+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
		+ "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
		img.outerHTML = strNewHTML
		alert(strNewHTML)
	 }
   }*/
   
}



function doc_getRealLeft(imgElem) {
	var imgObj = document.images[imgElem];
	xPos = imgObj.offsetLeft;
	tempEl = imgObj.offsetParent;
	while (tempEl != null) {
		xPos += tempEl.offsetLeft;
		tempEl = tempEl.offsetParent;
	}
	return xPos;
}



function doc_getRealTop(imgElem) {
	var imgObj = document.images[imgElem];
	yPos = imgObj.offsetTop;
	tempEl = imgObj.offsetParent;
	while (tempEl != null) {
		yPos += tempEl.offsetTop;
		tempEl = tempEl.offsetParent;
	}
	return yPos;
}



/* this function hides the pop-up when
 user moves the mouse out of the link */
function HideDiv(el_name)
{
	/* hide the pop-up */
	document.getElementById(el_name).style.display="none";
}



/*var imgObj = new Object();
var el_name1 = 'dummypixel'
var el_name2 = 'TV'
window.onload = ShowDiv('dummypixel', 'TV');
window.resize = ShowDiv('dummypixel', 'TV'); */



// Clears text of input-field
function clearfield(f){
	if (f == "nb") {
		if (document.nieuwsbriefform.email.value == "Schrijf je in voor de nieuwsbrief")
			document.nieuwsbriefform.email.value = "";
	}
	
	if (f == "sz") {
		if (document.snelzoekerform.ztag.value == "Doorzoek Archief")
			document.snelzoekerform.ztag.value = "";
	}
}


function noSpam(user,domain,country,extra) {
	locationstring = "mailto:" + user + "@" + domain + "." + country + extra;
//	window.location.href = locationstring;
	document.write('<a href="' + locationstring + '">' + user + '@' + domain + '.' + country + '</a>');
}

//function noSpamTxt(user,domain,country) {
//	document.write(" " + user + "@" + domain + "." + country + " ");
//}
