function xthtagWidget() {
	this._buyPrefix = ["我想买","我想买你家的","我想买你们家的"];
	this.gid = 0;
	this.picUrlInfo=[];
	this.pic_id=-1;
	this.smallpreview="";
	this.picMapArray=new Array();
	this.picMapObject=[];
	this.topFaq="";
	this.remindTitle="";
	this.listFaqResult="";
	this.lookJianghuUrl="";
	this.hasShowHand=false;
	
}

xthtagWidget.prototype._getPicMapArray=function(){
	return this.picMapArray;
}
xthtagWidget.prototype._setPicMapArray=function(picMapArray){
	this.picMapArray=picMapArray;
}
xthtagWidget.prototype._getPic_id=function(){
	   return this.pic_id;
	
}
xthtagWidget.prototype._setTopFaq=function(topFaq){
	
	  this.topFaq=topFaq;
}
xthtagWidget.prototype._setListFaqResult=function(listFaqResult){
	this.listFaqResult=listFaqResult;
	
}
xthtagWidget.prototype._getListFaqResult=function(){
	
	return this.listFaqResult;
}

xthtagWidget.prototype._getTopFaq=function(){
	
	   return this.topFaq;
}
xthtagWidget.prototype._setRemindTitle=function(remindTitle){
	
	  this.remindTitle=remindTitle;
}

xthtagWidget.prototype._getRemindTitle=function(){
	
	   return this.remindTitle;
}
xthtagWidget.prototype._setPic_id=function(pic_id){
	
	this.pic_id=pic_id;
}
xthtagWidget.prototype._setSmallpreview=function(smallpreview){
	this.smallpreview=smallpreview;
}
xthtagWidget.prototype._getSmallpreview=function(){
	return this.smallpreview;
}
xthtagWidget.prototype._getBuyPrefixInfo = function() {
	var i = Math.floor(Math.random()*1000)%3;
	return this._buyPrefix[i];
}
xthtagWidget.prototype._setLookJianghuUrl=function(lookJianghuUrl){
	this.lookJianghuUrl=lookJianghuUrl;
}
xthtagWidget.prototype._getLookJianghuUrl=function(){
	
	return this.lookJianghuUrl;
}

xthtagWidget.prototype.setPicUrlInfo=function(picUrlInfoStr){
	   if(this.picUrlInfo.length>0){
		   this.picUrlInfo=[];
	   }
	   var picUrlInfoObject=eval('('+picUrlInfoStr+')');
	   
	   for(var i=0;i<picUrlInfoObject.length;i++){
		   
		  this.picUrlInfo[i]=picUrlInfoObject[i];
		   
	   }
	  
}

xthtagWidget.prototype.getPicUrlInfo=function(i){
	
	    return this.picUrlInfo[i];
}
xthtagWidget.prototype._setPicMapObject=function(picMapObjectStr){
	
	if(this.picMapObject.length>0){
		this.picMapObject=[];
	}
	var picMapObject=eval('('+picMapObjectStr+')');
	for(var i=0;i<picMapObject.length;i++){
		this.picMapObject[i]=picMapObject[i];
	}
}
xthtagWidget.prototype._getPicMapObjectOne=function(i){
	return this.picMapObject[i];
	
}
xthtagWidget.prototype._getPicMapObject=function(){
	return this.picMapObject;
}
xthtagWidget.prototype.getAllPicUrlInfo=function(){
	
	    return this.picUrlInfo;
}
xthtagWidget.prototype.getPicUrlInfoLength=function(){
        return this.picUrlInfo.length;	
 }
xthtagWidget.prototype.faqUrlListSelect = function(id,comment)
{
	var cmd = {command: "faqAsk64", param: ""};
	var paramArray = new Array();
	var option = {"key": "id", "text": id};
	paramArray.push(option);
	var option = {"key": "question", "text": comment};
	paramArray.push(option);
	cmd.param = paramArray;
	qsupport.showInputBeforeCommand(JSON.stringify(cmd),utf8to16(base64decode(comment)));
}

xthtagWidget.prototype.openUrl = function(url) {
	window.open(url,"newwindow"+(++this.gid));
}

xthtagWidget.prototype.displaySwitch = function(iid,tid, lid, cid,flag,key) {
	
	if($("#"+tid).is(":visible"))
	{
		$("#"+tid).hide();
		$("#tr"+tid).removeClass("questionSelect");
		$("#"+iid).attr("src","images/flex1.gif");
		$("td[class^='" + lid + "-td']").each(function() {
			$(this).removeClass("questionTDSelect");
		});
		//阿里旺旺打开知识相关链接
		
		if(flag == 'true'){
			this.openLeftPartTd();
		}
		
		
	}
	else
	{
		
		$("tr[class^='" + lid + "-1']").each(function() {
			$(this).removeClass("questionSelect");
		});
		$("td[class^='" + lid + "-td']").each(function() {
			$(this).removeClass("questionTDSelect");
		});
		
		$("tr[class='" + lid + "-2']").hide();
		
		$("img[class^='" + lid + "-3']").attr("src","images/flex1.gif");
		$("#"+tid).show();
		$("#tr"+tid).addClass("questionSelect");
		$("#" + cid + "-td").addClass("questionTDSelect");
		$("#"+iid).attr("src","images/flex2.gif");
		 
		//阿里旺旺打开知识相关链接
        if(key != null && key != undefined && key != ''){
			if(qsupportGetValue(COMPANY_ID) == 3){
     		    //changeTab("0");
     		    
     	        document.getElementById("right_h").src=decodeURIComponent(key);
     	    }
		}
		if(flag == 'true'){
			this.closeLeftPartTd();
		}
	}
	
}

xthtagWidget.prototype.faqUrlListMoreFaq = function(question64,startIndex) {
	var cmd = {command: "faqList64", param: ""};
	var paramArray = new Array();
	var option = {"key": "question", "text": question64};
	paramArray.push(option);
	var option = {"key": "startIndex", "text": startIndex};
	paramArray.push(option);
	cmd.param = paramArray;
	qsupport.showInputBeforeCommand(JSON.stringify(cmd),"查找更多信息");
}
xthtagWidget.prototype.faqUrlListMoreFaqNew = function(moreDiv) {
	if($("#" + moreDiv).css("display") == 'none'){
		$("#" + moreDiv).show();
	}else{
		$("#" + moreDiv).hide();
	}
	_qsupport_scrollReplyForNoTab();
}


xthtagWidget.prototype.restaurantFaqAsk = function(name)
{
        var cmd = {command: "faqAsk", param: ""};
        var paramArray = new Array();
        var option = {"key": "id", "text": 0};
        paramArray.push(option);
        var option = {"key": "question", "text": name};
        paramArray.push(option);
        cmd.param = paramArray;
        qsupport.showInputBeforeCommand(JSON.stringify(cmd),name);
}

