if(charStr){
	scripts = document.getElementsByTagName('script');
	currentScript = scripts[scripts.length - 1];
	tempargs=currentScript.src.split("?")[1].split("&");
	document.write("<div id=\"");
	var tempArr = new Array();
	tempArr.autoOpen = "";
	tempArr.displayName = "";
	tempArr.onlineMessage = "";
	tempArr.offlineMessage = "";
	imgUrl = "";
	for(var i=0;i<tempargs.length;i++){
  		if(tempargs[i].indexOf("v_uin=")>=0){
  			document.write(tempargs[i].substring(tempargs[i].indexOf("=")+1) + "@" + UMWEBSERVER + "apperceive\" name=\"" + tempargs[i].substring(tempargs[i].indexOf("=")+1) + "@" + UMWEBSERVER + "apperceive\"");
  			document.write(" onclick=\"if(typeof roster != \'undefined\'){roster.userClicked(this,\'" + tempargs[i].substring(tempargs[i].indexOf("=")+1) + "@" + UMWEBSERVER + "\');}\"");
  			tempArr.push("uin");
  			tempArr.push(tempargs[i].substring(tempargs[i].indexOf("=")+1));
  			if(uin == ""){
  				uin = tempArr[1];
  			}
  		}
		if(tempargs[i].indexOf("v_open=")>=0){
			tempArr.autoOpen=decodeURI(tempargs[i].substring(tempargs[i].indexOf("=")+1));
		}
		if(tempargs[i].indexOf("v_displayName=")>=0){
			try{
				tempArr.displayName=decodeURI(tempargs[i].substring(tempargs[i].indexOf("=")+1));
			}catch(e){}
		}
		if(tempargs[i].indexOf("v_onlineMessage=")>=0){
			try{
				tempArr.onlineMessage=decodeURI(tempargs[i].substring(tempargs[i].indexOf("=")+1));
			}catch(e){}
		}
		if(tempargs[i].indexOf("v_offlineMessage=")>=0){
			try{
				tempArr.offlineMessage=decodeURI(tempargs[i].substring(tempargs[i].indexOf("=")+1));
			}catch(e){}
		}
		if(tempargs[i].indexOf("v_imgurl=")>=0){
			imgUrl=decodeURIComponent(tempargs[i].substring(tempargs[i].indexOf("=")+1));
		}
  	}
  	if(typeof apperceive_userObj[tempArr[1]] == "undefined"){
  		apperceive_users.push(tempArr);
		apperceive_userObj[tempArr[1]] = "";
  	}
  	document.writeln(" style=\"cursor:pointer;display:inline;font-size:12px;\">" + (imgUrl != "" ? "<img src=\"" + imgUrl + "\">":"") + "</div>");
}else{
	var apperceive_users = new Array();
	var apperceive_userObj = new Object();
	var charStr = document.charset || document.characterSet;
	var scripts = document.getElementsByTagName('script');
	var currentScript = scripts[scripts.length - 1];
	var hostPath = currentScript.src.split("/umservice")[0].split("http://")[1] || (document.location.hostname + ":" + document.location.port);
	var tempargs = currentScript.src.split("?")[1].split("&");
	var orgid;
	var uin="";
	var v_username = "";
	var linkMan = "";
	var l = false;
	var UMWEBSERVER;
	var THEMESDIR = "themes";
	var stylePath = "default";
	var colorStyle = "default";
	var flag = 2;// 用来判断请求类型，0， 网页版um登录 1， um在线感知 2，在线客服
	var isBlog = 0; //是否微博 0，不是 1，是
	var imgUrl = "";
	for(var i=0;i<tempargs.length;i++){
		if(tempargs[i].indexOf("v_orgid=")>=0){
			orgid=tempargs[i].substring(tempargs[i].indexOf("=")+1);
		}
		if(tempargs[i].indexOf("v_uin=")>=0){
			uin=tempargs[i].substring(tempargs[i].indexOf("=")+1);
		}
		if(tempargs[i].indexOf("v_host=")>=0){
			UMWEBSERVER=tempargs[i].substring(tempargs[i].indexOf("=")+1);
		}
		if(tempargs[i].indexOf("v_style=")>=0){
			colorStyle=tempargs[i].substring(tempargs[i].indexOf("=")+1);
		}
		if(tempargs[i].indexOf("v_linkman=")>=0){
			try{
				linkMan=decodeURI(tempargs[i].substring(tempargs[i].indexOf("=")+1));
			}catch(e){}
		}
		if(tempargs[i].indexOf("v_l=")>=0){
			l=(tempargs[i].substring(tempargs[i].indexOf("=")+1)=="true");
		}
		if(tempargs[i].indexOf("v_flag=")>=0){
			flag=parseInt(tempargs[i].substring(tempargs[i].indexOf("=")+1));
		}
		if(tempargs[i].indexOf("v_imgurl=")>=0){
			imgUrl=decodeURIComponent(tempargs[i].substring(tempargs[i].indexOf("=")+1));
		}
		if(tempargs[i].indexOf("v_username=")>=0){
			v_username=decodeURIComponent(tempargs[i].substring(tempargs[i].indexOf("=")+1));
		}
		if(tempargs[i].indexOf("v_isBlog=")>=0){
			isBlog=parseInt(tempargs[i].substring(tempargs[i].indexOf("=")+1));
		}
		
	}
	if(typeof uin != "undefined" && uin != ""){
		var tempArr = new Array("uin",uin);
		tempArr.autoOpen = "";
		tempArr.displayName = "";
		tempArr.onlineMessage = "";
		tempArr.offlineMessage = "";
		for(var i=0;i<tempargs.length;i++){
			if(tempargs[i].indexOf("v_open=")>=0){
				tempArr.autoOpen=decodeURI(tempargs[i].substring(tempargs[i].indexOf("=")+1));
			}
			if(tempargs[i].indexOf("v_displayName=")>=0){
				try{
					tempArr.displayName=decodeURI(tempargs[i].substring(tempargs[i].indexOf("=")+1));
				}catch(e){}
			}
			if(tempargs[i].indexOf("v_onlineMessage=")>=0){
				try{
					tempArr.onlineMessage=decodeURI(tempargs[i].substring(tempargs[i].indexOf("=")+1));
				}catch(e){}
			}
			if(tempargs[i].indexOf("v_offlineMessage=")>=0){
				try{
					tempArr.offlineMessage=decodeURI(tempargs[i].substring(tempargs[i].indexOf("=")+1));
				}catch(e){}
			}
		}
		apperceive_users.push(tempArr);
		apperceive_userObj[tempArr[1]] = "";
	}
	var basePath = "http://" + parent.hostPath + "/umservice" + (charStr.toLowerCase() == "utf-8" ? "/":"_gbk/");
	document.writeln("<link rel=\"stylesheet\" id=\"tt\" type=\"text\/css\" href=\"" + basePath + THEMESDIR + "\/" + stylePath + "\/css_ajax.css\">");
	document.writeln("<link rel=\"stylesheet\" type=\"text\/css\" href=\"" + basePath + "css\/common.css\">");
	document.writeln("<!--[if IE 6]>");
	document.writeln("	<script type=\"text\/javascript\" src=\"" + basePath + "dd_belatedpng.js\" ><\/script>");
	document.writeln("<![endif]-->");
	document.writeln("<script type=\"text\/javascript\" src=\"" + basePath + "browsercheck.js\"><\/script>");
	document.writeln("<script type=\"text\/javascript\" src=\"" + basePath + "FlashHelper.js\"><\/script>");
	document.writeln("<script type=\"text\/javascript\" src=\"" + basePath + "shared.js\"><\/script>");
	document.writeln("<script type=\"text\/javascript\" src=\"" + basePath + "statusLed.js\"><\/script>");
	document.writeln("<script type=\"text\/javascript\" src=\"" + basePath + "jsjac.js\"><\/script>");
	document.writeln("<script type=\"text\/javascript\" src=\"" + basePath + "umweb.js\"><\/script>");
	document.writeln("<script type=\"text\/javascript\" src=\"" + basePath + "roster.js\"><\/script>");
	document.writeln("<script type=\"text\/javascript\" src=\"" + basePath + "emoticons.js\"><\/script>");
	document.writeln("<script type=\"text\/javascript\" src=\"" + basePath + "display_effect\/wz_dragdrop.js\"><\/script>");
	document.writeln("<script type=\"text\/javascript\" src=\"" + basePath + "display_effect\/js_main.js\"><\/script>");
	document.writeln("<script type=\"text\/javascript\" src=\"" + basePath + "um_chat.js\"><\/script>");
	document.writeln("<script src=\"http:\/\/" + parent.hostPath + "\/umservice\/switchStyle.js\"><\/script>");
	document.writeln("<script type=\"text\/javascript\" src=\"" + basePath + "um.js\"><\/script>");
}