var newwindow;
var leftpos;
var toppos;
function detectexist(obj){
return (typeof obj !="undefined")
}
function janela(pagina)
{
	leftpos=(detectexist(window.screenLeft))? screenLeft+document.body.clientWidth/2-600/2 : detectexist(window.screenX)? screenX+innerWidth/2-600/2 : 0
	toppos=(detectexist(window.screenTop))? screenTop+document.body.clientHeight/2-800/2 : detectexist(window.screenY)? screenY+innerHeight/2-140/2 : 0
	newwindow=window.open(pagina,'name','height=640,width=720,status=no,resizable=no,scrollbars=yes,left='+leftpos+',top='+toppos);
	if (window.focus) {newwindow.focus()}
}