showProfileData();
function showProfileData(){
	var serverData='';
	var xmlhttp = getHTTPRequest();	
	var uri = '/iams/en_US/jsp/angel/Profile.jsp';
	//alert("uri is " + uri);	
	xmlhttp.open('GET',uri,true);
	//alert("AFTER OPEN");	
	xmlhttp.onreadystatechange = function()
	{	
		//alert(xmlhttp.readyState)		
		if (xmlhttp.readyState == 4) 
		{				
			serverData=xmlhttp.responseText;			
			//alert("serverData->" + serverData);
			serverData = serverData.replace(/^[\s]+/,'').replace(/[\s]+$/,'').replace(/[\s]{2,}/,' ');			
			if(serverData != ''){				
				var profileSpan = document.getElementById("profile");
				if(profileSpan){
					profileSpan.innerHTML = serverData + ',&nbsp;&nbsp;<a href="/iams/en_US/jsp/IAMS_Page.jsp?pageID=SO">Sign Out</a> | <a href="/iams/en_US/jsp/IAMS_Page.jsp?pageID=UP" title="Modify Profile">Modify Profile</a>';
				}				
			}
		}
	};
	xmlhttp.send(null);
	return serverData;	
}


function getHTTPRequest() 
{
	var xmlhttp = false;
	try 
	{
		xmlhttp = new ActiveXObject('Msxml2.XMLHTTP');
	}
	catch (e) 
	{
		try 
		{
			xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');
		}
		catch (E) 
		{
			xmlhttp = false;
		}
	}
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') 
	{
		xmlhttp = new XMLHttpRequest();
	}
	return xmlhttp;
}

