
function ChangeText(newSize)
{
var overviewDiv;
var subDivs;
var theClass;
var strReplace = "";
var showContents = "Contents: ";

    // only for the overview
    overviewDiv = document.getElementById("testimonial_overview");
    
    // continu working with only the Div's within testimonial_overview"
    subDivs = overviewDiv.getElementsByTagName("DIV");
         
    for (var i=0; i < subDivs.length; i++)
    {
        // get the className of each DIV
        theClass = subDivs[i].className;
    
        // For Testing purposes only
//        showContents = showContents + "\n" + theClass;
        
        // General code to replace all current classNames by the new requested
        if (theClass.startsWith("testimonialItem"))
        {
            // For Testing purposes only
            showContents = showContents + "\n" + theClass;

            if (theClass.endsWith("Large"))
            {
                strReplace = theClass.replace("Large", "");

                switch (newSize)
                {
	              case "small":
	                subDivs[i].className = strReplace;
		            break;
	              case "medium": 
	                subDivs[i].className = strReplace + "Medium";
		            break;
		          default:
		            break;
                }           
            }
            else
            {
                if (theClass.endsWith("Medium"))
                {
                    strReplace = theClass.replace("Medium", "");
                    
                    switch (newSize)
                    {
	                  case "small":
	                    subDivs[i].className = strReplace;
		                break;
	                  case "large":
                        subDivs[i].className = strReplace + "Large";
                        break;
                      default:
                        break;
                    }           
                }
                else
                {
                    switch (newSize)
                    {
	                  case "medium": 
	                    subDivs[i].className = theClass + "Medium";
		                break;
	                  case "large":
                        subDivs[i].className = theClass + "Large";
                        break;
                      default:
                        break;
                    }           
                }
            }
        }
        
    }
    alert(showContents);
}


// Generic code to change the font within Testimonials_Overview
function ChangeFont (toChange, newSize)
{
	var toChangeItem;
	var itsClass;

    if (toChange == "body")
    {
        toChangeItem = document.body;
    }
    
    if (toChange == "testimonials")
    {
		// get the overall div
        toChangeItem = document.getElementById("testimominals_overall");
    }
    
    if (toChangeItem != null)
    {
		// get it's className
		itsClass = toChangeItem.className;
		// browserspecific
		if (itsClass.endsWith(" IE"))
		{
			itsClass = itsClass.replace(" IE","");
		}
	    
		// code to change the classname
		if (itsClass.endsWith("Large"))
		{
			strReplace = itsClass.replace("Large", "");

			switch (newSize)
			{
			  case "small":
				toChangeItem.className = strReplace;
				break;
			  case "medium": 
				toChangeItem.className = strReplace + "Medium";
				break;
			  default:
				break;
			}           
		}
		else
		{
			if (itsClass.endsWith("Medium"))
			{
				strReplace = itsClass.replace("Medium", "");
	            
				switch (newSize)
				{
				  case "small":
					toChangeItem.className = strReplace;
					break;
				  case "large":
					toChangeItem.className = strReplace + "Large";
					break;
				  default:
					break;
				}           
			}
			else
			{
				switch (newSize)
				{
				  case "medium": 
					toChangeItem.className = itsClass + "Medium";
					break;
				  case "large":
					toChangeItem.className = itsClass + "Large";
					break;
				  default:
					break;
				}           
			}
		}
	}
}

