        function loadValues(line){
var j=(3*line)-1;
var valuePop=document.forms["QuickSearch"].elements[j];
var fieldPop=document.forms["QuickSearch"].elements[j-1];
if (fieldPop.selectedIndex == 0){
field1=new Array("22 drawings","Architecture","assemblage","cartoon drawing","collage","construction","Drawing","drawing--------------------------------------","drawing and limited edition print","drawing, textile","Exhibition Site","Installation","montage","Painting","painting (relief)","Photograph","photograph and audio","photograph and drawing","photograph, collage","portfolio for photographs","Print","print","print (altered)","print on canvas","print with drawing","print with hand-coloring","print with hand-painting","print with objects","print, collage","print, drawing","print, photograph","prints","Sculpture","sculpture (called &quot;drawing&quot; by the artist)","sculpture (multiple)","textile","Video","Wall relief");
valuePop.length=field1.length;
for (var i = 0; i <= (field1.length - 1); i++){
valuePop.options[i].value = field1[i];
valuePop.options[i].text = field1[i];
}
}
if (fieldPop.selectedIndex == 1){
field2=new Array("Begins with:","0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","L","M","N","O","P","R","S","T","U","V","W");
valuePop.length=field2.length;
for (var i = 0; i <= (field2.length - 1); i++){
valuePop.options[i].value = field2[i];
valuePop.options[i].text = field2[i];
}
}
if (fieldPop.selectedIndex == 2){
field3=new Array("Begins with:","0","1","2","3","4","5","6","8","A","B","C","E","F","G","H","I","J","K","L","M","N","O","P","R","S","T","U","V","W","X","Y");
valuePop.length=field3.length;
for (var i = 0; i <= (field3.length - 1); i++){
valuePop.options[i].value = field3[i];
valuePop.options[i].text = field3[i];
}
}
if (fieldPop.selectedIndex == 3){
field4=new Array("- - - - -");
valuePop.length=field4.length;
for (var i = 0; i <= (field4.length - 1); i++){
valuePop.options[i].value = field4[i];
valuePop.options[i].text = field4[i];
}
}
if (fieldPop.selectedIndex == 4){
field5=new Array("Begins with:","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z");
valuePop.length=field5.length;
for (var i = 0; i <= (field5.length - 1); i++){
valuePop.options[i].value = field5[i];
valuePop.options[i].text = field5[i];
}
}
if (fieldPop.selectedIndex == 5){
field6=new Array("Begins with:","0","1","2","C","N","P");
valuePop.length=field6.length;
for (var i = 0; i <= (field6.length - 1); i++){
valuePop.options[i].value = field6[i];
valuePop.options[i].text = field6[i];
}
}
}
var listWind = ""
function setPopup(row, str) {
  document.forms["QuickSearch"].elements["value"+row].selectedIndex=0
  document.forms["QuickSearch"].elements["value"+row].options[0].text="- "+str+" -"
  document.forms["QuickSearch"].elements["value"+row].options[0].value=str
  document.forms["QuickSearch"].elements["value"+row].blur()
  listWind.close()
}

function lineChange(NameOfForm,srchType,lastLine) {
document.forms[NameOfForm].action = "/4DACTION/HandleCGI/QS_"+srchType+"*"+lastLine+"$45*1402"
 document.forms[NameOfForm].submit()
}

function checkValues() {
  var row = document.forms["QuickSearch"].lineCount.value
  loadValues(row)
}
function valueChange(row) {
  //only execute if this is a 'Begins with:' list
  var fieldPop = document.forms["QuickSearch"].elements[(row*3)-2]
  var valuePop = document.forms["QuickSearch"].elements[(row*3)-1]
  var doIt = "No" //until proven otherwise
  if (valuePop.options[0].text.charAt(0) == "-") {
    if (valuePop.options[0].text.charAt(valuePop.options[0].length-1) == "-") {
      doIt = "Yes"
    }
  }
  else {
    if (valuePop.options[0].text == "Begins with:") {
      doIt = "Yes"
    }
  }
  if (doIt == "Yes") {
    doNew(row)
  }
}

