function get_attribute_name(){

	if(document.all) {
    	return "className";
	} else {
		return "class";
	}
}

function update_methods(strSection) {

    //Methods
    document.getElementById("property").style.display = "none";
    document.getElementById("function").style.display = "none";    
    document.getElementById("event").style.display = "none";
   
	  document.getElementById("property_btn").setAttribute(get_attribute_name(), "normal");
    document.getElementById("function_btn").setAttribute(get_attribute_name(), "normal");
    document.getElementById("event_btn").setAttribute(get_attribute_name(), "normal");
	
	 //turn the selected one on
    document.getElementById(strSection).style.display = "block";
    document.getElementById(strSection + "_btn").setAttribute(get_attribute_name(), "selected");

}

function update_tutorials(strSection){
	//Release notes
	document.getElementById("tut_most_recent").style.display = "none";
	document.getElementById("tut_most_viewed").style.display = "none";
    
	document.getElementById("tut_most_recent_btn").setAttribute(get_attribute_name(), "normal");
  document.getElementById("tut_most_viewed_btn").setAttribute(get_attribute_name(), "normal");
	
	//turn the selected one on
	document.getElementById(strSection).style.display = "block";
	document.getElementById(strSection + "_btn").setAttribute(get_attribute_name(), "selected");

	// update title
    document.getElementById("tutorials_title").innerHTML = document.getElementById(strSection + "_txt").innerHTML;
	
}


function update_notes(strSection){
	
	//Release notes
	document.getElementById("info").style.display = "none";
	document.getElementById("notes").style.display = "none";
	document.getElementById("requirements").style.display = "none";
    
	document.getElementById("info_btn").setAttribute(get_attribute_name(), "normal");
    document.getElementById("notes_btn").setAttribute(get_attribute_name(), "normal");
    document.getElementById("requirements_btn").setAttribute(get_attribute_name(), "normal");
	
	//turn the selected one on
    document.getElementById(strSection).style.display = "block";
    document.getElementById(strSection + "_btn").setAttribute(get_attribute_name(), "selected");
    
    // update title
    document.getElementById("notes_title").innerHTML = document.getElementById(strSection + "_txt").innerHTML;
}

function update_support(strSection){

    //Support
    document.getElementById("kb").style.display = "none";
    document.getElementById("ask").style.display = "none";
    
    document.getElementById("kb_btn").setAttribute(get_attribute_name(), "normal");
    document.getElementById("ask_btn").setAttribute(get_attribute_name(), "normal");
    
    //turn the selected one on
    document.getElementById(strSection).style.display = "block";
    document.getElementById(strSection + "_btn").setAttribute(get_attribute_name(), "selected");
    
    // update title
    document.getElementById("support_title").innerHTML = document.getElementById(strSection + "_txt").innerHTML;

  
}

