
function windowPop(pathName,winName,intWidth,intHeight,intScroll,intLocation,resize) {

  if (resize == null)
    var resizable = "yes";
  else
      var resizable = resize;
	  
  if (document.all)
    var xWidth = screen.width, yHeight = screen.height;
  else
    if (document.layers)
      var xWidth = window.outerWidth, yHeight = window.outerHeight;
    else
      var xWidth = 800, yHeight=600;

  var xOffset = (xWidth - intWidth)/2, yOffset = (yHeight - intHeight)/2;

    var features;
    features = 'width=' + intWidth
      features += ',height=' + intHeight
        features += ',screenX=' + xOffset
          features += ',screenY=' + yOffset
            features += ',top=' + yOffset
              features += ',left=' + xOffset
                features += ',scrollbars=' + intScroll
                  features += ',location=' + intLocation
                    features += ',resizable=' + resizable           
                              
              //alert(features)

    var newWindow
    newWindow = window.open(pathName,winName,features)
    newWindow.focus()

}


// This assumes that "THE PERFECT GIFT" option is the first selection in the drop-down list. 
// This will force the page to refresh for this selection, rather than popping up in a new window.
//
function handlePerfectGiftSelection(selectIndex,pathName,winName,intWidth,intHeight,intScroll,intLocation,resize) {

  if (selectIndex == 0)
    self.location.href = pathName;
  else
    windowPop(pathName,winName,intWidth,intHeight,intScroll,intLocation,resize);
 
}

