function createNameSpace(str) {  
    var strs = str.split(".");  
    var strT = strs[0];  
    if (window[strT] == undefined) {  
        window[strT] = new Object();  
    }  
    for (var i = 1; i < strs.length; i++) {  
        if (eval(strT)[strs[i]] == undefined) {  
            eval(strT)[strs[i]] = new Object();  
        }  
        strT += "." + strs[i];  
    }  
}  
createNameSpace("com.infowarelab.tag");

com.infowarelab.tag.ChatTag = function(configID,staticFlag,pitch,fromTop,fromLeft,tagColor,template,acdGroupId,customOnlineUrl,customOfflineUrl,contextPath,staticBranding) {
	this.configID = configID;
	this.staticFlag = staticFlag;
	this.pitch = pitch;	
	this.fromTop = fromTop;
	this.fromLeft = fromLeft;
	this.tagColor = tagColor;	
	this.template = template;
	this.acdGroupId = acdGroupId;
	this.customOnlineUrl = customOnlineUrl;	
	this.customOfflineUrl = customOfflineUrl;	
	
	
	this.staticImageUrl=contextPath+"/static/";
	this.staticBranding=staticBranding;
	this.imgIdPrefix="easytouchimg";
	this.tagLock="_lock";
	this.tagForImage=this.imgIdPrefix+this.configID;	
	this.etIE = (document.all) ? true : false;
    this.etDOM = (document.getElementById) ? true : false;    
    this.dynamicAgentChatUrl="";
    this.chatOnImage="";
    this.chatOffImage="";
    
    window.chatTag = this;  
    
    this.initImageInfo = function() {
		if (this.template != "customer_select") {
			this.dynamicAgentChatUrl = this.staticImageUrl + "branding/"+this.staticBranding+"/"
					+ this.tagColor + "/image/";
			this.chatOnImage = "OL_con_on.gif";
			this.chatOffImage = "OL_con_off.gif";
		} else {
			this.dynamicAgentChatUrl = "";
			this.chatOnImage = this.customOnlineUrl;
			this.chatOffImage =this.customOfflineUrl;
		}
	};
    
    	
	this.appendImageDIV =function (){
	 if(this.etIE && document.readyState!="complete" ){
   		setTimeout("appendImageDIV()", 1000);
   		return ;
     }
    if ((this.etIE || this.etDOM )) {
        var imageDIV = document.getElementById(this.configID);
       if (imageDIV != null) {
          return;
         }
        var obody = document.getElementsByTagName('BODY').item(0);        
        var imageDIV = document.createElement("DIV");
        imageDIV.id = this.configID;
        imageDIV.style.display = "none";
        imageDIV.style.position = "absolute";
        imageDIV.style.zIndex = 999999999;
        obody.appendChild(imageDIV);       
        var content = '<img src="'+this.dynamicAgentChatUrl+this.chatOffImage+'"  id="'+this.tagForImage+'" onmouseover="this.style.cursor=\'pointer\'" />';
        imageDIV.innerHTML = content;
    }
};

this.setImageDIV =function (){
	 if(this.etIE&&document.readyState!="complete" ){
   		setTimeout("chatTag.setImageDIV()", 1000);
   		return ;
     }   
     if ((this.etIE || this.etDOM)) {         
        var imageDIV = document.getElementById(this.configID+this.tagLock);
        if (imageDIV == null) {        	
          setTimeout("chatTag.setImageDIV()", 1000);
          return;
         }         
        var content = '<img src="'+this.dynamicAgentChatUrl+this.chatOffImage+'"  id="'+this.tagForImage+'" onmouseover="this.style.cursor=\'pointer\'" />';
        imageDIV.innerHTML = content;
    }
};

this.playImgFloatPosition =function (staticFlag,id,left,top,pitch){
  return function(){
	  if(staticFlag=="false"){
		var imageDIV = document.getElementById(id);
	    if (imageDIV == null) {
	        setTimeout('chatTag.playImgFloatPosition("'+ staticFlag + '","'+ id + '",' + left + ',' + top +',' + pitch + ')', 1000);
	        return;
	    }
	    if (pitch==1){
	     imageDIV.style.left = left + "px";
	     imageDIV.style.right = "";
	    }else{
	     imageDIV.style.left ="";
	     imageDIV.style.right = left + "px";
	    }     
	    imageDIV.style.bottom = "";   
	    imageDIV.style.top =(parseInt(getScrollSize()[1])+parseInt(top)) + "px";
	    imageDIV.style.display="";
  }
}
};

this.initImgFloatPosition =function (staticFlag,id,left,top,pitch){
  
	  if(staticFlag=="false"){
		var imageDIV = document.getElementById(id);
	    if (imageDIV == null) {
	        setTimeout('chatTag.initImgFloatPosition("'+ staticFlag + '","'+ id + '",' + left + ',' + top +',' + pitch + ')', 1000);
	        return;
	    }
	    if (pitch==1){
	     imageDIV.style.left = left + "px";
	     imageDIV.style.right = "";
	    }else{
	     imageDIV.style.left ="";
	     imageDIV.style.right = left + "px";
	    }     
	    imageDIV.style.bottom = "";   
	    imageDIV.style.top =(parseInt(getScrollSize()[1])+parseInt(top)) + "px";
	    imageDIV.style.display="";
}
};
 
  this.initEventForChat =function (){  	
  	addEventForTag('scroll', this.playImgFloatPosition(this.staticFlag,this.configID,this.fromLeft,this.fromTop,this.pitch));
  	addEventForTag('resize', this.playImgFloatPosition(this.staticFlag,this.configID,this.fromLeft,this.fromTop,this.pitch));
	};
	
 this.chatOpenWindow =function(acdGroupId) {
	return function() 
	{ 	var chat_currentAcdId =acdGroupId;
		if (chat_currentAcdId == "-1") {
			chat_currentAcdId = "";
		}
		new ActiveChatInviteCommand().execute(chat_currentAcdId);
	}
 };

 this.initImageDIV =function (){
       if(this.staticFlag=="false"){
		   this.appendImageDIV();
		}
		else{
		   this.setImageDIV();
		}
 };
 
  this.setChatImageSrc =function (imageName){
    var easytouchimg = etGetObj(this.tagForImage);
    if (easytouchimg != null) {
        easytouchimg.src = this.dynamicAgentChatUrl + imageName;
    }
 };
 
 this.enterChat=function (){ 
	 var obj = document.getElementById(this.tagForImage);
	 if (obj == null) {
			setTimeout('chatTag.enterChat()', 1000);
			return;
		}
     var chat_availableAcdGroupId = this.acdGroupId;    
     var chat_currentAcdAvailable=false;    
     debug(" enterChat chat_CURRENT_ACDGROUP_ID :"+this.acdGroupId);         
     if(chat_availableAcdGroupId=="-1")
     {
      debug(" enterChat currentAcdGroupStatus:"+currentAcdGroupStatus);
      if( currentAcdGroupStatus.toLowerCase()=="true")
      {
        chat_currentAcdAvailable=true;
      }
      else
      {
      	chat_currentAcdAvailable=false;
      }
      
    }
    else{
	    for (var i = 0; i < currentAcdGroups.length; i++) {
	        if (currentAcdGroups[i].id == chat_availableAcdGroupId && currentAcdGroups[i].aval) {
	            chat_currentAcdAvailable = true;
	            break;
	        }
	        }
      }
      
      if(canInvite(WEBTOUCH_INVITE_ABLE) && currentAcdGroupStatus.toLowerCase()=="true" && !hasInvited )
     {
        setTimeout('etAutoInvite()', WEBTOUCH_INVITE_DELAY * 1000);
      }
            
        debug(" enterChat chat_currentAcdAvailable :"+chat_currentAcdAvailable);
        
        if (chat_currentAcdAvailable) {   
        	this.setChatImageSrc(this.chatOnImage);        	
        	if (window.addEventListener) {
			    etGetObj(this.tagForImage).addEventListener('click', this.chatOpenWindow(this.acdGroupId),false);
			}
			if (window.attachEvent) {
				etGetObj(this.tagForImage).attachEvent('onclick', this.chatOpenWindow(this.acdGroupId));
			}    
        }
        if ( !chat_currentAcdAvailable) {            
            etGetObj(this.tagForImage).onclick = function(){
                etLeaveWords();
            };
            this.setChatImageSrc(this.chatOffImage);
        }        
};	
this.initData=function(){
	this.initImageInfo();
	this.initImageDIV(); 
	this.initImgFloatPosition(this.staticFlag,this.configID,this.fromLeft,this.fromTop,this.pitch);
	this.initEventForChat();
};
}
function createNameSpace(str) {  
    var strs = str.split(".");  
    var strT = strs[0];  
    if (window[strT] == undefined) {  
        window[strT] = new Object();  
    }  
    for (var i = 1; i < strs.length; i++) {  
        if (eval(strT)[strs[i]] == undefined) {  
            eval(strT)[strs[i]] = new Object();  
        }  
        strT += "." + strs[i];  
    }  
}  
createNameSpace("com.infowarelab.tag");

