
function holdbutton(formname, buttonname){
  document[formname][buttonname].disabled = true;       
  document[formname][buttonname].value = 'please wait...';
  document[formname][buttonname].className = 'buttonDown';
  document[formname].submit();
}

function popupWindow(url, parameter_string) {
  var parameter_string = parameter_string;
	if(!parameter_string)parameter_string = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=50,screenY=50,top=10,left=200';
  window.open(url,'popupWindow',parameter_string);
}

function toggle( whichLayer ){  
  var elem, vis;  
  
  if( document.getElementById ) // this is the way the standards work    
    elem = document.getElementById( whichLayer );  
  else if( document.all ) // this is the way old msie versions work      
    elem = document.all[whichLayer];  
  else if( document.layers ) // this is the way nn4 works    
    elem = document.layers[whichLayer];  
    
  vis = elem.style;  // if the style.display value is blank we try to figure it out here  
    
  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)    
    vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';  
  
  vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}

function display( whichLayer, displayStyle ){  
  var elem, vis;  
  
  if( document.getElementById ) // this is the way the standards work    
    elem = document.getElementById( whichLayer );  
  else if( document.all ) // this is the way old msie versions work      
    elem = document.all[whichLayer];  
  else if( document.layers ) // this is the way nn4 works    
    elem = document.layers[whichLayer];  
    
  vis = elem.style;  // if the style.display value is blank we try to figure it out here  
    
  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)    
    vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';  
  
  vis.display = displayStyle;
}

function showPhoto(src, width, height){
  var image;
  
  if( document.getElementById ) // this is the way the standards work    
    image = document.getElementById( 'PhotoImage' );  
  else if( document.all ) // this is the way old msie versions work      
    image = document.all['PhotoImage'];  
  else if( document.layers ) // this is the way nn4 works    
    image = document.layers['PhotoImage'];  
    
  image.src = src;
  image.width = width;
  image.height = height;
}