function PrintTopics(RootPath,dir)
{
var name = navigator.appName

/*
if (dir=='index')
	document.write ('<table border=0 cellpadding="0" cellspacing="0" width="760" bgcolor="#336699"><tr><td><img src="'+ RootPath +'img/thaiastro-h-index1.gif" border="0" width="670" height="80"></td><td><a href="sitemap.html"><img src="'+ RootPath +'img/thaiastro-h-index2.gif" border="0" width="90" height="80"></a></td></tr></table>')
else
	document.write ('<a href="http://thaiastro.nectec.or.th/"><img src="'+ RootPath +'img/thaiastro-h.gif" border="0" width="760" height="47"></a><br>')
	*/

document.write ('<div id="header"><a href="http://thaiastro.nectec.or.th/"><img src="'+ RootPath +'img/tas-logo-name-small.gif" border="0" width="373" height="61" alt=" สมาคมดาราศาสตร์ไทย" /></a>  <img src="'+ RootPath +'img/blank.gif" alt="" width="320" height="1" /><a href="http://www.facebook.com/group.php?gid=143862015637362" title="facebook" rel="alternate"><img src="'+ RootPath +'img//fb-icon16x16.gif" alt="" style="border:0" /></a> <a href="'+ RootPath +'rss.xml" title="รับข่าวสารผ่านทาง RSS" rel="alternate" type="application/rss+xml"><img src="'+ RootPath +'img/feed-icon16x16.gif" alt="" style="border:0" /></a></div>')

if (name == "Microsoft Internet Explorer") a='0'; else a='0'
document.write ('<table border='+a+' cellpadding="1" cellspacing="0" width="760" bgcolor="#5B5B5B"><tr>')

if (dir=='index') document.write ('')
else document.write ('<td class=topics align="center"><a href="'+ RootPath +'">หน้าหลัก</a></td>')

if (dir=='news')
	document.write ('<td class=topicsnow align="center"><a href="'+ RootPath +'news/">ข่าวดาราศาสตร์</a></td>')
else
	document.write ('<td class=topics align="center"><a href="'+ RootPath +'news/">ข่าวดาราศาสตร์</a></td>')


if (dir=='webboard')
	document.write ('<td class=topicsnow align="center"><a href="'+ RootPath +'webboard/">ห้องสนทนา</a></td>')
else
	document.write ('<td class=topics align="center"><a href="'+ RootPath +'webboard/">ห้องสนทนา</a></td>')


if (dir=='skyevent')
	document.write ('<td class=topicsnow align="center"><a href="'+ RootPath +'skyevnt/">ปรากฏการณ์ท้องฟ้า</a></td>')
else
	document.write ('<td class=topics align="center"><a href="'+ RootPath +'skyevnt/">ปรากฏการณ์ท้องฟ้า</a></td>')

if (dir=='activity')
	document.write ('<td class=topicsnow align="center"><a href="'+ RootPath +'activity/">กิจกรรม</a></td>')
else
	document.write ('<td class=topics align="center"><a href="'+ RootPath +'activity/">กิจกรรม</a></td>')

if (dir=='library')
	document.write ('<td class=topicsnow align="center"><a href="'+ RootPath +'library/library.php">ห้องสมุด</a></td>')
else
	document.write ('<td class=topics align="center"><a href="'+ RootPath +'library/library.php">ห้องสมุด</a></td>')

if (dir=='faqs')
	document.write ('<td class=topicsnow align="center"><a href="'+ RootPath +'library/faqs/">สารพันคำถาม</a></td>')
else
	document.write ('<td class=topics align="center"><a href="'+ RootPath +'library/faqs/">สารพันคำถาม</a></td>')

if (dir=='report')
	document.write ('<td class=topicsnow align="center"><a href="'+ RootPath +'report/">รายงาน</a></td>')
else
	document.write ('<td class=topics align="center"><a href="'+ RootPath +'report/">รายงาน</a></td>')

if (dir=='about')
	document.write ('<td class=topicsnow align="center"><a href="'+ RootPath +'about/abouttas.html">เกี่ยวกับสมาคมฯ</a></td>')
else
	document.write ('<td class=topics align="center"><a href="'+ RootPath +'about/abouttas.html">เกี่ยวกับสมาคมฯ</a></td>')

// if (dir=='index') document.write ('<td class=topics align="center"><a href="'+ RootPath +'eng/index.html">English version</a></td></tr>')

document.write ('</tr></table>')

document.write ('<table border='+ a + ' cellpadding="1" cellspacing="0" width="760" bgcolor="#5B5B5B"><tr>')

if (dir=='olympiad')
	document.write ('<td class=topicsnow align="center"><a href="'+ RootPath +'olympiad/">ดาราศาสตร์โอลิมปิก</a></td>')
else
	document.write ('<td class=topics align="center"><a href="'+ RootPath +'olympiad/">ดาราศาสตร์โอลิมปิก</a></td>')

document.write ('<td class=topics align="center"><a href="'+ RootPath +'ency/">ปทานุกรมดาราศาสตร์</a></td>')

if (dir=='mwj') document.write ('<td class=topicsnow align="center"><a href="'+ RootPath +'mlky/">วารสารทางช้างเผือก</a></td>')
else
	document.write ('<td class=topics align="center"><a href="'+ RootPath +'mlky/">วารสารทางช้างเผือก</a></td>')

if (dir=='gallery')
	document.write ('<td class=topicsnow align="center"><a href="'+ RootPath +'gal/gallery.php">ห้องภาพท้องฟ้า</a></td>')
else
	document.write ('<td class=topics align="center"><a href="'+ RootPath +'gal/gallery.php">ห้องภาพท้องฟ้า</a></td>')

/*
if (dir=='pow')
	document.write ('<td class=topicsnow align="center"><a href="'+ RootPath +'picoftheweek/index.html">ภาพเด่นประจำสัปดาห์</a></td>')
else
	document.write ('<td class=topics align="center"><a href="'+ RootPath +'picoftheweek/index.html">ภาพเด่นประจำสัปดาห์</a></td>')
*/

if (dir=='letters')
	document.write ('<td class=topicsnow align="center"><a href="'+ RootPath +'letters/letters.html">จดหมายถึง thaiastro</a></td>')
else
	document.write ('<td class=topics align="center"><a href="'+ RootPath +'letters/letters.html">จดหมายถึง thaiastro</a></td>')

if (dir=='sitemap')
	document.write ('<td class=topicsnow align="center">แผนผังเว็บไซต์</td>')
else
	document.write ('<td class=topics align="center"><a href="'+ RootPath +'sitemap.html">แผนผังเว็บไซต์</a></td>')

document.write ('</tr></table>')

}

