function openWindow(url, height, width){
	var sParams = 'height='+height+',' 
           sParams = sParams + 'width='+width+',' 
           sParams = sParams + 'toolbar=no,' 
           sParams = sParams + 'status=yes,' 
           sParams = sParams + 'scrollbars=yes,' 
           sParams = sParams + 'directories=no,' 
           sParams = sParams + 'location=no,' 
           sParams = sParams + 'menubar=no' 
           sParams = sParams + ',resizable=yes';
	var win = window.open(url,"memberwin",sParams,true);
}

function openGlossery(url){
  	glossWindow = window.open(url, 'Glossary', 'width=400,height=400,menubar=no,toolbar=no,resizable=no,status=no,scrollbars=yes',true) 
	glossWindow.focus()  
}

function openItem(url){
  	newWindow = window.open(url, 'Item', 'width=750,height=650,menubar=no,toolbar=no,resizable=yes,status=no,scrollbars=yes',true) ;
	newWindow.focus() ;
}

function openHelp(url){
  	newWindow = window.open(url, 'Help', 'width=750,height=650,menubar=no,toolbar=no,resizable=yes,status=no,scrollbars=yes',true) ;
	newWindow.focus() ;
}
 
function openPic(img){
    var flowerPic=new Image() ;
    flowerPic.src=img ;
/*    fwidth=flowerPic.width+50 ;
    fheight=flowerPic.height+50 ;  
	fwidth=flowerPic.width+5 ;
    fheight=flowerPic.height+5 ; 
*/	
  	newWindow = window.open('flowerpic.cfm?pic='+img, 'Flower', 'width=1,height=1,menubar=no,toolbar=no,resizable=no,status=no,scrollbars=no',true) ;
	newWindow.focus() ;
} 

function returnPicWidth(img){
    var Pic=new Image ;
    Pic.src=img ;
    return Pic.width ;
}

function returnPicHeight(img){
    var Pic=new Image ;
    Pic.src=img ;
    return Pic.height ;    
}
/*
function doCheckAll(formid)
  { 
    if (formid != null)
      {//1
        var doc = document.getElementById(formid);//2
        var el = document.getElementById('allcheck');
        for (var i=0;i<doc.elements.length;i++)
          {//3
            var e=doc.elements[i];			
           if ((e.type=='checkbox')&&(e.name!='allcheck'))
			  {
     	        e.checked=el.checked ;
			  }
          }
       return true;
      }
  } 	
*/

function doCheckAll(formid){
	doc=document.getElementById(formid) ;
	el=document.getElementById('allcheck') ;
	for(i=0; i < doc.elements.length; i++){
		e=doc.elements[i] ;
		if ((e.type == 'checkbox') && (e.name != 'allcheck')){
			e.checked=el.checked ;
		}
	}
    return true ;
}
  
function verFields(formid)
  {
    authHeight(formid) ;
	authElevation(formid) ;  
  }  
  
 function authHeight(formid)
   {//1
	if (formid != null)
	  {
	    var doc = document.getElementById(formid);
        var minh = document.getElementById('minheight') ;
        var maxh = document.getElementById('maxheight') ;
		if ((minh.value != '') || (maxh.value != ''))
		  { // if one or both is defined 		  
            if ((minh.value == '') || (isNaN(minh.value)))
		      {
		        minh.value = 0 ;
		      }		 

		    if ((maxh.value == '') || (isNaN(maxh.value)))
		      {
		        maxh.value = 99999 ;
		      }			
		  }
	  }
    }
	
 function authElevation(formid)
   {//1
	if (formid != null)
	  {
	    var doc = document.getElementById(formid);
        var minele = document.getElementById('minelevation') ;
        var maxele = document.getElementById('maxelevation') ;
		if ((minele.value != '') || (maxele.value != ''))
		  { // if one or both is defined 		  
            if ((minele.value == '') || (isNaN(minele.value)))
		      {
		        minele.value = 0 ;
		      }		 

		    if ((maxele.value == '') || (isNaN(maxele.value)))
		      {
		        maxele.value = 99999 ;
		      }			
		  }
	  }//1  
    }	
    
  function preloadImages() {
	document.preload = new Array();
	if (document.images) {
		for (var i = 0; i < preloadImages.arguments.length; i++) {
			document.preload[i] = new Image();
			document.preload[i].src = preloadImages.arguments[i];
		}
	}
}    