	var http 		= getHTTPObject();			// creating the HTTP Object
	var isWorking 	= false;					// flag - present status on whether any process is in progress or not.
	var counter 	= 0;

	// depending upon the browser type, it creates an HTTP object...
	function getHTTPObject()
	{
		var xmlhttp;
		/*@cc_on
		@if (@_jscript_version >= 5)
		try {
		  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
		  try {
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		  } catch (E) {
			xmlhttp = false;
		  }
		}
		@else
		xmlhttp = false;
		@end @*/
		if (!xmlhttp && typeof XMLHttpRequest != 'undefined')
		{
			try{
			  xmlhttp = new XMLHttpRequest();
			} catch (e) {
			  xmlhttp = false;
			}
		}
		return xmlhttp;
	}

	function faqs(cat)
	{
		http.open("GET", "faqs_fetchall.php?param="+cat, true);
		http.onreadystatechange = httpResponse_faqs;
		http.send(null);
	}

	// returns the response or results from the source file.
	function httpResponse_faqs()
	{		
		if (http.readyState == 4)					// if HTTP has completed retreiving the data
		{
			if (http.status == 200 || http.status == 0) 			// If the data was retrieved successfully (OK)
			{ 														// Use the XML DOM to unpack the data 
				var xmlResponse = http.responseXML.getElementsByTagName("xmlResponse")[0];
				if(xmlResponse.childNodes.length > 0)				// if RECORD EXISTS then loop till the End of Records for the
				{													// selected date.
					html = "";
					for(i=0; i<xmlResponse.childNodes.length; i++)
					{
						ID			= xmlResponse.childNodes[i].getAttribute("id");			// ID
						Question	= xmlResponse.childNodes[i].getAttribute("question");// userDetails
						Answer		= xmlResponse.childNodes[i].firstChild.data;			// ShortDescription
//						alert("i: " + i + "\nID: " + ID + "\nQuestion: " + Question);// + "\nShortDescription: " + ShortDescription);

						html += "<table border='0' width='100%'><tr><td align='left'><strong><a href='javascript:void(0);' onclick=showHide('divAnswer"+ID+"'); class='skyblue'>"+Question+"</a></strong></td></tr>";
						html += "<tr><td align='left'><div name='divAnswer"+ID+"' id='divAnswer"+ID+"' style='display:none;'><p style='display:inline;'>"+Answer+"</p></div></td></tr>";
						html += "<tr><td align='left' padding-top:'10px;'></td></tr></table>";
					}
//alert(html);
					document.getElementById('divFaqs').innerHTML = html;
				}
			}
			else if (http.status != 0) 				// IE returns a status code of 0 on some occasions, so ignore this case
				 alert("Error while retrieving the URL: " + http.statusText); 
		}
		else
			document.getElementById("divFaqs").innerHTML = "";
	}

	function showHide(div_val)
	{
//alert(div_val);
		new Effect.toggle(div_val,'slide');
//		if(e.innerHTML == "more...")
//			e.innerHTML = "close...";
//		else
//			e.innerHTML = "more...";
	}