function gochk()
{
	if(document.frmpictures.gradyearfrm.value =="")
	{
      msg = "<br><font class='ErrorMsg'>";
      msg += "Please a graduation year.</font>";
      showErrMsg(msg); 
	  return false;
	}
}

function fixImgs(whichId, maxW) 
{
  var pix=document.getElementById(whichId).getElementsByTagName('img');

  for (i=0; i<pix.length; i++) 
  {
    w=pix[i].width;
    h=pix[i].height;

    if (w > maxW) 
    {
      f=1-((w - maxW) / w);	        
      pix[i].width=w * f;
      pix[i].height=h * f;
    }
  }

  fixheight(whichId); 
}

function fixheight(whichId)
{
  var pix=document.getElementById(whichId).getElementsByTagName('img');
		
  for (i=0; i<pix.length; i++) 
  {
    pix[i].height = pix[0].height;
  }
}

function view_profile(id)
{
  document.viewprofile.profile_id.value=id;
  document.viewprofile.submit();
}

function view_by_year(year_grad)
{
  document.frmPicturesYear.gradyearfrm.value=year_grad;
  document.frmPicturesYear.gradyearto.value=year_grad;
  document.frmPicturesYear.submit();
}