function OpenPics(id, iwidth, iheight, salt){
//	window.open ('/image.asp?id='+ id +'&alt='+ salt, 'pics', 'height='+iheight+', width='+ iwidth +', left=125,top=100')
	newWindow = window.open("","newWindow","width="+iwidth+",height="+iheight+",left=125,top=100");
	newWindow.document.open();
	newWindow.document.write('<html><title>'+salt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">'); 
	newWindow.document.write('<a href="javascript:window.close()"><img border="0" src="image.aspx?id='+id+'" alt="'+salt+'"></a>');
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}

function showHide() {
	var id1 = document.getElementById("sitemapmenu");
	var id2 = document.getElementById("sitemapbg");
	var brancheID = document.getElementById("brancheID");
	var soortID = document.getElementById("soortID");
	var active = id1.style.visibility;
	id1.style.visibility = (active=='visible')?'hidden':'visible';
	id2.style.visibility = (active=='visible')?'hidden':'visible';
	if (brancheID) brancheID.style.visibility = (active=='visible')?'visible':'hidden';
	if (soortID) soortID.style.visibility = (active=='visible')?'visible':'hidden';
}

//Javascript window die resized naar de juiste grootte van de image (wordt nog niet gebruikt op de site)
function popup(imgsrc)
{							
	var showimg = window.open("", "foto", "toolbar=no, location=no, menubar=no, scrollbars=no, status=no, top=10, left=10, width=200, height=200");
	showimg.focus();
	showimg.document.writeln("<html><head><title>Origineel</title>");
	showimg.document.writeln("<style type=\"text/css\">html,body {margin:0; padding: 0; height:100%; width:100%; cursor: pointer; overflow: hidden; }</style>");
	showimg.document.writeln("<script>function resize(){");
	showimg.document.writeln("var img = document.images[0];");
	showimg.document.writeln("var w = img.offsetWidth;");
	showimg.document.writeln("var h = img.offsetHeight;");
	showimg.document.writeln("window.resizeTo(w + 10, h + 10);");
	showimg.document.writeln("window.resizeBy(w - document.body.offsetWidth, h - document.body.offsetHeight);");
	showimg.document.writeln("}</sc"+"ript>");
	showimg.document.writeln("</head><body onload=\"resize()\">");
	showimg.document.writeln("<img src=\"image.aspx?id=" + imgsrc + "\" onclick=\"window.close();\" title=\"Klik om venster te sluiten.\">");
	showimg.document.writeln("</body></html>");
	showimg.document.close();		
		
	return false;
}

function RunNewsFlash(titels,ids)
{
    document.write('<object type="application/x-shockwave-flash" data="news.swf?intervalTime=2&rollSpeed=1&newsTitles=' + titels + '&newsIDS=' + ids + '" width="158" height="90">\n');
    document.write('<param name="scale" value="exactfit" />');
    document.write('<param name="wmode" value="transparent" />');
    document.write('<param name="movie" value="news.swf?intervalTime=2&rollSpeed=1&newsTitles=' + titels + '&newsIDS=' + ids + '" />\n');
    document.write('</object>\n');
}

function RunReferenceFlash(images,siteurl,siteurltarget)
{
	if ( images.length > 0 )
	{
		document.write('<object type="application/x-shockwave-flash" data="slideshow.swf?intervalTijd=5000&fadeSpeed=6&imageIDS=' + images + siteurl + siteurltarget + '" width="165" height="124">\n');
		document.write('<param name="allowScriptAccess" value="sameDomain" />');
		document.write('<param name="quality" value="high" />');
		document.write('<param name="scale" value="exactfit" />');
		document.write('<param name="wmode" value="transparent" />');
		document.write('<param name="bgcolor" value="#ffffff" />');
		document.write('<param name="movie" value="slideshow.swf?intervalTijd=5000&fadeSpeed=6&imageIDS=' + images + siteurl + siteurltarget + '" />');
		document.write('</object>\n');
	}
}
