var xmlhttp=null;


function showHint(msg)
{
	if (msg.length==0)
  	{ 
  		document.getElementById("txtHint").innerHTML="";
  		return;
  	}
	if(!xmlhttp && typeof ActiveXObject != "undefined")
	{
   		try
		{ 
			xmlhttp=new ActiveXObject("MSXML2.XMLHTTP"); 
		}
		catch(e)
		{
			xmlhttp=false;
		}
   		if(!xmlhttp)
		{
			try
			{ 
				xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 
			}
			catch(e)
			{
				xmlhttp=false;
			}
		}
  	}
	else if(window.XMLHttpRequest)
  	{
  		// code for IE7+, Firefox, Chrome, Opera, Safari
  		xmlhttp=new XMLHttpRequest();
		//alert("ie7 FIREFOX Chrome");
  	}
	else if (window.ActiveXObject)
  	{
  		// code for IE6, IE5
  		//xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		try  
		{  
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");  
		}  
		catch (e)  
		{ 
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); 
			
		}  
 	}
	else
  	{
  		alert("Your browser does not support XMLHTTP!");
  		return;
  	}
	var url="chat_display.php?m=" + msg ;
	url=url+"&sid="+Math.random();
	xmlhttp.open("GET",url,false);
	xmlhttp.send(null);
	
	document.getElementById("txtHint").innerHTML=xmlhttp.responseText;

	var divObject = document.getElementById('myDiv');
	divObject.scrollTop = divObject.scrollHeight;
	//document.getElementById('message').value=null;
	//document.all.myDiv.scrollIntoView(true);

	setTimeout("showHint(' ')", 2000)	
}

function showHideEmoticons()
{
	var display = document.getElementById("emote").style.display;	
	if(display=="none")
	{
		document.getElementById("emote").style.display="block";
	}
	else
	{
		document.getElementById("emote").style.display="none";
	}
}
