// JavaScript Document
function switchclass(id){
   if(document.getElementById(id)){    //check the element exists and can be accessed
       var ele = document.getElementById(id);    //get hold of the element
       if(ele.className=="regular"){ 
           ele.className="active";       
       }else{
           ele.className="regular";     
       }
   }
}