function openWindow(url)
{
		openwin = this.open(url,"ctrlwindow","width=300,height=260,toolbar=no,scrollbars=no,resizable=no");
		openwin.focus();
}

function openMailinglist(id)
{
	var url = '/nieuwsbrief.php?id='+id;
	openwin = this.open(url,"ctrlwindow","width=810,height=500,toolbar=no,scrollbars=yes,resizable=no");
	openwin.focus();
}

function swapImage(myID, newSrc)
{
	var strOver  = "_hover";
	var strOff = "_up";

	if(typeof myID != 'object')
		var oImg = document.getElementById(myID);
	else
		var oImg = myID;
   
   if(newSrc)
   {
	   oImg.src = newSrc;
	   return;
   }
   
   
	var currImg = oImg.src;

	if (currImg.indexOf(strOver) != -1)
		oImg.src = currImg.replace(strOver,strOff)
	else
		oImg.src = currImg.replace(strOff,strOver)
}

function picture(myID)
{
	var strThumb = '_thumb';
	var strLarge = '_large';
	
	if(typeof myID != 'object')
		var oImg = document.getElementById(myID);
	else
		var oImg = myID;

	var currImg = oImg.src;
	currImg = currImg.replace(strThumb, strLarge);
		

	img = new Image();
	img.src = currImg;
	setTimeout('javascript:void()', 500);
	var width = img.width;
	var height = img.height;

	if(height == 0)
		height = 320;
	if(width == 0)
			width = 426;

	var imageString = '<img src="' + currImg + '" width="' +  width + '" height="' +  height + '" alt="">';
	var openwin = this.open('',"ctrlwindow","width=" + width + ",height=" + height + ",toolbar=no,scrollbars=no,resizable=yes");
	
	openwin.document.open();
	openwin.document.write('<html><head><title>Afbeelding</title><style type="text/css">body{margin:0;padding:0;}</style></head><body>' + imageString + '</body></html>')
	openwin.document.close();
	openwin.focus();
}
