// JavaScript Document

//open New Window
function openNewWin(winWidth,winHeight,winUrl)
{
	var winLeft=Math.max(0,(screen.availWidth-winWidth-10)/2);
	var winTop=Math.max(0,(screen.availHeight-winHeight-30)/2);
	var obj=window.open(winUrl,'_blank','left='+winLeft+',top='+winTop+',height='+winHeight+',width='+winWidth+',status=no,toolbar=no,scrollbars=yes,menubar=no,location=no,resizable=no,directories=no');
	obj.focus();
}

//open New Window align center
function openReportNewWinC(winUrl)
{
	var winOjbect = window.open(winUrl,'_blank','left=5,top=5,height='+(screen.availHeight-160)+',width='+(screen.availWidth-30)+',status=no,toolbar=yes,scrollbars=yes,menubar=yes,location=no,resizable=yes,directories=no');
	winOjbect.focus();
}

//Are you sure to delete this record?
function isDeleteConfirm( goURL )
{
	if(confirm("确认要删除该条记录吗？"))
    { 
		document.postForm.action = '' + goURL ;
		document.postForm.submit() ;
	}
}

function isNumberStr(s)
{
	var c;
	for(i=0;i<s.length;i++)
	{
		c=s.substr(i, 1);
		if( !((c>='0')&&(c<='9')) )
		{
			if(c!=".")
			   return false;
		}
	}
	return true;
}