/**
 *  弹出IM
 * @author Mr.Jin
 * @copyright 2010.06
 * @email jindaibin@126.com
   change date 2010.11.10 Mr.Jin
 */
 
 
 /**
  *  wangwang img :http://amos1.taobao.com/online.ww?v=2&uid=&s=1
  *  qq       img :http://wpasig.qq.com/msgrd?v=1&uin=&site=qq&menu=yes
  *  msn      img :
  */
 
function show_im(C,T,A)
{
	var O = {
		
	ifram:null,
	
	msn:function(u){
		
		  var t= 'msnim:chat?contact='+u;
		  
		  this.show(t);
		  
		},
		  
	qq:function(u){
		
	    var t = 'http://wpasig.qq.com/msgrd?v=1&uin='+u+'&site=qq&menu=yes';	
		//document.write(t);
		this.show(t);
	},
	
	show:function(url){
		
		 
		   if(T==1&&A.tagName=='A')
		   {
			   // ie
			   
			   /**
			    *  解决 在浏览器中，出现IM工具后退及弹出编辑框的问题
				*  dickJin 2011.04.13
				*/
			  
			   A.href = url;
			   
			   return true;
			   
		   }
		   else if(this.ifram==null)
		   {
			   
			   this.ifram = document.createElement('iframe');
			   
			   this.ifram.setAttribute('width',0);
			   
			   this.ifram.setAttribute('height',0);
			   
	           document.body.appendChild(this.ifram);
			    
		   }
			
		   
		   this.ifram.src = url;
			 
		}
		
		};
	
	T = parseInt(T);
	
	if(T==1)
	{
	     O.qq(C);
	}
	else if(T==2)
	{
		 //MSN
		 O.msn(C);
		 
	}//end if
	return false;
}//end function




