// JScript source code
	   var eOpenMenu = null;
	
	 /*   

	  function onmouseover()
	  {
	   
	   
	   PURPOSE: This event handled to trap whether the mouse is over the menu and sub menu 
	  
	    
	    //Trapping the source of this event	
		

		if (window.event)
		{ var eSrc2 = window.event.srcElement; }
			else 
		{     eSrc = eSrc ? eSrc : (window.event) ? window.event : "";  }


		//Checking whether the menu is the source of this event.
		if (!("clsMenuBarItem" == eSrc.className || "clsMenu" == eSrc.className || "clsMenuLetter" == eSrc.className))		  
		{		
		    //Checking whether the submenu is the source.
			if (eOpenMenu && !eOpenMenu.contains(eSrc)) 
			{
			   //if not making it invisible
				eOpenMenu.style.visibility = 'hidden';
				//destroying the reference to the submenu
				eOpenMenu = null;
			}	    			
	    }		
	  }
	
	     */

		function CloseMenu(eMenu)
		{
		/*
		PURPOSE: This method ensures the opened sub menu closes.
		ARGUMENT: The reference to the opened menu of class clsMenu.
		*/
			
			//Making the opened sub menu as invisible
			eMenu.style.visibility = "hidden";
			//destroying the reference to the submenu.
			eOpenMenu = null;
		}	     			
			
			
		function fncOverMenu(obj)			
		{
		/*
		PURPOSE: This method performs the task when the mouse move overs the menu.
		ARGUMENT: Inbuild object reference of the table cell of class clsMenuBarItem.
		*/	
            //Trying to identify each of the menu cell.
			switch (obj.id) 
			{
				case 'Find':				    
					fncChangeArrow('over','Arrows_Find');						
					OpenMenu('divMenuFind',obj);
					break;
				case 'Alert':			
					fncChangeArrow('over', 'Arrows_Alert');
					OpenMenu('divMenuAlert',obj);						
					break;	
				case 'Advice':
	                fncChangeArrow('over','Arrows_Advice');
					OpenMenu('divMenuAdvice',obj);							                    
	                break;
	            case 'News':
					fncChangeArrow('over','Arrows_News');
					OpenMenu('divMenuNews',obj);							                    						
					break;
				// EB 31/07/2003 - Bug - when move from News submenu to Slideshow, ensure News submenu disappears
	            case 'Slideshow':
					if (eOpenMenu) {				    
						eOpenMenu.style.visibility = 'hidden';
						eOpenMenu = null;
						}
					break;
				case 'Recruiter':
					fncChangeArrow('over','Arrows_Recruiters');
					OpenMenu('divMenuRecruiters',obj);
					break;
				default:
					break;
			}				

		}
			
		function fncOutMenu(obj)
		{
		/*
		PURPOSE: This method performs the task when the mouse moves out of the menu.
		ARGUMENT: Inbuild object reference of the table cell of class clsMenuBarItem.
		*/
			switch (obj.id) 
			{
                //Trying to identify each of the menu cell.
				case 'Find':
					fncChangeArrow('out', 'Arrows_Find');	
					break;
				case 'Alert':
					fncChangeArrow('out', 'Arrows_Alert');
					break;	
				case 'Advice':
	                fncChangeArrow('out','Arrows_Advice');
	                break;
	            case 'News':
					fncChangeArrow('out','Arrows_News');
					break;
				case 'Recruiter':
					fncChangeArrow('out','Arrows_Recruiters');
					break;						
				default:
					break;
			}
		}
		
		function fncChangeArrow(strMousePos,spanId)
		{

		/*
		PURPOSE: This method performs the task of changing the direction of the 
		         arrow that appears next to the menu item.
		ARGUMENT: strMousePos - to indicate the position of the mouse.
		          spanId - ID of the span element that encloses this arrow.		          
		*/			
		
			var spanElement;
			
			//getting the reference of the span element by its id.
			spanElement = document.getElementById(spanId);
			
			//Identifying the position of the menu.
			switch (strMousePos)
			{
				case 'over':
				    //if over the arrow is down.
					spanElement.innerText = 'q';
					break;
				case 'out':
				    //if out the arrow is up.
					spanElement.innerText = 'u';
					break;
				default:
					break;
			}				
		}
						
			function OpenMenu(eMenuId,obj) {
			
			/*
			PURPOSE: This method performs the task of opening the menu.
			ARGUMENT: eMenuId - the id of the div element that contain the submenu.
   					  obj - the object reference of the menu cell for which the submenu to be open.		          
			*/				
								
				var eMenu;
				
				//Checking whether any  submenu is open and visible.
				if (eOpenMenu && (eOpenMenu.id == eMenuId) && (eOpenMenu.style.visibility = 'visible'))
				{
				   eOpenMenu.style.visibility = 'hidden';
				}
				//Checking whether any reference to any other submenu have been holding.
				else if (eOpenMenu) {				    
					eOpenMenu.style.visibility = 'hidden';
					eOpenMenu = null;
			    }						

                var oParent = obj.offsetParent; 
                //Getting the Left position of the table that is holding this menu cell.
                var oParentLeft = oParent.offsetLeft;			   
			  	
			  	//Getting the reference of the sub menu to be open.				
				eMenu = document.getElementById(eMenuId);
				
				//Making the left of the to be open submenu as a sum of parent table and the menu cell.
				//This is to ensure the left position according to the size of the browser window.
				if ("divMenuRecruiters" == eMenuId)
				{
					eMenu.style.left = oParentLeft + obj.offsetLeft - 15;
				} else
				{
					eMenu.style.left = oParentLeft + obj.offsetLeft;
				}	
				
				//Making the open of the to be open submenu as a sum of parent table top and the menu cell height.				
				//This is to ensure the top position according to the size of the browser window.
				eMenu.style.top = oParent.offsetTop + obj.offsetHeight;
				
				//Making the sub menu visible.				
				eMenu.style.visibility = "visible";
				
				//Holding the reference of the opened sub menu.
				eOpenMenu = eMenu;
				
			}
			
			
			function EnsureVisiblity(obj) {
			
			/*
			PURPOSE: This method performs the task of ensuring the sub menu is visible when the mouse overs to
			         the opened sub menu and the arrow is in the proper direction.
			ARGUMENT: obj - the object reference of the opened submenu.   					  		          
			*/				
			
			   var sStr = 'Arrows_';		
			   
			   sStr = sStr + obj.id.substr(7);			   
			   
			   var spanElement;
			   
			   //Getting the reference of the span element that contains the arrow.	
			   spanElement = document.getElementById(sStr);
               
               //Making the arrow down.
			   spanElement.innerText = 'q';				   	
			   
			   //Ensuring the submenu is visible.
			   obj.style.visibility = 'visible';
						
			}
			
			
			function EnsureInVisiblity(obj) {
			
			/*
			PURPOSE: This method performs the task of ensuring the sub menu is invisible when the mouse 
			         out of the opened sub menu and the arrow is in the proper direction.
			ARGUMENT: obj - the object reference of the opened submenu.   					  		          
			*/	
			   			   			
			
			   var sStr = 'Arrows_';
			   
			   sStr = sStr + obj.id.substr(7);
			   
			   var spanElement;
			   
			   //Getting the reference of the span element that contains the arrow.	
			   spanElement = document.getElementById(sStr);
			   
			   //Making the arrow up.
			   spanElement.innerText = 'u';		
			   
			   //Ensuring the submenu is invisible.
			   obj.style.visibility='hidden';			   			  
			   
			   //Destroying the closed menu reference.
			   eOpenMenu = null;			
			}  
			
			

			function fncSubmit() {
			   
			/*
			PURPOSE: This method performs the task of calling the page that displays the result for the
			         quicksearch.			         
			*/		
					
					var txtSearch = document.getElementById('idSearchBox');
					
					var queryString = "http://goodmoves/Search/_ScriptLibrary/Results.asp"
					//window.open(queryString + "?" + "ts=" + ts.value);
					
					location.href = "../findajob/findajobres.asp?qs=" + txtSearch.value;
			      		
			}

		function fncOpenHelp() 
		{

		/*
		PURPOSE: This method performs the task of opening the help window for quick search.			         
		*/		   
		   
			var newWindow; 
			var props = 'scrollBars=yes,resizable=no,toolbar=no,menubar=no,location=no,directories=no,width=350,height=275,top=300,left=300'; 
			newWindow = window.open('../help/help.htm', 'Help', props);		  
			newWindow.focus();
			return true;  
		      
		   
		}
   
		function fncSiteMapTitle(strTitle)
		{
		/*
		   PURPOSE: This method performs the task of displaying the String that identifies the displaying page.			         
		   ARGUMENT: strTitle - the string to be display.
		*/					    
			idSiteMapChange.innerHTML = '&nbsp;' + strTitle;
		}
   
		
				
				function doThePopUp() {
				theUrl="../TANDC.aspx";
				reWin = window.open(theUrl,'determined','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=445,height=310,top=250,left=275');
				}
				//  End Added By Zak 12-/02/03 for window popups-->
				
				
				function NewWindow(mypage, myname, w, h, scroll) {
					var winl = (screen.width - w) / 2;
					var wint = (screen.height - h) / 2;
					winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
					win = window.open(mypage, myname, winprops)
					if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
				}//  End Added By Zak 13-/02/03 for window popups  NewWindow('goodmoves_advert.htm','GOODMOVES',430,370)-->
				
				
				function open_popup(page) {
	
     if (screen.availWidth > 800)

		                    {wWidth = 610;

                        wLeft = (screen.availWidth - wWidth) / 2;}

            else

                        {wWidth = screen.availWidth;

                        wLeft = 0;}

            if (screen.availHeight > 600)

                        {wHeight = 550;

                        wTop = (screen.availHeight - wHeight) / 2;}

            else

                        {wHeight = screen.availHeight;

                        wTop = 0;}
                       
    top.window_handle = open(page,'popupWindowName',"top=" + wTop + ",left=" + wLeft + ",resizable=yes,scrollbars=yes,width=" + wWidth + ",height=" + wHeight + ",toolbar=no,menubar=no,status=no,scroll=no");
    top.window_handle.focus();
    if (!top.window_handle.opener) top.window_handle.opener = self;
    return false;
}