
// Returns month name from numerical representation
function getMonthName(i)
{
  var theMonths = new Array('January','February','March','April','May','June','July','August','September','October','November','December') ;
  return theMonths[i] ;
}

// Returns day name from numerical representation
function getDayName(i)
{
  var theDays   = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday') ;
  return theDays[i] ;
}

// Returns current date in Day, Month Day of Month, Year format (ie: Monday, January 13, 2003)
function getCurrentDate()
{

  var thisDate = new Date() ;

  var curYear  = thisDate.getFullYear() ;
  var curMonth = getMonthName(thisDate.getMonth()) ;
  var curDate  = thisDate.getDate() ;
  var curDay   = getDayName(thisDate.getDay()) ;

  var dateNow = curDay + " " + curMonth + " " + curDate + ", " + curYear ;

  return dateNow  ;
}

// Opens window for viewing images.
function imageViewer(imageName, description)
{
  var url = "<IMG SRC='" + imageName + "' STYLE='BORDER: 1px SOLID #1C326B'>" ;
  var imageWindow ;
  imageWindow = window.open("","","resizeable,statusbar,scrollbars=1,height=600,width=600,left=0,top=0,screenX=0,screenY=0") ;

  var windowBody ;
  windowBody =  "<HTML>\n" ;
  windowBody += "<HEAD>\n" ;
  windowBody += "<TITLE>Blue Sky Dogs - " + description + "</TITLE>\n" ;
  windowBody += "<LINK REL='STYLESHEET' TYPE='text/css' HREF='scripts/globalstyle.css'>" ;
  windowBody += "</HEAD>\n" ;
  windowBody += "<BODY>\n" ;
  windowBody += "<TABLE ALIGN='CENTER' HEIGHT='50%' CLASS='BODY_BOLD'>\n" ;
  windowBody += "<TR><TD ALIGN='CENTER'>" + description + "<BR><BR>" + url + "</TD></TR></TABLE>";
  windowBody += "<P ALIGN='CENTER' CLASS='BODY'><A HREF='javascript:window.close()'>Close This Window</A></P></BODY></HEAD>" ;
  imageWindow.document.write(windowBody) ;
}

// Changes status message.
function changeStatus(msg)
{
  window.status=msg ;
}