function writeDate() {
  todaysDate = new Date()
  days = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
  thisDay = days[todaysDate.getDay()]
  thisDate = todaysDate.getDate()
  ending = "th"
  if(thisDate==1 || thisDate==21 || thisDate==31) ending = "st"
  if(thisDate==2 || thisDate==22) ending = "nd"
  if(thisDate==3 || thisDate==23) ending = "rd"
  months = new   Array("January","February","March","April","May","June","July","August","September","October","November","December")
  thisMonth = months[todaysDate.getMonth()]
  thisYear = todaysDate.getFullYear()
  document.writeln(thisDay+" "+thisDate+ending+" "+thisMonth+", "+thisYear+"<br>")
}

preload_array = new Array('but_home_f2.gif', 'but_artists_f2.gif', 'but_exhibition_f2.gif', 'but_contact_f2.gif', 'but_enter_ex_f2.gif', 'but_next_f2.gif', 'but_prev_f2.gif', 'but_index_f2.gif')

out_array = new Array('but_home', 'but_artists', 'but_exhibition', 'but_contact', 'but_enter_ex', 'but_next', 'but_prev', 'but_index')


var t2 = 0

function preload()
{
  im = new Array()
  for (n=0; n<preload_array.length; n++)
  {
    im[n] = new Image()
    im[n].src = im_path + preload_array[n]
  }
}


function out(mode)
{
  clearTimeout(t2)
  for (n=0; n<out_array.length; n++)
  {
    if (document.images[out_array[n]]) document.images[out_array[n]].src = im_path + out_array[n] + ".gif"
  }
  if (mode == "reshow") show_button()
}

function over(but)
{
  out() //clear all over images first in case being shown by show_button
  document.images[but].src = im_path + but + "_f2.gif"
}


var win1

function newWin(url,w,h) {
if (win1 && win1.open || win1 && !win1.closed){win1.close()}
win1 = window.open(url,"win1","width="+w+",height="+h+",toolbar=no,location=no,menubar=no,status=no,scrollbars=no,resizable=yes")
}