/////////////////////////*******************************//////////////////////////
xthtagWidget.prototype._composeProductListCommand = function (question64,pageNo,pageSize)
{
	var startIndex;
	if(pageNo==undefined||pageSize==undefined)
	{
		startIndex = 0;
	}
	else
	{
		startIndex = (pageNo-1)*pageSize;
	}
	var cmd = {command: "search64", param: ""};
	var paramArray = new Array();
	var option = {"key": "question", "text": question64};
	paramArray.push(option);
	var option = {"key": "startIndex", "text": startIndex};
	paramArray.push(option);
	cmd.param = paramArray;
	return JSON.stringify(cmd);
}
xthtagWidget.prototype.productListMoreProduct = function(question64,pageNo,pageSize) 
{
	qsupport.showInputBeforeCommand(this._composeProductListCommand(question64,pageNo,pageSize),
			"我想查看更多结果");
}
xthtagWidget.prototype.productListProductSearch = function(question64,pageNo,pageSize) 
{   
	qsupport.showInputBeforeCommand(this._composeProductListCommand(question64,pageNo,pageSize),
			"我要找"+utf8to16(base64decode(question64)));
}
xthtagWidget.prototype.productListFocusProduct = function(li)
{
	$(li).addClass("articlehover");
	$(li).find("a[@name=help]").each(function() {
		$(this).show();
	});
}
xthtagWidget.prototype.productListUnFocusProduct = function(li)
{
	$(li).removeClass("articlehover");
	$(li).find("a[@name=help]").each(function() {
		$(this).hide();
	});
}
xthtagWidget.prototype.productListProductHelp = function (help,url) {
	
	qsupport.getProductKnowledge(help,url);
	var li = $(help).parent().parent().parent().parent().parent().parent();
	$("#fragment-1").html("<div style='margin-top:50px;'><img src='image/ajax-loader.gif'></div>");
	$("#fragment-2").html("<div style='margin-top:50px;'><img src='image/ajax-loader.gif'></div>");
	$("#fragment-3").html("<div style='margin-top:50px;'><img src='image/ajax-loader.gif'></div>");
	$("#btn_popupcontentHide").attr("disabled", true);
	$("#popupcontent > ul").tabs('select', 0);
	popupcontentShow(li.offset().left,li.offset().top+li.height());
	
}
xthtagWidget.prototype.productListProductHelpDisplay = function (help,merchInfo,taobaoInfo,productKnowledge){
	$("#fragment-1").html(merchInfo);
	$("#fragment-2").html(taobaoInfo);
	$("#fragment-3").html(productKnowledge);
	$("#btn_popupcontentHide").removeAttr("disabled");
}

xthtagWidget.prototype.guideHelp = function (help,question,text,key,comment,align) {
	
	
	 suggestFunClose2();
	 $("#isMonitor").val("1");
	
	$("#enabledInputBox").css("display","");
	if($("#sequoia_operationBar").is(":visible")){
		
		$("#sequoia_operationBar").hide();
	}
	
	question = utf8to16(base64decode(question));

	$("#guide_title").html("&nbsp;&nbsp;"+text);
	$("#guide_key").val(key);
	$("#guide_comment").val(comment);
	$("#guide_text").val(key);
	var li = $(help);
	//var popUp = document.getElementById("popupGuide");
	//popUp.style.top = li.offset().top+li.height();//窗口距离浏览器内容区最上方的偏移值
	//if(align=='left')
	//{
	///	popUp.style.left = li.offset().left-380;//窗口距离浏览器内容区最左边的偏移值
	///}
	///else
	///{
	///	popUp.style.left = li.offset().left;//窗口距离浏览器内容区最左边的偏移值
	///}
	//////////20090201 add guide details//////////
	if(key=='search')
	{
		var helpHtml = "<div style='margin-top:10px;' ><span>" +
				"我想买" +
				"</span><input id='guide_search_content' type='text' size='40' value='" +
				question +
				"' /></div>";
		$("#guide_helper").html(helpHtml);
	}
	else if(key=='faqAsk')
	{
		var helpHtml = "<div style='margin-top:10px;' ><input id='guide_faqask_content' type='text' size='50' value='" +
				question +
				"' /></div>";
		$("#guide_helper").html(helpHtml);
	}
	else if(key=='customerMonitor')
	{
		var paramArray = new Array();
		option = {"key": "question", "text": question};
		paramArray.push(option);
		cmd = {command: "startMonitor", param: ""};
		cmd.param = paramArray;
		qsupport.sendCommand(JSON.stringify(cmd));
	    return;
		
	}
	else if(key=='leaveMsg')
	{
		var paramArray = new Array();
		option = {"key": "question", "text": question};
		paramArray.push(option);
		option = {"key": "leaveMsgType", "text": '0'};
		paramArray.push(option);
		cmd = {command: "leaveMsg", param: ""};
		qdisp = "[留言:]"+question;
		cmd.param = paramArray;
		//qsupport.showInputBeforeCommand(JSON.stringify(cmd),qdisp);
		qsupport.sendCommand(JSON.stringify(cmd));qsupport.pollReplyMessage();
		return;
	}
	else if(key=='查运费')
	{
		var helpHtml = "<div style='margin-top:10px;' ><span>我在</span><input id='guide_shipfee_content' type='text' size='40' value='上海市浦东新区' /><span>，快递多少</span></div>";
		$("#guide_helper").html(helpHtml);
	}
	else if(key=='导购')
	{
		var helpHtml = "<div style='margin-top:10px;' ><input id='guide_productcat_content' type='text' size='50' value='你们卖什么' /></div>";
		$("#guide_helper").html(helpHtml);
	}
	else if(key=='讨价还价')
	{
		var helpHtml = "<div style='margin-top:10px;' ><input id='guide_bargain_content' type='text' size='50' value='想问问你啊能再便宜点了？' /></div>";
		$("#guide_helper").html(helpHtml);
	}
	else if(key=='查看知识')
	{
		var helpHtml = "<div style='margin-top:10px;' ><input id='guide_bargain_content' type='text' size='50' value='你到底懂什么' /></div>";
		$("#guide_helper").html(helpHtml);
	}
	else
	{
		$("#guide_question").html(question);
	}
	//////////20090201 add guide details end//////////
	///popUp.style.width = "400px";//窗口的宽度
	///popUp.style.height = "90px";//窗口的高度
	///popUp.style.visibility = "visible";
//	document.getElementById("guide_question").focus();
}

xthtagWidget.prototype.popupGuideCommit = function() {
	var key = $("#guide_key").val();
	var comment = $("#guide_comment").val();
	var text = $("#guide_text").val();
	var question;
	var qdisp;
	var cmd;
	var paramArray = new Array();
	var option;
	var inputMsg="";
	$("#guide_helper").find("input").each(function() {
		inputMsg = $(this).val();
	});
	if(!checkEvilInput(inputMsg))
	{
		return;
	}
	if(key=="search")
	{
		question = "我想买"+$('#guide_search_content').val();
		option = {"key": "question", "text": question};
		paramArray.push(option);
		cmd = {command: "search", param: ""};
		qdisp = question;
	}
	else if(key=="faqAsk")
	{
		question = $("#guide_faqask_content").val();
		option = {"key": "question", "text": question};
		paramArray.push(option);
		cmd = {command: "faqAsk", param: ""};
		qdisp = question;
	}
	else if(key=="leaveMsg")
	{
		question = $("#guide_leavemsg_content").val();
		option = {"key": "question", "text": question};
		paramArray.push(option);
		option = {"key": "leaveMsgType", "text": $("#guide_leavemsg_type").val()};
		paramArray.push(option);
		cmd = {command: "leaveMsg", param: ""};
		qdisp = "[留言:]"+question;
	}
	else
	{
		if(text=='查运费')
		{
			question = "我在"+$("#guide_shipfee_content").val()+"，快递多少";
		}
		else if(text=='导购')
		{
			question = $("#guide_productcat_content").val();
		}
		else if(text=='讨价还价')
		{
			question = $("#guide_bargain_content").val();
		}
		else if(text=='查看知识')
		{
			question = $("#guide_bargain_content").val();
		}
		else
		{
			question = $("#guide_question").val();
		}
		option = {"key": "question", "text": question};
		paramArray.push(option);
		option = {"key": "bizKey", "text": comment};
		paramArray.push(option);
		cmd = {command: "bizCommand", param: ""};
		qdisp = question;
	}
	cmd.param = paramArray;
	qsupport.showInputBeforeCommand(JSON.stringify(cmd),qdisp);
	this.popupGuideHide();
}

