	function objetoAjax(){
		var xmlhttp=false;
		try{ xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");	} 
		catch(e){ try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); }
			catch(E){ xmlhttp = false; }
		}

		if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
			xmlhttp = new XMLHttpRequest();
		}
		return xmlhttp;
	}
	function ShowPic(idpic,idtable){
		TableResult = document.getElementById(idtable);

		ajax = objetoAjax();
		ajax.onreadystatechange=function() {
			if(ajax.readyState == 4){
				TableResult.innerHTML = ajax.responseText;
			}
		}
		ajax.open("GET", 'visor.php?id='+idpic);
		ajax.send(null);
	}
	
	function ShowPicReload(idpic,idtable, pagin){
		TableResult = document.getElementById(idtable);

		ajax = objetoAjax();
		ajax.onreadystatechange=function() {
			if(ajax.readyState == 4){
				TableResult.innerHTML = ajax.responseText;
			}
		}
		ajax.open("GET", 'visoreload.php?' + pagin + 'idp=' + idpic);
		ajax.send(null);
	}

