function renderPopup(posx, posy, item){
	
		var d = document.createElement("div");
		d.id = 'menuCalloutPopup' + item;
		d.className = 'menuPopups';
		d.style.height = '162px';
		d.style.width = '175px';
		d.style.backgroundImage = 'url(_img_interface/vilgab-preview-callout.png)';
		d.style.top = posy - 162 + 'px';
		d.style.left = posx + 'px';
		d.style.display = 'none';
		//link
		var l = document.createElement("a");
		l.href = 'content.php?p=' + item;
		l.title = 'Klik om naar deze pagina te gaan';
		
		//image
		var i = document.createElement("img");
		i.className = 'menuPopupsImage';
		i.src = '_img_interface/' + item + '.png';
		i.border = 0;
		
		//append image to link
		l.appendChild(i);
		
		//append link to div
		d.appendChild(l);
		
		//append div to body
		$('content').appendChild(d);
		Effect.Appear($(d.id),{duration:.01});
	
	
	
}

function hidePops(){
	//hide all popups
	
	var pops = $$('div.callout');	
	
	pops.each(function(s){
		s.hide();
	
	});
	
}


function presentPopup(id){

	//show and apply effect on a text popup
var pops = $$('div.callout');	
		pops.each(function(s){
			s.hide();
		
		});
	 if (pops.pluck("id").include(id)){
		$(id).show();
	}

	
}
