//data="この部分にデータを入力する。ただし半角は使用しないでください！"



var data ="　　　　　　お知らせ：　日は新聞休刊日のため　日のホームページ更新を休みます。";



data=data+"　　　　　　　　　　";
function set(){
//データの前の一番最初の文字を一番最後へと移動させる。これは文字列の長さに対応するように設定
data = data.substring(2,data.length)+data.substring(0,2);
//データを表示させる
document.denkou.box.value=data;
};

function sai(){
// ここに繰り返したい宣言を記入すれば一秒おきに繰り返し処理が行われる
setTimeout("sai()",500); // 500msec = 1sec
set();
}





//ポップ

function chk(url, name, w, h ,f,cou) {

cou = getCookie("Times");

if ((cou == "1") || (cou == ""))
{
//open1('soku.html', 'sokuhou', 350, 300,1);
open1(url, name, w, h ,f);

};



}



//チェックボックスの書き出し
function chkbox(cou) {
cou = getCookie("Times");

if ((cou == "") || (cou == "1"))
{
document.write("<TABLE border=1 bordercolor=#666666 cellpadding=0 cellspacing=0><TR><TD><TABLE><TR><FORM><TD><input type=\"checkbox\" onclick=\"syori(this)\"></fonm></td><td><font STYLE=\"FONT-SIZE:12px\">12時間このウィンドウを自動的に表示しない</font></TD></TR></table></TD></TR></table>");
}

else
{
document.write("<TABLE border=1 bordercolor=#666666 cellpadding=0 cellspacing=0><TR><TD><TABLE><TR><FORM><TD><input type=\"checkbox\" onclick=\"syori(this)\" checked></td></fonm><td><font STYLE=\"FONT-SIZE:12px\">12時間このウィンドウを自動的に表示しない</font></TD></TR></table></TD></TR></table>");
};

}




//ウインドオープン
function open1(url, name, w, h ,f) {
	var nw;
	nw = window.open(url, name,"width=" + w + ",height=" + h + "status=0,scrollbars=yes,resizable=yes,top=30,left=600");
//表示位置指定
	//nw.moveTo(750,10);
	if (f == 1) nw.focus();

}




//チェックがあればON1 チェックがはずされればOFF2
function syori(offer) {
//false
if (offer.checked)
{


//setCookie("Times", 0 , 3600000);//times、dateの書き込み処理
setCookie("Times", 0 , 43200000);//times、dateの書き込み処理
Close();

}

else
{


//setCookie("Times", 1 , 3600000);//times、dateの書き込み処理
setCookie("Times", 1 , 43200000);//times、dateの書き込み処理


};


}




//xx2は;の位置、tmp2は最初に引っかかった";"までの中身、
//getCookieの中身
function getCookie(key,  tmp1, tmp2, xx1, xx2, xx3) {
    tmp1 = " " + document.cookie + ";";//クッキーを読み込み
    xx1 = xx2 = 0;//xxを初期化
    len = tmp1.length;//クッキーの長さ獲得　同名で別のクッキーとの区別化
    while (xx1 < len) {
        xx2 = tmp1.indexOf(";", xx1);//tmp1のxx1から;の文字位置を獲得
        tmp2 = tmp1.substring(xx1 + 1, xx2);//tmp1の内側を獲得　メインクッキーの探り出し
        xx3 = tmp2.indexOf("=");//tmp2から=を検索
        if (tmp2.substring(0, xx3) == key) {//key名を確認
            return(unescape(tmp2.substring(xx3 + 1, xx2 - xx1 - 1)));//=から;位置から開始の数を引いたものを取り出す
        }
        xx1 = xx2 + 1;//xx1を;つぎに変更、つぎのブロックを検索
    }
    return("");
}




//setCookieの中身 消化時刻＋１日のクッキー作成
function setCookie(key, val, tim, tmp) {//定義
	//;//1日の指定
	var pdate = new Date();
	pdate.setTime(pdate.getTime() + tim);
	tmp = key + "=" + escape(val) + "; ";//keyの書き込み　valをアスキーコード化
	// tmp += "path=" + location.pathname + "; ";//保存時の名称指定
	tmp += "expires=" + pdate.toGMTString() + "; ";//cookieの有効期限指定
	document.cookie = tmp;//クッキーの書き込み
	//alert(tmp);

}



function Close(){
    window.close();
}




function prwrite(){
    document.write('<font color="#000088">【ＰＲ】</font>');
}






function WGo(){
    sel=document.Form.list.selectedIndex;
    hrf=document.Form.list.options[sel].value;
        if(hrf!="-")location.href=hrf;
}








function onff1(){
document.getElementById('content1').style.display="block";
document.getElementById('content2').style.display="none";
document.getElementById('content3').style.display="none";


}

function onff2(){

document.getElementById('content1').style.display="none";
document.getElementById('content2').style.display="block";
document.getElementById('content3').style.display="none";



}

function onff3(){

document.getElementById('content1').style.display="none";
document.getElementById('content2').style.display="none";
document.getElementById('content3').style.display="block";


}

