//<script >
<?php if($showmsg){?>
alert('<?=$showmsg?>');
<?php }else{ ?>

var reimkf={
	url:'<?=URL?>',
	key:'<?=$agentrs['agentkey']?>',
	init:function(){
		var str = '<div style="position:fixed;right:1px;top:40%;padding:10px;background-color:#99cc66;color:white;z-index:50;cursor:pointer;font-size:12px" align="center" onclick="reimkf.openlive()"><div><img src="'+this.url+'images/logos.png" width="34px" height="34px"></div><div>在线客服</div></div>';
		var div = document.createElement('div');
		div.id = 'reimkfshowdiv';
		document.body.appendChild(div);
		document.getElementById('reimkfshowdiv').innerHTML=str;
	},
	openlive:function(){
		var url = this.url+'?m=front&a=chat&key='+this.key+'';
		//url+='&formurl='++'';
		window.open(url);
	}
}
reimkf.init();
<?php } ?>