//ヘッダー
var tableColor="";
var menuColor="#cccccc";
var cellWidth=80;
var cellHeight=33;
var cellWidth1=70;
var cellHeight1=33;
var cellWidth2=1;
var cellHeight2=1;
var menuWidth=0;

function setTD(width,height,bgcolor,href,title,sTitle){
	if (width!="*") menuWidth+=width;
	var xStr="";
	var className="";
	if (width=="") width="";
	//if (bgcolor=="") bgcolor="#ffffff";
	if (title==document.title){
		//bgcolor="#aaffff";
		className=" class=\"activepage\"";
	}
	xStr += "<tr><td align=left valign=middle width='"+width+"' height=\""+height+"\" bgcolor=\""+bgcolor+"\" nowrap>";
	xStr += "<tt><span "+className+"><a href=\""+href+"\"><nobr>"+sTitle+"</nobr></a></span></tt>";
	xStr += "</td></tr>";
	return xStr;
}

function setTD2(width,height,image){
	menuWidth+=width;
	return "<tr><td width='"+width+"' height='"+height+"'></td></tr>\n";
}

function setTD1(width,height,color){
	menuWidth+=width;
	return "<tr><td width='"+width+"' height='"+height+"' bgcolor=\""+color+"\"><br></td></tr>\n";
}

function setMenu(xColor){
	var xStr = "";
	var image2="images/menu2.gif";
	xStr += "<div class=\"menu\">"
	xStr += "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
	//xStr += "<tr height=\""+cellHeight+"\">";
	xStr += setTD2(cellWidth2,cellHeight2,"images/menu3.gif");
	xStr += setTD1(80,0,tableColor);
	xStr += setTD(cellWidth,cellHeight,"","index.htm","小菅六雄","&nbsp;<img src=\"images2/image024.gif\" border=\"0\">");
	xStr += setTD2(cellWidth2,cellHeight2,image2);
	xStr += setTD(cellWidth,cellHeight,"","profile.htm","自己紹介","&nbsp;<img src=\"images2/image015.gif\" border=\"0\">");
	xStr += setTD2(cellWidth2,cellHeight2,image2);
	xStr += setTD(cellWidth,cellHeight,"","tuusin.htm","むつお通信","&nbsp;<img src=\"images2/image025.gif\" border=\"0\">");
	xStr += setTD2(cellWidth2,cellHeight2,image2);
	xStr += setTD(cellWidth,cellHeight,"","osirase.htm","お知らせ","&nbsp;<img src=\"images2/image023.gif\" border=\"0\">");
	xStr += setTD2(cellWidth2,cellHeight2,image2);
	xStr += setTD(cellWidth,cellHeight,"","diary.htm","週間日記","&nbsp;<img src=\"images2/image022.gif\" border=\"0\">");
	xStr += setTD2(cellWidth2,cellHeight2,image2);
	xStr += setTD(cellWidth,cellHeight,"","diary2.htm","撮りたて","&nbsp;<img src=\"images2/image040.gif\" border=\"0\">");
	xStr += setTD2(60,1,image2);
	xStr += setTD1(80,1,tableColor);
	xStr += setTD(cellWidth1,cellHeight1,tableColor,"http://www.yasusigi.net/","野洲市議団","&nbsp;　<img src=\"images2/image017.gif\" border=\"0\">");
	xStr += setTD(cellWidth1,cellHeight1,tableColor,"http://www.yasusigi.net/~nonami/","野並市議","&nbsp;　<img src=\"images2/image016.gif\" border=\"0\">");
	xStr += setTD(cellWidth1,cellHeight1,tableColor,"http://www.yasusigi.net/minpou.htm","やす民報","&nbsp;　<img src=\"images2/image018.gif\" border=\"0\">");
	xStr += setTD(cellWidth1,cellHeight1,tableColor,"http://www.yasusigi.net/news.htm","市議団ﾆｭｰｽ","&nbsp;　<img src=\"images2/image020.gif\" border=\"0\">");
	xStr += setTD(cellWidth1,cellHeight1,tableColor,"http://www.yasusigi.net/report.htm","一般質問","&nbsp;　<img src=\"images2/image019.gif\" border=\"0\">");
	xStr += setTD(cellWidth1,cellHeight1,tableColor,"http://www.yasusigi.net/bbs.htm","掲示板","&nbsp;　<img src=\"images2/image021.gif\" border=\"0\">");
	xStr += setTD1("*","*",tableColor);
	//xStr += "</tr>";
	xStr += "</table>";
	xStr += "</div>";
	return xStr;
}

var xStr="";
var menuStr=setMenu(menuColor);
xStr += "<table align=center width=\"200\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\">";
xStr += "<tr><td rowspan=4 width=200>";
xStr += "<a href=\"index.htm\"><img src=\"images2/top_kosuga4.jpg\" alt=\"ホーム\"  border=\"0\" align=left></a>";
xStr += "</td></tr>";
xStr += "</table>\n";
xStr += "<table align=center width=\"200\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
xStr += "<tr><td>";
xStr += menuStr;
xStr += "</td></tr>";
xStr += "</table>";
document.write(xStr);

function mailto(id,domain,msg,img){
	mail=id+"@"+domain;
	str="<a href=\"mailto:"+mail+"\">";
	if(msg==""){
		str+=mail;
	}else{
		str+=msg;
	}
	if(img==1){str+="<img src=\"Images/mail.gif\" alt=\"メール\" border=\"0\" align=bottom>";}
	str+="</a>";
	document.write(str);
}