function ChangePicture(objectPicId,imgSrc)
{
	$(objectPicId).src = imgSrc;
}
function ChangeProducts(prodName)
{
	//sets session variables
	var xhr = createXMLHttpRequest();
	var link;
	
	switch(prodName)
	{
    	case "stackable":
			link = "stackable.php";	 
    	break; 
    	case "slidingslat":
			link = "slidingslat.php";	 
    	break; 	
    	case "puzzle":
			link = "puzzletable.php";	 
    	break; 	 
	 
	}
	var params = "";
	xhr.open("POST",link, false);
	//Send the proper header information along with the request
	xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xhr.setRequestHeader("Content-length", params.length);
	xhr.setRequestHeader("Connection", "close");
	xhr.onreadystatechange = function() {
		if (xhr.readyState==4)//Request is finished 
		{
			if (xhr.status==200) 
			{      
			} else {
				alert("Message returned, but with error status.");
			}
		}
	}
	xhr.send(params);
	$('changeProducts').innerHTML = xhr.responseText;
}
