//simple show/hide bit

var state = 'none';

function showhide(layer_ref) {
	if (state == 'block') {
		state = 'none';
	}
	else {
		state = 'block';
	}
	if (document.all) { //IS IE 4 or 5 (or 6 beta)
		eval( "document.all." + layer_ref + ".style.display = state");
	}
	if (document.layers) { //IS NETSCAPE 4 or below
		document.layers[layer_ref].display = state;
	}
	if (document.getElementById &&!document.all) {
		hza = document.getElementById(layer_ref);
		hza.style.display = state;
	}
}

var tm = null;
var speed = 40;
var oldspeed = speed;
var scroll = null;
function doubleSpeed()
{
	oldspeed = speed;
	speed = speed/2;
}
function resetSpeed()
{
	speed = oldspeed;
}
function scrollBegin(t,id)
{
	scroll = document.getElementById(id);
	if (t)
		scrollUp();
	else
		scrollDown();
}

function scrollUp()
{
	scroll.scrollTop += 3; 
	tm = setTimeout('scrollUp();', speed);
}

function scrollDown()
{
	scroll.scrollTop -= 3; 
	tm = setTimeout('scrollDown();', speed);
}

function scrollEnd()
{
	clearTimeout(tm);
}

function ShowScroll(scrollid, linksid, size2)
{
	var s = document.getElementById(scrollid);
	var l = document.getElementById(linksid);
	
	if(!s)
	{
		alert('Scroll area with id=' + scrollid +' not found!');
	}
	if(!l)
	{
		alert('Scroll links block with id=' + scrollid +' not found!');
	}
	
	if(s.scrollHeight > size2)
	{
		s.style.height = size2 + 'px';
		s.style.overflow = 'hidden';
		l.style.display = 'block';
	}
}

function openWindow(theURL,x,y) {
  	var features = "width=" + x + ",height=" + y + ",scrollbars=0,toolbars=0";
	var winName = window.open(theURL,'Crow',features);
	winName.focus();
}


