// JavaScript Document
function makeArray(str)
{
	var array = str.split(" ");
	
	return array;
}
	
function shuffleProducts(category, width)
{		
	try
	{
		xmlhttp = new XMLHttpRequest();
	}
	catch(e)
	{// code for IE6, IE5
		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;
			  }
		}
	}
	
	xmlhttp.onreadystatechange = function()
	{
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
		{
			document.getElementById("products").innerHTML = xmlhttp.responseText;
		}
	}
	
	xmlhttp.open("GET","randomize.php?category=" + category + "&width=" + width + "",true);
	xmlhttp.send();
}
