
function getExhibitorLoginString(e_key, eid)
{
	var xmlHttp = GetXmlHttpObject();
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			if (xmlHttp.status==200)
			{
				// 200 = "OK"
				//alert(xmlHttp.responseText);
				var response = xmlHttp.responseText;
				var array = response.split("]");
				
				if (array.length == 2)
				{
					var username = array[0];
					var password = array[1];
					var link = "&username=" + username + "&password=" + password;
					document.getElementById('link' + e_key).href = document.getElementById('link' + e_key).href + link;
					document.getElementById('login' + e_key).innerHTML = username;
					document.getElementById('password' + e_key).innerHTML = password;
				}
			}
			else
			{
				alert("Problem retrieving data: " + xmlHttp.statusText);
			}
		}
	}
	var url = "ajax/ajax_getExhibitorLoginString.php?eid=" + eid + "&e_key=" + e_key;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);  
}

function GetXmlHttpObject()
{
	var xmlHttp=null;
	try
	{  
		// Firefox, Opera 8.0+, Safari  
		xmlHttp=new XMLHttpRequest();  
	}
	catch (e)
	{  
		// Internet Explorer  
		try
		{    
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");    
		}
		catch (e)
		{    
			try
			{      
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");      
			}
			catch (e)
			{      
				alert("Your browser does not support AJAX!"); 
			}    
		}  
	}
	return xmlHttp;
}