xthtagWidget.prototype.popupGuideHide = function () {
	var popUp = document.getElementById("popupGuide");
	popUp.style.top = 0;//窗口距离浏览器内容区最上方的偏移值
	popUp.style.left = 0;//窗口距离浏览器内容区最左边的偏移值
	popUp.style.visibility = "hidden";
	$("#guide_title").html("");
	$("#guide_helper").html("");
	$("#guide_key").val("");
	$("#guide_comment").val("");
}

xthtagWidget.prototype.popupFeedBack = function () {
	var popUp = document.getElementById("feedBack");
	
	var width=document.body.clientWidth;
	var height=document.body.clientHeight;
	$(popUp).css("top",height/4);//窗口距离浏览器内容区最上方的偏移值
	$(popUp).css("left",width/2-270);//窗口距离浏览器内容区最左边的偏移值
	$(popUp).css("width","550px");//窗口的宽度
	$(popUp).css("height","150px");//窗口的高度
	popUp.style.visibility = "visible";
	
	var popUpParent=document.getElementById("feedBackCoverge");
	
	popUpParent.style.visibility="visible";
   
	$("#feedBackCoverge").css("width",screen.width);
	$("#feedBackCoverge").css("height",screen.height);
	
	if($("#sequoia_operationBar").is(":visible")){
		
		$("#sequoia_operationBar").hide();
	}
	
	$("#feedBack_question").val("");
    $("#feedBack_account_content").val("");
}
xthtagWidget.prototype.hiddenFeedBack = function () {
	var popUp = document.getElementById("feedBack");
	
	popUp.style.top = 400;//窗口距离浏览器内容区最上方的偏移值
	popUp.style.left = 500;//窗口距离浏览器内容区最左边的偏移值
	
	popUp.style.visibility = "hidden";
	var popUpParent=document.getElementById("feedBackCoverge");
	popUpParent.style.visibility="hidden";
	
	$("#feedBack_question").val("");
	//$("#feedBack_title_content").val("");
	$("#feedBack_account_content").val("");
	//$("#feedBack_contact_content").val("");
}
xthtagWidget.prototype.addFeedBack = function() 
{   
	var question = $("#feedBack_question").val();
	//var title= $("#feedBack_title_content").val();
	var title="";
	//var realname=$("#feedBack_name_content").val();
	var realname="";
	var account_content=$("#feedBack_account_content").val();
	//var contact_content=$("#feedBack_contact_content").val();
	var contact_content="";
	//var email=$("#feedBack_email_content").val();
	var email="";
	/*
	if(title==null ||title==""){
		alert("请输入标题!");
		return ;
		
	}*/
	if(question == null||question==""){
		alert("请输入内容!");
		return ;
		
	}else if(question.length>1024){
		
		alert("内容长度不能超过1024个字符!");
		return;
		
	}
	/*
	if(title.length>256){
		alert("长度不能超过256个字符!");
		$("#feedBack_question").val("");
		$("#feedBack_title_content").val("");
		return ;
		
	}
	
	if(realname!=""&&realname.length>50){
		alert('姓名长度不能大于50');
		return;
	}*/
	if(account_content==""){
		
		alert("请输入淘宝帐号!");
		return ;
		
		
	}
	if(account_content!=""&&account_content.length>50&&account_content.length<5){
		alert('请输入正确的淘宝帐号!');
		return ;
		
	}
	/*
	if(contact_content!=""&&contact_content.length>500){
		alert('你输入的联系方式过长!');
		return;
	}


	if(email==""){
		alert('请输入邮箱!');
		return;
		
	}
	
	if(email.length>64){
		alert('邮箱长度过长');
		return;
	}
	if(email!=""){
		var pattern=/^\w+([-+.]\w+)*@\w+([-.\w+])*\.\w+([-.]\w+)*$/;
		if(!pattern.exec(email)){
			      alert('邮箱格式不对');
			      return;
		}
	}*/
	qsupport.addFeedBack(question,title,realname,account_content,contact_content,email);
}
xthtagWidget.prototype.popupHowGetRightPop = function () {
	var popUp = document.getElementById("howGetRightPopDiv");
	var width=document.documentElement.clientWidth?document.documentElement.clientWidth:document.body.clientWidth;
    var height=document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight;
    var top=(height-503)/2;
    if(top < 10) top=10;
	$(popUp).css("top",top);//窗口距离浏览器内容区最上方的偏移值
	$(popUp).css("left",(width-736)/2);//窗口距离浏览器内容区最左边的偏移值
	popUp.style.visibility = "visible";
	//if(width > 1024  ){
		//$("#howGetRightPopDiv").width(parseInt($("#howGetRightPopDiv").width()* width/1024,10));
		//$("#howGetRightImage").width(parseInt($("#howGetRightImage").width()* width/1024,10));
		
	//}
	//if(height > 768){
		//$("#howGetRightPopDiv").height(parseInt($("#howGetRightPopDiv").height()* height/1024,10));
		//$("#howGetRightImage").height(parseInt($("#howGetRightImage").height()* height/768,10));
		
	//}
	var popUpParent=document.getElementById("feedBackCoverge");
	
	popUpParent.style.visibility="visible";
   
	$("#feedBackCoverge").css("width",screen.width);
	$("#feedBackCoverge").css("height",screen.height);
}
xthtagWidget.prototype.hideHowGetRightPop = function (){
    var popUp = document.getElementById("howGetRightPopDiv");
	popUp.style.visibility = "hidden";
	var popUpParent=document.getElementById("feedBackCoverge");
	popUpParent.style.visibility="hidden";
	//$("#howGetRightImage").height(550);
	//$("#howGetRightImage").width(327);
	//$("#howGetRightPopDiv").width(340);
	//$("#howGetRightPopDiv").height(590);
}
xthtagWidget.prototype.categoryProductSearch = function(question) 
{   
	qsupport.showInputBeforeCommand(this._composeProductListCommand(base64encode(utf16to8(question))),
			"我要找"+question);
}

