<!-- Function to open a new window -->

			function NewWindow(mypage,myname,w,h,scroll,pos){

			if(pos=="random")
			{
			LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
			TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
			}
			if(pos=="center")
			{
			LeftPosition=(screen.width)?(screen.width-w)/2:100;
			TopPosition=(screen.height)?(screen.height-h)/2:100;
			}
			else if((pos!="center" && pos!="random") || pos==null)
			{
			LeftPosition=0;TopPosition=20
			settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
			win=window.open(mypage,myname,settings);
			}
					
}


function openenlarge(url) 
{
	//closeenlarge();

	//original 450
	iheight = 650;
	iwidth = screen.availWidth - 80;  

    var left = 20;   // coordinates of new window
    var top = 20;
	// now open the window
	enlargewin = window.open(url,'enlarge','resizable=0,scrollbars=0,status=0,toolbar=0,menubar=0,directories=0,'+'width='+iwidth+',height='+iheight+',left='+left+',screenX='+left+',top='+top+',screenY='+top);
	// make sure the new window is associated with this window
	enlargewin.opener = self;
   
}


<!-- Function to open a the artist list in a popup -->
 var artistlistwin = null;
	  var letter = "";
	   
	   
	  function openartistlist(form,letter, e, xoffset, yoffset) {
	 letter = document.searchform.artist.value;
	 
	    //var url = "artists_"+letter+".html"; // url to open
	    var url = "artistsearch.huam?alpha="+letter; // url to open
	  
	    if (artistlistwin != null && !artistlistwin.closed) {
	      artistlistwin.location = url;
	    }
	    else {
	      var width = 250; // width of new window
	      var height = 300;  // height of new window
	      var left = 710;   // coordinates of new window
	      var top = 120;
	      // attempt to position relative to the mouse
	      // xoffset, yoffset are button x,y indices i.e. a=(0,0), b=(1,0), etc.
	      // each button is 19x19 pixels
	      // the idea is to get back into the gray area of the page
	      if (e != null) {
	        left = e.screenX - (xoffset+3)*19 - width;
	        top = e.screenY - height; // keep bottom of popup at mouse height
	      }
	      // otherwise attempt to position relative to browser window
	      else if (window.screenTop != null) {
	        top = window.screenTop + top;
	        left = window.screenLeft + left;
	      }
	      else if (window.screenX) {
	        left = window.screenX + left;
	        top = window.screenY + top;
	      }
	      // check that the popup window isn't off the edge of the screen
	      if (screen.availWidth != null) {
	        if (left+width > screen.availWidth) {
	          left = screen.availWidth - width;
	        }
	        if (top+height > screen.availHeight) {
	          top = screen.availHeight - height;
	        }
	      }
	      if (left < 0)
	        left = 0;
	      if (top < 0)
	        top = 0;
	  
	      // now open the window
	      artistlistwin = window.open(url,'artistlist','resizable=1,scrollbars=1,status=0,toolbar=0,menubar=0,directories=0,'+'width='+width+',height='+height+',left='+left+',screenX='+left+',top='+top+',screenY='+top);
	      if (!artistlistwin.opener) {
	        artistlistwin.opener = self;
	      }
	    }
}


<!-- Function to clear the form in the search page when the clear button is clicked in search page -->

				
				function clearform(f) {
				  if (f) {
				    var i;
				    for (i = 0; i < f.elements.length; i++) {
				      if (f.elements[i].type == "text") {
				        f.elements[i].value = f.elements[i].defaultValue;
				      }
				      else if (f.elements[i].type == "checkbox") {
				        f.elements[i].checked = f.elements[i].defaultChecked;
				      }
					else if (f.elements[i].type == "select-one") {
					  f.elements[i].options[0].selected = true;
				      } 
					  else if (f.elements[i].type == "select-multiple") {
					  f.elements[i].options[0].selected = true;
				      } 
				    }
				  }
}
	
	
	<!-- Function for invoking the search function -->
							function newSearchFunction(){
							
							
							document.forms[0].action="search.huam";
							document.forms[0].submit();
							prog();
				}
				
	<!-- Function when clicked on any page number in pagination -->
				
				function newSearchFunctionpagenavigation(pageNum){
								
				document.searchform1.page.value = pageNum;						
				document.searchform1.action="searchresults.huam";
				document.searchform1.submit();
				}
				
				
			<!-- Function when clicked next button in pagination -->	
				
				function newSearchFunctionnext(){
				
				document.searchform1.action="searchresults.huam?page=next";
					document.searchform1.submit();
				}
				
				
			<!-- Function when clicked previous button in pagination -->	
				
				
				function newSearchFunctionprevious(){
											
											
					document.searchform1.action="searchresults.huam?page=previous";
					document.searchform1.submit();
				}
				
				<!-- Function when clicked ViewAll button in pagination -->	
				
				function viewall(){
				document.searchform1.flag1.value = "viewall"	
				
				document.searchform1.action="searchresults.huam";
				document.searchform1.submit();
									
				}
				
				var i
				function prog()
				{
				
				  document.getElementById("d1").innerHTML="";
				  document.getElementById("d2").style.width=0;  i=0;
				  progBar();
				}
				
				function progBar()
				{
				   if (i<=(300))
				   {
					    if (i>40){document.getElementById("d1").innerHTML=
					    "Loading.." + parseInt(i/3)+"%";}
				      document.getElementById("d2").style.width=i+"px";
				      var j=0;
				      while (j<=100)
				       	j++;
				        setTimeout("progBar();", 220);
				        i++;
				   }
}
				
				<!-- Function for changing the images when clicked in thetop navigation -->		
				
				function change(obj) {
				
					id = obj;	
					if(id == "SEARCH") {
						MM_swapImage('Image1','','images/search_y.gif',1);
					}
					if(id == "EXHIBITIONS") {
						MM_swapImage('Image2','','images/exhibition_y.gif',1);
					}
					if(id == "RESOURCES") {
					MM_swapImage('Image3','','images/resources_y.gif',1);
					}
					if(id == "ABOUTTHISSITE") {
						MM_swapImage('Image4','','images/site_y.gif',1);
					}
					
				}
				
				
				
				
				
				
				function MM_swapImage() { //v3.0
				
				  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
				   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
				   
}




				
				
				
				
				function MM_swapImgRestore() { //v3.0
				  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
				  change(id);
				}
				
	

	