now = new Date
expireDate = new Date
expireDate.setMonth(expireDate.getMonth()+6)
lastVisit = new Date(cookieVal("pageVisit"))
document.cookie = "pageVisit="+now+";expires=" + expireDate.toGMTString()

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 "1 January 1970"
}

function newCheck(yyy,mm,dd) {
  lastChgd = new Date(yyy,mm-1,dd)
  if (lastChgd.getTime() > lastVisit.getTime()) {
    document.write("<img src='/Daten/privat/web_design/Java_script/new.gif' alt='new'>")
  }
}
