// JavaScript Document

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

// get date

var var1;

function makeArray(n){
  this.length = n;
  for (i=1;i<=n;i++){
    this[i]=0;
  }
  return this;
}

function displayDate() {
	var this_month = new makeArray(12);
    this_month[0]  = "January";
    this_month[1]  = "February";
    this_month[2]  = "March";
    this_month[3]  = "April";
    this_month[4]  = "May";
    this_month[5]  = "June";
    this_month[6]  = "July";
    this_month[7]  = "August";
    this_month[8]  = "September";
    this_month[9]  = "October";
    this_month[10] = "November";
    this_month[11] = "December";
	var today = new Date();
	var day   = today.getDate();
	var month = today.getMonth();
	var year  = today.getYear();
	if (year< 1900) {
		year += 1900;
	}
  return(this_month[month]+" "+day+", "+year);
}

function displayTDate() {
	var this_month = new makeArray(12);
    this_month[0]  = "มกราคม";
    this_month[1]  = "กุมภาพันธ์";
    this_month[2]  = "มีนาคม";
    this_month[3]  = "เมษายน";
    this_month[4]  = "พฤษภาคม";
    this_month[5]  = "มิถุนายน";
    this_month[6]  = "กรกฎาคม";
    this_month[7]  = "สิงหาคม";
    this_month[8]  = "กันยายน";
    this_month[9]  = "ตุลาคม";
    this_month[10] = "พฤศจิกายน";
    this_month[11] = "ธันวาคม";
	var today = new Date();
	var day   = today.getDate();
	var month = today.getMonth();
	var year  = today.getYear();
	if (year< 1900) {
		year += 2443;
	}
  return(day+" "+this_month[month]+" "+year);
}

// end get date
