// JavaScript Document
<!--
var delta=0.15;
var collection;
var closeB=false;
function floaters() 
{
  this.items=[];
  this.addItem=function(id,x,y,contentF,contentS)
  {
  	var str = "";
  	if(document.all){
  			str = '<IFRAME style="position:absolute; visibility:inherit; top:0px; left:0px; width:80px; z-index:-1;opacity:0;filter: Alpha(Opacity=0); -moz-opacity: 0;" src="javascript:void();" frameBorder="0" scrolling="no"></IFRAME>';
  	}
  	if(choose())
    {    	
    	document.write('<DIV id='+id+' style="Z-INDEX: 10; POSITION: absolute;  width:80px; height:60px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+'">'+str+contentF+'</DIV>');
    }else{
    	document.write('<DIV id='+id+' style="Z-INDEX: 10; POSITION: absolute;  width:80px; height:60px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+'">'+str+contentS+'</DIV>');
    }     
    var newItem={};
    newItem.object=document.getElementById(id);
    newItem.x=x;
    newItem.y=y;
    newItem.close = false;
    newItem.name = id;
    this.items[this.items.length]=newItem;
  }
  this.play=function()
  {
     collection=this.items
     setInterval('play()',10);
  }
}
  function play()
  {
    for(var i=0;i<collection.length;i++)
   {
   	 if(collection[i].close){	
	     collection[i].object.style.display = 'none';
	     continue;
     }
    var followObj=collection[i].object;
    var followObj_x=(typeof(collection[i].x)=='string'?eval(collection[i].x):collection[i].x);
    var followObj_y=(typeof(collection[i].y)=='string'?eval(collection[i].y):collection[i].y);
    if(followObj.offsetLeft!=(getScrollXY().x+followObj_x))
    {
     var dx=(getScrollXY().x+followObj_x-followObj.offsetLeft)*delta;
     dx=(dx>0?1:-1)*Math.ceil(Math.abs(dx));
     followObj.style.left=followObj.offsetLeft+dx+"px";
    }
    if(followObj.offsetTop!=(getScrollXY().y+followObj_y)) 
    {
    	var dy=(getScrollXY().y+followObj_y-followObj.offsetTop)*delta;
        dy=(dy>0?1:-1)*Math.ceil(Math.abs(dy));
        followObj.style.top=followObj.offsetTop+dy+"px";
    }
    followObj.style.display = '';
   }
  }
  function getScrollXY(){
	var x,y;
	if(document.body.scrollTop){
	  x=document.body.scrollLeft;
	  y=document.body.scrollTop;
	}
	else{
	  x=document.documentElement.scrollLeft;
	  y=document.documentElement.scrollTop;
	}
	return {x:x,y:y};
	} 
  function closeBanner(name)
  {
    for(var i=0;i<collection.length;i++)
    {
     if(collection[i].name == name){	
     collection[i].object.style.display = 'none';
     collection[i].close = true;
     return;
     }
    }
  }
  function cls()
  {  	
  }
  function choose()
  {
  	var number=Math.ceil(Math.random()*10);
    number=number%2;
    if(number==0)return true;
    else return false;
  }
	function correctPNG(myImage) // correctly handle PNG transparency in Win IE 5.5 & 6.
{
    var arVersion = navigator.appVersion.split("MSIE")
    var version = parseFloat(arVersion[1])
    if ((version >= 5.5) && (document.body.filters))
    {
     		var imgID = (myImage.id) ? "id='" + myImage.id + "' " : "";
		    var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : "";
		    var imgTitle = (myImage.title) ?  "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' ";
		    var imgStyle = "display:inline-block;" + myImage.style.cssText;
		    if (myImage.align == "left") imgStyle = "float:left;" + imgStyle;
        if (myImage.align == "right") imgStyle = "float:right;" + imgStyle;
        if (myImage.parentElement.href) imgStyle = "cursor:pointer;" + imgStyle;
		    var strNewHTML = "<span " + imgID + imgClass + imgTitle
		                  + " style=\"" + "width:" + myImage.width 
		                  + "px; height:" + myImage.height 
		                  + "px;" + imgStyle + ";"
		                  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
		                  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>";
		    myImage.outerHTML = strNewHTML;  
    }    
} 
var theFloaters  = new floaters();

//var contentF='<a href="javascript:cls();" onclick="closeBanner(\'followDiv1\')"><img SRC="/01.png" border="0" onload="correctPNG(this)"></a><br><img onload="correctPNG(this)" SRC="/02.png" border="0"><br><A href="msnim:chat?contact=services@liyi99.com"><img  alt=MSN客服 onload="correctPNG(this)" src="/msn.png" border=0></A><br><a href="http://b.qq.com/webc.htm?new=0&sid=800015575&o=www.liyi99.com&q=7" target="_blank" border="0"><img onload="correctPNG(this)" SRC=/qq_2.png alt="客服咨询" border="0"></a><br><a href="http://b.qq.com/webc.htm?new=0&sid=800015575&o=www.liyi99.com&q=7" target="_blank" border="0"><img onload="correctPNG(this)" SRC=/qq_3.png alt="订单查询" border="0"></a>';
//var contentS='<a href="javascript:cls();" onclick="closeBanner(\'followDiv1\')"><img SRC="/01.png" border="0" onload="correctPNG(this)"></a><br><img onload="correctPNG(this)" SRC="/02.png" border="0"><br><A href="msnim:chat?contact=services1@liyi99.com"><img alt=MSN客服 onload="correctPNG(this)" src="/msn.png" border=0></A><br><a href="http://b.qq.com/webc.htm?new=0&sid=800015575&o=www.liyi99.com&q=7" target="_blank" border="0"><img onload="correctPNG(this)" SRC=/qq_2.png alt="订单查询" border="0"></a><br><a href="http://b.qq.com/webc.htm?new=0&sid=800015575&o=www.liyi99.com&q=7" target="_blank" border="0"><img onload="correctPNG(this)" SRC=/qq_3.png alt="投诉建议" border="0"></a>';
//theFloaters.addItem('followDiv1','document.body.clientWidth-130','390',contentF,contentS);

//if(document.getElementById("addimage")){
	//var leftimg = "<img src='/images/index/duilian.jpg' style='cursor:pointer' onclick='closeBanner(\"followDiv2\")'  /><br /><a target='_blank' href='/spring.html'><img src='/images/index/duilian2.jpg'  /></a>";
	//var rightimg = "<img src='/images/index/duilian.jpg' style='cursor:pointer' onclick='closeBanner(\"followDiv3\")'  /><br /><a target='_blank' href='/spring.html'><img src='/images/index/duilian2.jpg' /></a>";
	//theFloaters.addItem('followDiv2','5','128',leftimg,leftimg);
	//theFloaters.addItem('followDiv3','document.body.clientWidth-90','128',rightimg,rightimg);
//}
//theFloaters.addItem('followDiv2',2,230,'<a href="http://www.yacol.com/product/400youyongka.jsp"><img height=194 alt="" src="/images/youyong_banner.jpg" width=88 border=0></a>');

theFloaters.play();

//-->
