// JavaScript Document
//------- Link URL For Menu All---------//
function LinkMenu(link_value)
{
	try
	{
		var url = window.location.href.toLowerCase();
		var version = "";//"/TH";
		var pos = 0;
		
		if ( (pos = url.indexOf("/th")) != -1)	
			version = "/TH";
		else if ( (pos = url.indexOf("/en")) != -1)
			version = "/EN";
		version = "";
		
		switch (link_value)
		{	
			case 10 : 	// Link Flash Intro TCC
									window.location.href = "/index.php";
									return;
			case 11 : 	// Link Flash Intro TCM
									alert("Coming Soon...");
									//window.location.href = "/index.php";
									return;
			case 12 : 	// Link Flash Intro TCS
									alert("Coming Soon...");
									//window.location.href = "/index.php";
									return;
			case 13 : 	// Link Flash Intro KPW
									alert("Coming Soon...");
									//window.location.href = "/index.php";
									return;
			case 101 : 	// Link TCC
									window.location.href = "/index.php";
									return;
			case 102 : 	// Link TCM
									window.location.href = "/Pages/contact.php";
//									window.location.href = "/";
//									alert("Coming soon....");
									return;
			case 103 : 	// Link TCS
									window.location.href = "/Pages/contact.php";
//									window.location.href = "/";
//									alert("Coming soon....");
									return;
			case 104 : 	// Link KPW
									window.location.href = "/Pages/contact.php";
//									window.location.href = "/";
//									alert("Coming soon....");
									return;
									
			case 901 : 	// Button submit contact
									CheckValid(document.frm);
//									document.frm.submit();
									return;
									
			case 1000 : 	// Link Home
									window.location.href = "/index.php";
									return;
			case 1001 : //	Link Company Profile
									window.location.href = "/Pages/profile.php";
									return;
									
			case 1002 : //	Link Service
									window.location.href = "/Pages/services.php";
									return;
									
			case 1003 : //	Link Current Projects
									window.location.href = "/Pages/current_projects.php";
									return;
									
			case 1004 : //	Link News & Events
									window.location.href = "/Pages/news_events.php";
									return;
									
			case 1005 : //	Link Job
									window.location.href = "/Pages/job_position.php";
									return;
									
			case 1006 : //	Link Contact
									window.location.href = "/Pages/contact.php";
									return;
																		
			case 1007 : //	Link Webboard
//									alert("Coming Soon !!!");
									board = window.open("/webboard","board");
									board.focus();
									return;
																		
			// Link Button Other
			case 2001 : //	Link Achievement Project
									window.location.href = "/Pages/achievement_projects.php";
									return;
			case 2002 : //	Link Current Project
									window.location.href = "/Pages/current_projects.php";
									return;
			case 2003 : //	Link Back Button Poject Page
									window.history.back();
									return;
			case 2004 : //	Link Summary Current Project
									window.location.href = "/Pages/summary_project.php?status=Active";
									return;
			case 2005 : //	Link Summary Archeivement Project
									window.location.href = "/Pages/summary_project.php?status=Shutdown";
									return;
			case 2006 : //	Link Back Button Summary Poject Page
									window.history.back();
									return;
			case 2007 : // Link Managerment Team Profile
									window.location.href = "/Pages/team.php?id=1";
									return
			default :
									alert("Error code menu : "+link_value);
									return;
		}
	}
	catch (err)
	{
		alert("กรุณาตรวจสอบการเปิดอนุญาติ ให้รัน javascript ด้วยนะค่ะ\nError message :"+err.message);
	}
}
