function open_window(name, url, pleft, ptop, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';
  window.open(url, name, 'left='+pleft+',top='+ptop+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
};


function showPhoto(theURL,h,w) { //v2.0
  width = w + 20;
  height= h + 20;
  if(parseFloat(navigator.appVersion)>=4)
  {
    wleft  = (screen.width - width) / 2;
    wtop   = (screen.height - height) / 2;
  } 
  else
  {
    wleft  = (640 - width) / 2;
    wtop   = (480 - height) / 2;
  } 
  open_window('viewer', theURL, wleft, wtop, width, height, 0, 0, 0, 0, 0);
};

