function hideItem(menuSet){
if (document.getElementById(menuSet).className=="displayNone")
{
document.getElementById(menuSet).className="leftMenuItemUL";
}else
{
document.getElementById(menuSet).className="displayNone";
}
}
/*Ajax Functions*/
function createRequestObject(){
var request_o; //declare the variable to hold the object.
var browser = navigator.appName; //find the browser name
if(browser == "Microsoft Internet Explorer"){
/* Create the object using MSIE's method */
request_o = new ActiveXObject("Microsoft.XMLHTTP");
}else{
/* Create the object using other browser's method */
request_o = new XMLHttpRequest();
}
return request_o; //return the object
}
//Make XML Request
function makeRequest(url) {
var http_request = createRequestObject();
if (!http_request)
{
alert('Cannot create an XMLHTTP instance');
return false;
}
http_request.onreadystatechange = function()
{
alertContents(http_request);
};
http_request.open('GET', url, true);
http_request.send(null);
}
//Actions after get a server response
function alertContents(http_request) {
if (http_request.readyState == 4) {//receive done!
if (http_request.status == 200) {//http correct
//process back texts
document.getElementById("cpBody").innerHTML=http_request.responseText;
} else {
alert('There was a problem with the request.');
}
}
}