function redirectOnChange(page, combobox)
{
	selectedIndex = combobox.selectedIndex;
	if (combobox.options[selectedIndex].value != -1)
		window.location = page + combobox.options[selectedIndex].value;
}

function refreshOnChange(form, destination)
{
  if (navigator.appName == 'Netscape' || document.all)
  {
    form.action = destination;
    form.submit();
  }
}

function setAction(form, destination)
{
  if (navigator.appName == 'Netscape' || document.all)
    form.action = destination;
}

function setField(form, fieldname, fieldvalue)
{
	form.elements[fieldname].value = fieldvalue;
}

function viewFullSize(imageSrc)
{
  redirectURL = 'popup.php?src=' + imageSrc;
  myWin = window.open(redirectURL, '','toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0,status=0,width=170,height=100');
}

function resize(img)
{
  window.resizeTo(img.width + 10,img.height + 29);
  document.getElementById('loading').style.visibility = 'hidden';
}

function imageNotFound(errorImg)
{
  document.getElementById('loading').style.visibility = 'visible';
  document.getElementById('imgLoading').src = errorImg;
}
