
function uclock()
{
var thetime=new Date();

var nhours=thetime.getHours();
var nmins=thetime.getMinutes();
var nsecn=thetime.getSeconds();
var nday=thetime.getDay();
var nmonth=thetime.getMonth();
armonth = new Array("New Year","January ","February ","March ","April ","May ","June ","July ","August ","September ", "October ","November ","December ")
ardate = new Array("0th","1st","2nd","3rd","4th","5th","6th","7th","8th","9th","10th","11th","12th","13th","14th",
"15th","16th","17th","18th","19th","20th","21st","22nd","23rd","24th","25th","26th","27th","28th","29th","30th","31st");
var ntoday=thetime.getDate();
var nyear=thetime.getYear();
var AorP=" ";

if (nhours>=12)
    AorP="pm";
else
    AorP="am";

if (nhours>=13)
    nhours-=12;

if (nhours==0)
   nhours=12;

if (nsecn<10)
 nsecn="0"+nsecn;

if (nmins<10)
 nmins="0"+nmins;

nmonth+=1;

if (nyear<=99)
  nyear= "19"+nyear;

if ((nyear>99) && (nyear<2000))
 nyear+=1900;
fetch('localtime').innerHTML=armonth[nmonth]+" "+ardate[ntoday]+" "+nyear+", "+nhours+":"+nmins+AorP;

setTimeout('uclock()',1000);
} 

function fetch(id)
{
return document.getElementById(id)
}
function fast_on(id)
{
fetch(id).style.display = 'block';
fetch(id).style.visibility = 'visible';
}

function fast_off(id)
{
fetch(id).style.display = 'none';
fetch(id).style.visibility = 'hidden';
}


function AJAXfile(file, element, lo) {
//scripted for concept4 networks
//show the loading element
if(lo){
document.getElementById(lo).style.display = 'block';
document.getElementById(lo).style.visibility = 'visible';
}
//check to see if the browser can create an AJAX instance
      if (window.XMLHttpRequest) {
         ajax_req = new XMLHttpRequest();
         if (ajax_req.overrideMimeType) {
            ajax_req.overrideMimeType('text/xml');
         }
      } else if (window.ActiveXObject) { 
         try {
            ajax_req = new ActiveXObject("Msxml2.XMLHTTP");
         } catch (e) {
            try {
               ajax_req = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
         }
      }

//open the file
ajax_req.open("GET",file,true);

ajax_req.onreadystatechange=function() {

//ready state 4 means the file is fully loaded
  if (ajax_req.readyState==4) {

//hide the loading element
if(lo){
document.getElementById(lo).style.display = 'none';
document.getElementById(lo).style.visibility = 'hidden';
}

//lets get the file contents into a variable
var result = ajax_req.responseText;

//push the result into the html element specified when calling this function
document.getElementById(element).innerHTML = result;


  }
 }
//finish up
ajax_req.send(null)
}
