function async_start() {

	if (document.all) document.onmousemove= async_getpos ;
	else if (document.getElementById && !document.all) window.addEventListener("mousemove", async_getpos, true);

	isLoaded = true ;

}

function async_getpos(evt) {
	if (document.all) {
		xr = window.event.x + document.documentElement.scrollLeft ;
		yr = window.event.y + document.documentElement.scrollTop ;
		
	} else if (document.getElementById && !document.all) {
		xr = evt.pageX  ;
		yr = evt.pageY  ;
	}
}

function async_load (url) {


	document.getElementById("asyncdiv").innerHTML = "<iframe name='asyncframe' style='border:1px solid #214758;' frameborder='0' scrolling='no' width='"+wa+"' height='"+ha+"' src='"+url+"'></iframe>" ;
	document.getElementById("asyncdiv").style.visibility = 'visible' ;


	async_timer = window.setInterval("async_move();", 50) ;
}

function async_unload () {
	window.clearInterval(async_timer) ;
	
	document.getElementById("asyncdiv").style.left = "0px" ;
	document.getElementById("asyncdiv").style.top = "0px" ;
	document.getElementById("asyncdiv").style.visibility = 'hidden' ;
	document.getElementById("asyncdiv").innerHTML = '' ;
	
}

function async_move() {
	if (isLoaded) {

		var dx = - Math.round(wa/2);
		var dy = 20 ;

		var yy = yr + dy ;
		var xx = xr + dx ;
		
		if  ( ( xx + wa + 20 ) > document.body.scrollWidth ) xx = document.body.scrollWidth - wa - 20 ;
		else if  ( xx < 0 ) xx = 0; 
		
		if  ( ( yy + ha ) > document.body.scrollHeight ) yy = document.body.scrollHeight - ha ; 

		document.getElementById("asyncdiv").style.left = xx+"px" ;
		document.getElementById("asyncdiv").style.top = yy+"px" ;
		
	}

}