//*****************************************************************************//
//  Modified: 05-29-06 by Helen T modified some parts of the code 
//	to match with the purpose of the Gateway select pages

//	Nav bar tab highlighting
//	Author: Michael Turnwall, Gateway, Inc
//	Created: 08.30.2005
//	Description: determine location of user by the filename and turn on
//					appropiate tab on nav bar. Also a function to open an new
//					window and create dynamic links
//	Copyright 2005 Gateway, Inc. All rights reserved.
//*****************************************************************************//

function navLocation()
{
	    var loc;
		/*HT added this code here for case that has asp query*/
		var findQuery = location.search;
		 if(findQuery == "?page=features")
			loc		= "features";
		else if(findQuery == "?page=versions")
			loc		= "versions";			
		else if(findQuery == "?page=overview")
			loc		= "overview";			
        else if(findQuery == "?page=vista_gateway")
            loc     = "gateway";
        else if(findQuery == "?page=express")
            loc     = "express";
		else{
			var here = location.pathname;
			var extension = here.indexOf(".") - 1;
			var filename = here.lastIndexOf("/");
			var strLen = extension - filename;
			loc = here.substr(filename + 1, strLen);
		}
	
	switch(loc)
	{
		case "overview":
		case "index":
			menuItem = document.getElementById("menu01");
			menuLink = menuItem.firstChild;
			menuLink.id = "here";
			var tabBar = document.getElementById("tabBar");
			tabBar.style.marginTop = "0";
			break;
			
		case "features":
			menuItem = document.getElementById("menu02");
			menuLink = menuItem.firstChild;
			menuLink.id = "here";
			break;
			
		case "versions":
			menuItem = document.getElementById("menu03");
			menuLink = menuItem.firstChild;
			menuLink.id = "here";
			break;
			
        case "vista_gateway":
            menuItem = document.getElementById("menu04");
            menuLink = menuItem.firstChild;
            menuLink.id = "here";
            break;
            
        case "express":
            menuItem = document.getElementById("menu05");
            menuLink = menuItem.firstChild;
            menuLink.id = "here";
            break;
            
 

		
	}
	
}

