function moveDiv(){  //移动对象类
     this.isMove=0;
     this.obj=null;
     this.Xmax=1024;
     this.Ymax=768;
     var x1=0;
     var y1=0;
	 var x2=0;
	 var y2=0;
	 var x3=0;
	 var y3=0;
	 this.moveOk=0;  //用于外部程序判定移动是否成功
     this.moveSize=10;  //移动的步长
     this.star=function(moveobj){
		this.obj=moveobj;
        x1=getmouseX()-getLeft(this.obj);
        y1=getmouseY()-getTop(this.obj);
		x2=getmouseX();
		y2=getmouseY();
		x3=getmouseX();
		y3=getmouseY();
		this.isMove=1;
     }
     this.move=function(){
       if (this.isMove==1&this.obj!=null){
            x=getmouseX()-x1
            y=getmouseY()-y1
            if (x<=1){x=1;this.moveEnd();}
            if (y<=1){y=1;this.moveEnd();}
			if (Math.abs(getmouseX()-x2)>10|Math.abs(getmouseY()-y2)>10){
            	this.moveOk=1;
			}
			if (Math.abs(getmouseX()-x3)>this.moveSize|Math.abs(getmouseY()-y3)>this.moveSize){
				if (x+100>this.Xmax){x=this.Xmax-100}
				if (y+100>this.Ymax){y=this.Ymax-100}
				if (x<1){
					x=1;
					this.moveEnd();		
					if (this.obj.id="icoIframe"){
						this.obj.style.zIndex="0";
					}
				}
				if (y<1){
					y=1;
					this.moveEnd();	
					if (this.obj.id="icoIframe"){
						this.obj.style.zIndex="0";
					}
				}
				this.obj.style.left=x
				this.obj.style.top=y
				x3=getmouseX();
				y3=getmouseY();
			}
        }
     }
	 this.moveEnd=function(){
		 if (this.isMove==1){
			 this.moveOk=0;
			 this.isMove=0;
			 $("twoOverDiv").removeNode(true);
			document.body["onmousemove"]= null;
			document.body["onmouseup"]= null; 
		 }
	}
}
