/* ****************************************************************************** */
var Today = new Date();
var tyear = Today.getFullYear();
var tmnth = Today.getMonth()+1;
var tdate = Today.getDate();
var twday = Today.getDay();
var thour = Today.getHours();	//時間
var tmint = Today.getMinutes();	//分
var tscnd = Today.getSeconds();	//秒
var aweek = new Array( "日","月","火","水","木","金","土" );
var eweek = new Array( "Sun","Mon","Tue","Wed","Thu","Fri","Sat" );
var wkday = aweek[twday];
/* ****************************************************************************** */
function CookLog(){
	times = getCookie("Times");	if (times == "") {times = 1;}
	adate = getCookie("Adate");	if (adate == "") {adate = "none";}
	document.write("<IMG src='http://f24.aaa.livedoor.jp/~catseye/x/acc.cgi?");
	document.write(document.referrer+",");
	document.write(screen.width+"x"+screen.height+"_%_"+times+"_%_"+adate+"' height=1 width=1>");
	times++;
	setadate();
	setCookie("Times", times);
	setCookie("Adate", adate);
}
/* ****************************************************************************** */
function setadate(){
	var Now = new Date();
	var tyear = Now.getFullYear();
	var tmnth = Now.getMonth()+1;
	var tdate = Now.getDate();
	var twday = Now.getDay();
	var thour = Now.getHours();	//時間
	var tmint = Now.getMinutes();	//分
	var tscnd = Now.getSeconds();	//秒
	if (tyear <1900) tyear += 1900;
	if (tmnth <10) tmnth = "0" + tmnth;
	if (tdate <10) tdate = "0" + tdate;
	if (thour <10) thour = "0" + thour;
	if (tmint <10) tmint = "0" + tmint;
	if (tscnd <10) tscnd = "0" + tscnd;
	adate = tyear + "/" + tmnth + "/" + tdate + "["+eweek[twday]+"]" + thour + ":" + tmint + ":" + tscnd;
}
/* ****************************************************************************** */
function getCookie(key,  tmp1, tmp2, xx1, xx2, xx3) {
    tmp1 = " " + document.cookie + ";";
    xx1 = xx2 = 0;
    len = tmp1.length;
    while (xx1 < len) {
        xx2 = tmp1.indexOf(";", xx1);
        tmp2 = tmp1.substring(xx1 + 1, xx2);
        xx3 = tmp2.indexOf("=");
        if (tmp2.substring(0, xx3) == key) {
            return(unescape(tmp2.substring(xx3 + 1, xx2 - xx1 - 1)));
        }
        xx1 = xx2 + 1;
    }
    return("");
}
/* ****************************************************************************** */
function setCookie(key, val, tmp) {
    tmp = key + "=" + escape(val) + "; ";
    // tmp += "path=" + location.pathname + "; ";
    tmp += "expires=Tue, 31-Dec-2030 23:59:59; ";
    document.cookie = tmp;

}
/* ****************************************************************************** */
function clearCookie(key) {
    document.cookie = key + "=" + "xx; expires=Tue, 1-Jan-1980 00:00:00;";
}
/* ****************************************************************************** */
function disp(url){
	window.open(url, "window_name", "width=800,height=270,scrollbars=yes,resizable=yes");
}
function dsp(url){
	window.open(url, "window_name", "width=530,height=230,scrollbars=yes,resizable=yes");
}
/* ******************************************************************************* */
function mobilechk(){
	var ua = navigator.userAgent;
	var thispage = location.href;
	if  (ua.indexOf('Transcoder') > 0) {
			location.href='http://subaru39.tripod.com/home/dont.html?guid=ON';
		//	location.href= thispage;
		//	location.reload()
		//	document.write("<font color=#ff3366><b>葛飾の極悪詐欺師・佐々木忠夫の血筋の者どもよ！地獄へ落ちるがいい！</b></font>")
		//	document.write("<img src='http://f24.aaa.livedoor.jp/~catseye/x/acc.cgi?guid=ON" + location.href + "' width=0 height=0>")
	}
	else if (ua.indexOf('UP.Browser') > 0) {	// auKDDI
		//	location.href='http://subaru39.tripod.com/home/dont.html';
	}
	else if (ua.indexOf('DoCoMo') > 0) {		// Docomo
		if (thispage.indexOf('guid') < 0) {
			location.href= thispage + '?guid=ON';
			//	location.replace(thispage + '?guid=ON');
			//	document.write('<a href=' + thispage + '?guid=ON>logon</a>');
			//	document.write('<form method="post"><input type="hidden" name="guid" value="ON"></form>');
			//	post
			//	document.write('<form action=' + thispage + '"?guid=ON" method="post"><input type="submit" name="" value="submit"></form>');
			//	get
			//	document.write('<form action=' + thispage + 'method="get"><input type="hidden" name="guid" value="ON"><input type="submit" name="" value="submit"></form>');
		}
	}
	else if (ua.indexOf('NetFront') > 0) {		// SoftBank
		//	location.href='http://subaru39.tripod.com/home/dont.html';
	}
	else {
		//	document.write('<form method="post"><input type="hidden" name="guid" value="ON"></form>')
	}
}
/* ****************************************************************************** */
function sasa(){
	if ((twday == 0) || (twday == 6)) {			// Weekend
		document.write('<h3><span class=b_red>極悪詐欺師の棲息地・東京都葛飾区新小岩４−４５−８&nbsp;&nbsp;090-3522-8009</span></h3>');
		document.write('<h3><span class=b_red>極悪詐欺師・佐々木忠夫&gt;詐欺師一家&gt;佐々木久子(女房)、展子(長女)、孝司(長男)</span></h3>');
	}
	else if ((thour < 8) || (thour > 20)) {		// 21:00 => 07:59
		document.write('<h3><span class=b_red>極悪詐欺師の棲息地・東京都葛飾区新小岩４−４５−８&nbsp;&nbsp;03-3654-4816</span></h3>');
		document.write('<h3><span class=b_red>極悪詐欺師・佐々木忠夫、極悪詐欺師一家・佐々木久子、佐々木展子、佐々木孝司</span></h3>');
	}
	else {										// 08:00 =. 20:59
		document.write('<h3><span class=b_red>葛飾にハイエナのような詐欺師一家が棲むという</span></h3>');
		document.write('<h3><span class=b_red>人の格好をしているがヒトデナシ。他人から騙し取った金で優雅に暮しているそうな。</span></h3>');
	}
}
/* ****************************************************************************** */
function show_hynote(x) {
	if (document.getElementById) {
		if ((twday == 0) || (twday == 6)) {			// Weekend
			if     (x<=1) document.getElementById("hy1").innerHTML = '<span class=b_red>葛飾のハイエナ:00819035228009</span>';
			else if(x==2) document.getElementById("hy2").innerHTML = '<span class=b_red>葛飾のハイエナ一家:0081336544816</span>';
		}
		else if ((thour < 8) || (thour > 20)) {		// 21:00 => 07:59
			if     (x<=1) document.getElementById("hy1").innerHTML = '<span class=b_red>葛飾のハイエナ:090-3522-8009</span>';
			else if(x==2) document.getElementById("hy2").innerHTML = '<span class=b_red>葛飾のハイエナ一家:03-3654-4816</span>';
		}
		else {
			if     (x<=1) document.getElementById("hy1").innerHTML = '<span class=b_red>極悪詐欺師・葛飾のハイエナ</span>';
			else if(x==2) document.getElementById("hy2").innerHTML = '<span class=b_red>悪辣非道な葛飾のハイエナ一家の生態</span>';
		}
	}
}
/* ****************************************************************************** */
function hfamily(){
	document.write('<hr>');
	if ((twday == 0) || (twday == 6)) {			// Weekend
		document.write('<iframe src="http://hyena.sarashi.com/data/note/novelx.html" width="700" height="840" frameborder=0 border=0 marginwidth=0 marginheight=0 scrolling=no id="ex2"></iframe>');
	}
	else if ((thour < 8) || (thour > 20)) {		// 21:00 => 07:59
		document.write('<iframe src="http://hyena.sarashi.com/data/note/novelx.html" width="700" height="840" frameborder=0 border=0 marginwidth=0 marginheight=0 scrolling=no id="ex2"></iframe>');
	}
	else {										// 08:00 =. 20:59
		document.write('<iframe src="http://hyena.sarashi.com/data/note/novelz.html" width="700" height="420" frameborder=0 border=0 marginwidth=0 marginheight=0 scrolling=no id="ex2"></iframe>');
	}
}
/* ****************************************************************************** */
function dnote(){
	br = unescape("%0A");
	s = navigator.appVersion.charAt(5).toUpperCase();
	if(s=="M") br = unescape("%0D");
	if(s=="W") br = unescape("%0D")+br;
	num = 23; // numbers of stf array
	stf = new Array(num);
	stf[0]=""+br;
	stf[1]="　　　　このノートに名前を記された詐欺師は"+br;
	stf[2]=""+br;
	stf[3]="　　　　　　　　　　　死ぬ！"+br;
	stf[4]=""+br;
	stf[5]=""+br;
	stf[6]="　　　デスノートに記せ！極悪詐欺師の名前を！"+br;
	stf[7]=""+br;
	stf[8]=""+br;
	if ((thour > 8) && (thour < 20)) {
		stf[9]="　　　人に見えるが　　人でなしの　　人もどき"+br;
		stf[10]=""+br;
		stf[11]="　　呪われた一族　葛飾のハイエナ一家の血統"+br;
		stf[12]=""+br;
		stf[13]="　　極悪詐欺師　葛飾のハイエナ　佐崎　忠夫"+br;
		stf[14]=""+br;
		stf[15]=""+br;
		stf[16]="　　　佐崎久子　　　佐崎展子　　　佐崎孝司"+br;
		stf[17]=""+br;
		stf[18]=""+br;
	} else {
		stf[9]="　　　東京　都　　　葛飾　区　　　新　小岩"+br;
		stf[10]=""+br;
		stf[11]="　　　４　匹が　　　４５　方に　　８　方に"+br;
		stf[12]=""+br;
		stf[13]="　　極悪詐欺師　葛飾のハイエナ　佐々木忠夫"+br;
		stf[14]="　　　　　　　090-3522-8009"+br;
		stf[15]=""+br;
		stf[16]="　　佐々木久子　　佐々木展子　　佐々木孝司"+br;
		stf[17]="　　　　　　　03-3654-4816"+br;
		stf[18]=""+br;
	}
	stf[19]="　　　　呪われし一族の血筋は絶えるだろう"+br;
	stf[20]=""+br;
	stf[21]="　デスノートに記された者は近く死ぬ運命にある"+br;
	stf[22]=""+br;
	cnt = 0; 
	timeID = 10; 
}
function roll(){
	str = "";
	for (i=0; i<5; i++) str += stf[i+cnt];
	document.auto.automes.value = str;
	cnt++;
	if (cnt>=num-5) cnt=0;
	clearTimeout(timeID);
	timeID = setTimeout('roll()',2000);
}
/* ****************************************************************************** */
function deathnote(){
	document.write('<br>');
	document.write('<FORM name="auto" cols=50 rows=3>');
	document.write('<TEXTAREA name="automes">');
	document.write('</TEXTAREA>');
	document.write('</FORM>');
}
/* ****************************************************************************** */
function sound(name){
var str = "";
str = str + "<EMBED id = 'id_sound'";
str = str + " SRC='" + name + "'";
str = str + " AUTOSTART='true'";
str = str + " HIDDEN='true'>";
document.getElementById("id_sound").innerHTML = str;
}
/* ****************************************************************************** */
function shooton(sskobj,gunobj,gunsound){
	guns.src=gunsound;
	document.images['sagishi'].src =sskobj;
	document.images['gun'].src=gunobj;
	document.guns.play();
}
function shootoff(sskobj,gunobj){
	document.images['sagishi'].src =sskobj;
	document.images['gun'].src=gunobj;
}
/* ****************************************************************************** */
function tencyuon(sskobj,tenobj,hitsound){
	hits.src=hitsound;
	document.images['sagishi'].src =sskobj;
	document.images['ten'].src=tenobj;
	document.hits.play();
}
function tencyuoff(sskobj,tenobj){
	document.images['sagishi'].src =sskobj;
	document.images['ten'].src=tenobj;
}
/* ****************************************************************************** */
function thunderson(thund1,thund2,thunders){
	thunder.src=thunders;
	document.body.style.backgroundImage="url(" + thund1 + ")";
	document.thunder.play();
	settimeout("thundersback()", 2000);
//	document.body.style.backgroundImage="url(" + thund2 + ")";
}
function thundersoff(thund2){
	document.body.style.backgroundImage="url(" + thund2 + ")";
}
function thundersback(){
	document.body.style.backgroundImage='url(../tenblred.gif)';
}
/* ****************************************************************************** */
function CngBgClr(){
	document.bgColor="#66ddff";
}
function CngBgImg(opt) {
  document.body.style.backgroundImage = "url(" + opt.options[opt.selectedIndex].value + ")";
}
/* ****************************************************************************** */
function thunders(){
	tens.src=tensound;
	document.body.style.backgroundImage='url(../tenblred.gif)';
	document.tens.play();
	setTimeout(thunders(),5000);
	clearTimeout(thunders());
	setTimeout(thundblk(),5000);
	clearTimeout(thundblk());
}
function thundblk(){
	document.body.style.backgroundImage='url(../tenblack.gif)';
}
/* ****************************************************************************** */
function jslink(url){
	location.href='url';
}
/* ****************************************************************************** */
//function CngBgg(fname){
//	win1=window.open("newWinContents.html","","toolbar=0,directories=0,width=300,height=300");
//	win1.document.body.background= fname;
//	document.getElementById("tenblack").background = fname;
//	document.body.background= fname;
//	document.body.style.backgroundImage='url(fname)';
//}
/* ****************************************************************************** */
