msgArray = new Array(
  '',
  'Click to enlarge photo in snapshot viewer',
  'Click to enlarge photo in slide show viewer',
  'Select a photo viewer');

function statusMessage(msg)  {
// if msg is numeric and in range display the standard message
// from msgArray. If out of range display standard message [0],
// which is null. If msg is not numeric display msg.
  if (numeric(msg))  {
    if (msg > 0 && msg < msgArray.length)  {
      window.status = msgArray[msg];
    }
    else  {
      window.status = msgArray[0];
    }
  }
  else {
    window.status = msg;
  }
  return true;
}
