function spawnWindow(url, windowname, attributes) {
var urlString = url;
 if (urlString.indexOf(".pdf")!=-1){
    remote = window.open(url,windowname, attributes);
    remote.location = url;
  } 
  else {
    remote = window.open(url,windowname, attributes);
    }
  remote.focus();
  if (remote.opener == null) {
    remote.opener = window;
  }
}

function spawnPhotoWindow(url) {
  help = spawnWindow(
    url,
    "review_window",
    "width=700,height=700,screenX=10,screenY=10,top=10,left=10,resizable=yes,toolbar=no,scrollbars=yes");
}

function spawnPhoto2Window(url) {
  help = spawnWindow(
    url,
    "article_window",
    "width=700,height=800,screenX=10,screenY=10,top=10,left=10,resizable=yes,toolbar=no,scrollbars=yes");
}

function spawnPhoto3Window(url) {
  help = spawnWindow(
    url,
    "article_window",
    "width=825,height=725,screenX=10,screenY=10,top=10,left=10,resizable=yes,toolbar=no,scrollbars=yes");
}

function spawnPhoto4Window(url) {
  help = spawnWindow(
    url,
    "article_window",
    "width=750,height=550,screenX=10,screenY=10,top=10,left=10,resizable=yes,toolbar=no,scrollbars=yes");
}

function spawnPhoto5Window(url) {
  help = spawnWindow(
    url,
    "article_window",
    "width=900,height=750,screenX=10,screenY=10,top=10,left=10,resizable=yes,toolbar=no,scrollbars=yes");
}
