
var oOldElement = null;
function toggleCells(oElement, sColor)
{ 
	if(oOldElement)
	{
		oOldElement.style.backgroundColor = "";
	}

	oOldElement = oElement;
	oElement.style.backgroundColor = sColor;
}

function OpenWindow(url,window_width,window_height,window_name) 
{
	if( isNaN( parseInt( window_width ))) window_width = 800;
	if( isNaN( parseInt( window_height ))) window_height = 600;

	window_name = ( window_name ? window_name : "EduWindow" );

	var winstyle = "height=" + window_height + ",width=" + window_width 
	+ ",status=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no";

	if( screen )
	{
		var middleX = screen.width / 2 - window_width / 2;
		var middleY = screen.height / 2 - window_height / 2;
		winstyle = winstyle + ",screenX=" + middleX + ",screenY="
		+ middleY + ",left=" + middleX + ",top=" + middleY;
	}

	window.open(url,window_name,winstyle);
}

function loadFrames(frame1,page1,frame2,page2) 
{
	eval("parent."+frame1+".location='"+page1+"'");
	eval("parent."+frame2+".location='"+page2+"'");
}

