<!--
var artsURL = '<a href=\"http://www.wingfield-arts.co.uk/wingfield.htm\"'
var barnsURL = '<a href=\"http://www.wingfieldbarns.com\"'
var collegeURL = '<a href=\"http://www.wingfieldcollege.com\"'
var pubURL = '<a href=\"http://www.gastropubslimited.co.uk \"'
var SwingletreeURL = '<a href=\"http://www.swingletree.co.uk\"'
var WingURL = '<a href=\"http://www.wingfield-suffolk.org.uk\"'

// check browser version

var isChrome = (navigator.userAgent.indexOf('Chrome') >= 0)? true : false;
var isSafari = (navigator.userAgent.indexOf('Safari') >= 0)? true : false;

var isIE  = (document.all && !isOpera)? true : false;
var isIE5  = ((navigator.appName == "Microsoft Internet Explorer") && (navigator.appVersion.search(/MSIE 5./i) != -1))? true : false;
var isIE6plus = ((navigator.appName == "Microsoft Internet Explorer") && ((navigator.appVersion.search(/MSIE 6./i) != -1) || (navigator.appVersion.search(/MSIE 7./i) != -1) || (navigator.appVersion.search(/MSIE 8./i) != -1)))? true : false;

var isFirefox = ((navigator.userAgent.indexOf('Firefox') >= 0) && (navigator.userAgent.search(/2./i) != -1))? true : false;

var isNC    = (document.layers) ? 1 : 0;
var isNS6 = ((navigator.appName == "Netscape") && (navigator.userAgent.search(/Netscape6\/6./i) != -1))? true : false;
var isNS9 = ((navigator.appName == "Netscape") && (navigator.userAgent.search(/Navigator\/9./i) != -1))? true : false;

var isOpera = (navigator.userAgent.indexOf('Opera') >= 0)? true : false;

var isDOM   = (document.getElementById && !isIE && !isOpera)? true : false;

var isGEBId   = (document.getElementById)? true : false;

// alert(navigator.appVersion)
// alert(isSafari)
<!-- if no cookie, write one and set lang to 1 //-->
storeMasterCookie();
if (!Get_Cookie('Language')) storeIntelligentCookie('Language','1','/');
lang = Get_Cookie('Language')
<!-- ****************************************************************************************************************** //-->



<!-- ****************************************************************************************************************** //-->

<!-- clock script for //-->

function getthedate(){
	var today=new Date()
	var year=today.getYear()
	if (year < 1000) year+=1900
	var day=today.getDay()
	var month=today.getMonth()
	daym=today.getDate()
	var hours=today.getHours()
	var minutes=today.getMinutes()
	var seconds=today.getSeconds()
		var greeting
		if (hours<=11) greeting = am[lang]
		if (hours>=12) greeting = pm[lang]
		if (hours>=18) greeting = ev[lang]
		greeting += " "
//		if ((day==0)&&(lang==4)) greeting += (on[lang] + "a ")
//		if ((day>=1)&&(lang==4)) greeting += (on[lang] + "o ")
//		if (lang!=4) greeting += (on[lang] + " ")
		if ((lang==1)) dateOrd="<sup>th</sup>"
		if (((daym==1)||(daym==21)||(daym==31))&&(lang==1)) dateOrd="<sup>st</sup>"
		if (((daym==2)||(daym==22))&&(lang==1)) dateOrd="<sup>nd</sup>"
		if (((daym==3)||(daym==23))&&(lang==1)) dateOrd="<sup>rd</sup>"
		if ((daym==1)&&(lang==2)) dateOrd="<sup>er</sup>"
		if ((daym>=2)&&(lang==2)) dateOrd="<sup>&egrave;me</sup>"
		if ((lang==3)) dateOrd="."
		if ((lang==4)) dateOrd=""
		if ((lang==5)) dateOrd=""
		var defArt=new Array("", "the", "le", "der", "il", "el")
		if (hours<=9) hours="0"+hours
		if (minutes<=9) minutes="0"+minutes
		if (seconds<=9) seconds="0"+seconds
  //change font size here
	var gting=greeting+" "+oddsNends[lang][1]+" "+welcom[lang]
	var gdate=dotw[lang][day]+" "+defArt[lang]+" "+daym+dateOrd+" "+moty[lang][month]+", "+year
	var cdate=hours+":"+minutes+":"+seconds
	if (isIE5||isIE6plus||isOpera||isFirefox||isChrome||isSafari||isNS6||isNS9) {
	  <!-- NS6+ //-->
	  document.getElementById("greet").innerHTML=gting
	  document.getElementById("dmyhms").innerHTML=gdate+"&nbsp;&nbsp;&nbsp;["+cdate+"]"
//	  document.getElementById("clock").innerHTML=cdate
	}
	else if (document.all) {
  	  <!-- IE4+ //-->
	  document.all.greet.innerHTML=gdate
	  document.all.clock.innerHTML=cdate
//	  document.all.dmyhms.innerHTML=cdate
	}
	else if (document.layers) {
	  <!-- NS4.6+ //-->
	  document.layers("greet").innerHTML=gdate
	  document.layers("clock").innerHTML=cdate
	}
	else {
	  document.write(gdate)
	  document.write(cdate)
	}
}

