function toggleContainer(div_name) {	
	arrow_name = div_name+'_Arrow';
	if($(div_name).style.display == 'none') {
		Effect.BlindDown(div_name);
		$(arrow_name).src = '/images/toggle_arrow_open2.gif';
	} else {
		Effect.BlindUp(div_name);
		$(arrow_name).src = '/images/toggle_arrow_closed2.gif';
	}
}

function toggleContainerBlack(obj) {
	arrow = obj+'_Arrow';
	object = $(obj)
	if(object.style.display == 'none') {
		Effect.BlindDown(obj);
		$(arrow).src = '/images/toggle_arrow_open.gif';
	} else {
		Effect.BlindUp(obj);
		$(arrow).src = '/images/toggle_arrow_closed.gif';
	}
}

function toggleInfoCurtain(obj) {
	arrow = obj+'_Arrow';
	object = $(obj)
	if (object == null) {return;}
	if($(obj).style.display == 'none') {
		Effect.BlindDown(obj);
		$(arrow).src = '/images/toggle_arrow_closed3.gif';
	} else {
		Effect.BlindUp(obj);
		$(arrow).src = '/images/toggle_arrow_open3.gif';
	}
}

function toggleBlock(obj) {
	object = $(obj)
	if (object == null) {return;}
	if($(obj).style.display == 'none') {
		$(obj).style.display='block';
	} else {
		$(obj).style.display='none';
	}
}

function changeClass(id, newClass) {
	$(id).className=newClass;
}

function showInline(id) {
	$(id).style.display='inline';
}

function showBlock(id) {
	$(id).style.display='block';
}

function hideThis(id) {
	$(id).style.display='none';
}


function get_position(o) {
	var x = y = 0;
	if (o.offsetParent) {
		x = o.offsetLeft;
		y = o.offsetTop;
		while (o = o.offsetParent) {
			x += o.offsetLeft;
			y += o.offsetTop;
		}
	}
	return [x,y];
}


// For homepage classes
// Determine whether a node's text content is entirely whitespace.
function is_all_ws( nod ) {
  return !(/[^\t\n\r ]/.test(nod.data));
}

// Version of |firstChild| that skips nodes that are entirely whitespace and comments.
function first_child( par ) {
  var res=par.firstChild;
  while (res) {
    if (!is_ignorable(res)) return res;
    res = res.nextSibling;
  }
  return null;
}

// Determine if a node should be ignored by the iterator functions. 
function is_ignorable( nod ) {
  return ( nod.nodeType == 8) || // A comment node
         ( (nod.nodeType == 3) && is_all_ws(nod) ); // a text node, all ws
}

function child_nodes( nod ) {
	var cNod = nod.childNodes;
	var rNod = [];
	for (i=0; i<cNod.length; i++) {
		if (!is_ignorable(cNod[i])) rNod.push(cNod[i]);
	}
	return rNod;
}