function getElements(tagName,className)
            {
        	var children = document.getElementsByTagName(tagName); 
        	var elements = new Array();
        	for (var i=0;i<children.length;i++) 
              {
        	  var child = children[i];
        	  var classNames = child.className.split(' ');
        	  for (var j = 0; j < classNames.length; j++) 
                {
        	    if (classNames[j] == className) 
            	  {
        	      elements.push(child);
        		  break;
        		  }
        		}
        	  }
        	return elements;
            }

         function changeBody(selectedItem,bodyURL)
           {
           changeBody(selectedItem,bodyURL,false);
           }
         
         function changeBody(selectedItem,bodyURL,fullURL)
           {
           changeBody(selectedItem,bodyURL,fullURL,"_self");
           }

          function changeBody(selectedItem,bodyURL,fullURL,target)
            {

            // Change the Menu
            var theNavigationButtons = getElements("div","NavigationButton");

            var theId = "NavigationButton_" + selectedItem;
            for(var i = 0; i < theNavigationButtons.length; i++ )
              {
              var aNavigationButton = theNavigationButtons[i];
              if ( aNavigationButton.id == theId )
                { 
                aNavigationButton.setAttribute("selected","yes");
                }
              else if ( aNavigationButton.getAttribute("selected") == "yes" )
                { 
            	aNavigationButton.setAttribute("selected","no");
                } 
              }

            // Change the visibility of top logo
            if ( selectedItem == "Home" )
              {
              document.getElementById("imageForLogoOnTop").style.visibility="hidden";
              }
            else
              {
              document.getElementById("imageForLogoOnTop").style.visibility="visible";
              }
            
            if ( fullURL == true )
              {
              if ( target == null )
                {
            	target = "_self";  
                }
              window.open(bodyURL,target);
              if ( target != "_self" )
                {
                window.parent.focus();
                window.close();
                }
              }
            else
              {
              try
                {
                // Load the New Body
                var arrayBodyURL = bodyURL.split('#');
 
                var loadURL = arrayBodyURL[0] + "?body";
                if ( arrayBodyURL.length == 2 )
                  {
                  loadURL += "#" + arrayBodyURL[1];
                  }
            
        	    $('#innerBody').load(loadURL);
                }
             catch(err)
                {
        	    window.location.href = bodyURL;
                }
              }
            }