if (!document.all&&!document.getElementById) getthedate()

function BannerUpdate(){
	if (document.all||document.getElementById) setInterval("getthedate()",1000)
//	if (document.all||document.getElementById) getthedate()
}

<!-- end clock script for IE4+ and NS6+ //-->

<!-- ****************************************************************************************************************** //-->

<!--  start cookies //-->

function Get_Cookie(name) {
    var start = document.cookie.indexOf(name+"=");
    var len = start+name.length+1;
    if ((!start) && (name != document.cookie.substring(0,name.length))) return null;
    if (start == -1) return null;
    var end = document.cookie.indexOf(";",len);
    if (end == -1) end = document.cookie.length;
    return unescape(document.cookie.substring(len,end));
}

function Set_Cookie(name,value,expires,path,domain,secure) {
    document.cookie = name + "=" +escape(value) +
        ( (expires) ? ";expires=" + expires.toGMTString() : "") +
        ( (path) ? ";path=" + path : "") + 
        ( (domain) ? ";domain=" + domain : "") +
        ( (secure) ? ";secure" : "");
}

function Delete_Cookie(name,path,domain) {
    if (Get_Cookie(name)) document.cookie = name + "=" +
       ( (path) ? ";path=" + path : "") +
       ( (domain) ? ";domain=" + domain : "") +
       ";expires=Thu, 01-Jan-70 00:00:01 GMT";
}

var today = new Date();
var zero_date = new Date(0,0,0);
today.setTime(today.getTime() - zero_date.getTime());

var todays_date = new Date(today.getYear(),today.getMonth(),today.getDate(),0,0,0);
var expires_date = new Date(todays_date.getTime() + (8 * 7 * 86400000));

function storeMasterCookie() {
    if (!Get_Cookie('MasterCookie'))
        Set_Cookie('MasterCookie','MasterCookie');
}

function storeIntelligentCookie(name,value,path) {
    if (Get_Cookie('MasterCookie')) {
        var IntelligentCookie = Get_Cookie(name);
        if ((!IntelligentCookie) || (IntelligentCookie != value)) {
            Set_Cookie(name,value,expires_date,path);
            var IntelligentCookie = Get_Cookie(name);
            if ((!IntelligentCookie) || (IntelligentCookie != value)) {
                Delete_Cookie('MasterCookie');
            }
        }
    }
}

<!-- end Cookies //-->

<!-- set Cookie language variable -->

function setLang(L){

	if (isIE5||isIE6plus||isOpera) storeIntelligentCookie('Language',L,'/');
	if (isFirefox||isChrome||isSafari||isNS6||isNS9){
		function setCookie(name, value, expires) { 
		document.cookie = name + "=" + escape(value) + "; path=/" + ((expires == null) ? "" : "; expires=" + expires.toGMTString()); 
		} 
	var exp = new Date();     //set new date object 
	exp.setTime(exp.getTime() + (1000 * 60 * 60 * 24 * 30));     //set it 30 days ahead 
setCookie('Language',L, exp)
	}
}
<!-- end set Cookie language variable //-->

<!-- ****************************************************************************************************************** //-->

<!-- load default images //-->

function loadDefaultImages() {
  var I_imagesURLs = new Array("welcome.gif", "Aerial.jpg", "UKF.gif", "FRANCEF.gif", "GERMANYF.gif", "SPAINF.gif", "ITALYF.gif", "Castle.jpg", "Church2.jpg", "College2.jpg", "DeLaPole-pub.jpg", "St Andrews.jpg", "Swingletree.jpg")
  var I_images = new Array(I_imagesURLs.length)

  	for (var i=0; i<I_imagesURLs.length; i++) {
		I_images[i] = new Image();
		I_images[i].src = 'Images/' + I_imagesURLs[i];
	}
}

<!-- end load default images //-->

<!-- ****************************************************************************************************************** //-->

