function wopen(url, width, height)
{
	var left = (screen.availWidth - width) / 2
	var top = (screen.availHeight - height) / 2
	width+=0; height+=0;
	wId=window.open(url, "wo", 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,left='+left+',top='+top+',width='+width+',height='+height);
	wId.focus();
}

function wopentrash(url, width, height)
{
	var left = (screen.availWidth - width) / 2
	var top = (screen.availHeight - height) / 2
	width+=0; height+=0;
	wId=window.open(url, "wo", 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,left='+left+',top='+top+',width='+width+',height='+height);
	wId.focus();
}

function wopenvieworders(url, width, height)
{
	var left = (screen.availWidth - width) / 2
	var top = (screen.availHeight - height) / 2
	width+=0; height+=0;
	wId=window.open(url, "wo", 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,left='+left+',top='+top+',width='+width+',height='+height);
	wId.focus();
}

function SetTableForShow (TableId)
{
	if (eval ("tsm_"+TableId).style.display=="none") eval ("tsm_"+TableId).style.display="block";
	else eval ("tsm_"+TableId).style.display="none";
}

function GetElementOffsetLeft1(element)
{
	if (element.offsetParent)
		return element.offsetLeft+GetElementOffsetLeft1(element.offsetParent);
	else
		return element.offsetLeft;
}

function GetElementOffsetTop1(element)
{
	if (element.offsetParent)
		return element.offsetTop+GetElementOffsetTop1(element.offsetParent);
	else
		return element.offsetTop;
}

function ShowTooltip1(message)
{
	TooltipLayer.innerHTML = "<table><tr><td style='color:#FFFFFF;'>"+message+"</td></tr></table>";
	TooltipLayer.style.posLeft = GetElementOffsetLeft1(window.event.srcElement)+21;
	TooltipLayer.style.posTop  = GetElementOffsetTop1(window.event.srcElement)+110;
	TooltipLayer.style.display = "block";
}

function HideTooltip1()
{
	TooltipLayer.style.display = "none";
}

function ShowVMenu(MObj)
{
	MObj.style.posLeft = GetElementOffsetLeft1(window.event.srcElement)-9;
	MObj.style.posTop  = GetElementOffsetTop1(window.event.srcElement)+13;
	MObj.style.display = "block";
}

function HideVMenu(MObj)
{
	MObj.style.display = "none";
}


