/* © 2004 - Masoud Varjavandi (http://www.masoud.org) */
function ShowHideElement(element_id)
{
	var element=document.getElementById(element_id);

	if (element.style.display == "")
		element.style.display= "none";
	else
		element.style.display= "";
}

function mv_round(number,X) {
// rounds number to X decimal places, x=0 means round to integer
if (!parseInt(X) || X<= 0)
	return Math.round(number);
else
	return Math.round(number*Math.pow(10,X))/Math.pow(10,X);
}

function new_win(url,w,h,name)
{
	//w = 400; //width
	//h = 350; //height
	screenw = screen.width - 20;
	screenh = screen.height - 20;
	l = screenw/2-w/2; //left
	t = screenh/2-h/2; //top
	
	if (l < 0 || t < 0)
	{
		l = 0;
		t = 0;
	}
	s = 'no'; // status

	newwin = window.open(url, name, "fullscreen=no,toolbar=yes,status="+s+",menubar=no,scrollbars=yes,resizable=yes,directories=no,location=no,width="+w+",height="+h+",left="+l+",top="+t);
	newwin.focus();
}
