function loadjscssfile(filename,filetype){
    if(filetype == "js"){
        var fileref = document.createElement('script');
        fileref.setAttribute("type","text/javascript");
        fileref.setAttribute("src",filename);
    }else if(filetype == "css"){
        var fileref = document.createElement('link');
        fileref.setAttribute("rel","stylesheet");
        fileref.setAttribute("type","text/css");
        fileref.setAttribute("href",filename);
    }
   if(typeof fileref != "undefined"){
        document.getElementsByTagName("head")[0].appendChild(fileref);
    }
}
function onlineqq(qq){
   var tempSrc='/plug/kefu/wpa.asp?rantime='+Math.random()+'&qq='+qq;
	var oldscript=document.getElementById('onlinQQJs');
	var newscript=document.createElement('script');
	newscript.setAttribute('type','text/javascript'); 
	newscript.setAttribute('id', 'onlinQQJs');
	newscript.setAttribute('src',tempSrc);
	if(oldscript == null){
		document.body.appendChild(newscript);}
	else{
		oldscript.parentNode.replaceChild(newscript, oldscript);
	}
	return false;
}
loadjscssfile(webroot+"plug/kefu/css/jquery.fixed.1.5.1.js","js");
loadjscssfile(webroot+"plug/kefu/css/service.css","css");
$(window).load(function(){
	$("#fixedBox").fix({
		position 		: "right",
		horizontal  	: 0,		
		vertical    	: 220,      
		halfTop     	: false,	
		minStatue 		: true,	
		hideCloseBtn 	: false,	
		skin 			: "blue",	
		showBtnWidth 	: 28,       
		contentBoxWidth : 154, 		
		durationTime 	: 1000		
	});
});
var shtml;
shtml='<div class=\"fixed_box\" id=\"fixedBox\">';
shtml+='    <div class=\"content_box\">';
shtml+='        <div class=\"content_inner\">';
shtml+='        	<div class=\"close_btn\"><a title=\"关闭\"><span>关闭</span></a></div>';
shtml+='            <div class=\"content_title\"><span>客服中心</span></div>';
shtml+='            <div class=\"content_list\">';
shtml+='                <div class=\"qqserver\">';
shtml+='                    <p><a href="javascript:;" onclick="javascript:onlineqq(\'40819446\');"><img border="0" src="http://wpa.qq.com/pa?p=2:40819446:45">&nbsp;<span style="color:#000000;">亿联网客服</span></a></p>';
shtml+='                    <p><a href="javascript:;" onclick="javascript:onlineqq(\'2424152423\');"><img border="0" src="http://wpa.qq.com/pa?p=2:2424152423:45">&nbsp;<span style="color:#000000;">亿联网渠道</span></a></p>';
shtml+='                </div>';
shtml+='                <hr>';
shtml+='                <div class=\"phoneserver\">';
shtml+='                    <h5>客户服务热线</h5>';
shtml+='                    <p>0512-86899026</p>';
shtml+='                </div>';
shtml+='                <hr>';
shtml+='                <div class=\"msgserver\">';
shtml+='                    <p><a href=\"/plug/book.asp\">给我们留言</a></p>';
shtml+='                </div>';
shtml+='            </div>';
shtml+='            <div class=\"content_bottom\"></div>';
shtml+='        </div>';
shtml+='    </div>';
shtml+='    <div class=\"show_btn \"><span>展开客服</span></div>';
shtml+='</div>';
$(document).ready(function(){
    $('body').append(shtml);
});