var exit=true;
function getCookie(NameOfCookie)
{
if (document.cookie.length > 0)
{              
begin = document.cookie.indexOf(NameOfCookie+"=");       
if (begin != -1)
{           
begin += NameOfCookie.length+1;       
end = document.cookie.indexOf(";", begin);
if (end == -1) end = document.cookie.length;
return unescape(document.cookie.substring(begin, end));
}
}
return null;
}

function setCookie(NameOfCookie, value, expiredays)
{
var ExpireDate = new Date ();
ExpireDate.setTime(ExpireDate.getTime() + (expiredays*24*60*60*1000));

document.cookie = NameOfCookie + "=" + escape(value) + 
((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());
}
function leave()
{
visited=getCookie('visited');
if (exit)
if (visited==null) 
{
setCookie('visited','yes',4) // SET AMOUNT OF DAYS HERE
}
}
function enter()
{
visited=getCookie('visited');
}
function addfav()
{if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
 
var url="http://www.kidsgoals.com";
var title="KidsGoals.com";
 
document.write('<A HREF="javascript:window.ext');
document.write('ernal.AddFavorite(url,title);" ');
document.write('onMouseOver=" window.status=');
document.write("'Add KidsGoals.com to your favorites!'; return true ");
document.write('"onMouseOut=" window.status=');
document.write("' '; return true ");
document.write('"><p align=center>KidsGoals.com is updated regularly - please click here to add us to your favorites!<\/p><\/a>');
}
else {
var msg = "KidsGoals.com is updated regularly - please remember to add us to your favorites!";
if(navigator.appName == "Netscape") msg += "  (CTRL-D)";
document.write(msg);
}} 
