
function windowAdjust(width,height,xLeftPos,yTopPos)
{
	if(width != undefined && height != undefined)
		window.resizeTo(width,height);
	if(xLeftPos != undefined && yTopPos != undefined)
		window.moveTo(xLeftPos,yTopPos);
}

function NewWindow(urlPage,targetPage,featureStr)
{
	if(urlPage == undefined)
		return;
	if(targetPage == undefined)
		targetPage = '_blank';
	window.open(urlPage,targetPage,featureStr);
}

function window_size(left,top,right,bottom)
{
	if(left == undefined)
		left = 0;
	if(top == undefined)
		top = 0;
	if(right == undefined)
		right = 1024;
	if(bottom == undefined)
		bottom = 740;
	var window_Width = left;
	var window_Height = top;
	var windowMaxWidth = right;
	var windowMaxHeight = bottom;
	
	sWidth = window.screen.availWidth;
	sHeight = window.screen.availHeight;
	availWidth = window.screen.availWidth;
	availHeight = window.screen.availHeight;
	setWidth = windowMaxWidth;
	setHeight = windowMaxHeight;
	
	if (availWidth >= setWidth)
	{
		window_Width = setWidth;
	}
	else
	{
		window_Width = availWidth;
	}
	
	if (availHeight >= setHeight)
	{
		window_Height = setHeight;
	}
	else
	{
		window_Height = availHeight;
	}
	windowAdjust(window_Width,window_Height);
}


