/*------------------------------------------------------------------
Definition: scroll left or right on the menu
------------------------------------------------------------------*/
function scrollMenu (start,parentID,baseURL,numCat,parentBaseURL,exclude)
{
	//get object
	var menu = document.getElementById('menu');
	
	//retrieve ajax object
	var xmlHttp = ajaxFunction();
	var params = 'start='+start+'&parentID='+parentID+'&baseURL='+baseURL+'&numCat='+numCat+'&parentBaseURL='+parentBaseURL+'&exclude='+exclude;
	
	//process ajax returned request
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
  		{
			menu.innerHTML = xmlHttp.responseText;
		}
	}
	
	//posted values to the product_category_process.php
	xmlHttp.open("POST","./ajax/prodMenu/prodMenu_process.php",true);
	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp.setRequestHeader("Content-length", params.length);
	xmlHttp.setRequestHeader("Connection", "close");
  	xmlHttp.send(params);
	
	return;
}





/*------------------------------------------------------------------
Definition: create an ajax object
------------------------------------------------------------------*/
function ajaxFunction()
{
	var xmlHttp;
	
	try
	{  
		// Firefox, Opera 8.0+, Safari  
		xmlHttp=new XMLHttpRequest();  
	}
	catch (e)
	{  
		// Internet Explorer  
		try
		{    
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");    
		}
		catch (e)
		{    
			try
			{      
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");      
			}
			catch (e)
			{      
				alert("Your browser does not support AJAX!");      
				return false;      
			}    
		}  
	}  
	
	return xmlHttp;
}