var chgCont = new Array()
var seenCont
chgCont[0] = "<img src='img/header/01.jpg' alt='Foundations&Lingerie パル' width='760' height='120'>"
chgCont[1] = "<img src='img/header/02.jpg' alt='Foundations&Lingerie パル' width='760' height='120'>"
chgCont[2] = "<img src='img/header/03.jpg' alt='Foundations&Lingerie パル' width='760' height='120'>"
chgCont[3] = "<img src='img/header/04.jpg' alt='Foundations&Lingerie パル' width='760' height='120'>"
chgCont[4] = "<img src='img/header/05.jpg' alt='Foundations&Lingerie パル' width='760' height='120'>"
// メッセージ中にはこの例のようにＨＴＭＬタグが使えます。
// メッセージの途中で改行を入れるとスクリプトが動かなくなるので、長いメッセージでも
// 改行を入れないでください。
var newCont = chgCont[0] // デフォルトで表示されるもの（クッキーをオフにしている場合など）
var cExpires
var nowDate = new Date()
nowDate.setMonth(nowDate.getDate()+(365*10)) //10年後にクッキー消滅
cExpires = nowDate.toGMTString()
var cookieValue = document.cookie
var startOfValue = cookieValue.indexOf("seenCont=")
if (startOfValue == -1) {
   startOfValue = cookieValue.indexOf("seenCont=")
   if (startOfValue == -1) {
      seenCont = 0
      newCont = chgCont[seenCont]
   }
}
if (seenCont != 0) {
   startOfValue = cookieValue.indexOf("=", startOfValue) + 1
   var endOfValue = cookieValue.indexOf(";", startOfValue)
   if (endOfValue == -1) {
      endOfValue = cookieValue.length
   }
   seenCont = Number(cookieValue.substring(startOfValue, endOfValue))
   if (seenCont<chgCont.length-1) {
      seenCont++
   } else {
      seenCont = 0
   }
   newCont = chgCont[seenCont]
}
document.cookie = "seenCont=" + seenCont + ";expires=" + cExpires + ";"
