﻿var xmlHttp = false;
function createXMLHttpRequest(){
	if(window.ActiveXObject){
		return new ActiveXObject("Microsoft.XMLHTTP");
	}else if(window.XMLHttpRequest){
		return new XMLHttpRequest();	
	}
}
function CheckLogin(){
xmlHttp=createXMLHttpRequest();
var url="/Naturecolored_checkLogin.html?ran"+Math.random();
xmlHttp.open("GET",url,true);
xmlHttp.onreadystatechange=function(){
if(xmlHttp.readyState==4&&xmlHttp.status==200){
document.getElementById("userlogin").innerHTML=xmlHttp.responseText;
}};
xmlHttp.send(null);	
setTimeout("CheckLogin()",2000);
}

function Chatting(obj){
var hd=document.getElementById("chatdiv").style;
if(hd.display!="block"){
hd.display="block";
obj.title="Close Chatting";
}else{
hd.display="none";
obj.title="Open Chatting";
}}
