// Open Centered "More..." Window
function openMoreWindow(URL,WinName,W,H,Features){
  openCenterWin(URL,WinName,W,H,Features);
}


// Open Centered Zoom Window
function OpenZoomWindow(url){
  openCenterWin(url,'zoom_window','400','600','status=yes,resizable=yes');
}

// Open Centered Cart Window
function OpenZoomWindowCart(url){
  openTRWin(url,'zoom_window','850','800','status=yes,resizable=yes,scrollbars=yes');
}
// Open Privacy Window
function OpenPrivacyWindow(url){
  openCenterWin(url,'privacy','470','600','status=yes,resizable=yes');
}
// Open Size Window
function OpenSizeWindow(url){
  openCenterWin(url,'size','550','490','status=yes,resizable=yes');
}
// Open Email Window
function OpenEmailWindow(url){
  openCenterWin(url,'email','570','400','status=yes,resizable=yes');
}
// Open Ensemble Window
function OpenEnsembleWindow(url){
  openCenterWin(url,'ensemble','625','400','status=yes,resizable=yes');
}



// Open Regular Centered Window - called by above two functions
var centWin = null;
function openCenterWin(URL,WinName,W,H,Features){
  if(!Features){Features = "status=no,scrollbars=yes,resizable=yes"}
  LeftPosition = (screen.width) ? (screen.width-W)/2 : 0;
  TopPosition = (screen.height) ? (screen.height-H)/2 - 50 : 0;
  Settings = 'width='+W+',height='+H+',top='+TopPosition+',left='+LeftPosition+','+Features;
  centWin = window.open(URL,WinName,Settings);
  if(centWin){
    centWin.focus();
  }
}

// Open Top Left Window - not used but shows an alternative to opening window in middle of screen
var TRWin = null;
function openTRWin(URL,WinName,W,H,Features){
  if(!Features){Features = "status=no,scrollbars=yes,resizable=yes"}
  LeftPosition = 400
  TopPosition = 10
  Settings = 'width='+W+',height='+H+',top='+TopPosition+',left='+LeftPosition+','+Features;
  TRWin = window.open(URL,WinName,Settings);
  if(TRWin){
    TRWin.focus();
  }
}



