document.onkeyup = function(e)
{
	
	var event = e || window.event;
	var keynum = event.keyCode;
	
	if	(keynum==27)
	{
		closeDivFly();
	}
}
function $(str)
{
	return document.getElementById(str);
}
function showInFlyDiv(strResponse){
	var oDivFly = $('divFly');
	oDivFly.innerHTML = strResponse;
	oDivFly.className = 'visible';	
	var scripts=strResponse.match(new RegExp('<script[^>]*>[^<]+</script>', 'gi'));
	if(scripts){
		for(var i=0; i<scripts.length; i++){
			if(new RegExp('<script[^>]*>([^<]+)</script>', 'i').exec(scripts[i]).length>0){
				eval(new RegExp('<script[^>]*>([^<]+)</script>', 'i').exec(scripts[i])[1].replace(new RegExp('\t', 'g'), ''));
			}
		}
	} 
}
function send(studentId, langId)
{
	var poststr = "studentId=" + studentId + "&langId=" + langId;     
	doAjax("/_ajax/student.post.ajax.php", showInFlyDiv, poststr, false);
}
function closeDivFly()
{
	var oDivFly = $('divFly');
	oDivFly.className = 'invisible';
	oDivFly.innerHTML = '';	
}