/////////////////////////////////////////////////////////////////////
// Menu Moving (for first page)
// by.. Flg.Off. Venich Thongsom
/////////////////////////////////////////////////////////////////////

var nscp = (navigator.appName == "Netscape")
var counter = 10

/////////////////// MOVING ////////////////////////////////
function init()
{	if (!(nscp))
	{	setTimeout("movemenu()",1)
	}
}

function movemenu()
{	if (nscp)
	{	document.menumove.document.menumove1.left = 0 + (counter * 20)
	}
	else
	{	document.all.menumove1.style.left = 0 + (counter * 20)
	}
	if (counter != 0)
	{	setTimeout("movemenu()",1)
	}
	counter--
}
///////////////////////////////////////////////////////////




/////////////////// MENU //////////////////////////////////
var browser=0;

browser = ( ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 3))
	|| ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) );

if(browser)	// if browser can show image replacing
{
 	mnu01_on = new Image(50,12);	mnu01_on.src = "images/m_main_on.gif";
	mnu01_off = new Image(50,12);	mnu01_off.src = "images/m_main.gif";
	mnu02_on = new Image(195,12);	mnu02_on.src = "images/m_history_on.gif";
	mnu02_off = new Image(195,12);	mnu02_off.src = "images/m_history.gif";
	mnu03_on = new Image(80,12);	mnu03_on.src = "images/m_rtaftoday_on.gif";
	mnu03_off = new Image(80,12);	mnu03_off.src = "images/m_rtaftoday.gif";
	mnu04_on = new Image(80,12);	mnu04_on.src = "images/m_futuregoals_on.gif";
	mnu04_off = new Image(80,12);	mnu04_off.src = "images/m_futuregoals.gif";
	
	mnu05_on = new Image(50,12);	mnu05_on.src = "images/m_gallery_on.gif";
	mnu05_off = new Image(50,12);	mnu05_off.src = "images/m_gallery.gif";
	mnu06_on = new Image(120,12);	mnu06_on.src = "images/m_greetingcards_on.gif";
	mnu06_off = new Image(120,12);	mnu06_off.src = "images/m_greetingcards.gif";
	mnu07_on = new Image(80,12);	mnu07_on.src = "images/m_download_on.gif";
	mnu07_off = new Image(80,12);	mnu07_off.src = "images/m_download.gif";
}

function active(name)	// for show image ( name => image name; ex: 'mnu00' )
{
   if(browser) {
    document[name].src = eval(name + "_on.src");	// ¤èÒ·Õèä´é¤×Í  mnu00_on.src
   }
}

function inactive(name)	// for show image ( name => image name; ex: 'mnu00' )
{
   if(browser) {
      document[name].src = eval(name + "_off.src");	// ¤èÒ·Õèä´é¤×Í  mnu00_off.src
   }
}
///////////////////////////////////////////////////////////




/////////////////// SHOW MENU /////////////////////////////
function WriteMenu()
{
	document.write('<a href=\"index.html\" onmouseover=\"active(\'mnu01\')\" onmouseout=\"inactive(\'mnu01\')\"><img src=\"images/m_main.gif\" width=\"50\" height=\"12\" alt=\"\" border=\"0\" name=\"mnu01\"></a><br>');
	document.write('<a href=\"history/index.html\" onmouseover=\"active(\'mnu02\')\" onmouseout=\"inactive(\'mnu02\')\"><img src=\"images/m_history.gif\" width=\"195\" height=\"12\" alt=\"\" border=\"0\" name=\"mnu02\"></a><br>');
	document.write('<a href=\"rtaf-today/index.html\" onmouseover=\"active(\'mnu03\')\" onmouseout=\"inactive(\'mnu03\')\"><img src=\"images/m_rtaftoday.gif\" width=\"80\" height=\"12\" alt=\"\" border=\"0\" name=\"mnu03\"></a><br>');
	
	// àÁ¹Ù  future-goals
	//document.write('<a href=\"future-goals/index.html\" onmouseover=\"active(\'mnu04\')\" onmouseout=\"inactive(\'mnu04\')\"><img src=\"images/m_futuregoals.gif\" width=\"80\" height=\"12\" alt=\"\" border=\"0\" name=\"mnu04\"></a><br>');
	document.write('<a onmouseover=\"active(\'mnu04\')\" onmouseout=\"inactive(\'mnu04\')\"><img src=\"images/m_futuregoals.gif\" width=\"80\" height=\"12\" alt=\"\" border=\"0\" name=\"mnu04\"></a><br>');
	
	document.write('<img src=\"images/m_separate.gif\" width=\"120\" height=\"12\" alt=\"\" border=\"0\"><br>');
	document.write('<a href=\"../gallery/gallery.html\" onmouseover=\"active(\'mnu05\')\" onmouseout=\"inactive(\'mnu05\')\"><img src=\"images/m_gallery.gif\" width=\"50\" height=\"12\" alt=\"\" border=\"0\" name=\"mnu05\"></a><br>');
	document.write('<a href=\"../ecard/ecard.html\" onmouseover=\"active(\'mnu06\')\" onmouseout=\"inactive(\'mnu06\')\"><img src=\"images/m_greetingcards.gif\" width=\"120\" height=\"12\" alt=\"\" border=\"0\" name=\"mnu06\"></a><br>');
	document.write('<a href=\"../download/download.html\" onmouseover=\"active(\'mnu07\')\" onmouseout=\"inactive(\'mnu07\')\"><img src=\"images/m_download.gif\" width=\"80\" height=\"12\" alt=\"\" border=\"0\" name=\"mnu07\"></a><br>');
	document.write('<br>&nbsp;&nbsp;&nbsp;<a href=\"'+path+'../index.html\"><img src=\"'+path+'images/flag_thai.gif\" width=\"22\" height=\"13\" alt=\"\" border=\"0\"></a><br>\n');
}

function menuNormal()
{
	if (nscp)
	{	WriteMenu();
	}
}

function menuLayer()
{
	if (!(nscp))
	{
		document.write('<div id=\"menumove\"><div id=\"menumove1\">');
		document.write('<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td align=\"right\">');
		document.write('<table width=\"200\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">');
		document.write('<tr><td valign=\"top\">');
		
		WriteMenu();
		
		document.write('</td></tr></table>');
		document.write('</td></tr></table>');
		document.write('</div></div>');
	}
}
///////////////////////////////////////////////////////////