// JavaScript Document
function getFeaProduct( fpid ) {
	var q_string = "";
	var p = 0;	
	q_string = "index2.php?option=com_quicksearch&task=featuredProd&p=" + fpid;
	
	if ( !requestGET(q_string, hwnd_showFeaturedProd) ) {
		alert("Connection Error.");
	}
	return false;	
}


/**
 * This function is used to handle the Response form the Server
 * for the request for retriving the Product list.
 *
 */
function hwnd_showFeaturedProd() { 
	
	if ( objXmlHttp.readyState == 4 
		||
		objXmlHttp.readyState == "complete" ) 
	{
		if ( objXmlHttp.status == 200 ) {
			response = objXmlHttp.responseText;
			populateFeaturedProd(response);
			
		}
		else {
			// Invalid response from the server, do nothing.	
		}
	}
	else {
		
	}
		
}
/**
 * This function is used to generate the HTML displaying the 
 * Product list for selection.
 * 
 */
function populateFeaturedProd(data) {
	var details = data.split("####--####") ;
	document.getElementById('list_no').innerHTML = details[0];
	document.getElementById('featProdBG').innerHTML = details[1];
}

