﻿// JScript File
		
var newwin;
var timerID;

function refresh()
{
	//  This version of the refresh function will be invoked
	//  for browsers that support JavaScript version 1.2
	//
	//  The argument to the location.reload function determines
	//  if the browser should retrieve the document from the
	//  web-server.  In our example all we need to do is cause
	//  the JavaScript block in the document body to be
	//  re-evaluated.  If we needed to pull the document from
	//  the web-server again (such as where the document contents
	//  change dynamically) we would pass the argument as 'true'.
	//  
	window.location.reload( true );
}
function pagajanela(URL,params) {	
	var i;
	
	newwin = window.open(URL+"?params=" + params, "Pagamentos", "location=1, menubar=0");
	timerID = setInterval("checkClosed()",1000);
}

function checkClosed() 
{
	if (newwin.closed) 
	{		
		clearInterval(timerID);
		refresh();
	}
}

function ScrollTop()
{
	window.scroll(0,0);
}