function close_skybox() { 
	//document.getElementById('holder').innerHTML = temp;
	document.getElementById('skybox').style.visibility = 'hidden';
}

function draw_skybox(foto, beschrijving, imgbox) { 
	//temp = document.getElementById('holder').innerHTML;
	//var temp_skybox = "";
	//temp_skybox = '<div id="skybox"><div id="sluiten"><a href="#" href="close_skybox()">[sluiten]</a></div>';
	//temp_skybox += '<img id="skybox_img" src="'+foto+'">';
	//temp_skybox += '<div id="skybox_description">'+beschrijving+'</div></div>';
	//document.getElementById('content').innerHTML = temp_skybox;

	document.getElementById('skybox_description').innerHTML = beschrijving;
	document.getElementById('skybox_img').src = foto;
	document.getElementById('skybox').style.visibility = 'visible';
	
	if(imgbox.width > imgbox.height)
		document.getElementById('skybox_container').style.width = 550+30;
	else 
		document.getElementById('skybox_container').style.width = imgbox.width+30;
	
	
	
}

ImagePickerWindow = null;
PickerDestination = '';

function image_picker(id, destination) { 
	if(ImagePickerWindow != null) ImagePickerWindow.window.close();
	
	PickerDestination = destination;
	ImagePickerWindow = open('image_picker.php?selected='+id, 'Afbeeldingen bibliotheekje','width=800,height=600,scrollbars,resizable,status');
}

function updateImage(id) { 
	ImagePickerWindow.window.close();
	ImagePickerWindow = null;
	
	document.getElementById(PickerDestination).value = id;
	
	
	//alert(id);
}
