function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width=870,height=760,scrollbars=no,resizable=yes,status=no,');
return false;
}

function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=yes'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function ventana(direccion,nombreVentana,ancho,alto)
{
var posAncho=(screen.width-ancho)/2;
var posAlto=(screen.height-alto)/2;
var atributos='resizable=yes,scrollbars=yes,width='
atributos+=ancho+',height='+alto+',left='+posAncho+',top='+posAlto;
return window.open(direccion,nombreVentana,atributos)
}