xthtagWidget.prototype.moduleKnowledgeSearch = function(question) 
{
	var cmd = {command: "faqAsk64", param: ""};
	var paramArray = new Array();
	var option = {"key": "id", "text": "0"};
	paramArray.push(option);
	var option = {"key": "question", "text": question};
	paramArray.push(option);
	cmd.param = paramArray;
	qsupport.showInputBeforeCommand(JSON.stringify(cmd),utf8to16(base64decode(question)))
}

xthtagWidget.prototype.moduleKnowledgeMore = function(question,bizKey,index) 
{
	var cmd = {command: "bizCommand", param: ""};
	var paramArray = new Array();
	var option = {"key": "question", "text": question};
	paramArray.push(option);
	var option = {"key": "bizKey", "text": bizKey};
	paramArray.push(option);
	var option = {"key": "index", "text": index};
	paramArray.push(option);
	cmd.param = paramArray;
	qsupport.showInputBeforeCommand(JSON.stringify(cmd),'我想查看更多结果');
}

xthtagWidget.prototype.noFaqLeaveMessage = function (help,question64) {
	var question ="[留言:]"+utf8to16(base64decode(question64))
	var paramArray = new Array();
	var option = {"key": "question", "text": utf8to16(base64decode(question64))};
	paramArray.push(option);
	option = {"key": "leaveMsgType", "text": "0"};
	paramArray.push(option);
	var	cmd = {command: "leaveMsg", param: ""};
	
	cmd.param = paramArray;
	qsupport.showInputBeforeCommand(JSON.stringify(cmd),question);
	this.popupGuideHide();
}

xthtagWidget.prototype.productKnowledgeDisplayAnswer = function(id) {
	var jid = "#"+id;
	if($(jid).is(":visible"))
	{
		$(jid).hide();
	}
	else
	{
		$(jid).show();
	}
}

xthtagWidget.prototype.disableByName = function(name){
	var panel = document.getElementById("displayPanel");
	var temp = "input[@name="+name+"]";
	$(panel).find(temp).each(function() {
		$(this).attr("disabled",true);
	});
}

xthtagWidget.prototype.diagnoseSingleSelectValue = function(value,comment,name){
	var paramArray = new Array();
	var option = {"key": value, "text": comment};
	paramArray.push(option);
	var	cmd = {command: "diagnoseOption", param: ""};
	cmd.param = paramArray;
	qsupport.sendCommand(JSON.stringify(cmd));
	this.disableByName(name);
	return true;
}
xthtagWidget.prototype.diagnoseMultiSelectValue= function(name)
{
	var panel = document.getElementById("displayPanel");
	var temp = "input[@name="+name+"]";
	var cmd = {command: "diagnoseOption", param: ""};
	var paramArray = new Array();
	$(panel).find(temp).each(function() {
		if($(this).attr("checked")== true)
		{
			var option = {"key": $(this).val(), "text": $(this).attr("comment")};
			paramArray.push(option);
		}
	});
	cmd.param = paramArray;
	qsupport.sendCommand(JSON.stringify(cmd));
	this.disableByName(name);
	this.disableByName(name+"_confirm");
	this.disableByName(name+"_cancel");
}
xthtagWidget.prototype.diagnoseMultiResetValue = function(name)
{
	var panel = document.getElementById("displayPanel");
	var temp = "input[@name="+name+"]";
	$(panel).find(temp).each(function() {
		if($(this).attr("checked")== true)
		{
			$(this).attr("checked",false);
		}
	});
}

xthtagWidget.prototype.displayPage = function(w) {
	$("#RightContext").hide();
	$("#frame_content").attr("src",w.href);
	$("#Rightiframe").show();
}

xthtagWidget.prototype.backPage = function() {
	$("#RightContext").show();
	$("#Rightiframe").hide();
}

xthtagWidget.prototype.enabledInputBox=function(){
	

	$("#isMonitor").val("0");
	suggestionFunctionOpen2();
	$("#enabledInputBox").css("display","none");
    var cmd={command:"hangUp"};
    qsupport.sendCommand(JSON.stringify(cmd),'3');
	
}
xthtagWidget.prototype.hoverRobot = function (id) {
	$("#" + id).addClass("robotHover");
}
xthtagWidget.prototype.hoverEndRobot = function (id) {
	$("#" + id).removeClass("robotHover");
}
xthtagWidget.prototype.hoverQuestion = function (id) {
	$("#" + id).addClass("questionHover");
}
xthtagWidget.prototype.hoverEndQuestion = function (id) {
	$("#" + id).removeClass("questionHover");
}


xthtagWidget.prototype.hiddenBigImageDiv=function(){
	
	    var array=this._getPicMapArray();
	    for(var i=0;i<array.length;i++){
	    
	    	$("#area_big_image_show_"+array[i]).css("visibility","hidden");
	    	$("#area_big_image_show_"+array[i]).remove();
	    	$("#areaMap"+array[i]).remove();
	    	//document.getElementById("planetmap").innerHTML="";
	    }
	   
}

xthtagWidget.prototype.showTopFaq=function(){
	if($("#changeTabFaqName").html()!="热点问题"){
	      var topFaq=this._getTopFaq();
	
           $("#changeTabFaqName").html("热点问题");

            qsupport.showTopFaq(eval('('+topFaq+')'));
	}
}
xthtagWidget.prototype.hiddenImageManager=function(){
	
	$("#feedBackCoverge").css("visibility","hidden");
	
	
	$("#imageManageDiv").css("visibility","hidden");
	$("#imageManageDiv").css("top","0px");//窗口距离浏览器内容区最上方的偏移值
	$("#imageManageDiv").css("left","0px");//窗口距离浏览器内容区最左边的偏移值
	
}

xthtagWidget.prototype.listRelationFaq=function(faq_id,title,map_id){
    
	qsupport.listRelationFaq(faq_id,map_id);
	
	
	
	
}