<!-- attempt to disable right click in IE and NS (IE displays an alert) //-->
function noRightClick(e) {
  if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)){
    return false;
  }
  else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) {
    alert('The images are the property of Glenadair' + '\n' + 'Les images sont la propriété de Glenadair' + '\n' + 'Die Bilder sind Eigentum von Glenadair' + '\n' + 'Las imágenes son propiedad de Glenadair' + '\n' + 'Le immagini sono proprietà di Glenadair');
    return false;
  }
return true;
}

<!-- end attempt to disable right click in IE and NS //-->

<!-- ****************************************************************************************************************** //-->

<!-- insert last update //-->

function insertlastUpdate() {
//  var dateObj = new Date(document.lastModified)
//  var date = dateObj.getDate()
//  var fyear = dateObj.getYear()
//  var dayNo = dateObj.getDay()
// if (fyear < 2000) {fyear = fyear + 1900}
//  var wday = dotw[lang][dateObj.getDay()]
//  var wday = dotw[lang][dayNo]
//  var lmonth = moty[lang][dateObj.getMonth()]
//  var lastModhtml = uDated[lang] + ':&nbsp;&nbsp;&nbsp;';
//  lastModhtml += wday + '&nbsp;' + date + '&nbsp;' + lmonth + ',&nbsp;' + fyear;

  var dateToday=new Date()
  var dayNo =dateToday.getDay()
  var day =dateToday.getDate()
  var mnth =moty[lang][dateToday.getMonth()]
  var currYear = dateToday.getYear()
 if (currYear < 2000) {currYear = currYear + 1900}
  var wkDay = dotw[lang][dayNo]
  var lastModhtml = uDated[lang] + ':&nbsp;&nbsp;&nbsp;';

  lastModhtml += wkDay + '&nbsp;' + day + '&nbsp;' + mnth + ',&nbsp;' + currYear;


	if (document.all) {
	<!-- IE4+ //-->
	document.all.lastMod.innerHTML=lastModhtml;
	}
	else if (document.getElementById) {
	<!-- IE6+ and NS6+ //-->
 if(isNS6) {alert("Please press OK to continue")}
	document.getElementById("lastMod").innerHTML = lastModhtml;
	}
	else {
	document.write(lastModhtml);
	}
}

<!-- end insert last update //-->

<!-- ****************************************************************************************************************** //-->

function ShowPicture (width,height,pic,picWidth,picHeight,pageTitle,picAlt) { 

var htmlTxt = '<html><head><title>' + pageTitle + '</title></head>'
htmlTxt += '<body><div align=center><table border=0 align=center valign=top style="font-family: Arial; font-size: 10pt;" cellpadding=0 cellspacing=0><tr>'
htmlTxt += '<td align=center><img border=0 src="' + pic + '" alt="' + picAlt + '" width=' + picWidth + ' height=' + picHeight + '></td>'
htmlTxt += '</tr><tr>'
htmlTxt += '<td>&nbsp;</td>'
htmlTxt += '</tr><tr>'
htmlTxt += '<td align=center><a href="javascript:window.close();">Close Window</a></td>'
htmlTxt += '</tr></table></div></body>'


	{newwindow = window.open("", "NewWin" ,"resizable=no,width=" + width + ",height=" + height + ",top=30,left=40,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no");}

	newwindow.document.write(htmlTxt);
	newwindow.focus();	
}

<!-- ****************************************************************************************************************** //-->

<!-- play/stop sounds //-->

var flag = false;

function autoPlaySound(soundFile, soundobj) {
	if (isIE||isIE5||isIE6plus){

		if (flag == true){
			flag = false;
			document.getElementById("playStopBells").value="Play";
			var theSound=document.getElementById(soundobj);
			theSound.stop();
		}
		else if (flag == false){
			flag = true;
			document.getElementById("playStopBells").value="Stop";
			var theSound=document.getElementById(soundobj);
			theSound.play();
		}
	}
	else{
		alert(msg3[lang])
	}
}

<!-- ****************************************************************************************************************** //-->

<!-- insert common page head //-->

function insertCommonHeadSection () {
<!-- if no cookie, write one and set lang to 1 -->
  storeMasterCookie();
  if (!Get_Cookie('Language')) storeIntelligentCookie('Language','1','/');

<!-- script to prevent this page being opened in a frame -->
  if (window != top) top.location.href = location.href;

  document.onmousedown=noRightClick

}

<!-- end insert common page head //-->

<!-- *********************************************************************************************************************************************************** //-->

<!-- start of common body pagebuilder function //-->