function PrintTopicsold(RootPath,dir)
{

document.write ('<a href="'+ RootPath +'./"><img src="'+ RootPath +'img/thaiastro-h2.gif" width="734" height="47" alt="สมาคมดาราศาสตร์ไทย" /></a> <div id="navcontainer"><ul id="navlist">')

if (dir=='index')
	document.write ('')
else
	document.write ('<li><a href="'+ RootPath +'" title="กลับไปหน้าหลัก">หน้าหลัก</a></li>')

if (dir=='news')
	document.write ('<li id="active"><a href="'+ RootPath +'news/blletin.html" id="current" title="ข่าวดาราศาสตร์และอวกาศ">ข่าวดาราศาสตร์</a></li>')
else
	document.write ('<li><a href="'+ RootPath +'news/blletin.html" title="ข่าวดาราศาสตร์และอวกาศ">ข่าวดาราศาสตร์</a></li>')

if (dir=='webboard')
	document.write ('<li id="active"><a href="'+ RootPath +'webboard/" id="current" title="กระดานพูดคุยเรื่องดาราศาสตร์และอื่น ๆ">ห้องสนทนา</a></li>')
else
	document.write ('<li><a href="'+ RootPath +'webboard/" title="กระดานพูดคุยเรื่องดาราศาสตร์และอื่น ๆ">ห้องสนทนา</a></li>')

if (dir=='skyevent')
	document.write ('<li id="active"><a href="'+ RootPath +'skyevnt/index.html" id="current" title="ปรากฏการณ์ทางดาราศาสตร์">ปรากฏการณ์ท้องฟ้า</a></li>')
else
	document.write ('<li><a href="'+ RootPath +'skyevnt/index.html" title="ปรากฏการณ์ทางดาราศาสตร์">ปรากฏการณ์ท้องฟ้า</a></li>')

if (dir=='activity')
	document.write ('<li id="active"><a href="'+ RootPath +'activity/" id="current" title="กิจกรรม">กิจกรรม</a></li>')
else
	document.write ('<li><a href="'+ RootPath +'activity/" title="กิจกรรม">กิจกรรม</a></li>')

if (dir=='library')
	document.write ('<li id="active"><a href="'+ RootPath +'library/library.html" id="current" title="ห้องสมุด">ห้องสมุด</a></li>')
else
	document.write ('<li><a href="'+ RootPath +'library/library.html" title="ห้องสมุด">ห้องสมุด</a></li>')

if (dir=='faqs')
	document.write ('<li id="active"><a href="'+ RootPath +'library/faqs/index.html" id="current" title="สารพันคำถาม">สารพันคำถาม</a></li>')
else
	document.write ('<li><a href="'+ RootPath +'library/faqs/index.html" title="สารพันคำถาม">สารพันคำถาม</a></li>')

if (dir=='report')
	document.write ('<li id="active"><a href="'+ RootPath +'report/index.html" id="current" title="รายงานกิจกรรมและการสังเกตการณ์">รายงาน</a></li>')
else
	document.write ('<li><a href="'+ RootPath +'report/index.html" title="รายงานกิจกรรมและการสังเกตการณ์">รายงาน</a></li>')

if (dir=='olympiad')
	document.write ('<li id="active"><a href="'+ RootPath +'olympiad/index.html" id="current" title="ดาราศาสตร์โอลิมปิก">ดาราศาสตร์โอลิมปิก</a></li>')
else
	document.write ('<li><a href="'+ RootPath +'olympiad/index.html" title="ดาราศาสตร์โอลิมปิก">ดาราศาสตร์โอลิมปิก</a></li>')

if (dir=='ency')
	document.write ('<li id="active"><a href="'+ RootPath +'ency/index.html" id="current" title="ความหมายของคำศัพท์ทางดาราศาสตร์">ปทานุกรม</a></li>')
else
	document.write ('<li><a href="'+ RootPath +'ency/index.html" title="ความหมายของคำศัพท์ทางดาราศาสตร์">ปทานุกรม</a></li>')

if (dir=='mwj')
	document.write ('<li id="active"><a href="'+ RootPath +'mlky/index.html" id="current" title="วารสารทางช้างเผือก">วารสารทางช้างเผือก</a></li>')
else
	document.write ('<li><a href="'+ RootPath +'mlky/index.html" title="วารสารทางช้างเผือก">วารสารทางช้างเผือก</a></li>')

if (dir=='gallery')
	document.write ('<li id="active"><a href="'+ RootPath +'gal/gallery.php" id="current" title="ภาพถ่ายดาราศาสตร์ฝีมือคนไทย">ห้องภาพท้องฟ้า</a></li>')
else
	document.write ('<li><a href="'+ RootPath +'gal/gallery.php" title="ภาพถ่ายดาราศาสตร์ฝีมือคนไทย">ห้องภาพท้องฟ้า</a></li>')

if (dir=='letters')
	document.write ('<li id="active"><a href="'+ RootPath +'letters/letters.html" id="current" title="จดหมายถึงสมาคมดาราศาสตร์ไทย">จดหมายถึง thaiastro</a></li>')
else
	document.write ('<li><a href="'+ RootPath +'letters/letters.html" title="จดหมายถึงสมาคมดาราศาสตร์ไทย">จดหมายถึง thaiastro</a></li>')

if (dir=='about')
	document.write ('<li id="active"><a href="'+ RootPath +'about/abouttas.html" id="current" title="เกี่ยวกับสมาคมฯ">เกี่ยวกับสมาคมฯ</a></li>')
else
	document.write ('<li><a href="'+ RootPath +'about/abouttas.html" title="เกี่ยวกับสมาคมดาราศาสตร์ไทย">เกี่ยวกับสมาคมดาราศาสตร์ไทย</a></li>')

if (dir=='sitemap')
	document.write ('<li id="active"><a href="'+ RootPath +'sitemap.html" id="current" title="แผนผังเว็บไซต์">แผนผังเว็บไซต์</a></li>')
else
	document.write ('<li><a href="'+ RootPath +'sitemap.html" title="แผนผังเว็บไซต์">แผนผังเว็บไซต์</a></li>')

document.write ('</ul></div>')
}

