// JavaScript Document
function addbookmark()
{
bookmarkurl="http://www.imagineireland.com"
bookmarktitle="Imagine Ireland Holiday Cottages"
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}
//show / hide for +- dropdown
function change(id, newClass) {
identity=document.getElementById(id);
identity.className=newClass;
}
//--------------
rhrn = new Date();
rhrnt1 = rhrn.getTime();
rhrns1 = rhrn.getSeconds();
rhrnm1 = rhrn.getMinutes();
rhrnh1 = rhrn.getHours();
// this is arbitrary - it just looks like a normal cookie
cookievar1 = "AE87BC5C097ADD230B543BCD8" + rhrnh1 + rhrnm1 + rhrns1;
SetCookie ('tracker_id', cookievar1, 56);

if (GetCookie('tracker_id') == cookievar1)
{
	rhrn2 = new Date();
	rhrnt2 = rhrn2.getTime();
}
else
{
	rhrnt2 = 0
}

if (rhrnt2 < (rhrnt1 + 300) && rhrnt2 > 0)
{
	cookStatus = "Yes";
}
else
{
	if (rhrnt2 == 0)
	{
		cookStatus = "No";
	}
	else
	{
		cookStatus = "No";
	}
}
function GetCookie(cookieName)
{
	var theCookie=""+document.cookie;
	var ind=theCookie.indexOf(cookieName);
	if (ind==-1 || cookieName=="") return null;
	var ind1=theCookie.indexOf(';',ind);
	if (ind1==-1) ind1=theCookie.length;
	return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
}
function SetCookie(cookieName,cookieValue,nDays)
{
	var today = new Date();
	var expire = new Date();
	if (nDays==null || nDays==0) nDays=1;
	expire.setTime(today.getTime() + 3600000*24*nDays);
	document.cookie = cookieName + "=" +escape(cookieValue) + ";expires="+expire.toGMTString();
}