xthtagWidget.prototype.showDymRelationFaq=function(map_id,faqVOList){
	
	changeTab('0');
	$("#big_map_result_see_div").css("visibility","visible");
	$("#big_map_result_see_div").width($("#area_big_image_show_"+map_id).width());
	$("#big_map_result_see_div").height($("#area_big_image_show_"+map_id).height());
	$("#big_map_result_see_div").css("left",$("#area_big_image_show_"+map_id).css("left"));
	$("#big_map_result_see_div").css("top",$("#area_big_image_show_"+map_id).css("top"));
	var offset=$("#td0").offset();
	$("#big_map_result_see_div").animate({top:offset.top,left:offset.left,width:$("#containTD").width(),height:$("#containTD").height()},300, 'swing',function(){
	$("#big_map_result_see_div").css("visibility","hidden");
	$("#changeTabFaqName").html("区块相关问题");
	if(faqVOList==null||faqVOList==""){
		document.getElementById("td0").innerHTML="";	
	}else{
	   var faqVOOjbect=eval('('+faqVOList+')');
	   if(faqVOOjbect.length>0){
	          var faqHtml=""
	          faqHtml+="<table border='0' style=\"width:100%;\" id=\"relation_Faq_Table\">";
		      for(var i=0;i<faqVOOjbect.length;i++){
		    	  var question=faqVOOjbect[i].question;
	    	    
		    	  faqHtml += "<tr ><td class='topFaqItemTD'  id='maxFaqItemTD" + faqVOOjbect[i].id + "'><table class='topFaqItemTable'><tr id='maxFaqTR" + faqVOOjbect[i].id+ "' class='topFaqTRClass' ";
		    	  faqHtml += " onmouseover='qsupport.hoverMaxFaq(\"maxFaqTR" + faqVOOjbect[i].id+ "\")' onmouseout='qsupport.hoverMaxFaqEnd(\"maxFaqTR" + faqVOOjbect[i].id + "\")'";
		    	  faqHtml +=" onclick=\"qsupport.selectMaxFaq('"+faqVOOjbect[i].id+"','"+faqVOOjbect[i].id+"');\"";
		    	  faqHtml += ">";
		    	  faqHtml += "<td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td class='xiala_tpic_td'>";
		    	  faqHtml += "<image src='images/dian_line.gif' class=\"relationFaqDianLineImage\" align=\"absmiddle\" border='0'  id=\"relation_dian_line_image"+faqVOOjbect[i].id+"\"/>"
		    	  faqHtml += "</td>";
		    	  faqHtml += "<td align='left'> <span class='xiala_title' id='maxFaqTD"  + faqVOOjbect[i].id + "' >";
		    	  faqHtml += question;
		    	  faqHtml +=  "</span></td>";
		    	  faqHtml += "<td width='20' align='right' >";
		    	  faqHtml += "<image src='images/flex1.gif' class='topFaqImgs' id='maxFaqImg" + faqVOOjbect[i].id + "' border='0'/>"
		    	  faqHtml += "</td>";
		    	  faqHtml += "</tr></table></td></tr>";
		    	  faqHtml += "<tr id='max_Faq_" + faqVOOjbect[i].id+ "' class='TOPFaqClass' style=\"display:none;\" >";
		    	  faqHtml += "<td colSpan=\"3\"><font style=\"font-size:12px;\" class='topFaqContext'>" +  faqVOOjbect[i].answer+ "<br>";
		    	  faqHtml+= "<span id=\"statisy_content_relation_faq_"+faqVOOjbect[i].id+"\"  style=\"font-weight:bold;\">您对回答满意吗?&nbsp;&nbsp;";
		    	  faqHtml+="<span class=\"blue_iframe bb\">";
		    	  faqHtml+="<a href=\"javascript:void(0);\" class=\"statisfy_hand_yes\"  onclick=\"xthtagWidget.statisfyUpdateOther('"+faqVOOjbect[i].base64Quesion+"','"+faqVOOjbect[i].base64Quesion+"','"+faqVOOjbect[i].base64Answer+"','relation_faq_"+faqVOOjbect[i].id+"','1','','2');\"></a>";
		    	  faqHtml+="&nbsp;&nbsp;<a href=\"javascript:void(0);\"   onclick=\"xthtagWidget.statisfyUpdateOther('"+faqVOOjbect[i].base64Quesion+"','"+faqVOOjbect[i].base64Quesion+"','"+faqVOOjbect[i].base64Answer+"','relation_faq_"+faqVOOjbect[i].id+"','1','','2');\">顶，解决啦</a>";
		    	  faqHtml+="&nbsp;&nbsp;<a href=\"javascript:void(0);\" class=\"statisfy_hand_no\"  onclick=\"xthtagWidget.noStatisfyUpdate('relation_faq_"+faqVOOjbect[i].id+"');\"></a>";
		    	  faqHtml+="&nbsp;&nbsp;<a href=\"javascript:void(0);\"   onclick=\"xthtagWidget.noStatisfyUpdate('relation_faq_"+faqVOOjbect[i].id+"');\">踩，不满意</a>";
		    	  faqHtml+="</span></span>"
		    	  faqHtml+="<span id=\"statisy_content_div_relation_faq_"+faqVOOjbect[i].id+"\" style=\"display:none;\">";
		    	  faqHtml+="<span  style=\"font-weight:bold;\" id=\"no_statisy_content_div_relation_faq_"+faqVOOjbect[i].id+"\"><font style=\"font-weight:bold;text-decoration:underline;\">请选择不满意的原因，帮助小二进步</font><br/>";
		    	  faqHtml+="<input type=\"radio\" name=\"statisy_content_radiorelation_faq_"+faqVOOjbect[i].id+"\" onclick=\"xthtagWidget.statisfyUpdateOther('"+faqVOOjbect[i].base64Quesion+"','"+faqVOOjbect[i].base64Quesion+"','"+faqVOOjbect[i].base64Answer+"','relation_faq_"+faqVOOjbect[i].id+"','2','','2');\"/>功能有待改善";
		    	  faqHtml+="<input type=\"radio\" name=\"statisy_content_radiorelation_faq_"+faqVOOjbect[i].id+"\" onclick=\"xthtagWidget.statisfyUpdateOther('"+faqVOOjbect[i].base64Quesion+"','"+faqVOOjbect[i].base64Quesion+"','"+faqVOOjbect[i].base64Answer+"','relation_faq_"+faqVOOjbect[i].id+"','0','','2');\"/>答案对我没帮助";
		    	  faqHtml+="<span style=\"display:inline-block;\">";
		    	  faqHtml+="<input type=\"radio\" name=\"statisy_content_radiorelation_faq_"+faqVOOjbect[i].id+"\" onclick=\"xthtagWidget.statisfyUpdateOther('"+faqVOOjbect[i].base64Quesion+"','"+faqVOOjbect[i].base64Quesion+"','"+faqVOOjbect[i].base64Answer+"','relation_faq_"+faqVOOjbect[i].id+"','3','','2');\"/>太复杂，不想看";
		    	  faqHtml+="<input type=\"radio\" name=\"statisy_content_radiorelation_faq_"+faqVOOjbect[i].id+"\" onclick=\"xthtagWidget.statisfyUpdateOther('"+faqVOOjbect[i].base64Quesion+"','"+faqVOOjbect[i].base64Quesion+"','"+faqVOOjbect[i].base64Answer+"','relation_faq_"+faqVOOjbect[i].id+"','4','','2');\"/>不是我想问的";
		    	  faqHtml+="</span></span></span>";
		    	  //faqHtml+="<div  id=\"statisy_content_div_relation_faq_"+faqVOOjbect[i].id+"\" style=\"display:none;\">";
		    	 // faqHtml+="<span  style=\"font-weight:bold;\" id=\"no_statisy_content_div_relation_faq_"+faqVOOjbect[i].id+"\"><font style=\"font-weight:bold;text-decoration:underline;\">请选择不满意的原因，帮助小二进步</font></span>";
		    	 // faqHtml+="<div id=\"statisy_content_div_table_relation_faq_"+faqVOOjbect[i].id+"\" style=\"padding-left:20px;\">";
		    	  //faqHtml+="<table border=\"0\" cellspading=\"0\" cellpadding=\"0\">";
		    	  //faqHtml+="<tr><td><input type=\"radio\" name=\"statisy_content_radiorelation_faq_"+faqVOOjbect[i].id+"\" onclick=\"xthtagWidget.statisfyUpdateOther('"+encodeURIComponent(question)+"','"+encodeURIComponent(question)+"','"+encodeURIComponent(faqVOOjbect[i].answer)+"','relation_faq_"+faqVOOjbect[i].id+"','0');\"/>答案对我没帮助</td>";
		    	 // faqHtml+="<td style=\"padding-left:20px;\"><input type=\"radio\" name=\"statisy_content_radiorelation_faq_"+faqVOOjbect[i].id+"\" onclick=\"xthtagWidget.statisfyUpdateOther('"+encodeURIComponent(question)+"','"+encodeURIComponent(question)+"','"+encodeURIComponent(faqVOOjbect[i].answer)+"','relation_faq_"+faqVOOjbect[i].id+"','2');\"/>功能有待改善</td></tr>";
		    	  //faqHtml+="<tr><td><input type=\"radio\" name=\"statisy_content_radiorelation_faq_"+faqVOOjbect[i].id+"\" onclick=\"xthtagWidget.statisfyUpdateOther('"+encodeURIComponent(question)+"','"+encodeURIComponent(question)+"','"+encodeURIComponent(faqVOOjbect[i].answer)+"','relation_faq_"+faqVOOjbect[i].id+"','3');\"/>太复杂，不想看</td>";
		    	 // faqHtml+="<td style=\"padding-left:20px;\"><input type=\"radio\" name=\"statisy_content_radiorelation_faq_"+faqVOOjbect[i].id+"\" onclick=\"xthtagWidget.statisfyUpdateOther('"+encodeURIComponent(question)+"','"+encodeURIComponent(question)+"','"+encodeURIComponent(faqVOOjbect[i].answer)+"','relation_faq_"+faqVOOjbect[i].id+"','4');\"/>不是我想问的</td></tr>";
		    	  //faqHtml+="</table></div></div>";
		    	  faqHtml+="</font></td></tr>";
		    	  faqHtml += "</table></td></tr>"
		    	  
		      }
		         faqHtml+="</table>";
		         var createBox="<div id='"+"td0"+"cbox' style=\"display:none;\">"+faqHtml+"</div>";
		         document.getElementById("td0").innerHTML=createBox;
		         $("#td0cbox").slideDown(600);
	   }else{
		   
		   document.getElementById("td0").innerHTML="";
	   }
	}

	});
	/*统计区块的点击率
	 * */
	qsupport.areaPivClick(map_id);
}

