//'---------------------------------------------------------------------
//' this section executes every time 
//. put common function variables here
//'
var months=new Array(13);
months[1]="January";
months[2]="February";
months[3]="March";
months[4]="April";
months[5]="May";
months[6]="June";
months[7]="July";
months[8]="August";
months[9]="September";
months[10]="October";
months[11]="November";
months[12]="December";
var dayname = new Array("Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun");
var daysInMonth = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
var today = new Date();	
//.----------------------------------------------------------------------

//'----------------------------------------------------------------------
function mdsDate() {
var lmonth = months[today.getMonth() + 1];
var date = today.getDate();
var year = today.getYear();
var mdate = lmonth + " " + date + "," + year;
document.write(mdate);
}
//.---------------------------------------------------------------------
function mdsTime() {
var hours = today.getHours();
var minutes = today.getMinutes();
var seconds = today.getSeconds();
var amOrPm = "AM";
if (hours > 11) amOrPm = "PM";
if (hours > 12) hours = hours - 12;
if (hours == 0) hours = 12;
if (minutes <= 9) minutes = "0" + minutes;
if (seconds <= 9) seconds = "0" + seconds;
var mtime = hours + ":" + minutes + ":" + seconds + " " + amOrPm;
document.write(mtime);
}
//' ----------------------------------------------------------------------
function mdsDay() {
document.write(dayname[today.getDay() + 1]);
}
//'-----------------------------------------------------------------------------
function dblimage() {
  var imgOriginSrc;
  var imgTemp = new Array();
  var imgarr = document.getElementsByTagName('img');
  for (var i = 0; i < imgarr.length; i++) {
    if (imgarr[i].getAttribute('hsrc')) {
        imgTemp[i] = new Image();
        imgTemp[i].src = imgarr[i].getAttribute('hsrc');
        imgarr[i].onmouseover = function() {
            imgOriginSrc = this.getAttribute('src');
            this.setAttribute('src',this.getAttribute('hsrc'))
        }
        imgarr[i].onmouseout = function() {
            this.setAttribute('src',imgOriginSrc)
        }
    }
  }
}
onload=dblimage;

//'
function hidedoc() { if
(this.document.all.hidedoc.style.display=="none")
(this.document.all.hidedoc.style.display="block") ;
else (this.document.all.hidedoc.style.display="none") ; 
}
//'
//' ------------------------------------------------------------------
//. displays a 1 line of time  HH:MM:SS Am/Pm
//' put into BODY tag
//' <body onLoad="clock()">
//' Adjust the placement of the clock in the line below 
//' <span id="pendule" style="position:absolute;left:475;top:5;"></span>

function clock() {
var digital = new Date();
var hours = digital.getHours();
var minutes = digital.getMinutes();
var seconds = digital.getSeconds();
var amOrPm = "AM";
if (hours > 11) amOrPm = "PM";
if (hours > 12) hours = hours - 12;
if (hours == 0) hours = 12;
if (minutes <= 9) minutes = "0" + minutes;
if (seconds <= 9) seconds = "0" + seconds;
dispTime = hours + ":" + minutes + ":" + seconds + " " + amOrPm;
if (document.layers) {
document.layers.pendule.document.write(dispTime);
document.layers.pendule.document.close();
}
else
if (document.all)
pendule.innerHTML = dispTime;
setTimeout("clock()", 1000);
}
