/* --------------------------------------------------
	1. News Archive toggle Year/Date fields
-------------------------------------------------- */
	
General.event.register( document , 'click' , function( e ){
	var theNode = e.targetNode;
		
	if( theNode.nodeName == "INPUT" && theNode.getAttribute("type") != "radio" )
	{
		return true;
	}else if( theNode.nodeName == "LABEL" )
	{
		if( ( theNode.previousSibling && theNode.previousSibling.nodeType == 3 ) && ( theNode.previousSibling.previousSibling && theNode.previousSibling.previousSibling.nodeType == 1 ) )
		{
			theNode = theNode.previousSibling.previousSibling;
		}else 
		{
			return true;
		}
		
		if( theNode.nodeName != "INPUT" || theNode.getAttribute("type") != "radio" )
		{
			return true;
		}
	}else if( theNode.nodeName != "INPUT" )
	{
		return true;
	}
	
	var fieldSet = theNode.parentNode;
	if( fieldSet.nodeName != "FIELDSET" )
	{
		if( fieldSet.parentNode && fieldSet.parentNode.nodeName == "FIELDSET" )
		{
			fieldSet = fieldSet.parentNode;
		}else
		{
			return true;
		}
	}
		
		
	var otherFieldSet = null;
	if( fieldSet.className.indexOf( "date" ) == -1 ) 
	{
		if( fieldSet.nextSibling && fieldSet.nextSibling.nodeType == 1 )
		{
			otherFieldSet = fieldSet.nextSibling;
		}else if( fieldSet.nextSibling.nextSibling && fieldSet.nextSibling.nextSibling.nodeType == 1 )
		{
			otherFieldSet = fieldSet.nextSibling.nextSibling;
		}
	}else 
	{
		if( fieldSet.previousSibling && fieldSet.previousSibling.nodeType == 1 )
		{
			otherFieldSet = fieldSet.previousSibling;
		}else if( fieldSet.previousSibling.previousSibling && fieldSet.previousSibling.previousSibling.nodeType == 1 )
		{
			otherFieldSet = fieldSet.previousSibling.previousSibling;
		}
	}
		
	var myDropDowns = fieldSet.getElementsByTagName( "SELECT" );
	for( var i = 0; i < myDropDowns.length; i++ )
	{
		myDropDowns[i].disabled = theNode.checked ? false : true;
	}
	
	var neighbourDropDowns = otherFieldSet.getElementsByTagName( "SELECT" );
	for( var i = 0; i < neighbourDropDowns.length; i++ )
	{
		neighbourDropDowns[i].disabled = theNode.checked ? true : false;
	}
} );

