// JavaScript Document
// JavaScript Document
var objWinChild;
	var clickFromParent = false;
	function hlChildClick() {
		var xPos, yPos;
		var childWidth, childHeight;
		childWidth = 500;
		childHeight = 400;
		clickFromParent = true;
		if(!objWinChild) {
			objWinChild = window.open("/chatIncludes/clientChatWin.php","","status=1, resizable=0, width=" + childWidth + ",height=" + childHeight);
			xPos = (parseFloat(screen.width) / 2) - (childWidth / 2);
			yPos = (parseFloat(screen.height) / 2) - (childHeight / 2);
			objWinChild.moveTo(xPos, yPos);
		}
		document.getElementById('chkNotify').click();
	}
	function chkNotifyChange(obj) {
		if(!clickFromParent) {
			objWinChild = null;
			objXmlChatClose = new PartialPostBack();
			sendClientChatClose();
		}
		clickFromParent = false;
	}
	window.onunload = function() {
		if(objWinChild) {
			objWinChild.document.getElementById('chkNotify').click();
		}
	}
	//On Server Chat Window Close
	var intClientChatClose;
	var objXmlChatClose;
	function sendClientChatClose() {
		var url="/chatIncludes/clientLogout.php";
		var reqType = "GET";
		var req = null;
		var strData;
		objXmlChatClose.setXmlUrl(url);
		objXmlChatClose.setXmlRequestType(reqType);
		objXmlChatClose.sendXmlRequest(req);
		intClientChatClose = setInterval(recieveClientChatClose, 1);
	}
	function recieveClientChatClose() {
		if(objXmlChatClose.isResponseReady()) {
			alert(objXmlChatClose.getXmlResponse());	
		 clearInterval(intClientChatClose);
		}
	}