com.infowarelab.tag.TelTag = function(configID,staticFlag,pitch,fromTop,fromLeft,tagColor,template,acdGroupId,customOnlineUrl,customOfflineUrl,contextPath,staticBranding,telRelatedEasycall) {
	this.configID = configID;
	this.staticFlag = staticFlag;
	this.pitch = pitch;	
	this.fromTop = fromTop;
	this.fromLeft = fromLeft;
	this.tagColor = tagColor;	
	this.template = template;
	this.acdGroupId = acdGroupId;
	this.customOnlineUrl = customOnlineUrl;	
	this.customOfflineUrl = customOfflineUrl;	
	this.telRelatedEasycall=telRelatedEasycall;
	
	this.staticImageUrl=contextPath+"/static/";
	this.staticBranding=staticBranding;
	this.telIdPrefix="easytouchtel";
	this.tagLock="_lock";
	this.tagForTel=this.telIdPrefix+this.configID;	
	
	this.etIE = (document.all) ? true : false;
    this.etDOM = (document.getElementById) ? true : false;    
    
    this.dynamicTelImagetUrl="";
    this.telOnImage="";
    this.telOffImage="";
    
     window.telTag = this;  
    
    this.initImageInfo = function() {
		if (this.template != "customer_select") {
			this.dynamicTelImagetUrl = this.staticImageUrl + "branding/"+this.staticBranding+"/"
					+ this.tagColor + "/image/";
			this.telOnImage = "OL_frreecall_on.gif";
			this.telOffImage = "OL_frreecall_off.gif";
		} else {
			this.dynamicTelImagetUrl = "";
			this.telOnImage = this.customOnlineUrl;
			this.telOffImage =this.customOfflineUrl;
		}
	};
    
    	
	this.appendImageDIV =function (){
	 if(this.etIE && document.readyState!="complete" ){
   		setTimeout("telTag.appendImageDIV()", 1000);
   		return ;
     }
    if ((this.etIE || this.etDOM )) {
        var imageDIV = document.getElementById(this.configID);
       if (imageDIV != null) {
          return;
         }
        var obody = document.getElementsByTagName('BODY').item(0);        
        var imageDIV = document.createElement("DIV");
        imageDIV.id = this.configID;
        imageDIV.style.display = "none";
        imageDIV.style.position = "absolute";
        imageDIV.style.zIndex = 999999999;
        obody.appendChild(imageDIV);    
       
        var content = '<img src="'+this.dynamicTelImagetUrl+this.telOffImage+'"  id="'+this.tagForTel+'" onmouseover="this.style.cursor=\'pointer\'" />';
        imageDIV.innerHTML = content;
    }
};

this.setImageDIV =function (){
	 if(this.etIE&&document.readyState!="complete" ){
   		setTimeout("telTag.setImageDIV()", 1000);
   		return ;
     }   
     if ((this.etIE || this.etDOM)) {         
        var imageDIV = document.getElementById(this.configID+this.tagLock);
        if (imageDIV == null) {
          setTimeout("telTag.setImageDIV()", 1000);
          return;
         }         
        var content = '<img src="'+this.dynamicTelImagetUrl+this.telOffImage+'"  id="'+this.tagForTel+'" onmouseover="this.style.cursor=\'pointer\'" />';
        imageDIV.innerHTML = content;
    }
};

this.playTelFloatPosition =function (staticFlag,id,left,top,pitch){
  return function(){
	  if(staticFlag=="false"){
		var imageDIV = document.getElementById(id);
	    if (imageDIV == null) {
	        setTimeout('telTag.playTelFloatPosition("'+ staticFlag + '","'+ id + '",' + left + ',' + top +',' + pitch + ')', 1000);
	        return;
	    }
	    if (pitch==1){
	     imageDIV.style.left = left + "px";
	     imageDIV.style.right = "";
	    }else{
	     imageDIV.style.left ="";
	     imageDIV.style.right = left + "px";
	    }     
	    imageDIV.style.bottom = "";   
	    imageDIV.style.top =(parseInt(getScrollSize()[1])+parseInt(top)) + "px";
	    imageDIV.style.display="";
  }
}
};

this.initTelFloatPosition =function (staticFlag,id,left,top,pitch){
  
	  if(staticFlag=="false"){
		var imageDIV = document.getElementById(id);
	    if (imageDIV == null) {
	        setTimeout('telTag.initTelFloatPosition("'+ staticFlag + '","'+ id + '",' + left + ',' + top +',' + pitch + ')', 1000);
	        return;
	    }
	    if (pitch==1){
	     imageDIV.style.left = left + "px";
	     imageDIV.style.right = "";
	    }else{
	     imageDIV.style.left ="";
	     imageDIV.style.right = left + "px";
	    }     
	    imageDIV.style.bottom = "";   
	    imageDIV.style.top =(parseInt(getScrollSize()[1])+parseInt(top)) + "px";
	    imageDIV.style.display="";
}
};
 
  this.initEventForTel =function (){ 
  	  	addEventForTag('scroll', this.playTelFloatPosition(this.staticFlag,this.configID,this.fromLeft,this.fromTop,this.pitch));
  	  	addEventForTag('resize', this.playTelFloatPosition(this.staticFlag,this.configID,this.fromLeft,this.fromTop,this.pitch));
	};
	
	
 this.ecOpenCallWindow=function(tel_availableAcdGroupId){
 	return function() {
    new ActivePhoneInviteCommand().execute(tel_availableAcdGroupId);
 	}
};

 this.initImageDIV =function (){
       if(this.staticFlag=="false"){
		   this.appendImageDIV();
		}
		else{
		   this.setImageDIV();
		}
 };
 
  this.setTelImageSrc =function (imageName){
    var easytouchimg = etGetObj(this.tagForTel);
    if (easytouchimg != null) {
        easytouchimg.src = this.dynamicTelImagetUrl + imageName;
    }
 };
 
 this.enterTel=function (){ 
	 var obj = document.getElementById(this.tagForTel);   
	 if (obj == null) {
			setTimeout('telTag.enterTel()', 1000);
			return;
		}

     var tel_availableAcdGroupId = this.acdGroupId;    
     var tel_currentAcdAvailable=false;    
     debug(" enterTel chat_CURRENT_ACDGROUP_ID :"+this.acdGroupId);   
       debug(" enterTel telRelatedEasycall :"+this.telRelatedEasycall);   
      if (this.telRelatedEasycall!="true"){
        etGetObj(this.tagForTel).onclick = function(){
                etLeaveWords();
            };
           this.setTelImageSrc(this.telOffImage);
            return;    
    }
     
     
     if(tel_availableAcdGroupId=="-1")
     {
      debug(" enterTel currentAcdGroupStatus:"+currentAcdGroupStatus);
      if( currentAcdGroupStatus.toLowerCase()=="true")
      {
        tel_currentAcdAvailable=true;
      }
      else
      {
      	tel_currentAcdAvailable=false;
      }
      
    }
    else{
	    for (var i = 0; i < currentAcdGroups.length; i++) {
	        if (currentAcdGroups[i].id == tel_availableAcdGroupId && currentAcdGroups[i].aval) {
	            tel_currentAcdAvailable = true;
	            break;
	        }
	        }
      }
                
        debug(" enterTel tel_currentAcdAvailable :"+tel_currentAcdAvailable);
        
        if (tel_currentAcdAvailable) {   
        	this.setTelImageSrc(this.telOnImage);        	
        	if (window.addEventListener) {
			    etGetObj(this.tagForTel).addEventListener('click', this.ecOpenCallWindow(this.acdGroupId),false);
			}
			if (window.attachEvent) {
				etGetObj(this.tagForTel).attachEvent('onclick', this.ecOpenCallWindow(this.acdGroupId));
			}
			
        }
        if ( !tel_currentAcdAvailable) {            
            etGetObj(this.tagForTel).onclick = function(){
                etLeaveWords();
            };
            this.setTelImageSrc(this.telOffImage);
        }        
};	
this.initData=function(){
	this.initImageInfo();
	this.initImageDIV(); 
	this.initTelFloatPosition(this.staticFlag,this.configID,this.fromLeft,this.fromTop,this.pitch);
	this.initEventForTel();
};
}