xthtagWidget.prototype.mouseOutClass=function(id){
	
	var isIE6=false;
	if(navigator.appName == "Microsoft Internet Explorer"){
 	    
	     if(navigator.appVersion.match(/6./i)=="6."){
	    	 isIE6=true;
	     }
	}
	
	
	if(isIE6==true){
		
		$("#area_big_image_show_"+id).removeClass("area_pic_IE6_bak_div").addClass("area_pic_IE6_div");
		
	}else{
		
		 $("#area_big_image_show_"+id).removeClass("area_pic_bak_div").addClass("area_pic_div");
	}


	
	//$("#area_big_image_show_"+id).removeClass("area_pic_bak_div").addClass("area_pic_div");
}

xthtagWidget.prototype.mouseOverClass=function(id,title){
	
	var isIE6=false;
	if(navigator.appName == "Microsoft Internet Explorer"){
 	    
	     if(navigator.appVersion.match(/6./i)=="6."){
	    	 isIE6=true;
	     }
	}
	
	if(isIE6==true){
		
		$("#area_big_image_show_"+id).removeClass("area_pic_IE6_div").addClass("area_pic_IE6_bak_div");
	}else{
		
		 $("#area_big_image_show_"+id).removeClass("area_pic_div").addClass("area_pic_bak_div");
	}


	//$("#area_big_image_show_"+id).removeClass("area_pic_div").addClass("area_pic_bak_div");
}



xthtagWidget.prototype.getOffset=function(obj){
	 var x = obj.offsetLeft, y = obj.offsetTop;
	    while(obj.offsetParent){
	        obj = obj.offsetParent;
	        x += obj.offsetLeft;
	        y += obj.offsetTop;
	    }
	    return {x : x, y : y};
}

xthtagWidget.prototype.popImageManager=function(){
	var pic_id=this._getPic_id();
	qsupport.popImageManager(pic_id);
}



xthtagWidget.prototype.changeVsplitbarImage=function(id,imageName){
	
	          $("#"+id).attr("src",imageName);
}
xthtagWidget.prototype.showResizePicMapImprovement=function(){
	
	var object=document.getElementById("images_pic");
	if( object!= null && object != undefined && object.style.display!="none"){
		
	    var picMapObject=this.picMapObject;
	    var  offset=$("#containTDx").offset();
	    var bodyMiddTdOffSet=$("#body_middle_td").offset();
	    var consoleHeight=parseInt($("#consolePicHeight").val(),10);
	    var consoleWidth=parseInt($("#consolePicWidth").val(),10);
	    var bigHeight=parseInt($("#consolePicBigHeight").val(),10);
	    var bigWidth=parseInt($("#consolePicBigWidth").val(),10);
	    for(var i=0;i<picMapObject.length;i++){
	         var coordsString=picMapObject[i].coords;
	         var coords=coordsString.split(","); 
	         var left=(parseInt(coords[0],10)*bigWidth)/consoleWidth;
	         var top=(parseInt(coords[1],10)*bigHeight)/consoleHeight;
	         var right=(parseInt(coords[2],10)*bigWidth)/consoleWidth;
	         var bottom=(parseInt(coords[3],10)*bigHeight)/consoleHeight;
	         var width=right-left;
	     	 var height=bottom-top;
	         $("#area_big_image_show_"+picMapObject[i].id)       
	 	                   .css({
	 	                	  "top":(top+offset.top-((ff)?0:1))+"px",
    	                	   "left":(left+offset.left+((ff)?0:1))+"px",
	 	                	  "width":(width+4)+"px",
	 	                	  "height":(height+4)+"px",
	 	                	  "display":""
	 	              });
	        }
	}
}


xthtagWidget.prototype.focusInputBox=function(){
	
	
	var value=$("#inputBox").val();
	if(value==""||value==$("#focusInputBoxContent").val()){
		
		  $("#inputBox").val("");
		  $("#inputBox").css({
				
			  "color":"#0099FF"
		   });
	}
	
	
}

xthtagWidget.prototype.blurInputBox=function(){
	
	var value=$("#inputBox").val();

	if(value==""||value==$("#focusInputBoxContent").val()){
		
		$("#inputBox").val($("#focusInputBoxContent").val());
		$("#inputBox").css({
			
			  "color":"#666666"
		});
	}
}