function insertCommonBodySections () {
// document.write('<script language="javascript">window.onload=BannerUpdate</script>')
document.write('<script language="javascript">BannerUpdate()</script>')

<!-- Outer Container Div -->
document.write('<div id="containerDiv" style="position: absolute; left: 0; top: 0; width: 900; height: 600;";>')

<!-- Outer container Table -->
document.write('<table id="containerTable" border="0" cellSpacing="0" cellPadding="0" width="900px" height="600px" align="left" valign="top"')
document.write('<TR><TD>')

<!-- Table 1 -->
document.write('<table id="tble1" class="table1" border=0" cellSpacing="0" cellPadding="0" width="100%" height="120px" align="center" valign="top">')
document.write('<TR>')
document.write('<TD class="Hdgs" height=45px width=70% align=center valign=bottom style="padding-top:0px;padding-bottom:3px"><b><span id="greet"><!-- Greeting --></span></b></td>')
document.write('<TD class="Hdgs" width=30% align=center valign=middle>&nbsp;</td>')
document.write('</tr><tr>')
document.write('<TD class="Hdgs" height=30px align=center>&nbsp;<span id="subHeading">' + subHeadg[lang] + '</span></td>')
document.write('<TD class="lastMod" align=right style="padding-left:0px; padding-right:5px"><i><span id="lastMod"><!-- insertlastUpdated() --></span></i></td>')
insertlastUpdate()
document.write('</tr><tr>')
document.write('<td class="dmyhms" align=left height=45px valign=bottom style="padding-left:10px;padding-bottom:5px"><span id="dmyhms"><!-- date and time --></span></td>')
document.write('<td align=right valign=center style="padding-left:0px;padding-right:10px">')
insertLangFlags ()
document.write('</td></tr>')

<!-- close Table 1 -->
document.write('</table>')

<!-- Table 2 -->
<!-- It's important that you position the menu over a background, like a table/image -->

document.write('<table id="mBar" class="mBarTable" border="0" cellpadding="0" cellspacing="0" width=100% height="31">')
document.write('<tr><td id="mBarTop" class="mBarTop" height="3px"> </td></tr>')
document.write('<tr><td id="mBarTd" class="mBarTd" height="28px">&nbsp;</td></tr>')
document.write('</table>')
}
<!-- close Table 2 -->

<!-- end of common body pagebuilder function //-->


<!-- language flags -->
function insertLangFlags () {
  document.write('<tcols=5><table border=0 cellSpacing="0" cellPadding="0"><tr>')
  document.write('<TD valign=center align=left class="td_flags"><A HREF="", onclick="changeLang\(1,1\);return false", onmouseover="window.status=\'English   version\';return true", onmouseout="window.status=\'\';return true"><img src="Images/UKF.gif" width=30 height=20 ALT="Site in English" BORDER=1></A></TD>')
  document.write('<td class="td_flags">&nbsp;&nbsp;</td>')
  document.write('<TD valign=center align=left class="td_flags"><A HREF="", onclick="changeLang\(2,1\);return false", onmouseover="window.status=\'version   fran&ccedil;aise\';return true", onmouseout="window.status=\'\';return true"><img src="Images/FRANCEF.gif" width=30 height=20 ALT="Site en fran&ccedil;ais" BORDER=1></A></TD>')
  document.write('<td class="td_flags">&nbsp;&nbsp;</td>')
  document.write('<TD valign=center align=left class="td_flags"><A HREF="", onclick="changeLang\(3,1\);return false", onmouseover="window.status=\'Deutschversion\';return true", onmouseout="window.status=\'\';return true"><img src="Images/GERMANYF.gif" width=30 height=20 ALT="Platz auf Deutsch" BORDER=1></A></TD>')
  document.write('<td class="td_flags">&nbsp;&nbsp;</td>')
  document.write('<TD valign=center align=left class="td_flags"><A HREF="", onclick="changeLang\(5,1\);return false", onmouseover="window.status=\'versi&oacute;n espa&ntilde;ola\';return true", onmouseout="window.status=\'\';return true"><img src="Images/SPAINF.gif" width=30 height=20 ALT="Sitio en espa&ntilde;ol" BORDER=1></A></TD>')
  document.write('<td class="td_flags">&nbsp;&nbsp;</td>')
  document.write('<TD valign=center align=left class="td_flags"><A HREF="", onclick="changeLang\(4,1\);return false", onmouseover="window.status=\'versione italiana\';return true", onmouseout="window.status=\'\';return true"><img src="Images/ITALYF.gif" width=30 height=20 ALT="Sito in italiano" BORDER=1></A></TD>')
  document.write('</td></tr></table>')
}

<!-- end body pagebuilder //-->

-->
