	function showdiv(id)
	{
		document.getElementById(id).style.height = 'auto';
		document.getElementById(id).style.visibility = 'visible';
	}

	function hidediv(id)
	{
		document.getElementById(id).style.height = 1;
		document.getElementById(id).style.visibility = 'hidden';
	}
	
	function Enable(node, btnSubmit)
	{
		if(node.checked)
			document.getElementById(btnSubmit).disabled = false;
		else
			document.getElementById(btnSubmit).disabled = true;
	}	
	
	function PopImage(imgID)
	{
		newwin = window.open("../ShowImage.php?id="+imgID,'','status=yes,scrollbars=yes, width=500,height=600');
	
	}
	function PopFileImage(imgID)
	{
		newwin = window.open("../ShowSWFFileImage.php?id="+imgID,'','status=yes,scrollbars=yes, width=500,height=600');
	
	}
	function PopImage2(imgID)
	{
		newwin = window.open("../../ShowImage.php?id="+imgID,'','status=yes,scrollbars=yes, width=500,height=600');
	
	}

function SetAllCheckBoxes(FormName, FieldName, CheckValue)
{
	if(!document.forms[FormName])
		return;
	var objCheckBoxes = document.forms[FormName].elements[FieldName];
	if(!objCheckBoxes)
		return;
	var countCheckBoxes = objCheckBoxes.length;
	if(!countCheckBoxes)
		objCheckBoxes.checked = CheckValue;
	else
		// set the check value for all check boxes
		for(var i = 0; i < countCheckBoxes; i++)
			objCheckBoxes[i].checked = CheckValue;
}

	function updateHTML(id, val)
	{
		$(id).innerHTML = val;
	}

