//(x0,y0)为开始拖动时鼠标的位置(x1,y1)为开始拖动时对象的位置 
var move_obj_x0=0,move_obj_y0=0,move_obj_x1=0,move_obj_y1=0;
var obj_moveable=false; 
var QQStatus = false;
  			

//开始拖动; 
function startDrag(obj,id) 
{ 
  if (event.button==1) { 
    obj.setCapture(); 
    win=document.getElementById(id) 
    move_obj_x0 = event.clientX; 
    move_obj_y0 = event.clientY; 
    move_obj_x1 = parseInt(win.style.left);  
    move_obj_y1 = parseInt(win.style.top); 
    obj_moveable = true; 
  } 
}
 
//拖动; 
function drag(id) 
{ 
	if(obj_moveable){ 
    win=document.getElementById(id) 
    win.style.left = (move_obj_x1 + event.clientX - move_obj_x0>0)?move_obj_x1 + event.clientX - move_obj_x0:0; 
    win.style.top = (move_obj_y1 + event.clientY - move_obj_y0>0)?move_obj_y1 + event.clientY - move_obj_y0:0; 
  } 
}
 
//停止拖动; 
function stopDrag(obj,id) 
{ 
	if (obj_moveable) { 
  	obj.releaseCapture(); 
    obj_moveable = false; 
  } 
} 

function tracqfloaterChange(){
	if ( QQStatus ){
	 	if ( document.getElementById('tracqfloater').style.visibility == 'hidden' )
	 		document.getElementById('tracqfloater').style.visibility='visible';
	 	else
	 		 document.getElementById('tracqfloater').style.visibility = 'hidden'; 
	 }
	 else{
	 	loadQQ();		 
	 	if ( document.getElementById('tracqfloater').style.visibility == 'hidden' )
	 		document.getElementById('tracqfloater').style.visibility='visible';
	 	else
	 		 document.getElementById('tracqfloater').style.visibility = 'hidden'; 
	}
}

function tracqfloaterClose()
{
	document.getElementById('tracqfloater').style.visibility ='hidden';
}  

