function NewWindow(u,n,w,h,f,p,x,y) {

  var extension=u.split(".");
      extension=extension[extension.length-1];

  var stop=u.length - extension.length;
  stop -= 1;

  var file=u.substring(0,stop);
  file=file.replace(/Small/, "Full");

  var url=file+"."+extension;

  var ws=window.screen?1:0,m=Math,C='center',R='random',M='custom',sw=screen.availWidth,sh=screen.availHeight,T=(p==C&&ws)?(sh-h)/2:(p==R&&ws)?(m.floor(m.random()*(sh-h))):(p==M)?y:100,L=(p==C&&ws)?(sw-w)/2:(p==R&&ws)?(m.floor(m.random()*(sw-w))):(p==M)?x:100,s='scrollbars,width='+w+',height='+h+',top='+T+',left='+L;s+=(!f||f=='')?'':','+f;

  if(x) {
    window.location=x;
  }

  win=window.open(url,n,s);

  if(win.focus) {
    win.focus();
  }

}