function doNew(row) {
  var fieldPop = document.forms["QuickSearch"].elements[(row*3)-2]
  var valuePop = document.forms["QuickSearch"].elements[(row*3)-1]
  var numElements = (3*row)+2
  if(document.forms["QuickSearch"].elements[(row*3)-1].selectedIndex > 0) {
    if(row > 1) {
      if(row == 4) {
        numElements = numElements - 1 //no buttons in line 4
      }
      else {
        numElements = numElements + 1 //two buttons lines 2-3
      }
    }
    //if a value window was left open, close it
    if (!listWind || listWind.closed){
    }
    else {
      listWind.focus()
      listWind.close()
    }
    //open value window and reset popup to 0
    listWind = window.open("","","height=500,width=400,resizable")
    listWind.name="SearchValues"
    if(listWind != null){
      document.QuickSearch.elements[0].value=(fieldPop.selectedIndex + 1)+"row"+row;
      QSForm = document.QuickSearch;
      var content = "<html><head><title>Pick a search value</title>";
      content += "<link rel='stylesheet' type='text/css' href='/kioskstyles.css'>";
      content += "</head>";
      content += "<body onload='self.document.QuickSearch.submit();'>";
      content += "<h1>Loading Field Values</h1>";
      content += "<form name='QuickSearch' action='/4DACTION/HANDLECGI/QSA2$45*1402' method='post'>";
      for (var i = 0; i < numElements; i++){
        if(QSForm.elements[i].type == "select-one") {
          content += "<input type='hidden' name='"+QSForm.elements[i].name+"' value='"+QSForm.elements[i].options[QSForm.elements[i].selectedIndex].value+"'/>";
        }
        else {
        content += "<input type='hidden' name='"+QSForm.elements[i].name+"' value='"+QSForm.elements[i].value+"'/>";
        }
      }
      content += "</form></body></html>";
      valuePop.selectedIndex = 0;
      listWind.document.write(content);
      listWind.document.close();
    }
  }
}


        // BrowserCheck Object
        // provides most commonly needed browser checking variables
        // 19990326

        // Copyright (C) 1999 Dan Steinman
        // Distributed under the terms of the GNU Library General Public License
        // Available at http://www.dansteinman.com/dynapi/

        function BrowserCheck() {
            var b = navigator.appName
            if (b=="Netscape") this.b = "ns"
            else if (b=="Microsoft Internet Explorer") this.b = "ie"
            else this.b = b
            this.v = parseInt(navigator.appVersion)
            this.ns = (this.b=="ns" && this.v>=4)
            this.ns4 = (this.b=="ns" && this.v==4)
            this.ns5 = (this.b=="ns" && this.v>=5)
            this.ie = (this.b=="ie" && this.v>=4)
            this.ie4 = (navigator.userAgent.indexOf('MSIE 4')>0)
            this.ie5 = (navigator.userAgent.indexOf('MSIE 5')>0)
            if (this.ie5) this.v = 5
            this.min = (this.ns||this.ie)
        }

        // automatically create the "is" object
        is = new BrowserCheck();

        // set visible/hidden variables for managing styles in different browsers
        var visible
        var hidden
        if(is.ie || is.ns5) {
            visible = "visible";
            hidden = "hidden";
        }
        else {
            visible = "show";
            hidden = "hide";
        }

        function getStyleObj (obj) {
            // returns a 'style' object that's properly formatted for the user's browser
            if(is.ns5) {
                styleObj = document.getElementById(obj).style;
            }
            else if(is.ie) {
                styleObj = eval("document.all." + obj + ".style");
            }
            else if(is.ns) {
                styleObj = eval("document." + obj);
            }

            return styleObj;
        }

        function menuOn(selMenu) {
            // Change the background color of selMenu on mouse rollover.
            var obj = getStyleObj(selMenu);
            obj.backgroundColor ="#333366";
            //this color corresponds to the .menu a:hover bgcolor set in kioskstyles.css
        }

        function menuOff(selMenu) {
            // Remove the background color of selMenu on mouse rollout.
            if(currentMenu == selMenu) {
                // this is the 'current' menu; it should continue to look selected;
                setMenu(selMenu);
            } else {
                var obj = getStyleObj(selMenu);
                obj.backgroundColor ="";
            }
        }

        var currentMenu = "";

        function setMenu(selMenu) {
            // Changes the background color of the selected menu
            // This function is called in the 'onload' script of <body> tags.
            currentMenu = selMenu;
            var obj = getStyleObj(selMenu);
            obj.backgroundColor ="#666666";
        }

        function showHelp(theURL) {
            theURL = '/Help/'+theURL+'.htm';
            var newWindow = window.open(theURL,'Help','width=300,height=400,scrollbars,resizable');
        }

        function addToPort(SessionID,Sequence,objID) {
            document.theForm.objID.value = objID;
            suffix = "$"+SessionID + Sequence;
            var portWind = window.open("/Kiosk/ChoosePort.htm"+suffix,"ChoosePort","height=150,width=300")
        }

        function addIDs() {
            document.theForm.action = document.theForm.action+document.theForm.portID.value+"*"+document.theForm.objID.value+suffix;
            document.theForm.submit();
        }
        