function replacecomma(item)
{
	var re = /,/g;
	item = item.trim();
	item = item.replace(re,"<>");
	return item;
}

function encode(item, finditem, replaceitem)
{
	var re = /\'/g;
	item = item.replace(re,"\\'");
	return item;
}
	
function gotopage(url)
{
	window.location = url;		
}	

function openwindow(url)
{
// open url in a new window without location bar, etc

 window.open(url,'','location=no,menubar=no,status=no,toolbar=no,resizable=yes,scrollbars=yes');
}

function showhideg(showitem, hideitem)
{
	if (showitem != null)
		{
			var oshowitem = document.getElementById(showitem);
			oshowitem.style.display = "";
		}
	
	if (hideitem != null)
		{
			var ohideitem = document.getElementById(hideitem);
			ohideitem.style.display = "none";
		}	
	return;
}


function fnAlignCenter()
{
	//var oElem = document.body.firstChild
	var oElem = document.body
	var x = oElem.offsetWidth + 35;
	var y = oElem.offsetHeight +35;	
	fnAutoCenter(x,y);
}

function fnAutoCenter(clientX,clientY)
{
	var x = fnGetScreenX()/2 - clientX/2
	var y = fnGetScreenY()/2 - clientY/2
	window.moveTo(x,y);
}

function fnGetScreenX()
{
	var x = screen.width;
	return x;
}

function fnGetScreenY()
{
	var y = screen.height;
	return y;
}
