var jan2;
function centerWindow(ImageFile,xImageSize,yImageSize) {
    if (document.all) { // IE
        var xMax = screen.width, yMax = screen.height;
    } else { // Netscape
        var xMax = window.outerWidth, yMax = window.outerHeight;
    }
    var xOffset = (xMax - xImageSize)/2, yOffset = (yMax - yImageSize)/2;
    jan2=window.open(ImageFile,'VistaGeral',
    'width='+xImageSize+',height='+yImageSize+',screenX='+xOffset+',screenY='+
    yOffset+',top='+yOffset+',left='+xOffset+',toolbar=no,titlebar=no,status=no,menubar=no,scrollbars=no')
}

function closewindow() {
	jan2.close();
}

function test(ImageFile,xImageSize,yImageSize) {
	if (jan2 == undefined) {
		centerWindow(ImageFile,xImageSize,yImageSize);
	} else if (jan2.closed) {
		centerWindow(ImageFile,xImageSize,yImageSize);
	} else {
		jan2.focus();
	}
}

function add_bookmark(bk_url, bk_descricao) {
 var browsName=navigator.appName;
 if (browsName=="Microsoft Internet Explorer") {
  window.external.AddFavorite(bk_url,':: '+bk_descricao);
 } else {
  if (browsName=="Netscape") {
   alert("Para adicionar esta página aos seus Favoritos pressione CTRL+D");
  }
 }
}

