//--------------------------------------------------------------------------
//  Created by James Wilkes on 18/08/2004
//  Copyright Wilkes Design Ltd
//  
//--------------------------------------------------------------------------


function popwin(urlstr,name,width,height,scroll)
{
	NewWin=window.open(urlstr,name,"status=no,location=no,menubar=no,toolbar=no,directories=no,scrollbars=" + scroll + ",resizable=no,width=" + width + ",height=" + height);
}

function conf(message, url)
{
	ok = confirm(message);
	if(ok)
	{
		top.location = url;
	}
}

function showHide(showObj,hideObj)
// reinstate if require focus and select functions
//function showHide(showObj,hideObj,focusObj,selectObj)
{
	document.getElementById(showObj).style.display = 'block';
	document.getElementById(hideObj).style.display = 'none';

	// this line gets the focus if needed.
	//document.getElementById(focusObj).focus();
	//if (selectObj == true)
	//{
		// this does not work in netscape.
		// have tried all sorts but cannot get it to function works OK on ie6
		//document.getElementById(focusObj).select();
	//}
}
function resetContents(oToReset)
{
	var o = eval(oToReset);
	if (o.value == "Enter new value here")
	{
		o.style.color = "#000000";
		o.value = "";
	}
}
function setContents(oToReset)
{
	var o = eval(oToReset);
	if (o.value == "")
	{
		o.value = "Enter new value here";
		o.style.color = "#999999";
	}
}