xthtagWidget.prototype.closeLeftPartTd=function(){
	if(qsupportGetValue(COMPANY_ID) != 3){
		if(document.getElementById("images_pic").style.display != "none" ){
			  if($("#hand_Point_Div").is(":visible")){
					  $("#hand_Point_Div").hide();
			  }
			   var closeChange="<img onmouseout=\"MM_swapImgRestore()\" onclick=\"xthtagWidget.openLeftPartTd();\"" +
		         " style=\"cursor:pointer;\" onmouseover=\"MM_swapImage('Image24','','images_pic/openx.gif',0)\" " +
		         "src=\"images_pic/open.gif\"title=\"打开图片区\" alt=\"打开图片区\" name=\"Image24\" " +
		          "width=\"7\" height=\"89\" border=\"0\" id=\"Image24\" />";
				  var picMapObject=this.picMapObject;
					 for(var i=0;i<picMapObject.length;i++){
						 $("#area_big_image_show_"+picMapObject[i].id).hide();
					 }
					
					 if($("#sequoia_operationBar").is(":visible")){
				  	    $("#sequoia_operationBar").width($("#inputBox").width()+5);
				  	 }
				 var leftPx=($("#right_end_td").offset().left-2)+"px";
				 $("#images_pic_div").animate({width:'0px',left:leftPx},{duration:500,step:function(){
			    	  $("#images_pic").width($("#images_pic_div").width());
			    	},complete:function(){
			    	    //$("#displayPanel").width(916);
						//$("#td0").width(916);
						$("#images_pic").width(0);
						document.getElementById("images_pic").style.display="none";
						document.getElementById("right_end_td").style.display="none";
						document.getElementById("images_pic2").style.display="none";
						document.getElementById("right_end2_td").style.display="none";
						$("#border_middle_part_td").html(closeChange);
						
		       }});
			
		}
	}
}

xthtagWidget.prototype.openLeftPartTd=function(){
	
	if(qsupportGetValue(COMPANY_ID) != 3 ){
		if(document.getElementById("images_pic").style.display == "none"){
		     var instance=this;
			 //$("#displayPanel").width(358);
			 //$("#td0").width(358);
		      $("#images_pic_div").animate({width:"550px"},{duration:500,step:function(){
				  $("#images_pic").width($("#images_pic_div").width());
				  document.getElementById("images_pic").style.display="";
				  document.getElementById("right_end_td").style.display="";
				  document.getElementById("images_pic2").style.display="";
				  document.getElementById("right_end2_td").style.display="";
			 },complete:function(){
				   $("#images_pic").width(550);
				   $("#images_pic_div").width(550);
				   $("#containTDx").width(550);
				   var closeChange="<img onmouseout=\"MM_swapImgRestore()\" onclick=\"xthtagWidget.closeLeftPartTd();\"" +
					 		         " style=\"cursor:pointer;\" onmouseover=\"MM_swapImage('Image24','','images_pic/closex.gif',0)\" " +
					 		         "src=\"images_pic/close.gif\" title=\"关闭图片区\" alt=\"关闭图片区\" name=\"Image24\" " +
					 		          "width=\"7\" height=\"89\" border=\"0\" id=\"Image24\" />";
				    $("#border_middle_part_td").html(closeChange);
				    var picMapObject=instance.picMapObject;
				    var  offset=$("#containTDx").offset();
				    var consoleHeight=parseInt($("#consolePicHeight").val(),10);
				    var consoleWidth=parseInt($("#consolePicWidth").val(),10);
				    var bigHeight=parseInt($("#consolePicBigHeight").val(),10);
				    var bigWidth=parseInt($("#consolePicBigWidth").val(),10);
				    for(var i=0;i<picMapObject.length;i++){
				         var coordsString=picMapObject[i].coords;
				         var coords=coordsString.split(","); 
				         var left=(parseInt(coords[0],10)*bigWidth)/consoleWidth;
				         var top=(parseInt(coords[1],10)*bigHeight)/consoleHeight;
				         var right=(parseInt(coords[2],10)*bigWidth)/consoleWidth;
				         var bottom=(parseInt(coords[3],10)*bigHeight)/consoleHeight;
				         var width=right-left;
				     	 var height=bottom-top;
				         $("#area_big_image_show_"+picMapObject[i].id)       
				 	                   .css({
				 	                	  "top":(top+offset.top-((ff)?0:1))+"px",
			    	                	   "left":(left+offset.left+((ff)?0:1))+"px",
				 	                	  "width":(width+4)+"px",
				 	                	  "height":(height+4)+"px",
				 	                	  "display":""
				 	              });
				        }
				    if($("#sequoia_operationBar").is(":visible")){
				 	   $("#sequoia_operationBar").width($("#inputBox").width()+5);
				 	}
			}});
			 
		}
	}
}
xthtagWidget.prototype.closeLeftSpacePart=function(){
	       
	       	document.getElementById("body_left_part_td").style.display="none";
		   	document.getElementById("right_end_td").style.display="none";
			document.getElementById("images_pic2").style.display="none";
			document.getElementById("right_end2_td").style.display="none";
			$("#right_end_td").width(0);
			$("#images_pic2").width(0);
			$("#right_end2_td").width(0);
			$("#body_left_part_td").width(0);
	       var closeChange="<img onmouseout=\"MM_swapImgRestore()\" onclick=\"xthtagWidget.openLeftSpacePartTd();\"" +
	         " style=\"cursor:pointer;\" onmouseover=\"MM_swapImage('Image24','','images/openx.gif',0)\" " +
	         "src=\"images/open.gif\"title=\"打开\" alt=\"打开\" name=\"Image24\" " +
	          "width=\"7\" height=\"89\" border=\"0\" id=\"Image24\" />";
	       $("#border_middle_part_td").html(closeChange);
	       if($("#sequoia_operationBar").is(":visible")){
	    	   
	    	   $("#sequoia_operationBar").width($("#inputBox").width()+5);
	    	   
	       }
	       $.cookie("is_Close_Left_Part","close",{expires:30,path:"/"});
}

xthtagWidget.prototype.openLeftSpacePartTd=function(){
	
	document.getElementById("body_left_part_td").style.display="";
	document.getElementById("right_end_td").style.display="";
	document.getElementById("images_pic2").style.display="";
	document.getElementById("right_end2_td").style.display="";
	var closeChange="<img onmouseout=\"MM_swapImgRestore()\" onclick=\"xthtagWidget.closeLeftSpacePart();\"" +
     " style=\"cursor:pointer;\" onmouseover=\"MM_swapImage('Image24','','images/closex.gif',0)\" " +
     "src=\"images/close.gif\" title=\"关闭\" alt=\"关闭\" name=\"Image24\" " +
      "width=\"7\" height=\"89\" border=\"0\" id=\"Image24\" />";
    $("#border_middle_part_td").html(closeChange);
    $("#right_end_td").width(5);
    $("#images_pic2").width(5);
    $("#right_end2_td").width(5);
    $("#body_left_part_td").width(550);
    if($("#sequoia_operationBar").is(":visible")){
 	   
 	   $("#sequoia_operationBar").width($("#inputBox").width()+5);
 	   
    }
    $.cookie("is_Close_Left_Part","open",{expires:30,path:"/"});
}
xthtagWidget.prototype.preloadImages=function(){
	
	  var img1=new Image();
	  img1.src="images/dian_line_x.gif";
	  cacheImageArray[0]=img1;
	  
	  var img2=new Image();
	  img2.src="images/flex2.gif";
	  cacheImageArray[1]=img2;
	  var img3=new Image();
	  img3.src="images/flex1.gif";
	  cacheImageArray[2]=img3;
	  var img4=new Image();
	  img4.src="images/dian_line.gif";
	  cacheImageArray[3]=img4;
	 
}
xthtagWidget.prototype.statisfyUpdate=function(inputQuestion,question,answer,contentId,satisfied,trancation_Id,satisfy_type){
	   
	   qsupport.statisfyUpdate(inputQuestion,question,answer,satisfied,contentId,trancation_Id,satisfy_type);
	
}
xthtagWidget.prototype.statisfyUpdateOther=function(inputQuestion,question,answer,contentId,satisfied,trancation_Id,satisfy_type){
	 
      qsupport.statisfyUpdate(inputQuestion,question,answer,satisfied,contentId,trancation_Id,satisfy_type);
}
xthtagWidget.prototype.noStatisfyUpdate=function(contentId){
	
	 $("#statisy_content_"+contentId).remove();
	 $("#statisy_content_div_"+contentId).show();
	  
}

