mw=null;
function popup(url,imgwidth,imgheight,scroll){
        if(mw != null && !mw.closed){
                window.mw.close();
        }

x=imgwidth;
y=imgheight;
xresnow = x;
yresnow = y;
if (navigator.appVersion.indexOf("Mac")!=-1 && document.all) {
xresnow-=0;
yresnow-=0;
}
xl = (screen.availWidth/2)-(xresnow/2);
tt = (screen.availHeight/2)-(yresnow/2);
  if (document.all) mw=window.open(url,'new_win','scrollbars='+scroll+',width='+xresnow+',height='+yresnow+',left='+xl+',top='+tt);
  else {
    if (parseFloat(navigator.appVersion)<4.75)
      mw=window.open(url,'new_win','left='+xl+',top='+tt+',width='+x+',height='+y+',toolbar=0,status=0,location=0,scrollbars='+scroll);
    else {
      mw=window.open(url,'new_win','left='+xl+',top='+tt+',width='+x+',height='+y+',toolbar=0,status=0,location=0,scrollbars='+scroll);
    }
  }
}

mw2=null;
function popup2(url,imgwidth,imgheight,scroll){
        if(mw2 != null && !mw2.closed){
                window.mw2.close();
        }

x=imgwidth;
y=imgheight;
xresnow = x;
yresnow = y;
if (navigator.appVersion.indexOf("Mac")!=-1 && document.all) {
xresnow-=0;
yresnow-=0;
}
xl = (screen.availWidth/2)-(xresnow/2);
tt = (screen.availHeight/2)-(yresnow/2);
  if (document.all) mw2=window.open(url,'new_win2','scrollbars='+scroll+',width='+xresnow+',height='+yresnow+',left='+xl+',top='+tt);
  else {
    if (parseFloat(navigator.appVersion)<4.75)
      mw2=window.open(url,'new_win2','left='+xl+',top='+tt+',width='+x+',height='+y+',toolbar=0,status=0,location=0,scrollbars='+scroll);
    else {
      mw2=window.open(url,'new_win2','left='+xl+',top='+tt+',width='+x+',height='+y+',toolbar=0,status=0,location=0,scrollbars='+scroll);
    }
  }
}