var xmlHttp;
function help_ajax(opt){
try {xmlHttp=new XMLHttpRequest();}  // Firefox, Opera 8.0+, Safari  
	catch (e){try {xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");} // Internet Explorer
		catch (e){try {xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}
			catch (e) {alert("Your browser does not support AJAX!");return false;}
			}
		}


	if (opt == 1){ // Get questions
	var which=document.getElementById('selected').innerHTML;
	document.getElementById('questions_' + which).innerHTML="<strong>Loading Questions...</strong>";
	var queryString = "method=8&which="+ which +"&upd=" + new Date().getTime();
	xmlHttp.open("POST", "/_ajax/ajax.php", true);

	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp.setRequestHeader("Content-length", queryString.length);
	xmlHttp.setRequestHeader("Connection", "close");

		xmlHttp.onreadystatechange = function(){
			if(xmlHttp.readyState == 4 && xmlHttp.status == 200) {
				var ajaxDisplay = document.getElementById('questions_' + which);
				ajaxDisplay.innerHTML = xmlHttp.responseText;
				selected("");
			}
		}
	xmlHttp.send(queryString);	
	}

}

function closeall(){
document.getElementById('help_acc').style.display = "none";
document.getElementById('help_man').style.display = "none";
document.getElementById('help_uni').style.display = "none";
document.getElementById('help_com').style.display = "none";
document.getElementById('help_ele').style.display = "none";
document.getElementById('help_sta').style.display = "none";
document.getElementById('help_gen').style.display = "none";
}
function butt_change(elem){
var r=document.getElementById(elem);
if (!r.style.display || r.style.display == 'none'){document.getElementById("button_" + elem + "").src="/images/layout/icons/button_minus.png";} else {document.getElementById("button_" + elem + "").src="/images/layout/icons/button_add.png";}
}
