  var docTitle = document.title;
  var section = new String();
  var subSection = new String();
  var temp = new String();
  
  window.onerror = doNothing;
  
  function doNothing () {
  return true;
  }
      
  // pull section and subsection titles from the page title
  function getTitle () {
    section = docTitle.substring(docTitle.indexOf("*") +1); 
    subSection = section.substring(section.indexOf("*")+1);
    
    // strip section name from page title
    if (section.indexOf("*")!=-1) {
      section = section.substring(0, section.indexOf("*"));
    }
    
    for (var i=0; i < section.length; i++) {
      if (section.charAt(i) != " ") {
        temp = temp + section.charAt(i);
      }
    }
    section = temp;
    section = section.toLowerCase();
    temp = "";
    
    // strip subsection name from page title
    if (subSection.indexOf("*")!=-1) {
      subSection = subSection.substring(0, subSection.indexOf("*"));
    }
    
    for (var i=0; i < subSection.length; i++) {
      if (subSection.charAt(i) != " ") {
        temp = temp + subSection.charAt(i);
      }
    }
    subSection = temp;
    subSection = subSection.toLowerCase();
  }
  
  
  // highlight current 2nd level navigational element
 
   function selectLeftNav() {
     getTitle();
     
     if (section == "membersservices") {
       colorValue = "005539";
     } else {
       if (section == "prescribers") {
         colorValue = "550055";
       } else {
         if (section == "plansponsors") {
           colorValue = "008080";
         } else {
           if (section == "pharmacies") {
             colorValue = "990000";
           } else {
 
             colorValue = "003399";
             }
           }
         }
       }
  
           
     if (document.layers) {
        if ( document.ids[subSection] != null )
        {
          document.ids[subSection].color = "#" + colorValue;
          document.ids[subSection].fontweight = "700";
        }
     } else {
       if (document.all) {
         if ( document.all[subSection] != null )
         {
            document.all[subSection].style.color = "#" + colorValue;
            document.all[subSection].style.fontWeight = "500";
         }
       }
     }
   }
   
   function isNum(value){
	var regExp = /^\d/
	if(regExp.test(value)){
		return true;
	}else{
		return false;
	}
}

function checkRadioGroup(groupRef){
   		 if(!isNum(groupRef.length)  ){
   		 	if(groupRef.checked){
   		 		return true;
   		 	}else{
   		 		return false;
   		 	}
   		 } 
   		 
   		for(counter=0; counter<groupRef.length; counter++){
   			if(groupRef[counter].checked){
   				return true;
   			}
   		}
   		return false;
   		 
   }

