// Website updated v1.25d June 2009 SC in house for Kyle Smart Associates Limited
// Website copyright year updates all pages if javascript switched off the page displays a blank

function copyrightyear() {
copyyearvalue=2008					// change this figure only if you have revised this document and the
								// year is different from that shown otherwise this will be
								// automatically checked and updated by the script below
var currentyear = new Date();				// sets variable
var currentyear = currentyear.getFullYear();	// gets the current date from the browser
								// then checks the known copyyearvalue date against currentyear date
								// and updates the value of the copyright year if required
if (currentyear>=copyyearvalue) {		
copyyearvalue=currentyear			
}
document.write(' - '+copyyearvalue);	// writes the value to the browser window
}

// Website version number updates all pages if javascript switched off the page displays a blank

function version() {
vervalue="1.25d"
document.write('Version '+vervalue);
}

// Bookmark or add to favorites only works in Internet Explorer and Mozilla Firefox, function not supported in Apple Safari

function addtofavoritesorbookmark(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}

// This bit controls the email to hide from robots

function safemail(classcode, name, domain, display) {
excode1="class='"
excode2="'title='Click here to contact us via email'"
excode3="?subject=Enquiry From Website"

displayed=(typeof(display)=="undefined") ? name+"@"+domain : display // if the term display doesn't exist on the link within the body then it displays the email address instead
document.write('<a href=mailto:' + name + '@' + domain + excode3 + ' '+ excode1 + classcode + excode2 + '>' + displayed + '</a>');
}