function createNameSpace(str) {  
    var strs = str.split(".");  
    var strT = strs[0];  
    if (window[strT] == undefined) {  
        window[strT] = new Object();  
    }  
    for (var i = 1; i < strs.length; i++) {  
        if (eval(strT)[strs[i]] == undefined) {  
            eval(strT)[strs[i]] = new Object();  
        }  
        strT += "." + strs[i];  
    }  
}  
createNameSpace("com.infowarelab.tag");


com.infowarelab.tag.AcdGroupListTag = function(configID,grouptitle,pitch,fromTop,fromLeft,phoneAcdGroupId,phoneable,i18nClose,currentAcdGroups) {
	this.configID = configID;
	this.grouptitle = grouptitle;
	this.pitch = pitch;	
	this.fromTop = fromTop;
	this.fromLeft = fromLeft;	
	this.phoneAcdGroupId = phoneAcdGroupId;	
	this.phoneable=phoneable;
    this.i18nClose=i18nClose;	
    this.currentAcdGroups=currentAcdGroups;	

	this.webtouchAcdgroupDivId="Webtouch_ACDGroupList_"+this.configID;	
    this.acdGroupDivTitleMaxLenth = 10;
    window.acdGroupListTag = this;  
    
    this.acdgruoplistShowed=true;
    
   this.getShowStr = function(str, baseLength) {
		return str.substring(0, this.getShowLength(str, baseLength));
	};

	this.getShowLength = function(str, baseLength) {
		var i;
		var result;
		var state = false;
		result = baseLength;
		for (i = 0; i < str.length; i++) {
			if (i == baseLength - 1)
				break;
			if ((str.charAt(i) >= 'a' && str.charAt(i) <= 'z')
					|| (str.charAt(i) >= 'A' && str.charAt(i) <= 'Z')
					|| (str.charAt(i) >= '0' && str.charAt(i) <= '9')
					|| this.count(str.charAt(i))) {
				if (state) {
					state = false;
					result++;
				} else
					state = true;
			}
		}
		return result;
	};
	
	this.count = function(c) {
		if (c == '`' || c == '!' || c == '@' || c == '#' || c == '$'
				|| c == '%' || c == '^' || c == '&' || c == '*' || c == '('
				|| c == ')' || c == '_' || c == '-' || c == '+' || c == '='
				|| c == '[' || c == '{' || c == ']' || c == '}' || c == '\\'
				|| c == '|' || c == ';' || c == ':' || c == '"' || c == '\''
				|| c == '<' || c == ',' || c == '>' || c == '.' || c == '?'
				|| c == '/' || c == ' ')
			return true;
		else
			return false;
	};
	
	

	this.etAppendACDListDiv = function() {
		if (etIE && document.readyState != "complete") {
			setTimeout('acdGroupListTag.etAppendACDListDiv()', 1000);
			return;
		}
		if ((etIE || etDOM)) {
			var obody = document.getElementsByTagName('BODY').item(0);
			var acdListDiv = document.createElement("DIV");
			acdListDiv.id = this.webtouchAcdgroupDivId;
			acdListDiv.className = "Webtouch_ACDGroupList";
			acdListDiv.style.position = "absolute";
			acdListDiv.style.zIndex = "999";
			obody.appendChild(acdListDiv);
		}
		debug("etAppendACDListDiv id=" + this.webtouchAcdgroupDivId);
	};
	
	this.getDetailAcdGroupInfo=function(){
    var result = "";
    if (typeof(this.currentAcdGroups) != "undefined" && this.currentAcdGroups != null) {
        for (var i = 0; i < this.currentAcdGroups.length; i++) {
            var acdGroup = this.currentAcdGroups[i];
            if (acdGroup.aval) {
                result += '<li class="on"><a href="#" onfocus="this.blur()" onclick="new ActiveChatInviteCommand().execute(' + acdGroup.id + ')">' + acdGroup.name + '</a></li>';
            }
            else {
                result += '<li class="off"><a href="#" onfocus="this.blur()" onclick="etLeaveWords()">' + acdGroup.name + '</a></li>';
            }
 
        }
    }
    return result;
};

this.getCurrentPhoneAcdAvailable=function (){
     var currentPhoneAcdGroupId=this.phoneAcdGroupId;     
     debug("&&&&& getCurrentPhoneAcdAvailable :"+currentPhoneAcdGroupId);    
     var result = false;    
    if(currentPhoneAcdGroupId=="-1")
    {
	      debug(" ChatGetAcdGroupInfoResponseCommand currentAcdGroupStatus:"+currentAcdGroupStatus);
	      if( currentAcdGroupStatus.toLowerCase()=="true")
	      {
	        result=true;
	      }
	      else
	      {
	      	result=false;
	      }      
    }    
    else{
	    for (var i = 0; i < this.currentAcdGroups.length; i++) {
	        var acdGroup = this.currentAcdGroups[i];
	        if (acdGroup.id == currentPhoneAcdGroupId && acdGroup.aval) {
	            result = true;
	            break;
	        }
	    }
    }
    return result;
};
	
this.getPhoneButtonContent=function(phoneAcdGroupId){
    var phoneButton = "";       
   debug("1111 getPhoneButtonContent getCurrentPhoneAcdAvailable :"+this.getCurrentPhoneAcdAvailable());   
   debug("2222 getPhoneButtonContent phoneable :"+this.phoneable);   
    if ( this.getCurrentPhoneAcdAvailable() && this.phoneable )
    {
     phoneButton='<input type="button" class="btn_wt1" value="" onfocus="this.blur()" onclick="new ActivePhoneInviteCommand().execute('+phoneAcdGroupId+')"/>';
    }
    return phoneButton;
};
 

this.playAcdGroupDivFloatPosition =function (id,left,top,pitch){
  return function(){
	   if (!acdGroupListTag.acdgruoplistShowed)
	   {
	   	return ;
	   }
		var imageDIV = document.getElementById(id);
	    if (imageDIV == null) {
	        setTimeout('acdGroupListTag.playAcdGroupDivFloatPosition("'+ id + '",' + left + ',' + top +',' + pitch + ')', 1000);
	        return;
	    }
	    if (pitch==1){
	     imageDIV.style.left = left + "px";
	     imageDIV.style.right = "";
	    }else{
	     imageDIV.style.left ="";
	     imageDIV.style.right = left + "px";
	    }     
	    imageDIV.style.bottom = "";   
	    imageDIV.style.top =(parseInt(getScrollSize()[1])+parseInt(top)) + "px";
	    imageDIV.style.display="";
  }
};

this.initAcdGroupDivFloatPosition =function (id,left,top,pitch){
  
		var imageDIV = document.getElementById(id);
	    if (imageDIV == null) {
	        setTimeout('acdGroupListTag.playAcdGroupDivFloatPosition("'+ id + '",' + left + ',' + top +',' + pitch + ')', 1000);
	        return;
	    }
	    if (pitch==1){
	     imageDIV.style.left = left + "px";
	     imageDIV.style.right = "";
	    }else{
	     imageDIV.style.left ="";
	     imageDIV.style.right = left + "px";
	    }     
	    imageDIV.style.bottom = "";   
	    imageDIV.style.top =(parseInt(getScrollSize()[1])+parseInt(top)) + "px";
	    imageDIV.style.display="";

};
 
  this.initEventForAcdGroup =function (){ 
  	addEventForTag('scroll', this.playAcdGroupDivFloatPosition(this.webtouchAcdgroupDivId,this.fromLeft,this.fromTop,this.pitch));
  	addEventForTag('resize', this.playAcdGroupDivFloatPosition(this.webtouchAcdgroupDivId,this.fromLeft,this.fromTop,this.pitch));
	};
	 
 this.enterAcdGroup=function (){ 
 	
	    var phoneAcdGroupId= this.phoneAcdGroupId;
        var Webtouch_ACDGroupList_Div_Id = this.webtouchAcdgroupDivId;
        var ACDGroupListDiv = etGetObj(Webtouch_ACDGroupList_Div_Id);
        if(ACDGroupListDiv==null){
            setTimeout('acdGroupListTag.enterAcdGroup()',1000);
            return;
        }
        var contentBeforeDetailACDGroupInfo = '<div class="Webtouch_ACDGroupList" id="Webtouch_ACDGroupList">' +
        		                              '<div class="Webtouch_ACDGroupList_head" TITLE="' + currentGroupTitle + '">' +
                                               this.getShowStr(this.grouptitle, this.acdGroupDivTitleMaxLenth) + 
                                              '</div>' +
                                              '<div class="Webtouch_ACDGroupList_body" id="Webtouch_ACDGroupList_body">' +
                                              '<div class="container_box">' +
                                              '<div class="container" id="container">' +
                                              '<ul class="ACDGroupList">';
        var contentAfterDetailACDGroupInfo = '</ul></div></div>'
                                             +this.getPhoneButtonContent(phoneAcdGroupId)+
                                             '</div><div class="Webtouch_ACDGroupList_foot"></div>' +
                                             '<div class="closebar"><a href="javascript:void(0)" onfocus="this.blur()" onclick="acdGroupListTag.acdgruoplistShowed=false;document.getElementById(\''+Webtouch_ACDGroupList_Div_Id+'\').style.display = \'none\'"  >'+this.i18nClose+'</a></div></div> ';       
        var divContent = contentBeforeDetailACDGroupInfo + this.getDetailAcdGroupInfo() + contentAfterDetailACDGroupInfo;
        ACDGroupListDiv.innerHTML = divContent;
        debug("ACDGroupListDiv.innerHTML:"+ACDGroupListDiv.innerHTML);
         if(canInvite(WEBTOUCH_INVITE_ABLE) && currentAcdGroupStatus.toLowerCase()=="true" && !hasInvited )
       {
       	debug("acdgrouplist etAutoInvite!!!");
        setTimeout('etAutoInvite()', WEBTOUCH_INVITE_DELAY * 1000);
       }
};	
this.initData=function(){
	this.etAppendACDListDiv();
	this.initAcdGroupDivFloatPosition(this.webtouchAcdgroupDivId,this.fromLeft,this.fromTop,this.pitch);
	this.initEventForAcdGroup();
};
}
