function hideMenu(div)
{
	document.getElementById(div).innerHTML="";
}

//Function used to generate the first menu
function subMenu(div,cat,skw,style,sbj)
{
	var xmlHttp, urlOut;
	if(document.getElementById(div).innerHTML == "")
	{
		try
		{
			//Firefox / Opera / Safari
			xmlHttp = new XMLHttpRequest();
		}
		catch(e)
		{
			//Internet Explorer
			try
			{
				xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch(e)
			{
				try
				{
					//IE Try 2
					xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
				}
				catch(e)
				{
					alert("No AJAX SUPPORT");
					return false;
				}
			}
		}
	
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4)
			{
				//document.myForm.time.value=xmlHttp.responseText;
				document.getElementById(div).innerHTML=xmlHttp.responseText;
			}
			if(xmlHttp.readyState==1 || xmlHttp.readyState==2 || xmlHttp.readyState==3 )
			{
				//document.myForm.time.value=xmlHttp.responseText;
				document.getElementById(div).innerHTML="loading...";
			}
		}
		urlOut = "PHP/genSubMenu.php?CAT="+ cat + "&SKW=" + skw + "&style=" + style + "&SBJ=" + sbj;
		xmlHttp.open("GET",urlOut,true);
		xmlHttp.send(null);
	}
	else
	{
		
		document.getElementById(div).innerHTML="";
		document.getElementById(div).style.content = "";
	}

}