	function nuevoAjax()

	{

		/* Crea el objeto AJAX. Esta funcion es generica para cualquier utilidad de este tipo, por

		lo que se puede copiar tal como esta aqui */



	            var obj;



	            if(window.XMLHttpRequest){

	                obj = new XMLHttpRequest();

	            }else if(window.ActiveXObject){

	                obj = new ActiveXObject("Microsoft.XMLHTTP");

	            }



	            return obj;

	}



	function loadMore(product,current,val){



		var myDiv = document.getElementById('currentPic');

		// Creo el nuevo objeto AJAX

		var ajax=nuevoAjax();



		ajax.open("GET", "/ajax.getImage.php?img="+val+"&prod_id="+product+"&current="+current+"&ms="+new Date().getTime(), true);

		ajax.onreadystatechange=function()

		{

			/*if (ajax.readyState==1)

			{

				myDiv.innerHTML  = "";

			}*/

			if (ajax.readyState==4)

			{

				myDiv.innerHTML  = ajax.responseText;

			}

		}

		ajax.send(null);

	}



