function addbookmark(url,desc)
{
	var none_ie = 'Sorry, only Internet Explorer supports this method to add a bookmark/favourite\n But please feel free to visit the site\'s home page to add a bookmark manually';
	
	if(!url && !desc)
	{
	var bookmarkurl		= "http://www.apley-park-school.co.uk";
	var bookmarktitle	= "Apley Park and Millichope Boarding Schools";
	}
	else
	{
	var bookmarkurl		= url;
	var bookmarktitle	= desc;
	}
	

if (window.sidebar)	
	{ // Mozilla Firefox Bookmark
		alert('Due to security restrictions placed in Firefox, I am unable to automatically add a bookmark.\nPlease navigate to the home page and press: CTRL+D to add one manually.');
	}
	else if(document.all)
	{ // IE Favourites
		window.external.AddFavorite(bookmarkurl,bookmarktitle);
	}
	else
	{
	alert(none_ie);
	}
}
	
myMsg = "    Please ensure that I have your current email address - Send it via the Contact Form!";
i = 0;	
function scrollMsg()
{
	window.status = myMsg.substring(i,myMsg.length) + myMsg.substring(0,i);
	if (i < myMsg.length)
	{
		i++;
	}
	else
	{
		i = 0;
	}
setTimeout("scrollMsg()",200);
}	

function userInfo()
{
	// sets the variables with the date and time for "now" and "cookie expire date"
	dayName = new Array ("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
	monName = new Array ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");		
	now = new Date;
	expireDate = new Date;
	expireDate.setMonth(expireDate.getMonth()+60);

	// reads back the current "hitCt" and increments it
	hitCt = parseInt(cookieVal("pageHit"));
	hitCt++;
	
	// reads back the current "time and date" the page was visited
	lastVisit = cookieVal("pageVisit");
	if (lastVisit == 0)
	{
		lastVisit = "";
	}

	// writes the current page-hits and time/date value to the cookie
	document.cookie = "pageHit="+hitCt+";expires=" + expireDate.toGMTString();
	document.cookie = "pageVisit="+dayName[now.getDay()] + ", " + monName[now.getMonth()] + " " + now.getDate()+ " " + now.getFullYear()+";expires=" + expireDate.toGMTString();
	
	// read cookie function
	function cookieVal(cookieName)
	{
		thisCookie = document.cookie.split("; ");
		for (i=0; i<thisCookie.length; i++)
		{
			if (cookieName == thisCookie[i].split("=")[0])
			{
			return thisCookie[i].split("=")[1];
			}
		}
		return 0;
	}
}