/*
 * Copyright : (c) 2006 Webfish IT Services
 * Website   : http://www.webfish.nl
 * Email     : info@webfish.nl
 * -------------------------------------------------------------------------
 *   $Id$
 * -------------------------------------------------------------------------
 */

function blocking(nr)
{
	if (document.layers)
	{
		current = (document.layers[nr].display == 'block') ? 'none' : 'block';
		document.layers[nr].display = current;
	}
	else if (document.all)
	{
		current = (document.all[nr].style.display == 'block') ? 'none' : 'block';
		document.all[nr].style.display = current;
	}
	else if (document.getElementById)
	{
		vista = (document.getElementById(nr).style.display == 'block') ? 'none' : 'block';
		document.getElementById(nr).style.display = vista;
	}
}

var prev_img = '';
function swapImg(int_img, int_menu_id, str_lbl, str_loc)
{
	if (prev_img == int_img)
	{
		prev_img    = '';
		str_lbl     = '';
		str_display = 'none';
	}
	else
	{
		prev_img    = int_img;
		if (str_lbl != '')
			str_lbl = '<br />('+ str_lbl +')';
		str_display = 'block';
		document.getElementById('image_large'+ int_menu_id).src = 'upload/'+ str_loc +'/image_large_'+ int_img +'_'+ int_menu_id +'.jpg';
	}
	document.getElementById('image_lbl'+ int_menu_id).innerHTML = str_lbl;
	document.getElementById('image_div'+ int_menu_id).style.display = str_display;
}

function swapNewsArchive()
{
	str_display = (document.getElementById('news_archive').style.display == 'none') ? '' : 'none';
	document.getElementById('news_archive').style.display = str_display;
}

function swapLink()
{
	str_display = (document.getElementById('link').style.display == 'none') ? '' : 'none';
	document.getElementById('link').style.display = str_display;
}

function appendOnLoadAlert(str_msg)
{
	var appendOnLoadAlert_oldOnload = (window.onload) ? window.onload : function () { };
	window.onload = function () { appendOnLoadAlert_oldOnload(); alert(str_msg); }
}