    
    
    
	
	var TextAreaCurrentX = TextAreaCurrentY = 0;  	
	var TextAreaWhichIt = null;           	
	var TextAreaLastScrollX = 0; 
	var TextAreaLastScrollY = 0;	
	var NS = (document.layers) ? 1 : 0;	
	var IE = (document.all) ? 1: 0;	
	var g_TopOffset  = 40	
	var g_LeftOffset = 60


	var oDiv=window.document.createElement("<DIV ID='PromptTextAreaRestoreButton'></DIV>");
	window.document.body.appendChild(oDiv);
	var oDiv=window.document.createElement("<DIV ID='PromptTextArea'></DIV>");
	window.document.body.appendChild(oDiv);

	ObjMoveInit()
	TextAreaInit()


function TextAreaInit()
{
		var PromptTableHTML=""

		PromptTableHTML += '<Table bgcolor="#DDDDC8" border=0 cellspacing=0 cellpadding=0 ID="MoveableObject" style="VISIBILITY:visible; position:absolute;">'
		PromptTableHTML += '<!--上边黑边线-->'
		PromptTableHTML += '<TR>'
		PromptTableHTML += '	<TD BgColor=#000040 height=0 colspan=3></TD>'
		PromptTableHTML += '</TR>'
		PromptTableHTML += '<!--提示窗口标题-->'
		PromptTableHTML += '<TR>'
		PromptTableHTML += '	<!--左边黑边线-->'
		PromptTableHTML += '	<TD BgColor=#000040 width=1></TD>'
		PromptTableHTML += '	<!--中间提示信息框-->'
		PromptTableHTML += '	<TD bgcolor="#000000" valign="bottom">'
		PromptTableHTML += '      <p align="right">'
		PromptTableHTML += '         <input type="button" value="><" style="letter-spacing: -2; font-size: 6pt; color: black" onclick="closeTransientMessage()" onMouseMove="this.style.color=\'red\';this.style.cursor=\'hand\';" onMouseOut="this.style.color=\'black\';this.style.fontStyle=\'normal\';">'
		PromptTableHTML += '      </p>'
		PromptTableHTML += '    </TD>'
		PromptTableHTML += '	<!--右边黑边线-->'
		PromptTableHTML += '	<TD BgColor=#000040 width=1></TD>'
		PromptTableHTML += '</TR>'
		PromptTableHTML += '<!--提示窗口标题下黑线-->'
		PromptTableHTML += '<TR>'
		PromptTableHTML += '	<TD BgColor=#000040 height=0 colspan=3></TD>'
		PromptTableHTML += '</TR>'
		PromptTableHTML += '<TR>'
		PromptTableHTML += '	<!--左边黑边线-->'
		PromptTableHTML += '	<TD BgColor=#000040 width=1></TD>'
		PromptTableHTML += '	<!--中间提示信息框-->'
		PromptTableHTML += '	<TD>'
		PromptTableHTML += '		<TEXTAREA rows="5" cols="70" name="InputDataBox4" style="background-color : #edf0f5" onkeydown="return false;" onmousemove="cancelBubbleForObject()" style="font-size: 12px; font-family: 宋体;border-style: solid; border-width: 1">程序运行过程记录：</TEXTAREA>'
		PromptTableHTML += '	</TD>'
		PromptTableHTML += '	<!--右边黑边线-->'
		PromptTableHTML += '	<TD BgColor=#000040 width=1></TD>'
		PromptTableHTML += '</TR> '
		
		
		
		
		PromptTableHTML += '</Table>'

		PromptTextArea.innerHTML = PromptTableHTML

		
		
		
		
		
        
        
        
        
        
        MoveableObject.style.pixelTop  = (window.document.body.scrollTop) + (window.document.body.clientHeight)-MoveableObject.clientHeight
        MoveableObject.style.pixelLeft = (window.document.body.scrollLeft)+ (window.document.body.clientWidth )-MoveableObject.clientWidth

		PromptTableHTML = '<div id="RestoreButton" style=" position:absolute; font-size: 12px; color: black" onclick="restoreTransientMessage()" onMouseMove="this.style.color=\'red\';this.style.cursor=\'hand\';" onMouseOut="this.style.color=\'black\';this.style.fontStyle=\'normal\';"><center>点击这里<br>查看程序运行日志</center></div>'
		PromptTextAreaRestoreButton.innerHTML = PromptTableHTML

		RestoreButton.style.pixelTop  = (window.document.body.scrollTop )+window.document.body.clientHeight-RestoreButton.clientHeight-g_TopOffset
		RestoreButton.style.pixelLeft = g_LeftOffset

        
        
		
        
        RestoreButton.style.display   = 'none';
        
		
        MoveableObject.style.display  = 'none';

	
}
function closeTransientMessage() 
{
    
    RestoreButton.style.pixelTop  = (window.document.body.scrollTop)+window.document.body.clientHeight-RestoreButton.clientHeight-g_TopOffset
	RestoreButton.style.pixelLeft = g_LeftOffset

    
    
    
    
    RestoreButton.style.display   = 'block';
    
    MoveableObject.style.display='none';
}
function restoreTransientMessage()
{

return
    
    
    
    
    MoveableObject.style.pixelTop  = (window.document.body.scrollTop) + (window.document.body.clientHeight)-MoveableObject.clientHeight
    MoveableObject.style.pixelLeft = (window.document.body.scrollLeft)+ (window.document.body.clientWidth )-MoveableObject.clientWidth


    RestoreButton.style.display ='none'
    
    
	
    
    MoveableObject.style.display='block';
}
function cancelBubbleForObject()
{
    TextAreaWhichIt = event.srcElement;		
    
    
    if (TextAreaWhichIt.id.indexOf("InputDataBox4") != -1) 
    {				
        event.cancelBubble = true
    }				   				
}
	



	function ObjMoveInit()
	{
		if(NS) 
		{		
			window.captureEvents(Event.MOUSEUP|Event.MOUSEDOWN);		
			window.onmousedown = TextAreaGrabIt;	 	
			window.onmousemove = TextAreaMoveIt;		
			window.onmouseup = TextAreaDropIt;	
		}	
		if(IE) 	
		{		
			document.onmousedown = TextAreaGrabIt;	 	
			
			
		}	
		if(NS || IE) 
            
			
            window.setInterval("heartBeat2()",1 );
        
        
        
		
	}
	function heartBeat2() 	
	{		
		if(IE) 		
		{ 			
			diffY = document.body.scrollTop; 
			diffX = document.body.scrollLeft; 
		}	    
		if(diffY != TextAreaLastScrollY) 
		{	                
			percent = .1 * (diffY - TextAreaLastScrollY);	                
			if(percent > 0) 
				percent = Math.ceil(percent);	                
			else 
				percent = Math.floor(percent);					
			if(IE) 
			{
				document.all.MoveableObject.style.pixelTop += percent;
				document.all.RestoreButton.style.pixelTop  += percent;
			}
			TextAreaLastScrollY = TextAreaLastScrollY + percent;	    
		}		
		if(diffX != TextAreaLastScrollX) 
		{			
			percent = .1 * (diffX - TextAreaLastScrollX);			
			if(percent > 0) 
				percent = Math.ceil(percent);			
			else 
				percent = Math.floor(percent);			
			if(IE) 
			{
				document.all.MoveableObject.style.pixelLeft += percent;
				document.all.RestoreButton.style.pixelLeft  += percent;
			}
			TextAreaLastScrollX = TextAreaLastScrollX + percent;		
		}		
	}		
	function TextAreaCheckFocus(x,y) 
	{ 	        
		stalkerx = document.MoveableObject.pageX;	        
		stalkery = document.MoveableObject.pageY;	        
		stalkerwidth = document.MoveableObject.clip.width;	        
		stalkerheight = document.MoveableObject.clip.height;	        
		if( (x > stalkerx && x < (stalkerx+stalkerwidth)) && (y > stalkery && y < (stalkery+stalkerheight))) 			
			return true;	        
		else 			
			return false;	
	}		
	function TextAreaGrabIt(e)	
	{	
		if(IE) 
		{						
			TextAreaWhichIt = event.srcElement;			
			while (TextAreaWhichIt.id.indexOf("MoveableObject") == -1) 
			{				
				TextAreaWhichIt = TextAreaWhichIt.parentElement;				
				if (TextAreaWhichIt == null) 				
				{					
					document.onmousemove = null;					
					document.onmouseup   = null;					
					return true;				
				}				
				else				
				{					
					
					
					TextAreaCurrentX = (event.clientX + document.body.scrollLeft);	   				
					TextAreaCurrentY = (event.clientY + document.body.scrollTop); 	   				
					document.onmousemove = TextAreaMoveIt;					
					document.onmouseup   = TextAreaDropIt;									
				}						    
			}				   				
		} 
		else 
		{ 	        	
			window.captureEvents(Event.MOUSEMOVE);	        
			if(TextAreaCheckFocus (e.pageX,e.pageY)) 
			{ 	                
				TextAreaWhichIt = document.MoveableObject;	                
				StalkerTouchedX = e.pageX-document.MoveableObject.pageX;	                
				StalkerTouchedY = e.pageY-document.MoveableObject.pageY;	        
			} 		
		}	    
		return true;	
	}	
	function TextAreaMoveIt(e) 
	{		
		if (TextAreaWhichIt == null) 
		{ 
			return false; 
		}		
		if(IE) 		
		{		    
			newX = (event.clientX + document.body.scrollLeft);		    
			newY = (event.clientY + document.body.scrollTop);		    
			distanceX = (newX - TextAreaCurrentX);    
			distanceY = (newY - TextAreaCurrentY);		    
			TextAreaCurrentX = newX;    
			TextAreaCurrentY = newY;		    
			TextAreaWhichIt.style.pixelLeft += distanceX;		    
			TextAreaWhichIt.style.pixelTop += distanceY;			
			if(TextAreaWhichIt.style.pixelTop < document.body.scrollTop) 
				TextAreaWhichIt.style.pixelTop = document.body.scrollTop;			
			if(TextAreaWhichIt.style.pixelLeft < document.body.scrollLeft) 
				TextAreaWhichIt.style.pixelLeft = document.body.scrollLeft;			
			if(TextAreaWhichIt.style.pixelLeft > document.body.offsetWidth - document.body.scrollLeft - TextAreaWhichIt.style.pixelWidth - 20)
				 TextAreaWhichIt.style.pixelLeft = document.body.offsetWidth - TextAreaWhichIt.style.pixelWidth - 20;
			if(TextAreaWhichIt.style.pixelTop > document.body.offsetHeight + document.body.scrollTop - TextAreaWhichIt.style.pixelHeight - 5) 				
                TextAreaWhichIt.style.pixelTop = document.body.offsetHeight + document.body.scrollTop - TextAreaWhichIt.style.pixelHeight - 5;			
            event.returnValue = false;		
		} 		
		else 		
		{			
			TextAreaWhichIt.moveTo(e.pageX-StalkerTouchedX,e.pageY-StalkerTouchedY);	        	
			if(TextAreaWhichIt.left < 0+self.pageXOffset) 
				TextAreaWhichIt.left = 0+self.pageXOffset;	        	
			if(TextAreaWhichIt.top < 0+self.pageYOffset) 
				TextAreaWhichIt.top = 0+self.pageYOffset;	        	
			if( (TextAreaWhichIt.left + TextAreaWhichIt.clip.width) >= (window.innerWidth+self.pageXOffset-17)) 
				TextAreaWhichIt.left = ((window.innerWidth+self.pageXOffset)-TextAreaWhichIt.clip.width)-17;	        	
			if( (TextAreaWhichIt.top + TextAreaWhichIt.clip.height) >= (window.innerHeight+self.pageYOffset-17)) 
				TextAreaWhichIt.top = ((window.innerHeight+self.pageYOffset)-TextAreaWhichIt.clip.height)-17;	        	
			return false;		
		}	    
		return false;	
	}	
	function TextAreaDropIt() 
	{		
		TextAreaWhichIt = null;	    
		if(NS) window.releaseEvents(Event.MOUSEMOVE);	    
		return true;	
	}	
	function TextAreaGetObj(id)
	{        
		if (document.getElementById)                
			return document.getElementById(id);        
		else        
			if (document.all)        
				return document.all(id);
	}
	function TextAreaImageTimer()
	{
        
		
        setTimeout('TextAreaImageTimer()', 10 );
	}


