function center_window(id)
{
		win_height = parseInt(document.body.clientHeight);
		win_width = parseInt(document.body.clientWidth);
		block_height = parseInt(document.getElementById(id).offsetHeight);
		block_width = parseInt(document.getElementById(id).offsetWidth);
		document.getElementById(id).style.top = ( win_height - block_height ) / 2 + "px";
		document.getElementById(id).style.left = ( win_width - block_width ) / 2 + "px";
}
function open_window(_link,_name,_width,_height)
{
	win_height = parseInt(document.body.clientHeight);
	win_width = parseInt(document.body.clientWidth);
	_left = win_width / 2 - _width / 2;
	_top = win_height / 2 - _height / 2;
	window.open(_link,_name,'width='+_width+',height='+_height+',left='+_left+',top='+_top+',screenX=200,screenY=200,scrollbars=yes');
	return false;	
}

function extension(id,x,y)
{
		if (document.getElementById(id).style.display=='none')
		{
			document.getElementById(id).style.top=x + "px";
			document.getElementById(id).style.left=y + "px";
			document.getElementById(id).style.display='';
		}
		else
		{
			document.getElementById(id).style.top=-1000 + "px";
			document.getElementById(id).style.left=-1000 + "px";
			document.getElementById(id).style.display='none';
		}
}
function hide_seek(id)
{
		if (document.getElementById(id).style.display=='none')
		{
			document.getElementById(id).style.positinion='';
			document.getElementById(id).style.display='';
			document.getElementById(id).style.top='';
			document.getElementById(id).style.left='';
		}
		else
		{
			document.getElementById(id).style.positinion='absolute';
			document.getElementById(id).style.top=-1000 + "px";
			document.getElementById(id).style.left=-1000 + "px";
			document.getElementById(id).style.display='none';
		}
}
function hide(id)
{
	document.getElementById(id).style.positinion='absolute';
	document.getElementById(id).style.top=-1000 + "px";
	document.getElementById(id).style.left=-1000 + "px";
	document.getElementById(id).style.display='none';
}
function show(id)
{
	document.getElementById(id).style.display='';
	document.getElementById(id).style.top='';
	document.getElementById(id).style.left='';
	document.getElementById(id).style.positinion='';
}
function hide_seek2(id)
{
		if (document.getElementById(id).style.visibility=='hidden')
		{
			document.getElementById(id).style.positinion='';
			document.getElementById(id).style.visibility='';
			document.getElementById(id).style.top='';
			document.getElementById(id).style.left='';
		}
		else
		{
			document.getElementById(id).style.positinion='absolute';
			document.getElementById(id).style.visibility='hidden';
			document.getElementById(id).style.top=-1000 + "px";
			document.getElementById(id).style.left=-1000 + "px";
		}
}
function focus_input(form,id00,id01)
{
	if (document.forms[form].elements[id00].value == '')
	{
		document.forms[form].elements[id00].focus();
	} 
	else if (id01)
	{
		document.forms[form].elements[id01].focus();
	}
}
function confirmLink(msg)
{
var agree=confirm(msg);
if (agree)
	return true ;
else
	return false ;
}

function textarea_size(id,from,to)
{
	if (document.getElementById(id).style.height==from)
	{
		document.getElementById(id).style.height=to;	
	}
	else
	{
		document.getElementById(id).style.height=from;
	}
}
