function comfirmdelete(url) {
  ret = confirm('Are you sure that you want to delete this item?');
  if (ret == true) {
    //alert(url);
    window.location = url;
  }
}
function comfirmTY(url,title) {
  //message = "Are you sure you want to send \"Thank-You Letter\" info to the winner(s) of: " + title;
  message = "Are you sure you want to send Thank-You Letter ";
  message += "instructions to the winner(s) of:\n" + title;
  ret = confirm(message);
  if (ret == true) {
    window.location = url;
  }
}
function comfirmreceived(url) {
  message = "Please confirm that all items have been\npicked up and that all appropriate\nthank-you letters have been received.";
  ret = confirm(message);
  if (ret == true) {
    window.location = url;
  }
}
function closelottery(url) {
  message = "Please confirm that you want to close this lottery and return all items to \"Active Donations\".";
  ret = confirm(message);
  if (ret == true) {
    window.location = url;
  }
}

//popup window stuff
var newWindow1;
function openWindow(url,w,h,nam,x,y) 
{
  //if (x == undefined) { x = screen.width/2;}
  //if (y == undefined) { y = screen.height/2;}
  //if (x == undefined) { x = 0;}
  //if (y == undefined) { y = 0;}
  //alert(w + "," + h + "," + x + "," + y);
  var bName = navigator.appName;
  var bVer = parseInt(navigator.appVersion);
  var NS3 = (bName == "Netscape" && bVer >= 3);
  var IE5 = (bName == "Microsoft Internet Explorer" && bVer >= 5);
  var IE4 = (bName == "Microsoft Internet Explorer" && bVer >= 4);
  if (nam == ""){
    nam = "popwin"
  }
  if (!newWindow1 || newWindow1.closed)
    newWindow1 = window.open(url, nam, "toolbar=yes,location=no,scrollbars=yes,resizable=yes,status=yes,width=" + w +",height=" + h + ",left=" + x + ",top=" + y + ",alwaysRaised", true);
  else 
  {       
    newWindow1.location=url;
    newWindow1.focus();
  }
}

function openWindow2(url,nam,w,h,x,y) 
{
  //if (x == undefined) { x = screen.width/2;}
  //if (y == undefined) { y = screen.height/2;}
  //if (x == undefined) { x = 0;}
  //if (y == undefined) { y = 0;}
  //alert(w + "," + h + "," + x + "," + y);
  var bName = navigator.appName;
  var bVer = parseInt(navigator.appVersion);
  var NS3 = (bName == "Netscape" && bVer >= 3);
  var IE5 = (bName == "Microsoft Internet Explorer" && bVer >= 5);
  var IE4 = (bName == "Microsoft Internet Explorer" && bVer >= 4);
  if (nam == ""){
    nam = "popwin"
  }
  if (!newWindow1 || newWindow1.closed)
    newWindow1 = window.open(url, nam, "toolbar=yes,location=no,scrollbars=yes,resizable=yes,status=yes,width=" + w +",height=" + h + ",left=" + x + ",top=" + y + ",alwaysRaised", true);
  else 
  {       
    newWindow1.location=url;
    newWindow1.focus();
  }
}
function openWindow3(url,w,h,nam,x,y) 
{
  //if (x == undefined) { x = screen.width/2;}
  //if (y == undefined) { y = screen.height/2;}
  //if (x == undefined) { x = 0;}
  //if (y == undefined) { y = 0;}
  //alert(w + "," + h + "," + x + "," + y);
  var bName = navigator.appName;
  var bVer = parseInt(navigator.appVersion);
  var NS3 = (bName == "Netscape" && bVer >= 3);
  var IE5 = (bName == "Microsoft Internet Explorer" && bVer >= 5);
  var IE4 = (bName == "Microsoft Internet Explorer" && bVer >= 4);
  if (nam == ""){
    nam = "popwin"
  }
  if (!newWindow1 || newWindow1.closed)
    newWindow1 = window.open(url, nam, "toolbar=no,location=no,scrollbars=yes,resizable=yes,status=yes,width=" + w +",height=" + h + ",left=" + x + ",top=" + y + ",alwaysRaised", true);
  else 
  {       
    newWindow1.location=url;
    newWindow1.focus();
  }
}


function clear_select(which) {
  if (which == "") {return;}
  eval('document.forms[0].' + eval('which') + '.selectedIndex=0');
  if (which == "subcategory") {
    eval('document.forms[0].item.selectedIndex=0');
  }
  return;
}
