﻿//    /* getElementByClass
//    /**********************/

//    var allHTMLTags = new Array();

//    function getElementByClass(theClass) {

//    //Create Array of All HTML Tags
//    var allHTMLTags=document.getElementsByTagName(”*”);

//    //Loop through all tags using a for loop
//    for (i=0; i<allHTMLTags.length; i++) {

//    //Get all tags with the specified class name.
//    if (allHTMLTags[i].className==theClass) {

//    //Place any code you want to apply to all
//    //pages with the class specified.
//    //In this example is to “display:none;” them
//    //Making them all dissapear on the page.

//    allHTMLTags[i].style.display=’none’;

//    }
//    }
//    }

//window.addEvent('domready', function() {
//    var pnl_TestimonialTitle = $$('[class$=pnl_TestimonialTitle]');
//    var pnl_SubTestimonial = $$('[class$=pnl_TestimonialContent_Display]');



//    pnl_TestimonialTitle.each(function(e) {

//         //SET HEIGHT TO ZERO HERE FOR pnl_TestimonialContent_Display
//        //var target = $(e.getAttribute('sub_content'));  
//        //target.setStyle("display", "none");



//        e.addEvents({
//            "click": function() {
//                //alert('CLICKED')
//                var PnlID = e.getAttribute('sub_content');

//                pnl_SubTestimonial.each(function(f) {
//                    var subPnlID = f.getAttribute('sub_content');

//                    if (subPnlID == PnlID) {
//                        //alert(PnlID);
//                        //target.setStyle("display", "inline");

//                        var mySlide = new Fx.Slide(PnlID);
//                        e = new Event(e);
//                        mySlide.slideOut();
//                        e.stop();
//                        //open
//                    }
//                    else {
//                       alert('other');
//                        //close
//                    }
//                }); //end of f.addEvents function
//            } //end of addEvents function
//        }); //end of e.addEvents
//    }); //end for each testimonial items
//});   //end of window.addEvent
 


//FOR EACH OF THE CONTENT AREAS
 //var mySlide = new Fx.Slide('test');
 
// $('slidein').addEvent('click', function(e){
//	e = new Event(e);
//	mySlide.slideIn();
//	e.stop();
//});

//$('slideout').addEvent('click', function(e){
//	e = new Event(e);
//	mySlide.slideOut();
//	e.stop();
//});

//$('toggle').addEvent('click', function(e){
//	e = new Event(e);
//	mySlide.toggle();
//	e.stop();
//});
 
//}                    
                    

function testimonial_click(id) {
    var myControl = document.getElementById('ctl00_Main_Content_Testimonials_Item_' + id);

    getElementByClass('pnl_TestimonialContent_Display');
    //if (myControl.className == 'pnl_Content_Display') {
    //myControl.className = 'pnl_Content';     
    // }
    // else {
    myControl.className = 'pnl_TestimonialContent_Display';
    //} 
}
var allHTMLTags = new Array();
function getElementByClass(thisclass) {
    //Create Array of All HTML Tags
    var allHTMLTags = document.getElementsByTagName('*');
    //Loop through all tags using a for loop
    for (i = 0; i < allHTMLTags.length; i++) {
        //Get all tags with the specified class name.
        if (allHTMLTags[i].className == thisclass) {
            //Place any code you want to apply to all
            //pages with the class specified.
            //In this example is to “display:none;” them
            //Making them all dissapear on the page.
            allHTMLTags[i].className = 'pnl_TestimonialContent_Hidden';
        }
    }
}