/*<![CDATA[*/

// Function to switch content of info container
function switchInfoContainer(id, classname) {
	
	// Define suffix for content
	var suffix = "_content";
	
	// Define ID of content container
	var infoContainer = "infoContent";
	
	// Define ID of container of content container
	var infoContainerContainer = "infoContainer";
	
	// If ID is not empty
	if (id.length !== 0) {
		
		// If ID of content exists
		if (document.getElementById(id) && document.getElementById(id + suffix) && document.getElementById(infoContainerContainer)) {
			
			// If content container exists
			if (document.getElementById(infoContainer)) {
				
				// Place calling container in to short variable
				var clrCntnr = document.getElementById(id + suffix);
				
				// Place calling DIV in to short variable
				var clrDIV = document.getElementById(id);
				
				// Place info container ID in to short variable
				var infCntnr = document.getElementById(infoContainer);
				
				// Place container of content container ID in to short variable
				var infCntnrCntnr = document.getElementById(infoContainerContainer);
				
				// If class name has been provided
				if (classname.length > 0) {
				
					// Set info container class
					var infCntnrCls = "switchBlock " + classname;
					
				} else {
					
					// Set info container class
					var infCntnrCls = "switchBlock";
					
				}
					
				// Set class name
				infCntnrCntnr.className = infCntnrCls;
				
				// Set class of current selected DIV to NotSelected
				$$('.blockDivRow .blockDivSelected').setProperty('class', 'blockDivNotSelected');
				
				// Fade content out
				try {
					infCntnr.fade('hide');
				} catch(err) { }
				
				// Set class of new selected DIV to Selected
				clrDIV.className = 'blockDivSelected';
				
				// Set info container to the HTML contained inside the calling container
				infCntnr.innerHTML = clrCntnr.innerHTML;
				
				// Fade content in
				try {
					infCntnr.fade('in');
				} catch(err) { }
				
			}
			
		}
		
	}
	
}

/*]]>*/