//--------------------------------------------------------------------
// Name: addImageRollovers()
// Desc: An array of IDs of images is passed in and it adds rollovers
//       to each one.
//--------------------------------------------------------------------
function addImageRollovers( id_array )
{

    // Get the image's elements.
    var image_info = new Array();
    for ( var i = 0; i < id_array.length; i++ )
    {
        
        var element = document.getElementById( id_array[i] );
        
        image_info[i] = { element: element, 
                          filename: element.src.substring( 0, element.src.length - 4 ), 
                          file_extension: element.src.substring( element.src.length - 3 ) };
        
    }  // Next image.
    
    // Preload the images.
    var image_object = new Image();
    for ( var i = 0; i < id_array.length; i++ )
    {
    
        image_object.src = image_info[i].filename + "."  + image_info[i].file_extension;
    
    }  // Next image.
    
    // Add the image events.
    for ( var i = 0; i < id_array.length; i++ )
    {
            
        image_info[i].element.onmouseover = new Function( "document.getElementById( '" + id_array[i] + "' ).src = '" + image_info[i].filename + "-hover." + image_info[i].file_extension + "';" );
        image_info[i].element.onmouseout = new Function( "document.getElementById( '" + id_array[i] + "' ).src = '" + image_info[i].filename + "." + image_info[i].file_extension + "';" );
        
    }  // Next image.
    
}


//--------------------------------------------------------------------
// Name: windowopen()
// Desc: Opens a new window with the parameters passed in.
//--------------------------------------------------------------------
function windowopen(URL, width, height, scroll) 
{

   if (height==null)
      height=280;
   
   if (width==null)
      width=740;

   props = "width="+width+",height="+height+",scrollbars=yes,resizable=yes,menubar=yes,status=yes";			

   window.open(URL, "HessAuction", props);			

}