/**
 *  Show - Hide ID
 */
function showId(Id)
{
	$(Id).removeClassName('hidden');
}
function closeId(Id)
{
	$(Id).addClassName('hidden');
}


/**
 * Toggle Show - Hide ID
 */
var activeId = '';
function toggleId(Id)
{
	if (activeId != Id)
	{
		$(Id).removeClassName('hidden');
		activeId = Id;
	}
	else
	{
		$(activeId).addClassName('hidden');
		activeId = null;
	}
}


/**
 * Show Howto enlarge text in popup
 */
function enlargeInfo()
{
	var oInfo ={title:'Lettergroote instellen',content: '<img src="/images/popupEnlargeInfo.png" alt="Uitleg over lettervergroting" />'};
	oAlertPopup = showAlertPopup(oInfo);
	oAlertPopup.setWidth(570);
	$('popup').addClassName('popupAlbum');
	$('popup').addClassName('popupEnlarge');
}

/**
 * ajax login
 * for now, just redirect to login page
 */
function ajaxLogin(redirectUrl)
{
	location.href = '/account/inloggen/';
}

/**
 * WebTV Popup
 */
function showWebTV()
{
	var oInfo =
	{
			title: 'Uitleg over de modellen',
			content: '<embed width=\"540\" height=\"345\" align=\"middle\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowscriptaccess=\"always\" flashvars=\"client_id=241&media_id=92348&start=0\" name=\"QuadiaPlayer\" bgcolor=\"#000000\" salign=\"b\" wmode=\"transparent\" quality=\"high\" src=\"http://static.quadiatv.com/player/2011111-Zig/player.swf\"></embed>'
	};
	oAlertPopup = showAlertPopup(oInfo);
	oAlertPopup.setWidth(540);
	$('popup').addClassName('popupAlbum');
}

/**
 *  Remove href behind a ref
 */
function disableLink(sId)
{
	if($(sId))
	{
		$(sId).id = $(sId).id + "x"; 
	}
	else
	{
		return false;
	}
}

function openUrl(sUrl)
{
	alert(sUrl);
	window.location = sUrl;
}

/**
 *	Remove reaction
 */ 
function removeReaction(sMessage, sUrl)
{
	oConfig = new Object;
	oConfig.labelOk = "Reactie verwijderen";
	oConfig.labelClose = "Annuleren";
	oConfig.content = sMessage;
	oConfig.location = sUrl;
	showConfirmPopup(oConfig);
}

/**
 *	Remove option
 */ 
function removeOption(sMessage, sUrl)
{
	oConfig = new Object;
	oConfig.labelOk = "Optie verwijderen";
	oConfig.labelClose = "Annuleren";
	oConfig.content = sMessage;
	oConfig.location = sUrl;
	showConfirmPopup(oConfig);
}

/**
 *	Remove reaction
 */ 
function cancelPopup(sMessage, sUrl, sLabelOk, sLabelClose)
{
	oConfig = new Object;
	oConfig.labelOk = sLabelOk;
	oConfig.labelClose = sLabelClose;
	oConfig.content = sMessage;
	oConfig.location = sUrl;
	showConfirmPopup(oConfig);
}

/**
 *  Active ClickPreventer
 */
function activateClickPreventer()
{
	if($('clickPreventer'))
	{
		$('clickPreventer').style.height = $(document.body).getHeight() + 'px';
		$('clickPreventer').removeClassName('hidden');
		setTimeout("deactivateClickPreventer()", 500);
	}
}

/**
 *  Deactive ClickPreventer
 */
function deactivateClickPreventer()
{
	if($('clickPreventer'))
	{
		$('clickPreventer').addClassName('hidden');
	}
}
