function calendar_event(date)
{
	window.location="linkCalendar.php?display="+date+"&mode=d";
}

function setupIframe(container, iFrameObj)
{
	if(container && iFrameObj)
	{
		iFrameObj.style.position = container.style.position;
		iFrameObj.style.top = container.style.top;
		iFrameObj.style.left =  container.style.left;
		iFrameObj.style.zIndex = container.style.zIndex-1;
		iFrameObj.style.display = container.style.display;
		iFrameObj.style.width = container.offsetWidth;
		iFrameObj.style.height = container.offsetHeight;
	}
}

function hideCalendarInfoBox()
{
	getIFrameReference1(false);
	getContainerReference1(false);
	
	hideInfoBox();
}

function getIFrameReference1(initialState)
{
	var iFrame = document.getElementById("iFrameContainer1");
	var display = (initialState) ? "block":"none";

	if (iFrame)
	{
		iFrame.style.display = display;
		return iFrame;
	}
	else
	{
		var objIFrame = document.createElement("iframe");
			objIFrame.id = "iFrameContainer1";
			document.body.appendChild(objIFrame);

			objIFrame.style.display = display;
		return objIFrame;
	}
}

function getContainerReference1(initialState)
{
	var objInfoBox = document.getElementById("infoBox");
	var display = (initialState) ? "block":"none";

	if (objInfoBox)
	{
		objInfoBox.style.display = display;
		return objInfoBox;
	}
	else
	{
		var objDiv = document.createElement("div");
			objDiv.className = "infoBox";
			objDiv.id = "infoBox";
			//objDiv.style.backgroundColor = "yellow";
			document.body.appendChild(objDiv);

			objDiv.style.display = display;
		return objDiv;
	}
}