var imgPath = "http://127.0.0.1/szhaiyu/view/default/image/";
function WriteQqStr()
{
	document.write('<DIV id=backi style="RIGHT: 0px; width:125px;">');
	document.write('<table width="125" border="0" cellspacing="0" cellpadding="0">');
	document.write('<tr><td style="height:60px; background-image:url('+imgPath+'QQServiceHead.gif);vertical-align:top;"><a href="javascript:close_float_left();" title="close"><IMG src="'+imgPath+'QQSverviceClose.gif" border=0  style="float:right; margin-right:15px; margin-top:10px;"></a></td></tr>');
	document.write('<tr><td style="background-image:url('+imgPath+'QQServiceMiddle.gif); text-align:center;height:35px; font-size:12px;"><a href="tencent://message/?uin=55102023&Site=Labmart&Menu=yes"><img src="http://wpa.qq.com/pa?p=1:55102023:4"  style="margin-bottom:-3px;"  border="0"/>海宇净化</a></td></tr>');
	document.write('<tr><td style="background-image:url('+imgPath+'QQServiceMiddle.gif); text-align:center;height:35px; font-size:12px;"><a href="tencent://message/?uin=1015713695&Site=Labmart&Menu=yes"><img src="http://wpa.qq.com/pa?p=1:1015713695:4"  style="margin-bottom:-3px;"  border="0"/>海宇净化</a></td></tr>');
	document.write('<tr><td style="background-image:url('+imgPath+'QQServiceMiddle.gif); text-align:center;height:35px; font-size:12px;"><a href="tencent://message/?uin=350566440&Site=Labmart&Menu=yes"><img src="http://wpa.qq.com/pa?p=1:350566440:4"  style="margin-bottom:-3px;"  border="0"/>海宇净化</a></td></tr>');


	document.write('<tr><td style="height:49px; background-image:url('+imgPath+'QQServiceFooter.gif);"></td></tr>');
	document.write('</table>');
	document.write('</DIV>');
}
WriteQqStr();
function close_float_left()
{
    $('#backi').hide(500);
}
(function($) {
$.fn.extend({
"followDiv":function(str){
var _self = this;
var pos; //层的绝对定位位置
switch(str){
case("rightbottom")://右下角
pos={"right":"0px","bottom":"0px"};
break;
case("leftbottom")://左下角
pos={"left":"0px","bottom":"0px"};
break; 
case("lefttop"): //左上角
pos={"left":"0px","top":"0px"};
break;
case("righttop")://右上角
pos={"right":"0px","top":"130px"};
break;
default : //默认为右下角
pos={"right":"0px","bottom":"0px"};
break;
}
/*FF和IE7可以通过position:fixed来定位，*/
_self.css({"position":"fixed","z-index":"9999"}).css(pos);
/*ie6需要动态设置距顶端高度top.*/
if($.browser.msie && $.browser.version == 6) {
_self.css('position','absolute');
$(window).scroll(function(){
var topIE6;
if(str=="rightbottom"||str=="leftbottom"){
topIE6=$(window).scrollTop() + $(window).height() - _self.outerWidth();
}else if(str=="lefttop"||str=="righttop"){
topIE6=$(window).scrollTop();
}else{
topIE6=$(window).scrollTop() + $(window).height() - _self.outerWidth();
}
_self.css( 'top' , topIE6 );
});
}
return _self;//返回this，使方法可链。
}
});
})(jQuery);

$(document).ready(function(){
$('#backi').followDiv("righttop");
});

