
var hiding
var showing
var _id
var _obj

function ch(){
	if(hiding){clearTimeout(hiding);}
}

function cs(){
	if(showing){clearTimeout(showing);}
}

function s(id,obj,url){
	$('p_img').src='http://lessoncorner.com/search/thumb/' + id
	$('p_anchor').href=url

	if (!e) var e = window.event;
	if(obj.y){
		y = obj.y
		x = obj.x
	} else if (e.clientX || e.clientY){
		x = e.clientX + document.documentElement.scrollLeft;
		y = e.clientY + document.documentElement.scrollTop;
	}


	$('preview').style.top = y+'px'
	$('preview').style.left = (x+50)+'px'

	showing = setTimeout('doShow()',500);

/*
	msg=""
	for(var i in obj){
		msg += i +":" +obj[i] +"<br>"
	}
	document.write(msg)
*/
}

function h(){
	hiding = setTimeout('doHide()',200);
}

function doHide(){
	$('preview').style.display='none'
}

function doShow(){
//	clearTimeout(hiding);
	$('preview').style.display=''
	$('preview').onmouseover=function(){clearTimeout(hiding);}
	$('preview').onmouseout=h
}
