var dd_ie4 = (document.all) ? 1 : 0;
var dd_dom = ((document.getElementById) && (!dd_ie4)) ? 1 : 0;
var timer;
var dropdownTop = 0;
var dropdownLeft = 0;
var isOver;




function ShowCalendar(dropIndex) {
	var dropIndex = dropIndex;
	for (var i=1;i<=10;i++){
		if (i!=dropIndex){ 		
		HideCalendar(i);
		}
	}
	isOver = true;
	var whichEl = "scoresCalendarHidden"+dropIndex;
	if (dd_dom) {
		whichEl = document.getElementById(whichEl);
		var myObject = document.anchors["calendarLink"+dropIndex];
	}
	else {
		whichEl = document.all[whichEl];
		var myObject = document.all["calendarLink"+dropIndex];
	}
	while (myObject.offsetParent) {
		dropdownTop  = dropdownTop  + myObject.offsetTop;
		dropdownLeft = dropdownLeft + myObject.offsetLeft;
		myObject = myObject.offsetParent;
	}
	whichEl.style.visibility = "visible";
	whichEl.style.top = dropdownTop + 35;
	whichEl.style.left = dropdownLeft;

	dropdownTop = 0; 
	dropdownLeft = 0;
	
}

function ShowCalendar6(dropIndex) {
	var dropIndex = dropIndex;
	for (var i=1;i<=10;i++){
		if (i!=dropIndex && i!=4){ 		
		HideCalendar(i);
		}	
	}
	isOver = true;
	var whichEl = "scoresCalendarHidden"+dropIndex;
	if (dd_dom) {
		whichEl = document.getElementById(whichEl);
		var myObject = document.anchors["calendarLink"+dropIndex];
	}
	else {
		whichEl = document.all[whichEl];
		var myObject = document.all["calendarLink"+dropIndex];
	}
	while (myObject.offsetParent) {
		dropdownTop  = dropdownTop  + myObject.offsetTop;
		dropdownLeft = dropdownLeft + myObject.offsetLeft;
		myObject = myObject.offsetParent;
	}
	whichEl.style.visibility = "visible";
	whichEl.style.top = 0;
	whichEl.style.left =-84;

	
	dropdownTop = 0; 
	dropdownLeft = 0;
	
}

function HideCalendar(dropIndex) {
	var dropIndex = dropIndex;
	var whichEl = "scoresCalendarHidden"+dropIndex;
	if (dd_dom) {
		whichEl = document.getElementById(whichEl);
	}
	else {
		whichEl = document.all[whichEl];
	}
	if (whichEl!=null){
		if (!isOver) whichEl.style.visibility = "hidden";	
	}

	
}
function findy(item) {
	if (item.offsetParent) {
		return item.offsetTop + findy(item.offsetParent);
	}
	else {
		return item.offsetTop
	}
}
function findx(item) {
	if (item.offsetParent) {
		return item.offsetLeft + findx(item.offsetParent);
	}
	else {
		return item.offsetLeft;
	}
}

var whichEl = "scoresCalendarHidden"+1;
if (dd_dom) {
	whichEl = document.getElementById(whichEl);
}
else {  
	whichEl = document.all[whichEl];
}

whichEl.onmouseover = OverLayer;
whichEl.onmouseout = OutLayer;

var whichE2 = "scoresCalendarHidden"+2;
if (dd_dom) {
	whichE2 = document.getElementById(whichE2);
}
else {  
	whichE2 = document.all[whichE2];
}

whichE2.onmouseover = OverLayer;
whichE2.onmouseout = OutLayer;

var whichE3 = "scoresCalendarHidden"+3;
if (dd_dom) {
	whichE3 = document.getElementById(whichE3);
}
else {  
	whichE3 = document.all[whichE3];
}

whichE3.onmouseover = OverLayer;
whichE3.onmouseout = OutLayer;

var whichE4 = "scoresCalendarHidden"+4;
if (dd_dom) {
	whichE4 = document.getElementById(whichE4);
}
else {  
	whichE4 = document.all[whichE4];
}

whichE4.onmouseover = OverLayer;
whichE4.onmouseout = OutLayer;

var whichE5 = "scoresCalendarHidden"+5;
if (dd_dom) {
	whichE5 = document.getElementById(whichE5);
}
else {  
	whichE5 = document.all[whichE5];
}

whichE5.onmouseover = OverLayer;
whichE5.onmouseout = OutLayer;

function OverLayer() {
	clearTimeout(timer);
	isOver = true;
	
}

function OutLayer() {
	clearTimeout(timer);
	isOver = false;
	timer = setTimeout("HideCalendar(1)",300);
	timer = setTimeout("HideCalendar(2)",300);
	timer = setTimeout("HideCalendar(3)",300);
	timer = setTimeout("HideCalendar(4)",300);
	timer = setTimeout("HideCalendar(5)",300);
	
}

