﻿	function talk(antServer,antPort,loginName,userName,dept,jobTitle,phone,mobile,email,pic)
	{
		var livechat_query = "server=" + antServer+ "&port=" + antPort + "&lang=cn&savehistory=1" ;
		var url = "/livechatfile/talk.htm?" + livechat_query  ;
		if (loginName != undefined) {url += "&loginname=" + escape(loginName) ;}
		if (userName != undefined) {url += "&username=" + escape(userName) ;}
		if (dept != undefined) {url += "&dept=" + escape(dept) ;}
		if (jobTitle != undefined) {url += "&jobtitle=" + escape(jobTitle);}
		if (phone != undefined) {url += "&phone=" + escape(phone);}
		if (mobile != undefined) {url += "&mobile=" + escape(mobile);}
		if (email != undefined) {url += "&email=" + escape(email);}
		if (pic != undefined) {url += "&pic=" + escape(pic);}
		var w = 550;
		var h = 435 ;
		var l = (screen.width-w) / 2 ;
		var t = (screen.height-h) / 2 ;
		window.open(url,"livechat","width=" + w + ",height=" + h + ",top=" + t + ",left=" + l + ",scroll=0,resize=auto");
	}
	function setFloat(x,y)
	{
		var div = document.getElementById("livechat"); 
		window.onscroll = function () { 
			div.style.top = document.body.scrollTop + y; 
		} 
		div.style.top = y ;
		div.style.left = x ;
	}