var _x = 0
var _y = 0

var IE = document.all?true:false

document.onmousemove = getMouseXY

var MY_HINT = document.createElement("div")
var POPUP = document.createElement("div")

var t

function getMouseXY(e) {
if (IE) {
	_x = event.clientX + document.documentElement.scrollLeft
	_y = event.clientY + document.documentElement.scrollTop
}
else {
	_x = e.pageX
	_y = e.pageY
}
	MY_HINT.style.top = _y + 10 + "px"
	MY_HINT.style.left = _x + 10 + "px"


return true
}





function ShowHint(tt_text) {
//    alert(1)
	document.body.appendChild(MY_HINT)
//	alert(2)
	MY_HINT.id = "myalt"
//	alert(3)
	MY_HINT.innerHTML = tt_text;
//	alert(4)

}

function HideHint() {
	document.body.removeChild(document.getElementById("myalt"))
}





function ShowDownloadMenu(inc) {
      var elem = document.getElementById("video_test_" + inc)
	document.body.appendChild(POPUP)
	POPUP.id = "PopupMenu"
	POPUP.className = ''  
	var inner = elem && elem != "undefined" ? elem.innerHTML : ""
	POPUP.innerHTML = inner;             	
	POPUP.style.top = _y + 10 + "px"
	POPUP.style.left = _x + "px"
}

function HideDownloadMenu() {
	document.body.removeChild(document.getElementById("PopupMenu"))
}



function ShowCalendarMenu() {
	
	//try {
	
	//	document.body.removeChild(document.getElementById("PopupMenu"))
	
	//}
	
	//catch(err) {
	//}
	
//    alert(1)
	document.body.appendChild(POPUP)
//	alert(2)
	POPUP.id = "PopupMenu"
//	alert(3)


	POPUP.innerHTML = 
	'<div class="popup_cont">' + 
	'<div class="title">Added 25th:</div>' + 
	'<a href="#">All <span>70</span></a>' + 
	'<a href="#">Animations <span>85</span></a>' + 
	'<a href="#">Concerts <span>12</span></a>' + 
	'<a href="#">Interviews <span>25</span></a>' + 
	'<a href="javascript:HideDownloadMenu();" class="hide">Close X</a>' + 
	'</div>';
	
	POPUP.className = 'right_popup'
	
	
	
	POPUP.style.top = _y + 10 + "px"
	POPUP.style.left = _x - 140 + "px"
	
//	alert(4)

}

function HideCalendarMenu() {
	document.body.removeChild(document.getElementById("PopupMenu"))
}

