 var top = 50;
 var left = 50;
 var imageBorder = 40;
 var myWindow;
 function openMyPage(url, w, h) { 
	w = w + imageBorder;
	h = h + imageBorder;
	wh = "width=" + w + ",height=" + h;
	tl = ",top=" + top + ",left=" + left;
    if (!myWindow || myWindow.closed){
       myWindow = 
           window.open(url, "whatever", wh + tl);
           myWindow.focus();
       }
    else {
       myWindow.close();
       myWindow = 
           window.open(url, "whatever", wh + tl);
           myWindow.focus();
       }
  }
  
function NewWindow(u,n,w,h,f,p,x,y){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='width='+w+',height='+h+',top='+T+',left='+L;s+=(!f||f=='')?'':','+f;win=window.open(u,n,s);if(win.focus)win.focus();}
