/**
 * @author   Openminds
 * --------------
 * @by       Johan
 * @at       2009.01.20
 * @what     cleaning
 * -------------------- 
 * @by       jmoe
 * @at       2009.01.26
 * @what     Changed request to use "destination" parameter to avoid b0rkage on URL rewrites.
 * -------------------- 
 */

var box;

function showLanguageSelection() 
{
	addLightboxMarkup();
	var destination = window.location.pathname + window.location.search + window.location.hash;
	box = new lightbox('/includes/taalkeuze.php?destination='+encodeURIComponent(destination));
	box.activate();
}

function hideLanguageSelection() 
{
	box.deactivate();
}

// Add in markup necessary to make this work. Basically two divs:
// Overlay holds the shadow
// Lightbox is the centered square that the content is put into.
// Openminds: ppozero^p IE zuigt
function addLightboxMarkup() 
{
	bod = document.getElementsByTagName('body')[0];
	overlay = document.createElement('div');
	overlay.id = 'overlay';
	lb = document.createElement('div');
	lb.id = 'lightbox';
	lb.className = 'loading';
	lb.innerHTML = '<div id="lbLoadMessage">' + '<p>Loading</p>' + '</div>';
	bod.appendChild(overlay);
	bod.appendChild(lb);
}
