/* 
	function: openPop
	descripton: function to pop-up a new window
 
	usage: openPop(url, name, w, h, params)
	url    = url to open
	name   = name of the window; used to target the window if needed
	w      = width
	h      = height
	params = parameter list; defaults are all no
*/

function openPop(url, name, w, h, params)
{
    var popUp;
    popUp = window.open(url, name, "width="+ w + ",height=" + h + "," + params);
    popUp.focus();
}

/*
	function: getIdProperty
	description: get the style property of an id (visibility, etc)
	
	usage: getIdProperty(id, property)
	id = name of the id to change
	property = property to change
*/

function getIdProperty(id,property) 
{
	var styleObject = document.getElementById(id);
	if (styleObject != null) 
	{
		styleObject = styleObject.style;
		if (styleObject[property]) 
		{
			return styleObject[property];
		}
	}
	return (styleObject != null) ? styleObject[property] : null;
}

/*
	function: setIdProperty
	description: change the style property of an id (visibility, etc)
	
	usage: setIdProperty(id, property, value)
	id = name of the id to change
	property = property to change
	value = value to change property to
*/

function setIdProperty(id, property, value) 
{
	var styleObject = document.getElementById(id);
	if (styleObject != null) 
	{
		styleObject = styleObject.style;
		styleObject[property] = value;
	}
}

/*
	function: show
	description: function that will show a div that is currently not visible

	usage: show(div)
	div = name of the div to show
*/

function show(div)
{
	setIdProperty(div,"visibility","visible");
}

/*
	function: hide
	description: function that will hide a div that is currently not visible

	usage: hide(div)
	div = name of the div to hide
*/

function hide(div)
{
	setIdProperty(div,"visibility","hidden");
}
