
var last_sub ='';

function hideSub(the_id)
{
	if ( document.getElementById(the_id) )
	{
		document.getElementById(the_id).style.visibility = 'hidden';
	}
}

function showSub(the_id)
{
	if ( last_sub != '' ) hideSub(last_sub);
	document.getElementById(the_id).style.visibility = 'visible';
	last_sub = the_id;
}


function linkBox(url)
{
    newWindow = window.open(url, '_blank');
    newWindow.focus();
    return false;
}

function noSelectionRectangle(containerId)
{
	var container  = document.getElementById(containerId);
	var containerLinks = container.getElementsByTagName('a');
	for(i = 0; i < containerLinks.length; i++)
		containerLinks.item(i).onfocus = containerLinks.item(i).blur;
}

function toggleChecksByParrent(divId,bool)
{
    checkBoxes = document.getElementById(divId).getElementsByTagName('input');
    for(i = 0; i < checkBoxes.length; i++) checkBoxes[i].checked = bool;
    return false;
}

    
window.onload = function() 
{
    var end = -(6*document.getElementById('summary').innerHTML.length);
    setInterval(function(){scrollText('summary', 250, end)}, 30);
}
