msg="☆★☆メール配信サービス実施中！　☆★☆お得なスペシャル情報を携帯アドレスへ配信！（ＰＣにも対応）　　☆★☆次のURLにアクセス！ http://tsubatasekiyu.co.jp/k　　　";

function scroll() {
document.theTelop.scroll.value = msg; 
msg = msg.substring(1,msg.length) +
msg.substring(0,1);
}

function OpenWin() {
	var win1 = window.open('http://tsubatasekiyu.co.jp/coupon.html','coupon','toolbar=no,location=no,status=no,menubar=yes,scrollbars=no,width=400,height=350') ;
}

function OpenWin2() {
	var win1 = window.open('http://tsubatasekiyu.co.jp/popup.html','newwin1','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,width=310,height=142') ;
}

function OpenWinMap() {
	var win1 = window.open('http://tsubatasekiyu.co.jp/map.html','newwin1','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,width=385,height=380') ;
}

function OpenWinIP() {
	var win1 = window.open('http://tsubatasekiyu.co.jp/ip.html','newwin1','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,width=385,height=310') ;
}

function calendar() {
	var uagent=navigator.userAgent;
	f_size = 1;
	c_padding = 0;
	c_spacing = 1;
	if(uagent.indexOf('Win')>=0) {
		f_size = 2;
		c_padding = 0;
		c_spacing = 1;
	}
	var date=new Date();
	var Monthdays=new Array (31,28,31,30,31,30,31,31,30,31,30,31);
	var Days=new Array ("日","月","火","水","木","金","土");
	year=date.getYear();
	today=date.getDate();
	//うるう年の設定
	if(year<2000) {year=year+1900;
	}
	if(((year%4==0)&&(year%100!=0))||(year%400==0)) {Monthdays[1]=29;
	}
	thisMonthDays=Monthdays[date.getMonth()];
	date.setDate(1);
	Startday=date.getDay();
	//年月
	document.write("<table border=0 bgcolor=\"#DCDCDC\" cellpadding=" + c_padding + " cellspacing=" + c_spacing + ">");
	document.write("<tr bgcolor=\"#FFFFFF\"><th colspan=7><font size=" + f_size + ">");
	document.write(year, '年',date.getMonth()+1,'月');
	document.write("</font></th></tr>");
	//曜日
	for(i=0;i<7;i++) {
		if(Days[i]=="日") {
		document.write("<td align=center><font size=" + f_size + "color=\"#FF0000\">",Days[i],"</font></td>");
		}
		else {
		document.write("<td align=center><font size=" + f_size + ">",Days[i],"</font></td>");
		}
	}
	document.write("</tr>")
	//日
	document.write("<tr>");
	col=0;
	for(i=0;i<Startday;i++) {
		document.write("<td></td>");
		col++;
	}
	for(i=1;i<=thisMonthDays;i++) {
		if(i==today){
			document.write("<td align=center bgcolor=\"#FFFF00\"><font size=" + f_size + ">");
			document.write("<font color=\"#FF0000\"><b><a href=\"#\" onClick=\"OpenWin2()\">" + i + "</a></b></font>")
		}
		else {
			document.write("<td align=center bgcolor=\"#FFFFFF\"><font size=" + f_size + ">");
			document.write(i);
		}
		document.write("</font></td>");
		col++
		if(col==7) {
			document.write("</tr>\n<tr>");
			col=0;
		}
	}
	document.write("</table>");
}

function randomImage() {
	var value = Math.random() ;
	var ioption = " width=\"124\" height=\"165\" vspace=\"12\" alt=\"お店の様子\""
	if(value < 0.33) {
		document.write("<img src=\"images/top/r_2.jpg\"" + ioption + ">");
	}
	else if(value < 0.66) {
		document.write("<img src=\"images/top/r_3.jpg\"" + ioption + ">");
	}
	else {
		document.write("<img src=\"images/top/r_6.jpg\"" + ioption + ">");
	}
}
