
	var subgl1,subgl2,subgl3,subgl4,subgl5;		
	var timerRunning=false;
	var menuTimer=null;
	var mnuItm;
	var activePg;
	onerror=handleErr;
	function handleErr(){
		return true;
	}
	function activeMnu(){
		var str1=new String();
		var str2=new String();

		str1=location.href.substring(location.href.lastIndexOf('/')+1,31);
		str2=location.href.substring(location.href.lastIndexOf('/')+1,35);
		
		if (str1=='in' || str2=='') Itm='Cell1';
		
		else if (str1=='PS' || str2=='AB_pro') Itm='Cell2';
		else if (str1=='BB' || str2=='AB_pro') Itm='Cell2';
		else if (str1=='PB' || str2=='AB_pro') Itm='Cell2';
		else if (str1=='PN' || str2=='AB_pro') Itm='Cell2';
		
		else if (str1=='FI' || str2=='AB_fin') Itm='Cell3';
		else if (str1=='FS' || str2=='AB_fin') Itm='Cell3';
		
		else if (str1=='CP' || str2=='AB_com') Itm='Cell4';
		else if (str1=='FF' || str2=='AB_com') Itm='Cell4';
		else if (str1=='Cr' || str2=='AB_com') Itm='Cell4';
		
		else if (str1=='Pr' || str2=='AB_pre') Itm='Cell6';
		else if (str1=='CU' || str2=='AB_con') Itm='Cell5';
		else if (str1=='LU' || str2=='AB_con') Itm='Cell5';		
		
		mnuItm=document.getElementById(Itm);
		mnuItm.style.backgroundImage="url(assets/layout/menuBg_hvr.gif)";	
		mnuItm.style.color="#000000";
		activePg=Itm;
		}				
	function getData(Value){
			var a=new String();
			var b=new String();
			if (Value.lastIndexOf(",")!=-1 || Value.lastIndexOf(".")!=-1) 
			{ 
				for (var i=0;i<=Value.length;i++)
	 				 { a=Value.substring(i,i+1);
						  if (a==",") 
		  					{b=b+">";}
		 				  else if (a==".")
		  					{b=b+"/";}
		  				  else
		 					{b=b+a;}
	  				  }		
	 			  	return b;
			}
			else
			{  return Value;}
	}	
	function getNumkm(Value){
			var a=new String();
			var b=new String();

		
			for (var i=0;i<=Value.length;i++)
	 				 { a=Value.substring(i,i+1);
						if (a=="1") 
		  					{b=b+"&#6113;";}
		 				else if (a=="2")
		  					{b=b+"&#6114;";}
		  				else if (a=="3")
		  					{b=b+"&#6115;";}
		  				else if (a=="4")
		  					{b=b+"&#6116;";}
		  				else if (a=="5")
		  					{b=b+"&#6117;";}
		  				else if (a=="6")
		  					{b=b+"&#6118;";}
		  				else if (a=="7")
		  					{b=b+"&#6119;";}
		  				else if (a=="8")
		  					{b=b+"&#6120;";}
		  				else if (a=="9")
		  					{b=b+"&#6121;";}
		  				else if (a=="0")
		  					{b=b+"&#6112;";}
		  				else if (a==".")
		  					{b=b+",";}
		  				else if (a==",")
		  					{b=b+".";}
		  				else
		 					{b=b+a;}
	  				  }		
	 			  	return b;
	}
	
	
	function getnumKh(Value){
			var a=new String();
			var b=new String();

		
			for (var i=0;i<=Value.length;i++)
	 				 { a=Value.substring(i,i+1);
						if (a=="(")
							{b=b+"¬";}
						else if (a==")")
							{b=b+"¦";}
						else if (a=="/")
							{b=b+"¼";}
		  				else
		 					{b=b+a;}
	  				  }		
	 			  	return b;
	}
	
	function getSpace(Value){
			var a=new String();
			var b=new String();

		
			for (var i=0;i<=Value.length;i++)
	 				 { a=Value.substring(i,i+1);
						if (a==" ")
							{b=b+"&nbsp;";}
		  				else
		 					{b=b+a;}
	  				  }		
	 			  	return b;
	}
	
	/* Function button*/
	function showButton(btn_hvr){		
		var btn_locateUshvr=document.getElementById('btn_locateUs_hvr');
		var btn_customerServicehvr=document.getElementById('btn_customerService_hvr');
		var btn_siteMaphvr=document.getElementById('btn_siteMap_hvr');
		if (btn_locateUshvr!=null || btn_customerServicehvr!=null || btn_siteMaphvr!=null){
			if (btn_hvr=='btn_locateUs_hvr'){
				btn_locateUshvr.style.visibility='visible';
				btn_customerServicehvr.style.visibility='hidden';
				btn_siteMaphvr.style.visibility='hidden';				
				
			}
			if (btn_hvr=='btn_customerService_hvr'){
				btn_locateUshvr.style.visibility='hidden';
				btn_customerServicehvr.style.visibility='visible';
				btn_siteMaphvr.style.visibility='hidden';
			}
			
			if(btn_hvr=='btn_siteMap_hvr'){
				btn_locateUshvr.style.visibility='hidden';
				btn_customerServicehvr.style.visibility='hidden';
				btn_siteMaphvr.style.visibility='visible';
			}
		}
	}
	
	function hideButton(btn_hvr){
		var showBtn=document.getElementById(btn_hvr);
		showBtn.style.visibility='hidden';
	}
	
	/*-------------------welcome-------------------------*/	
	function showButtonWelcome(btn_hvr){		
		var btn_language_hvr=document.getElementById('btn_language_hvr');
		if (btn_language_hvr!=null){
			if (btn_hvr=='btn_language_hvr'){
				btn_language_hvr.style.visibility='visible';
			}
		}
	}
	
	function hideButtonWelcome(btn_hvr){
		var showBtn=document.getElementById(btn_hvr);
		showBtn.style.visibility='hidden';
	}
	
	function timer(menu,statusMouse){											
			stopTimer();
			if (statusMouse=='over')
				menuTimer = setTimeout('OverCel("' + menu + '")',300);
			if (statusMouse=='out')
				menuTimer = setTimeout('OutCel("' + menu + '")',800);			
			if (statusMouse=='outSubglobalNav')
				menuTimer = setTimeout('MouseOutLink("' + menu + '")',800);
			timerRunning=true;
		}

	function stopTimer(){
		if (timerRunning) 
			clearTimeout(menuTimer);
		timerRunning=false;
	}
	/*===========move mouse over each item in GlobalLink, then subGlobalNav of the item appears================*/
	function OverCel(Cell){			
			subgl2=document.getElementById('subglobal2');
			subgl3=document.getElementById('subglobal3');
			subgl4=document.getElementById('subglobal4');
			subgl5=document.getElementById('subglobal5');
			subgl6=document.getElementById('subglobal6');
			
			mnuItm=document.getElementById(Cell);	
			mnuItm.style.backgroundImage="url(assets/layout/menuBg_hvr.gif)";	
			mnuItm.style.color="black";					
		    if (subgl2!=null || subgl3!=null || subgl4!=null || subgl5!=null)
		    {
		
				if (Cell.substring(0,5)=='Cell2') 				
					subgl2.style.visibility='visible';
				if (Cell.substring(0,5)=='Cell3') 
					subgl3.style.visibility='visible';
				if (Cell.substring(0,5)=='Cell4') 
					subgl4.style.visibility='visible';
				if (Cell.substring(0,5)=='Cell5') 
					subgl5.style.visibility='visible';
				if (Cell.substring(0,5)=='Cell6') 
					subgl6.style.visibility='visible';		
					
				if (Cell.substring(0,5)!='Cell2')
				{	subgl2.style.visibility='hidden';
					var mnuItm=document.getElementById('Cell2');	
					mnuItm.style.backgroundImage="";	
					mnuItm.style.color="#555555";
				}
				if (Cell.substring(0,5)!='Cell3')
				{
					subgl3.style.visibility='hidden';				
					mnuItm=document.getElementById('Cell3');	
					mnuItm.style.backgroundImage="";	
					mnuItm.style.color="#555555";
				}
				if (Cell.substring(0,5)!='Cell4')
				{
					subgl4.style.visibility='hidden';				
					mnuItm=document.getElementById('Cell4');	
					mnuItm.style.backgroundImage="";	
					mnuItm.style.color="#555555";
				}
				if (Cell.substring(0,5)!='Cell5')
				{
					subgl5.style.visibility='hidden';										
					mnuItm=document.getElementById('Cell5');	
					mnuItm.style.backgroundImage="";	
					mnuItm.style.color="#555555";
				}
				if (Cell.substring(0,5)!='Cell6')
				{
					subgl6.style.visibility='hidden';
					mnuItm=document.getElementById('Cell6');	
					mnuItm.style.backgroundImage="";	
					mnuItm.style.color="#555555";				
				}				
			}
			var mnuActivePg=document.getElementById(activePg);	
			mnuActivePg.style.backgroundImage="url(assets/layout/menuBg_hvr.gif)";	
			mnuActivePg.style.color="#000000";	
		}
		
		/*===========move mouse out each item in GlobalNav, then subGlobalNav of the item disappears================*/
		function OutCel(Cell)
		{
			subgl2=document.getElementById('subglobal2');
			subgl3=document.getElementById("subglobal3");
			subgl4=document.getElementById("subglobal4");
			subgl5=document.getElementById("subglobal5");
			subgl6=document.getElementById("subglobal6");
		    if (subgl2!=null || subgl3!=null || subgl4!=null || subgl5!=null)
		    {
				mnuItm=document.getElementById(Cell);	
				mnuItm.style.backgroundImage="";	
				mnuItm.style.color="#555555";
				if (Cell=='Cell2')
					subgl2.style.visibility='hidden';
				if (Cell=='Cell3')
				    subgl3.style.visibility='hidden';	
				if (Cell=='Cell4')
				    subgl4.style.visibility='hidden';
				if (Cell=='Cell5')
					subgl5.style.visibility='hidden';
				if (Cell=='Cell6')
					subgl6.style.visibility='hidden';		
					
				var mnuActivePg=document.getElementById(activePg);	
				mnuActivePg.style.backgroundImage="url(assets/layout/menuBg_hvr.gif)";	
				mnuActivePg.style.color="#000000";	
            }			
		}
		
		/*===============move mouse over each item in SubGlobalNav,================*/
		function MouseOverLink(aLink)
		{	
			var h=document.getElementById(aLink);
			var Itm=new String();
				if (aLink=='subglobal2'|| aLink=='subglobal3' || aLink=='subglobal4' || aLink=='subglobal5' || aLink=='subglobal6'){
					if (timerRunning){
						h.style.visibility='visible';
						//switch (aLink){
						if (aLink=="subglobal2") Itm="Cell2";
						if (aLink=="subglobal3") Itm="Cell3";
						if (aLink=="subglobal4") Itm="Cell4";
						if (aLink=="subglobal5") Itm="Cell5";
						if (aLink=="subglobal6") Itm="Cell6";
						mnuItm=document.getElementById(Itm);	
						mnuItm.style.backgroundImage="url(assets/layout/menuBg_hvr.gif)";	
						mnuItm.style.color="#000000";						
					}
					
				stopTimer();
				}
		}
		
		/*=============== when move mouse out each item in SubGlobalNav===============*/
		function MouseOutLink(aLink)
		{
			var h=document.getElementById(aLink);
			var Itm=new String();
			if (aLink=='subglobal2' || aLink=='subglobal3' || aLink=='subglobal4' || aLink=='subglobal5' || aLink=='subglobal6') 		
			{	h.style.visibility='hidden';
				if (aLink=="subglobal2") Itm="Cell2";
				if (aLink=="subglobal3") Itm="Cell3";
				if (aLink=="subglobal4") Itm="Cell4";
				if (aLink=="subglobal5") Itm="Cell5";
				if (aLink=="subglobal6") Itm="Cell6";
				var mnuItm=document.getElementById(Itm);	
				mnuItm.style.backgroundImage="";	
				mnuItm.style.color="#555555";
				var mnuActivePg=document.getElementById(activePg);	
				mnuActivePg.style.backgroundImage="url(assets/layout/menuBg_hvr.gif)";	
				mnuActivePg.style.color="#000000";	
			}
		}
			

		/* Function help button language*/
		function showButtonHelp(btn_hvr){		
		var btn_helphvr=document.getElementById('btn_help_hvr');
		if (btn_helphvr!=null){
			if (btn_hvr=='btn_help_hvr')
				btn_helphvr.style.visibility='visible';			
		}
		}	
		
		function showButtonlanguage(btn_hvr)
		{		
			var btn_language_eng_hvr=document.getElementById('btn_language_eng_hvr');
			var btn_language_kh_hvr=document.getElementById('btn_language_kh_hvr');
			var btn_language_km_hvr=document.getElementById('btn_language_km_hvr');
			if (btn_language_eng_hvr!=null || btn_language_kh_hvr!=null || btn_language_km_hvr!=null){
				if (btn_hvr=='btn_language_eng_hvr'){
					btn_language_eng_hvr.style.visibility='visible';
					btn_language_kh_hvr.style.visibility='hidden';
					btn_language_km_hvr.style.visibility='hidden';
				}
				if (btn_hvr=='btn_language_kh_hvr'){
					btn_language_eng_hvr.style.visibility='hidden';
					btn_language_kh_hvr.style.visibility='visible';
					btn_language_km_hvr.style.visibility='hidden';
				}
				if (btn_hvr=='btn_language_km_hvr'){
					btn_language_eng_hvr.style.visibility='hidden';
					btn_language_kh_hvr.style.visibility='hidden';
					btn_language_km_hvr.style.visibility='visible';
				}
			}
		}
	
	function showButtonWelcome(btn_hvr){		
		var btn_language_hvr=document.getElementById('btn_language_hvr');
		if (btn_language_hvr!=null){
			if (btn_hvr=='btn_language_hvr'){
				btn_language_hvr.style.visibility='visible';
			}
		}
	}
	
	function hideButtonWelcome(btn_hvr){
		var showBtn=document.getElementById(btn_hvr);
		showBtn.style.visibility='hidden';
	}
	
	/*---------------------------------------display & hide welcome botton----------------------------*/
		function dropListLan(lan,st)
		{		
			if (st=="over")	document.getElementById('languageOption').style.visibility='visible';
			if (st=="out") document.getElementById('languageOption').style.visibility='hidden';				
		}
		
		var out
		function btnLanguageover(){
			setTimeout("dropListLan('languageOption','over')", 150);
			clearTimeout(out);
		}
		
		function btnLanguageout(){
			out=setTimeout("dropListLan('languageOption','out')", 1000);
		}
		

		/* Function help button language*/
		function showButtonHelp(btn_hvr){		
		var btn_helphvr=document.getElementById('btn_help_hvr');
		if (btn_helphvr!=null){
			if (btn_hvr=='btn_help_hvr')
				btn_helphvr.style.visibility='visible';			
		}
		}	
		