//--------------------------------------------------------------------------
function categoryfromajax(funcName,categoryid,notid,selected){
	var xmlhttp=false; //Clear our fetching variable
	try {
			xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object.
	} catch (e) {
			try {
					xmlhttp = new
					ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
		} catch (E) {
			xmlhttp = false;
					}
	}
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
			xmlhttp = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
	}		
		
	var file = 'ajaxFunctions.php?funcName='+funcName+'&categoryid='+categoryid+'&notid='+notid+'&selected='+selected;
	//This is the path to the file we just finished making *
    //alert(file);
	xmlhttp.open('GET', file, true); //Open the file through GET, and add the page we want to retrieve as a GET variable **
    xmlhttp.onreadystatechange=function() {
		//alert(xmlhttp.readyState);
        if (xmlhttp.readyState==4) { //Check if it is ready to recieve data
                var content = xmlhttp.responseText; //The content data which has been retrieved ***
                if( content ){ 
				//alert(content);
					if(content!='')
					{
						if(notid=='0')
						{
							for(i=1;i<4;i++)
							{
								document.getElementById(i + '_a').innerHTML='<img src="images/l-corner.gif">';
								document.getElementById(i + '_b').style.background='url(images/middle.gif) repeat-x';
								document.getElementById('textpart_' + i).style.color='#ffffff';
								document.getElementById(i + '_c').innerHTML='<img src="images/r-corner.gif">';
							}
							document.getElementById(selected + '_a').innerHTML='<img src="images/l-corner-hover.gif">';
							document.getElementById(selected + '_b').style.background='url(images/middle-hover.gif) repeat-x';
							document.getElementById('textpart_' + selected).style.color='#5E4A7D';
							document.getElementById(selected + '_c').innerHTML='<img src="images/r-corner-hover.gif">';
						}
						document.getElementById('newList').innerHTML=content;
					}
               }
			   return
        }
		else{
				document.getElementById('newList').innerHTML ='<div style="padding-left:50px;font-size:18px;float:left;color:#64507F;">Loding&nbsp;<img src="images/ajax-loader.gif"/></div>';
			}
        }
        xmlhttp.send(null) //Nullify the XMLHttpRequest
return;
}
