// Hides a div/span element
function divOff(name)
{
	document.getElementById(name).style.display = 'none';
}

// Shows a div/span element
function divOn(name)
{
	document.getElementById(name).style.display = 'block';
}

// Updates the innerhtml of an element
function changeAnchor(name, text)
{
	document.getElementById(name).firstChild.data = text;
}

// Clears a form element text/textarea etc.
function clearInput(name)
{
	document.getElementById(name).value = '';
}

// Changes an image src
function switchImg(name, image)
{
	document.getElementById(name).src = image;
}

// Check/Uncheck group of checkboxes
function checkAll(checkname, element)
{
	for (i = 0; i < checkname.length; i++)
	checkname[i].checked = element.checked ? true:false;
}

function popup(url, w, h)
{
	popUpWindow = window.open(url, 'notify', 'height='+h+', width='+w+', left=50,top=50, resizable, scrollbars, status');
	popUpWindow.top.focus();
}

