var calendarPosX = 0;
var calendarPosY = 0;


if(!document.all){
	window.onmousemove = calendarPos;	
}
else{
	document.onmousemove = calendarPos;
}

function hideCalendarEntry(id) {
	obi = document.getElementById(id);
	obi.style.display = 'none';
}

function showCalendarEntry(id) {
	obi = document.getElementById(id);
	obi.style.display = '';
        Y = parseInt(calendarPosY)  - 20;
        X = parseInt(calendarPosX)  + 20;
        obi.style.top = Y  + 'px';
        obi.style.left = X  + 'px';
}

function calendarPos(e){
	if(!e){
		e = window.event;
		calendarPosX = e.clientX + document.body.scrollLeft;
		calendarPosY= e.clientY + document.body.scrollTop;
	}
	else{
		calendarPosX = e.pageX;
		calendarPosY = e.pageY;
	} 
}


var foxHost = window.location.protocol + '//' + window.location.hostname;
var foxPopUpHandle = false;

function openPreview(url,x,y){

	if(foxPopUpHandle){
		foxPopUpHandle.close();
	}
	if(!x){
		x = 500;
	}
	if(!y){
		y = 500;
	}	
	foxPopUpHandle = open(foxHost + url, 'fox', 'width='+x+',height='+y );
	
}