xthtagWidget.prototype.changeApplication=function(company_id,content_id,text){
	
	   qsupport.changeApplication(company_id,content_id,text);
}
xthtagWidget.prototype.upToChangeCompanyCommand=function(isNew){
	
	   qsupport.upToChangeCompanyCommand(isNew);
}
xthtagWidget.prototype.wangwangReferLink=function(url){
	 if(qsupportGetValue(COMPANY_ID) == 3){
		   // changeTab("0");
	        document.getElementById("right_h").src=url;
	   }
}
xthtagWidget.prototype.addCollectionFold=function(title){
	
	if(ie){
		if(navigator.appVersion.indexOf("8")!=-1){
			
			window.external.addToFavoritesBar(location.href,title);
		}else{
		  window.external.addFavorite(location.href,title);
		}
	}else if(ff){
	     window.sidebar.addPanel(title,location.href,"");
	}else {
		  return;
    }
	
}


xthtagWidget.prototype.diagnoseSelect = function(id,comment)
{
//	changeTab("0");
	var cmd = {command: "diagnoseAsk64", param: ""};
	var paramArray = new Array();
	var option = {"key": "id", "text": id};
	paramArray.push(option);
	var option = {"key": "question", "text": comment};
	paramArray.push(option);
	cmd.param = paramArray;
	qsupport.showInputBeforeCommand(JSON.stringify(cmd),utf8to16(base64decode(comment)));
}
xthtagWidget.prototype.closeTeachQuestion=function(teach_li_id){
	document.getElementById(teach_li_id).style.display="none";
	changeTabx("11");
}
xthtagWidget.prototype.closeSuggestContext=function(suggest_li_id){
	document.getElementById(suggest_li_id).style.display="none";
	changeTabx("11");
}
xthtagWidget.prototype.openTeachQuestion=function(teach_li_id,value){
	
	changeTabx(value);
	menuTeacherToTeacher();
	document.getElementById(teach_li_id).style.display="";
}

xthtagWidget.prototype.closeSpaceTeachQuestion=function(teach_li_id){
	document.getElementById(teach_li_id).style.display="none";
	changeTabx("0");
}
xthtagWidget.prototype.changeTabsOrder=function(){
	if(document.getElementById("monitordiv2") != null && document.getElementById("monitordiv2") != undefined ){
		if(!$("#monitordiv2").is(":visible")){
		    changeTab('2');
		  }
	}
}
xthtagWidget.prototype.searchTeachQcTop=function(user_id,teach_start_id){
	qsupport.searchTeachQcTop(user_id,teach_start_id);
}
xthtagWidget.prototype.searchTeachQuestionTop=function(user_id,teach_start_id){
	qsupport.searchTeachQuestionTop(user_id,teach_start_id);
}
xthtagWidget.prototype.operateHandPoint=function(){
	if(!this.hasShowHand){
		this.hasShowHand=true;
	   $("#hand_Point_Div").css({
	   	 "left":parseInt($("#containTDx").offset().left)+$("#containTDx").width()/2,
	   	 "top":parseInt($("#containTDx").offset().top)+$("#containTDx").height()/2,
	   	 "visibility":"visible"
	      });
	    setTimeout(function(){
	   	   $("#hand_Point_Div").css("visibility","hidden");
	    },7000);
	 }
}
xthtagWidget.prototype.closeEmergenceAnnouncement=function(){
	if(document.getElementById("emergence_Blank_move") != undefined && document.getElementById("emergence_Blank_move") != null){
	    $("#emergence_Blank_move").remove();
	}
	document.getElementById("help-placard").style.display="none";
}
xthtagWidget.prototype.showAnnouncement=function(announcement,name){
	
	if(announcement != null && announcement != undefined &&  announcement != ""){
	     var annouceObject=eval('('+announcement+')');
	     var annouceEmergency="";
	     var normalAnnouce="<li>"+$("#company_cust_supportTD").html()+"</li>";
	     var n=0;
	     var em=0;
	     
	     for(var i=0;i<annouceObject.length;i++){
	    	 if(annouceObject[i].status_type == "1"){
	    		 annouceEmergency+="<li >"+annouceObject[i].content+"</li>";
	    		 em=em+1;
	    	 }else if(annouceObject[i].status_type == "0"){
	    		 normalAnnouce+="<li>"+annouceObject[i].content+"</li>";
	    		 n=n+1;
	    	 }
	      }
	     
	    if(annouceEmergency !=""){
	    	if(name != null && name != undefined && name != ""){
	    		$("#annouce_emergency_name").html(name+"：");
	    	}
	    	$("#announce_emergency_ul").html(annouceEmergency);
	    	if(em <= 1){
	    		clearInterval(EMERGENCY_ANNOUCE_SI);
	    	}
	    	
	    	//$("#help-placard").width($("#displayPanel").width());
	    	//alert($("#help-placard").width());
	    	EMERGENCY_ANNOUCE_SL_II = $("#help-placard ul li").length;
			EMERGENCY_ANNOUCE_SL_I = EMERGENCY_ANNOUCE_SL_II + 1;
			$("#help-placard div ul li").hide();
			$("#help-placard div ul li").eq(0).show();
	    	document.getElementById("help-placard").style.display="";
	    }else{
	    	$("#announce_emergency_ul").html(annouceEmergency);
	    	clearInterval(EMERGENCY_ANNOUCE_SI);
	    }
	 
	    if(normalAnnouce !=""){
	    	//setTimeout(function(){
	    		$("#company_cust_supportTD").remove();
	    		$("#pt_gonggao_words").html(normalAnnouce);
	    		document.getElementById("pt_gonggao_laba").style.display="";
	    		NORMA_ANNOUCE_SL_II = $("#pt_gonggao_content_div ul li").length;
				NORMA_ANNOUCE_SL_I = NORMA_ANNOUCE_SL_II + 1;
				$("#pt_gonggao_main_div div ul li").hide();
				$("#pt_gonggao_main_div div ul li").eq(0).show();
	    		
	    		document.getElementById("pt_gonggao_content_div").style.display="";
	    		if(n < 1){
	    			clearInterval(NORMAL_ANNOUCE_SI);
	    		}
	    	//},1000);
	    }
	    
	}
}

xthtagWidget.prototype.openSuggestContext=function(suggest_context_id,value){
	changeTabx(value);
	menuToSuggestContextSelect('suggest_context_iframe_a_id','./suggest/mysay.jsp');
	document.getElementById(suggest_context_id).style.display="";
}
