/* --------------------------------------------------- */
/* name:    utilities.js                               */
/* purpose: javascript utility functions               */
/* --------------------------------------------------- */
function popWindow(url, width, height, windowName) {
  /* defaults if not passed to function */
  if (!width) { width = 600; }
  if (!height) { height = 450; }
  if (!windowName) { windowName = "marcia"; }
  wref = window.open (url, windowName,
        "toolbar=no,width=" + width + ",height=" + height +
        ",directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no");
  if (navigator.appName == "Netscape" || navigator.appVersion.substring(0,1) == '5') {
    wref.focus();
  }
}
/* --------------------------------------------------- */
/* catalog functions                                   */
/* --------------------------------------------------- */
function browseByDoll(theID,theDoll) { 
  with (document.catalogForm) {
    doll.value = theID;
    dollName.value = theDoll;
    action = "items.cfm";
    submit(); 
  }
}
/* --------------------------------------------------- */
function browseByCategory(theID,theCategory) { 
  with (document.catalogForm) {
    category.value = theID;
    categoryName.value = theCategory;
    action = "items.cfm";
    submit(); 
  }
}
/* --------------------------------------------------- */
function pageForward() { 
  with (document.pageForm) {
    startrow.value = parseInt(startrow.value) + parseInt(maxrows.value);
    submit(); 
  }
}
/* --------------------------------------------------- */
function pageBack() { 
  with (document.pageForm) {
    startrow.value = parseInt(startrow.value) - parseInt(maxrows.value);
    submit(); 
  }
}

