/************************************************/
/*	Function：chatTools Interface			    */
/*	@author:tiger							    */
/*	@email:li284362085@163.com				    */
/*	@copyright:                          	    */	
/*	@date:2008-4-9								*/
/************************************************/
<!--
/**chatWindow Min and Max 
**工具窗口 最大化与最小化
**/
var Browser_Name=navigator.appName;
var is_IE=(Browser_Name=="Microsoft Internet Explorer");//get  browser Object;
function minWin(obj,winObj,bodyObj){
	try{
		if(typeof(winObj)!="object" || typeof(obj)!="object"
		  || typeof(bodyObj)!="object"){
		  	alert("参数不是对象!\nParameters is not the object!");
			return;
		}
		//get   the   layer   whose   id   is   xMsg   
		var   win   =  winObj; 
		
		//get   it's   parent   element(layer   too!)   
		var   tit   =  obj.parentNode;   
		
		//get   another   layer   which   is   near   its   parent   element   
		var   msg   =  bodyObj;
		//define   the   layer's   original   state
		var  flag   =   msg.style.display == "none";
		if(flag){ 
			msg.style.display="block";   
			win.style.top=winTop;   
			win.style.left=winLeft; 
			win.style.height=winHeight;  
			//obj.innerHTML="<img src='"+$("base").attr("href")+"templates/images/min.jpg' border='0' alt='"+L_MINIMIZE+"'>";
			obj.innerHTML="<img src='"+chatPath+"templates/images/min.jpg' border='0' alt='"+L_MINIMIZE+"'>";    
		}else{
			winTop=win.style.top;   
			winLeft=win.style.left;
			winHeight=win.style.height;
			
			msg.style.display = "none";
			
			win.style.height=tit.clientHeight+"px";
			if(is_IE){//verdict is IE browser //判断是否是 ie 浏览器  因为ie浏览器不宽度不算滚动条在内，所以应把窗口往左移
				win.style.left=(document.documentElement.clientWidth-win.clientWidth-20)+'px';
			}else{
				win.style.left=(document.documentElement.clientWidth-win.clientWidth-20)+'px';
			}
			win.style.top=(document.documentElement.scrollTop+ document.documentElement.clientHeight-36)+'px' 
			//win.style.top=(document.documentElement.scrollTop+ document.documentElement.scrollHeight-36)+'px' 
			//obj.innerHTML ="<img src='"+$("base").attr("href")+"templates/images/max.jpg' border='0' alt='"+L_RESTORE+"'>";   
			obj.innerHTML ="<img src='"+chatPath+"templates/images/max.jpg' border='0' alt='"+L_RESTORE+"'>";
		}  
	}catch(err){alert(err.message);}
}
 //显示即时对话界面
 function showChatDialog(){
 	$('#chatbody').show();
 	//$('#winminBut').html("<img src='"+$("base").attr("href")+"templates/images/min.jpg' border='0' alt='"+L_MINIMIZE+"'>");
 	$('#winminBut').html("<img src='"+chatPath+"templates/images/min.jpg' border='0' alt='"+L_MINIMIZE+"'>");
 	$('#chatwin').css({'visibility':'visible','right':'16px','top':'0px'});
 }
 
 //是否显示
 function isShowChatDialog(){
 	return $('#chatwin').css('visibility')=="visible";
 }
 
 //隐葳即时对话
 function hideChatDialog(){
 	$('#chatwin').css('visibility','hidden');
 } 
//-->