function loadQQ(){
	var imgPath = document.getElementById('txImgPath').value;
	if ( imgPath )
		imgPath += "/images/";;
	var div = document.getElementById('tracqfloater');

	var qqstr =  
	"<table id='tbCallOnline' cellspacing='0' cellpadding='0' width='115' border='0'>"+
	"	<tr><td><img style='cursor: hand' height='84' src='{imgPath}/menu_top.gif' width='115' usemap='#Map111' border='0'></td></tr>"+
	"	<tr><td><img height='5' src='{imgPath}/menu_hid_top.gif' width='115'></td></tr>"+
	"	<tr><td align='center' background='{imgPath}/menu_bg.gif' height='25'>"+
	"		<span class='acall'>出票专用客服① <a target='blank' href='http://wpa.qq.com/msgrd?V=1&Uin=496051923&Site=出票专用客服①'为您服务>"+
	"			<img border='0' src='http://wpa.qq.com/pa?p=16:496051923:16' alt='主要服务功能是帮助合作单位点出票，进行网上支付。请不要重复提交，其他功能请对应功能发布或致电客服热线：020-36172111'></a></span></td></tr>"+
	"	<tr><td align='center' background='{imgPath}/menu_bg.gif'>"+
	"		<span class='acall'>出票专用客服② <a target='blank' href='http://wpa.qq.com/msgrd?V=1&Uin=619036211&Site=出票专用客服②'为您服务>"+
	"			<img border='0' src='http://wpa.qq.com/pa?p=16:619036211:16' alt='主要服务功能是帮助合作单位点出票，进行网上支付。请不要重复提交，别的功能请对应功能发布或致电客服热线：020-36172111'></a></span></td></tr>"+
	"	<tr style='mso-yfti-irow: 1; height: 18.75pt'><td style='padding: 0cm 0cm 0cm 0cm; height: 18.75pt' background='{imgPath}/menu_bg.gif'>"+
	"		<p class='MsoNormal' align='center' style='text-align: center'>"+
	"		<span class='acall1'><span style='font-size: 9.0pt'>出票专用客服③ <span lang='EN-US'>"+
	"		<a	href='http://wpa.qq.com/msgrd?V=1&amp;Uin=429080357&amp;Site=出票专用客服①' target='blank'	为您服务><span style='text-decoration: none; text-underline: none'>"+
	"			<img border='0' width='77' height='17' id='_x0000_i1025' src='http://wpa.qq.com/pa?p=16:429080357:16' alt='主要服务功能是帮助合作单位点出票，进行网上支付。请不要重复提交，其他功能请对应功能发布或致电客服热线：020-36172111'></span></a></span></span></span>"+
	"		<span	lang='EN-US' style='font-size: 9.0pt'><o:p></o:p></span></p></td></tr>"+
	"	<tr style='mso-yfti-irow: 1; height: 18.75pt'><td style='padding: 0cm 0cm 0cm 0cm; height: 18.75pt' background='{imgPath}/menu_bg.gif'>"+
	"		<p class='MsoNormal' align='center' style='text-align: center'>"+
	"		<span class='acall1'><span style='font-size: 9.0pt'>申请位置专用① <span lang='EN-US'>"+
	"		<a	href='http://wpa.qq.com/msgrd?V=1&amp;Uin=458274661&amp;Site=申请位置专用①' target='blank' 为您服务><span style='text-decoration: none; text-underline: none'>"+
	"		<img border='0' width='77' height='17' id='Img1' src='http://wpa.qq.com/pa?p=16:458274661:16'	alt='主要服务功能是帮助合作单位点出票，进行网上支付。请不要重复提交，其他功能请对应功能发布或致电客服热线：020-36172111'></span></a></span></span></span><span lang='EN-US' style='font-size: 9.0pt'><o:p></o:p></span></p></td></tr>"+
	"	<tr style='mso-yfti-irow: 1; height: 18.75pt'><td style='padding: 0cm 0cm 0cm 0cm; height: 18.75pt' background='{imgPath}/menu_bg.gif'>"+
	"		<p class='MsoNormal' align='center' style='text-align: center'>"+
	"		<span class='acall1'><span style='font-size: 9.0pt'>申请位置专用② <span lang='EN-US'>"+
	"		<a href='http://wpa.qq.com/msgrd?V=1&amp;Uin=771059869&amp;Site=申请位置专用②' target='blank' 为您服务><span style='text-decoration: none; text-underline: none'>"+
	"		<img border='0' width='77' height='17' id='Img2' src='http://wpa.qq.com/pa?p=16:771059869:16' alt='主要服务功能是帮助合作单位点出票，进行网上支付。请不要重复提交，其他功能请对应功能发布或致电客服热线：020-36172111'></span></a></span></span></span><span lang='EN-US' style='font-size: 9.0pt'><o:p></o:p></span></p></td></tr>"+
	"	<tr style='mso-yfti-irow: 1; height: 18.75pt'>"+
	"		<td style='padding: 0cm 0cm 0cm 0cm; height: 18.75pt' background='{imgPath}/menu_bg.gif'>"+
	"		<p class='MsoNormal' align='center' style='text-align: center'>"+
	"		<span class='acall1'><span style='font-size: 9.0pt'>出票专用客服④ <span lang='EN-US'>"+
	"		<a href='http://wpa.qq.com/msgrd?V=1&amp;Uin=826487685&amp;Site=出票专用客服④ ' target='blank' 为您服务><span style='text-decoration: none; text-underline: none'>"+
	"		<img border='0' width='77' height='17' id='Img3' src='http://wpa.qq.com/pa?p=16:826487685:16' alt='主要服务功能是帮助合作单位点出票，进行网上支付。请不要重复提交，其他功能请对应功能发布或致电客服热线：020-36172111'></span></a></span></span></span><span lang='EN-US' style='font-size: 9.0pt'><o:p></o:p></span></p></td></tr>"+
	"	<tr><td align='center' background='{imgPath}/menu_bg.gif' height='25'>"+
	"		<span class='acall'>咨询处理问题①<a target='blank' href='http://wpa.qq.com/msgrd?V=1&Uin=649421191&Site=咨询处理问题①' 为您服务>"+
	"		<img border='0' src='http://wpa.qq.com/pa?p=16:649421191:16' alt='主要服务功能：咨询客户的基本问题，如系统无法订座，无法点出票，订单有问题，更改身份证号，航班改期，处理航班延误，咨询退票手续费等等和系统出票操作相关的问题'></a></span></td></tr>"+
	"	<tr><td align='center' background='{imgPath}/menu_bg.gif'>"+
	"		<span class='acall'>退票专用<a target='blank' href='http://wpa.qq.com/msgrd?V=1&Uin=838843560&Site=退票专用' 为您服务>"+
	"		<img border='0' src='http://wpa.qq.com/pa?p=16:838843560:16' alt='主要服务功能：处理退票等相关业务的问题，不处理当日作废'></a></span></td></tr>"+
	"	<tr><td align='center' background='{imgPath}/menu_bg.gif'>"+
	"		<span class='acall'>结算对帐专用 <a target='blank' href='http://wpa.qq.com/msgrd?V=1&Uin=906038812&Site=结算对帐专用' 为您服务>"+
	"		<img border='0' src='http://wpa.qq.com/pa?p=16:906038812:16' alt='主要服务功能：汇款后查账，授信，结算，对账，领票，寄票，退票款到帐问题，分配保险帐号等等相关财务方面的问题的处理'></a></span></td></tr>"+
	"	<tr><td align='center' background='{imgPath}/menu_bg.gif'>"+
	"		<span class='acall'>技术服务 <a target='blank' href='http://wpa.qq.com/msgrd?V=1&Uin=646692997&Site=技术服务' 为您服务>"+
	"		<img border='0' src='http://wpa.qq.com/pa?p=16:646692997:16' alt='主要功能：培训系统操作不熟练的客户，在网上远程协助帮助客户解决实际问题，对客户系统重装后打票，打保险无法打印的现象进行技术指导和远程处理，处理客服无法处理的问题'></a></span></td></tr>"+
	"	<tr><td align='center' background='{imgPath}/menu_bg.gif'>"+
	"		<span class='acall'>团队专用客服 <a target='blank' href='http://wpa.qq.com/msgrd?V=1&Uin=943907343&Site=团队专用客服' 为您服务>"+
	"		<img border='0' src='http://wpa.qq.com/pa?p=16:943907343:16' alt='主要功能：为客户处理10人以上团队的操作，向航空公司申请座位，处理10人以上团队的一切问题，非团队业务恕不回复'></a></span></td></tr>"+
	"	<tr><td align='center' background='{imgPath}/menu_bg.gif'>"+
	"		<span class='acall'>国际客服①<a target='blank' href='http://wpa.qq.com/msgrd?V=1&Uin=849295050&Site=国际客服①' 为您服务>"+
	"		<img border='0' src='http://wpa.qq.com/pa?p=16:849295050:16' alt='主要功能：为客户提供国际机票的查询与预订。'></a></span></td></tr>"+
	"	<tr><td align='center' background='{imgPath}/menu_bg.gif'>"+
	"		<span class='acall'>国际客服②<a target='blank' href='http://wpa.qq.com/msgrd?V=1&Uin=1059841483&Site=国际客服②' 为您服务>"+
	"		<img border='0' src='http://wpa.qq.com/pa?p=16:1059841483:16' alt='主要功能：为客户提供国际机票的查询与预订。'></a></span></td></tr>"+
	"	<tr><td align='center' background='{imgPath}/menu_bg.gif'>"+
	"		<span class='acall'>值班经理<a target='blank' href='http://wpa.qq.com/msgrd?V=1&Uin=907103823&Site=值班经理' 为您服务>"+
	"		<img border='0' src='http://wpa.qq.com/pa?p=16:907103823:16' alt='主要功能：处理日常工作，客户投诉，不处理一般的业务，请不要把业务单发给值班经理，任何业务的问题请与专职客服'></a></span></td></tr>"+
	"	<tr><td><img height='9' src='{imgPath}/menu_hid_bottom.gif' width='115'></td></tr>"+
	"	<tr><td><img height='18' src='{imgPath}/menu_bottom.gif' width='115'></td></tr>"+
	"</table>";
	qqstr = qqstr.replace(/{imgPath}/g, imgPath);
	div.innerHTML = qqstr;
	QQStatus =true;
}