var cssmenuids=["cssmenu1"] //Enter id(s) of CSS Horizontal UL menus, separated by commas
var csssubmenuoffset=-1 //Offset of submenus from main menu. Default is 0 pixels.

function createcssmenu2(){
for (var i=0; i<cssmenuids.length; i++){
  var ultags=document.getElementById(cssmenuids[i]).getElementsByTagName("ul")
    for (var t=0; t<ultags.length; t++){
			ultags[t].style.top=ultags[t].parentNode.offsetHeight+csssubmenuoffset+"px"
    	var spanref=document.createElement("span")
			spanref.className="arrowdiv"
			spanref.innerHTML="&nbsp;&nbsp;&nbsp;&nbsp;"
			ultags[t].parentNode.getElementsByTagName("a")[0].appendChild(spanref)
    	ultags[t].parentNode.onmouseover=function(){
					this.style.zIndex=100
    	this.getElementsByTagName("ul")[0].style.visibility="visible"
					this.getElementsByTagName("ul")[0].style.zIndex=0
    	}
    	ultags[t].parentNode.onmouseout=function(){
					this.style.zIndex=0
					this.getElementsByTagName("ul")[0].style.visibility="hidden"
					this.getElementsByTagName("ul")[0].style.zIndex=100
    	}
    }
  }
}

if (window.addEventListener)
window.addEventListener("load", createcssmenu2, false)
else if (window.attachEvent)
window.attachEvent("onload", createcssmenu2)

 //Random images on top right
 
 NoOfImagesToRotate = 20;
 FirstPart = '<img src="images/graystonpic';
 LastPart = '.jpg" height="180" width="300">';

function showImage() {

	var r = Math.ceil(Math.random() * NoOfImagesToRotate);
	
	document.write(FirstPart + r + LastPart);
}


if(window.addEventListener){
   window.addEventListener('load',showDate,false);
 }
else { 
if(window.attachEvent){
   window.attachEvent('onload',showDate);
  }
 }
 
  //Date

function showDate() {

   months=['January','February','March','April','May','June','July',
           'August','September','October','November','December'];

   days=['Sunday','Monday','Tuesday','Wednesday',
         'Thursday','Friday','Saturday'];

   now=new Date();
   yy=now.getUTCFullYear();
   mm=now.getUTCMonth();
   dt=now.getDate();
   dd=now.getUTCDay();

   end='th.';
if((dt==1)||(dt==21)||(dt==31)) {
   end='st.';
 }
if((dt==2)||(dt==22)) {
   end='nd.';
 }
if((dt==3)||(dt==23)) {
   end='rd.';
 }
   document.getElementById('day').firstChild.nodeValue=days[dd]+'  '+dt+'  '+months[mm]+'  '+yy;
 }
 