/* ====================================================
General Site variables script
==================================================== */

pagelink		= document.location
pagename		= document.title
sitetitle		= 'Hillocks Barn'
siteurl		= 'http://www.hillocksbarn.co.uk'
developer		= 'Peaknet LTD'
developerurl 	= 'http://www.peaknet.co.uk'
today		= new Date
today_time	= today.getHours()
defaultStatus	= siteurl
software		= navigator.appName
version		= parseInt(navigator.appVersion);
cpu		      	= navigator.platform


/* ====================================================
Detect for correct browser to determine CSS file
==================================================== */

if	     (document.layers)		                  		{ browser="n4"; }
else if  (document.all)		 			                    { browser="ie"; }
else if  (!document.all && document.getElementById)	{ browser="n6"; }

if	     (browser == "n4") { document.write('<LINK REL="STYLESHEET" HREF="netscape.css">');	}
else                       { document.write('<LINK REL="STYLESHEET" HREF="hillocksbarn.css">');	}


/* ====================================================
Previous Page
==================================================== */

function previous() { history.go(-1); }

/* ====================================================
Left menu rollover script
==================================================== */

function menuON(slot)	{ slot.className='menuslotON';	}
function menuOFF(slot)	{ slot.className='menuslot';	}
function mainmenuON(slot)	{ slot.className='mainmenuslotON'; }
function mainmenuOFF(slot)	{ slot.className='mainmenuslot'; }

/* ====================================================
HI-lite for form fields
==================================================== */

function hi(field)	{ field.className = 'formboxHI'; 	}
function lo(field)	{ field.className = 'formbox';		}

/* ====================================================
HI-lite for form fields
==================================================== */

function hismall(field)	{ field.className = 'formboxsmallHI'; 	}
function losmall(field)	{ field.className = 'formboxsmall';		}


/* ====================================================
Print Page
==================================================== */

function printpage()
{
	if(document.layers)
	{
		alert("Click on the printer icon, on the frame you wish to print");
	}
	else	// not navigator
	{
		parent.focus();
		parent.print();
	}
}

/* ====================================================
Calendar
==================================================== */

	 function popCalendar(txtID){
		 var txtObj=document.getElementById(txtID);
		 var popWinURL='http://wwww.hillocksbarn.co.uk/calendar.htm';
		 var popWinX=200;
		 var popWinY=180;
		 var calendarWin=window.open(popWinURL+'?'+txtObj.id+'&'+txtObj.value,'calendarWin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=yes,width='+popWinX+',height='+popWinY);
		 calendarWin.focus();
	 }



/* ====================================================
Print Today's DATE function - Y2K + Netscape friendly
==================================================== */

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 time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();
if (year < 2000)
year = year + 1900;

function year() { document.write(year); }


/* =========================================================================================================================
End of file
========================================================================================================================= */
