
//used in scroller - called from body OnLoad event
function resizeImages()
{
    for(i=0;i<document.images.length;i++)
    {
        var image = document.images[i];
        if(image.width>image.height*2.4)
        {
            image.width=120;
        }
        else
        {
            image.height=50;
        }
    }
}

//generic image resize function
//resizes a given image to fit within 
//maximum values without warping image
function resizeImage(image, maxWidth, maxHeight)
{
	try
	{
		var ratio = maxWidth / maxHeight;
	 
		if(image.width>image.height*ratio)
		{
			image.width=maxWidth;
		}
		else
		{
			image.height=maxHeight;
		}
    }
    catch(err)
    {
		//alert(err.description);
    }
}

//adds a function to page load
//not currently used anywhere (update this comment if used)
function addLoadEvent(func) 
{
  var oldonload = window.onload;
  if (typeof window.onload != 'function') 
  {
    window.onload = func;
  } 
  else 
  {
    window.onload = function() 
    {
      if (oldonload) 
      {
        oldonload();
      }
      func();
    }
  }
}






