// Various date formats - FyneWeb-Design October 2009 //

var theSuffix = "th",  theWeek = 1, theDate = new Date(), ampm="", ampmhour="";
var NowTime = "", NowDay = "", NowDate = "", ShortDate = "", UpDate = "";

	thehours = theDate.getHours();
	ampmhour  =  (thehours > 12) ? thehours - 12 : thehours;
	ampm =  (thehours >= 12) ? 'pm' : 'am';
	thetime = theDate.getMinutes();
	theminutes =  ((thetime < 10) ? ':0' : ':') + thetime;
NowTime = (ampmhour + theminutes + ampm + " ");

	theDay = theDate.getDay();
	theNum = theDate.getDate();
	theMonth = theDate.getMonth();
	theYear = theDate.getFullYear();

var Days = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
// var Days = new Array("Sun","Mon","Tues","Wed","Thurs","Frid","Sat")
NowDay = (Days[theDay] + " ");

var Months = new Array("January","February","March","April","May","June","July","August","September","October","November","December")
// var Months = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
	if (theNum == '1' || theNum == '21' || theNum == '31') var theSuffix = 'st'
	else if (theNum == '2' || theNum == '22')  var theSuffix = 'nd'
	else if (theNum == '3' || theNum == '23')  var theSuffix = 'rd'
	if (theNum > 15) var theWeek = 0

NowDate = (theNum +  theSuffix +  " " + Months[theMonth] + " " + theYear);
ShortDate =  (theNum +  "/" + (theMonth + 1) + "/" + theYear);
TimeDate = (NowTime + " " + NowDay + " " + NowDate)
UpDate= (Months[theMonth - theWeek]) + " " + (theYear)

// The Client
document.oncontextmenu=new Function("return false")
document.write("<link rel='stylesheet' type='text/css' href='fyne-style.css'>");
var tele = "Tele: +44 (0) 1546 810265";
var email = "<a class='fyneweb' href='mailto:info&#64;bruachan-fieldsports.com?subject=Bruachan-Fieldsports Web site enquiry'>info&#64;bruachan-fieldsports.com</a>";
var footer = "E-mail us at <a class='fyneweb' href='mailto:info&#64;bruachan-fieldsports.com?subject=Bruachan-Fieldsports Web site enquiry'>info&#64;bruachan-fieldsports.com</a> &#169; " + theYear + ". Bruachan Fieldsports.";
