   //*** Function openCategory *****************************************************************
   // Parameters: contentId - picked from URL
   // Called by function initChannel
   // Decides which clip category to open and opens it.
   // If no contentId is present in the URL the first category will open. Otherwise the category which contains the contentId will open. 
   var openClipList;
   function openCategory(contentId){
     var found = false;
       categoryList = document.getElementsByClassName("category");
     for(var i=0; i < categoryList.length && !found; i++){
         for(var j = 0; j < categoryList[i].childNodes.length && !found; j++){
               if(categoryList[i].childNodes[j].nodeType == 1 && categoryList[i].childNodes[j].className == "clipList"){
                 if(contentId == null || contentId == ""){
                       categoryList[i].childNodes[j].style.display = "block";
                       openClipList = categoryList[i].childNodes[j];
                     found = true;
                  }
                  else{
				  	
                     for(var k = 0; k < categoryList[i].childNodes[j].childNodes.length && !found; k++){
                           if(categoryList[i].childNodes[j].childNodes[k].nodeType == 1 && categoryList[i].childNodes[j].childNodes[k].id.indexOf(contentId) >-1 ){
                               categoryList[i].childNodes[j].childNodes[k].parentNode.style.display = "block";
                               openClipList = categoryList[i].childNodes[j].childNodes[k].parentNode;
                             found = true;
                           }
                       }
                   }
               }
           } 
       }  
   }
   